From 57b14734046ebca63645e843b5b7ea3569c3d6c8 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 4 Oct 2006 23:39:52 +0000 Subject: [PATCH] 2006-10-05 01:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbexprc.c * Temporary disabled optimization with references to object variables until we will not have extended reference items in our HVM. It can be enabled by compiling with HB_USE_OBJMSG_REF * harbour/include/hbclass.h * restored previous CLASSDATA behavior which ignores SHARED clause and always create shared class variables --- harbour/ChangeLog | 10 +++ harbour/include/hbclass.ch | 9 +-- harbour/include/hbexprc.c | 156 +++++++++++++++++++++++++++---------- 3 files changed, 129 insertions(+), 46 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7f08f53278..6d56406908 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ + hb_stack.pPos <= hb_stack.pBase + The old condition was generating usable error message only in the + startup function. In deeply called functions it was only waste of + CPU time on one of the most often call functions. Before it was + activated internal stack structures were corrupted. + If we were leaving for many years without really working stack + underflow protection then maybe we should think about disabling + it at when HB_STACK_MACROS are used and keep it only in real + stack functions for HVM developers. Single protection in + hb_stackOldFrame() I've just added is enough for basic C code validation. I created the second version of stack macros without it in hbstack.h but I would like to hear other developers opinion. diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 186d5bd053..d6b491947d 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -473,9 +473,11 @@ DECLARE HBClass ; _HB_MEMBER {[AS ] } ;; s_oClass:AddMultiData( <(type)>, , __HB_CLS_SCOPE( <.export.>, <.protect.>, <.hidde.> ) + iif( <.ro.>, HB_OO_CLSTP_READONLY, 0 ) + iif( <.persistent.>, HB_OO_CLSTP_PERSIST, 0 ), {<(DataNames)>}, __HB_CLS_NOINI ) + /* Warning! For backward compatibility this CLASSDATA ignores the + SHARED clause and always create shared class variables */ #xcommand CLASSDATA [ AS ] [ INIT ] [] [] [