|
From: Andre R. <and...@us...> - 2004-12-07 10:33:23
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27745/headers Modified Files: Tag: New_Tables_Experiment-branch frontierdefs.h lang.h langexternal.h tableinternal.h Log Message: Major change, conditionalized for fltablebackpointers pre-processor definition. External variables now strictly maintain a back pointer to their parent hashnode and parent hashtable. If either is zero, it's safe to assume that the external value is not directly part of the database hierarchy. This makes things like obtaining the full address of database objects, obtaining the direct parent of any object, or just building the popup menu of a window title much more efficient. Previously, we had to search the whole database hierarchy to accomplish these things. On the other hand, the new approach introduces some code that keeps the back pointers up-to-date at runtime. This has actually been attempted at least twice before but neither attempt was brought to completion. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4.2.9 retrieving revision 1.4.2.10 diff -C2 -d -r1.4.2.9 -r1.4.2.10 *** lang.h 4 Dec 2004 22:23:38 -0000 1.4.2.9 --- lang.h 7 Dec 2004 10:33:13 -0000 1.4.2.10 *************** *** 502,511 **** struct tyhashtable **prevhashtable; /*allow tables to be linked*/ ! #if !flruntime ! ! struct tyhashtable **parenthashtable; /*allow tables to be linked, but not lexically*/ ! ! #endif /* The following is added 12/29/99 by RAB so that we do not have to scan all the buckets of this tables parent to get the hashnode for this table and therefore it's value record and it's name. */ --- 502,513 ---- struct tyhashtable **prevhashtable; /*allow tables to be linked*/ ! #ifndef fltablebackpointers ! ! #if !flruntime + struct tyhashtable **parenthashtable; /*allow tables to be linked, but not lexically*/ + + #endif + /* The following is added 12/29/99 by RAB so that we do not have to scan all the buckets of this tables parent to get the hashnode for this table and therefore it's value record and it's name. */ *************** *** 513,516 **** --- 515,520 ---- hdlhashnode thistableshashnode; /*this tables hashnode referenced in it's parents hashbuckets 12/29/99 RAB*/ + #endif + #ifdef fltracklocaladdresses *************** *** 547,551 **** boolean flsubsdirty: 1; /*has this table got dirty subs -- set in tablepreflightsubsdirtyflag before saving*/ ! long hashtablerefcon; /*for use by application*/ long lexicalrefcon; --- 551,555 ---- boolean flsubsdirty: 1; /*has this table got dirty subs -- set in tablepreflightsubsdirtyflag before saving*/ ! long hashtablerefcon; /*2004-12-04 aradke: used for hdltablevariable*/ long lexicalrefcon; Index: langexternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langexternal.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** langexternal.h 20 Nov 2004 18:59:48 -0000 1.1.2.1 --- langexternal.h 7 Dec 2004 10:33:13 -0000 1.1.2.2 *************** *** 145,153 **** dbaddress oldaddress; /*last place this variable was stored in db*/ ! #if langexternalfind_optimization ! ! hdlhashtable hexternaltable; ! hdlhashnode hexternalnode; #endif --- 145,153 ---- dbaddress oldaddress; /*last place this variable was stored in db*/ ! #if fltablebackpointers ! hdlhashnode inhashnode; ! ! hdlhashtable inhashtable; #endif Index: tableinternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/tableinternal.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** tableinternal.h 4 Dec 2004 22:23:38 -0000 1.1.2.2 --- tableinternal.h 7 Dec 2004 10:33:13 -0000 1.1.2.3 *************** *** 81,85 **** ! #if langexternalfind_optimization typedef tyexternalvariable tytablevariable, *ptrtablevariable, **hdltablevariable; --- 81,85 ---- ! #if fltablebackpointers typedef tyexternalvariable tytablevariable, *ptrtablevariable, **hdltablevariable; Index: frontierdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontierdefs.h,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -C2 -d -r1.2.2.6 -r1.2.2.7 *** frontierdefs.h 2 Dec 2004 13:20:25 -0000 1.2.2.6 --- frontierdefs.h 7 Dec 2004 10:33:13 -0000 1.2.2.7 *************** *** 76,82 **** #undef lazythis_optimization #undef langexternalfind_optimization ! #define flrecyclehashnodes 1 /* 2004-11-11 aradke: enable to recycle hashnodes instead of disposing [EXPERIMENTAL] */ ! #define flrecyclehashbuckets 1 /* 2004-11-14 aradke: enable to recylce hash bucket arrays [EXPERIMENTAL] */ #define fltablesortorderisarray 1 /* 2004-11-14 aradke: keep table sort order as array instead of linked list [EXPERIMENTAL] */ #define PASCALSTRINGVERSION 1 --- 76,83 ---- #undef lazythis_optimization #undef langexternalfind_optimization ! #define flrecyclehashnodes 1 /* 2004-11-11 aradke: enable to recycle hashnodes instead of disposing [EXPERIMENTAL] */ ! #define flrecyclehashbuckets 1 /* 2004-11-14 aradke: enable to recylce hash bucket arrays [EXPERIMENTAL] */ #define fltablesortorderisarray 1 /* 2004-11-14 aradke: keep table sort order as array instead of linked list [EXPERIMENTAL] */ + #define fltablebackpointers 1 /* 2004-12-05 aradke: maintain back-pointers for external variables [EXPERIMENTAL] */ #define PASCALSTRINGVERSION 1 |