Commit Graph

28 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
8bef490815 2006-08-19 01:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
    * moved HB_STACK_STATE declaration from hbstack.h to hbapi.h
      it's covered by _HB_API_INTERNAL_ macro so it should not
      effect 3-rd party code
    * modified hb_struSymbol structure:
         LONG stackbase
      replaced by:
         PHB_STACK_STATE stackstate
      this modification allows to keepadditional information bound with
      function call stack accessible from different HVM modules.
      Now it's used by memvars code to keep/update PRIVATE variables
      stack pointers. I plan to store in HB_STACK_STATE structure
      information additional information for classes code like super
      casting or instance variables offsets in new OOP model I'm working on.
      It can be also used by debugger code to retrieve some informations
      about executed functions without active updating by main HVM loop.
    + added hb_memvarsClear() - cleanly clears all PRIVATE and PUBLIC
      variables
    + added hb_memvarUpdatePrivatesBase() - updates PRIVATE stack base
      offset so PRIVATE variables created in current function/procedure
      will not be removed when it returns
    - removed hb_memvarsRelease() and hb_memvarValueNew()

  * harbour/include/hbstack.h
    + added hb_stackClearMevarsBase() - helper function for hb_memvarsClear()
      clears PRIVATE stack offsets in executed functions
    * changed to static offset from int to long - in different places we
      were using int or long in HVM so I cleaned the HVM code to always
      operate on the same type

  * harbour/source/vm/estack.c
    * set/restore PRIVATE stack base offset in hb_stackNewFrame()/
      hb_stackOldFrame()
    * updated for new HB_IT_SYMBOL structure

  * harbour/source/vm/hvm.c
    ! removed setting/restoring PRIVATE stack base offset in hb_vmExecute()
      It make code like:
         eval(&("{||VAR:=1}"))
      Clipper compatible
    * updated for new HB_IT_SYMBOL structure
    * changed order of execution exit procedures for clean memvars removing
      and future destructors execution. I'll describe it better when I'll
      add destructors.

  * harbour/source/vm/memvars.c
    ! fixed CLEAR MEMORY - now this function should be safe in Harbour
      It's not exactly compatible with Clipper because I intentionally
      didn't replicated some Clipper bugs like possible memory corruption.
    + added hb_memvarsClear() - cleanly clears all PRIVATE and PUBLIC
      variables
    + added hb_memvarUpdatePrivatesBase() - updates PRIVATE stack base
      offset so PRIVATE variables created in current function/procedure
      will not be removed when it returns
    ! fixed releasing PUBLIC and PRIVATE variables which were passed by
      reference and are still active on HVM stack or in codeblocks as
      detached locals (see: hb_memvarDetachDynSym())
    * modified hb_memvarFindSymbol() to be more Clipper compatible
    % optimized hb_memvarRelease() to operate or PHB_DYNS instead of
      string comparison and not make linear dynamic symbol scan for
      PUBLIC or not existing symbols
    - removed hb_memvarReleasePublic()

  * harbour/include/hbvmpub.h
  * harbour/include/hbxvm.h
  * harbour/source/compiler/gencc.c
  * harbour/source/vm/classes.c
  * harbour/source/vm/debug.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/pcount.c
  * harbour/source/vm/proc.c
  * harbour/source/vm/pvalue.c
    * updated for the above modifications

  * harbour/source/rtl/memvarbl.prg
  * harbour/source/rtl/menuto.prg
    * use __mvEXIST( cMemvar ) instead of __mvSCOPE( cMemvar ) > HB_MV_ERROR
      __mvEXIST() is much faster function

  * harbour/source/rtl/type.c
    * execute hb_memvarUpdatePrivatesBase() after macro type checking.
      This should not be necessary but we are not Clipper compatible here
      and this is work around for difference in our TYPE() implementation.
      Clipper for:
         ? TYPE("VAR:=1")
      create PUBLIC variable VAR when [x]Harbour PRIVATE one.
      Should we try to make it Clipper compatible?

   The above should fix problems reported with memvars. We are not 100%
   Clipper compatible but unlike in Clipper we cannot break VM internals
   using some operation on references to memvars and detached locals
   and/or RELEASE.../ CLEAR MEMORY. This modifications should be intensively
   tested. If you will find any problems with current code please inform me.
   I'd like to hear your opinions about memvars created by TYPE() (see above).
   Should we change it? It may not be very easy operation - we will have to
   change macro compiler and add new PCODE for that.
2006-08-18 23:12:38 +00:00
Luiz Rafael Culik
395250383c See changelog 2002-12-07 21:45 UTC-0300 2002-12-08 00:06:26 +00:00
Luiz Rafael Culik
91c65a8b49 See changelog 2002-11-25 21:45 UTC-0300 2002-11-26 00:01:22 +00:00
Luiz Rafael Culik
01099577fc See changelog 2002-11-20 21:45 UTC-0300 2002-11-20 23:40:02 +00:00
Walter Negro
a95951e58a * source/rtl/menuto.prg
! Fix, initial value was not used.
      Reported by Horacio Roldan.
2002-05-13 16:21:14 +00:00
Walter Negro
44925cd65a * source/rtl/menuto.prg
! Fix recursive executions and exit without pressing key.
       Now use local pointer and save static pointer.
     ! Fix call to HitTest
2002-04-02 04:41:53 +00:00
Luiz Rafael Culik
040d3f3286 See changelog 2002-03-18 12:56 UTC-0300 2002-03-18 16:00:33 +00:00
Viktor Szakats
c2e365bf9a 2001-05-15 13:46 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu> 2001-05-15 11:46:55 +00:00
Viktor Szakats
57ad5bef90 20000229-22:00 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-02-29 21:12:27 +00:00
Viktor Szakats
7928a16138 20000214-07:50 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-02-14 06:54:30 +00:00
Luiz Rafael Culik
1fe0533c26 *** empty log message *** 2000-01-07 07:55:01 +00:00
Luiz Rafael Culik
e0a82cccea *** empty log message *** 2000-01-02 19:14:07 +00:00
Luiz Rafael Culik
6a9da269a1 *** empty log message *** 2000-01-01 08:51:55 +00:00
Viktor Szakats
1d72d0aa85 19991220-18:42 GMT+1 1999-12-20 17:47:52 +00:00
Viktor Szakats
521ffcf660 19991025-12:37 GMT+1 Victor Szel <info@szelvesz.hu> 1999-10-25 11:25:54 +00:00
Viktor Szakats
964da8b34b 19991021-23:33 GMT+1 1999-10-21 21:47:49 +00:00
Viktor Szakats
ac8580b4d0 19991006-00:32 GMT+1 1999-10-05 22:52:01 +00:00
Viktor Szakats
eb8beff0d0 19991004-18:42 GMT+1 1999-10-04 16:58:44 +00:00
Viktor Szakats
66a1f16b24 19990930-21:00 GMT+1 1999-09-30 19:16:16 +00:00
Viktor Szakats
5f04be73ee 19990916-21:00 GMT+1 1999-09-16 19:11:46 +00:00
Viktor Szakats
bba4046bb1 19990916-11:15 GMT+1 1999-09-16 09:34:13 +00:00
Viktor Szakats
34ab832aa3 19990916-03:57 GMT+1 1999-09-16 02:10:07 +00:00
Viktor Szakats
f655b02a7a 19990822-07:40 GMT+1 1999-08-22 06:29:28 +00:00
Viktor Szakats
35b7c865f0 19990809-06:23 GMT+1 1999-08-09 05:21:31 +00:00
Viktor Szakats
710dcabb74 *** empty log message *** 1999-08-07 21:55:42 +00:00
Andi Jahja
9e9a56f0d9 error checker added 1999-08-06 10:53:55 +00:00
Viktor Szakats
2f1ea75a14 19990806-05:31 GMT+1 1999-08-06 03:51:33 +00:00
Viktor Szakats
b1695b2ddc *** empty log message *** 1999-08-05 15:36:05 +00:00