You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(447) |
Nov
(163) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(172) |
Feb
|
Mar
(123) |
Apr
(64) |
May
(1) |
Jun
(278) |
Jul
(89) |
Aug
(97) |
Sep
(62) |
Oct
(53) |
Nov
(119) |
Dec
(60) |
| 2006 |
Jan
(76) |
Feb
(1094) |
Mar
(363) |
Apr
(163) |
May
(57) |
Jun
(43) |
Jul
(39) |
Aug
(15) |
Sep
(33) |
Oct
(62) |
Nov
(8) |
Dec
|
| 2007 |
Jan
(9) |
Feb
(34) |
Mar
(2) |
Apr
(14) |
May
(8) |
Jun
(40) |
Jul
(21) |
Aug
(1) |
Sep
(20) |
Oct
(15) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: David B. <dav...@us...> - 2004-11-22 04:33:18
|
Update of /cvsroot/frontierkernel/Frontier/Common/resources/Mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4238 Modified Files: Tag: sidewinder-branch kernvelverbs.r Log Message: put it in the right place Index: kernvelverbs.r =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/resources/Mac/kernvelverbs.r,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** kernvelverbs.r 26 Oct 2004 10:13:00 -0000 1.2 --- kernvelverbs.r 22 Nov 2004 04:33:08 -0000 1.2.4.1 *************** *** 1098,1099 **** --- 1098,1110 ---- }; + resource 'EFP#' (idpythonverbs, "python") { /* 2004-11-3 ddb: python verbs */ + { + "python", false, { + "startinterpreter", + "stopinterpreter", + "runstring" + } + } + }; + + |
|
From: David B. <dav...@us...> - 2004-11-22 04:31:50
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3930 Modified Files: Tag: sidewinder-branch kernelverbdefs.h Log Message: put it in the right place Index: kernelverbdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/kernelverbdefs.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** kernelverbdefs.h 9 Oct 2004 20:56:38 -0000 1.1 --- kernelverbdefs.h 22 Nov 2004 04:31:40 -0000 1.1.4.1 *************** *** 48,50 **** --- 48,51 ---- #define idquicktimeverbs 1022 /*7.0b4 PBS: QuickTime Player window verbs*/ #define idregexpverbs 1023 /*2003-04-22 AR: regular expression verbs*/ + #define idpythonverbs 1024 /* 2004-11-3 ddb: added python verbs */ |
|
From: David B. <dav...@us...> - 2004-11-22 04:30:02
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3451 Modified Files: Tag: sidewinder-branch shell.c Log Message: put it in the right place Index: shell.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shell.c,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** shell.c 1 Nov 2004 11:50:16 -0000 1.4 --- shell.c 22 Nov 2004 04:29:52 -0000 1.4.4.1 *************** *** 78,81 **** --- 78,83 ---- #include "WinSockNetEvents.h" + #include "langpython.h" + #ifdef flcomponent #include <uisharing.h> *************** *** 1321,1324 **** --- 1323,1328 ---- #endif + + pythoninitverbs(); if (keyboardescape ()) /*check again before landinit; after this, must do shellquit*/ |
|
From: David B. <dav...@us...> - 2004-11-22 04:28:32
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3180 Modified Files: Tag: sidewinder-branch langpython.c Log Message: put it in the right place Index: langpython.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langpython.c,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** langpython.c 23 Oct 2004 22:29:38 -0000 1.2 --- langpython.c 22 Nov 2004 04:28:20 -0000 1.2.4.1 *************** *** 27,37 **** #include "standard.h" ! #define xxxFRONTIER_PYTHON 1 ! ! #ifdef FRONTIER_PYTHON ! ! #include "C:\\Python16\\include\\Python.h" ! ! #endif [...1241 lines suppressed...] ! ! case stopinterpreterfunc: ! return stopInterpreter(); ! ! case runstringfunc: ! return runstringverb(hp1, v); ! ! default: ! getstringlist (langerrorlist, unimplementedverberror, bserror); ! return (false); ! } /*switch*/ ! } /*htmlfunctionvalue*/ ! ! ! boolean pythoninitverbs (void) { ! return (loadfunctionprocessor (idpythonverbs, &pythonfunctionvalue)); ! } #endif |
|
From: David B. <dav...@us...> - 2004-11-22 03:53:22
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28115/Common/source Modified Files: langpython.c langverbs.c shell.c Log Message: Initial checkin of Sidewinder code. Moved contents of sidewinder.[ch] into langpython.[ch], removing previous Python implementation. Added Python.framework to the XCode project. Added resource definitions for the python kernel verbs, currently Mac only and not #ifdef'd. Need to add Windows resource definitions. Index: shell.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shell.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shell.c 1 Nov 2004 11:50:16 -0000 1.4 --- shell.c 22 Nov 2004 03:52:56 -0000 1.5 *************** *** 78,81 **** --- 78,83 ---- #include "WinSockNetEvents.h" + #include "langpython.h" + #ifdef flcomponent #include <uisharing.h> *************** *** 1321,1324 **** --- 1323,1328 ---- #endif + + pythoninitverbs(); if (keyboardescape ()) /*check again before landinit; after this, must do shellquit*/ Index: langverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langverbs.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** langverbs.c 9 Nov 2004 20:33:06 -0000 1.5 --- langverbs.c 22 Nov 2004 03:52:56 -0000 1.6 *************** *** 3717,3722 **** } ! case pythondoscriptfunc: ! return (langrunpythonscript (hparam1, v)); --- 3717,3722 ---- } ! //case pythondoscriptfunc: ! // return (langrunpythonscript (hparam1, v)); Index: langpython.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langpython.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** langpython.c 23 Oct 2004 22:29:38 -0000 1.2 --- langpython.c 22 Nov 2004 03:52:56 -0000 1.3 *************** *** 27,37 **** #include "standard.h" ! #define xxxFRONTIER_PYTHON 1 ! ! #ifdef FRONTIER_PYTHON ! ! #include "C:\\Python16\\include\\Python.h" ! ! #endif [...1241 lines suppressed...] ! ! case stopinterpreterfunc: ! return stopInterpreter(); ! ! case runstringfunc: ! return runstringverb(hp1, v); ! ! default: ! getstringlist (langerrorlist, unimplementedverberror, bserror); ! return (false); ! } /*switch*/ ! } /*htmlfunctionvalue*/ ! ! ! boolean pythoninitverbs (void) { ! return (loadfunctionprocessor (idpythonverbs, &pythonfunctionvalue)); ! } #endif |
|
From: David B. <dav...@us...> - 2004-11-22 03:53:22
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28115/build_XCode/Frontier.xcode Modified Files: project.pbxproj Log Message: Initial checkin of Sidewinder code. Moved contents of sidewinder.[ch] into langpython.[ch], removing previous Python implementation. Added Python.framework to the XCode project. Added resource definitions for the python kernel verbs, currently Mac only and not #ifdef'd. Need to add Windows resource definitions. Index: project.pbxproj =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode/project.pbxproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** project.pbxproj 11 Nov 2004 09:29:37 -0000 1.15 --- project.pbxproj 22 Nov 2004 03:52:56 -0000 1.16 *************** *** 569,572 **** --- 569,573 ---- 6515294B072C000500411831, 6515294D072C000900411831, + 6730555D0751953E006F9CD7, ); isa = PBXFrameworksBuildPhase; *************** *** 5291,5294 **** --- 5292,5296 ---- 651527B7072BFE0E00411831 = { children = ( + 6730555C0751953E006F9CD7, 651527B8072BFE0E00411831, 6515294A072C000500411831, *************** *** 8614,8617 **** --- 8616,8643 ---- //653 //654 + //670 + //671 + //672 + //673 + //674 + 6730555C0751953E006F9CD7 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Python.framework; + path = /System/Library/Frameworks/Python.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + 6730555D0751953E006F9CD7 = { + fileRef = 6730555C0751953E006F9CD7; + isa = PBXBuildFile; + settings = { + }; + }; + //670 + //671 + //672 + //673 + //674 //BB0 //BB1 *************** *** 8632,8636 **** fileEncoding = 30; isa = PBXFileReference; ! lastKnownFileType = text.plist.xml; path = Info.plist; refType = 2; --- 8658,8662 ---- fileEncoding = 30; isa = PBXFileReference; ! lastKnownFileType = text.xml; path = Info.plist; refType = 2; |
|
From: David B. <dav...@us...> - 2004-11-22 03:53:22
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28115/Common/headers Modified Files: kernelverbdefs.h langpython.h Log Message: Initial checkin of Sidewinder code. Moved contents of sidewinder.[ch] into langpython.[ch], removing previous Python implementation. Added Python.framework to the XCode project. Added resource definitions for the python kernel verbs, currently Mac only and not #ifdef'd. Need to add Windows resource definitions. Index: langpython.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langpython.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** langpython.h 9 Oct 2004 20:58:04 -0000 1.1 --- langpython.h 22 Nov 2004 03:52:55 -0000 1.2 *************** *** 28,32 **** ! extern boolean langrunpythonscript (hdltreenode hp1, tyvaluerecord *v); --- 28,33 ---- ! boolean runstringverb(hdltreenode hp1, tyvaluerecord *v); ! boolean pythoninitverbs(void); Index: kernelverbdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/kernelverbdefs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kernelverbdefs.h 9 Oct 2004 20:56:38 -0000 1.1 --- kernelverbdefs.h 22 Nov 2004 03:52:55 -0000 1.2 *************** *** 48,50 **** --- 48,51 ---- #define idquicktimeverbs 1022 /*7.0b4 PBS: QuickTime Player window verbs*/ #define idregexpverbs 1023 /*2003-04-22 AR: regular expression verbs*/ + #define idpythonverbs 1024 /* 2004-11-3 ddb: added python verbs */ |
|
From: David B. <dav...@us...> - 2004-11-22 03:53:21
|
Update of /cvsroot/frontierkernel/Frontier/Common/resources/Mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28115/Common/resources/Mac Modified Files: kernvelverbs.r Log Message: Initial checkin of Sidewinder code. Moved contents of sidewinder.[ch] into langpython.[ch], removing previous Python implementation. Added Python.framework to the XCode project. Added resource definitions for the python kernel verbs, currently Mac only and not #ifdef'd. Need to add Windows resource definitions. Index: kernvelverbs.r =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/resources/Mac/kernvelverbs.r,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kernvelverbs.r 26 Oct 2004 10:13:00 -0000 1.2 --- kernvelverbs.r 22 Nov 2004 03:52:55 -0000 1.3 *************** *** 1098,1099 **** --- 1098,1110 ---- }; + resource 'EFP#' (idpythonverbs, "python") { /* 2004-11-3 ddb: python verbs */ + { + "python", false, { + "startinterpreter", + "stopinterpreter", + "runstring" + } + } + }; + + |
|
From: Andre R. <and...@us...> - 2004-11-21 21:10:59
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31614/Common/source Modified Files: Tag: New_Tables_Experiment-branch claycallbacks.c lang.c langevaluate.c langhash.c langhtml.c langstartup.c langvalue.c langxml.c opxml.c osacomponent.c tablepack.c tablestructure.c Log Message: newhashtable now takes an additional flag indicating whether the new table should maintain a sorted list of nodes. the symbol tables used for managing local variables during execution of UserTalk code don't need a sort order unless the process is being debugged and the stack of symbol tables can be inspected through the GUI. Index: lang.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/lang.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** lang.c 4 Nov 2004 21:56:39 -0000 1.4 --- lang.c 21 Nov 2004 20:15:26 -0000 1.4.2.1 *************** *** 527,533 **** boolean langdefaultpushtable (hdlhashtable *htable) { register hdlhashtable ht; ! if (!newhashtable (htable)) return (false); --- 527,543 ---- boolean langdefaultpushtable (hdlhashtable *htable) { + /* + 2004-11-21 aradke: symbol tables for local variables don't need to maintain + a sort order, so ask newhashtable to create a pure hash table without + an associated sorted list. this speeds up insertion of local variables + into the symbol table. + + note that this is only true when the current process is not being + debugged, but in that case scriptpushtable does our job instead. + */ + register hdlhashtable ht; ! if (!newhashtable (htable, false)) return (false); Index: langstartup.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langstartup.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** langstartup.c 31 Oct 2004 18:48:51 -0000 1.3 --- langstartup.c 21 Nov 2004 20:15:26 -0000 1.3.2.1 *************** *** 325,329 **** hdlhashtable htable; ! if (!newhashtable (&htable)) /*this is where everything starts*/ return (false); --- 325,329 ---- hdlhashtable htable; ! if (!newhashtable (&htable, true)) /*this is where everything starts*/ //2004-11-21 aradke: need sorted table return (false); Index: claycallbacks.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/claycallbacks.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** claycallbacks.c 31 Oct 2004 17:59:48 -0000 1.3 --- claycallbacks.c 21 Nov 2004 20:15:26 -0000 1.3.2.1 *************** *** 474,478 **** if (hclaybaskettable == nil) { // first time called ! if (!newhashtable (&hclaybaskettable)) return (false); } --- 474,478 ---- if (hclaybaskettable == nil) { // first time called ! if (!newhashtable (&hclaybaskettable, true)) return (false); } Index: langxml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langxml.c,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** langxml.c 17 Nov 2004 06:52:35 -0000 1.3.2.2 --- langxml.c 21 Nov 2004 20:15:26 -0000 1.3.2.3 *************** *** 1978,1982 **** goto exit; ! if (!newhashtable (&namespaces)) goto exit; --- 1978,1982 ---- goto exit; ! if (!newhashtable (&namespaces, true)) //2004-11-21 aradke: need sorted table goto exit; Index: tablestructure.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablestructure.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** tablestructure.c 31 Oct 2004 20:41:10 -0000 1.3 --- tablestructure.c 21 Nov 2004 20:15:27 -0000 1.3.2.1 *************** *** 296,300 **** hv = *hvariable; /*copy into register*/ ! if (!newhashtable (htable)) { disposehandle ((Handle) hv); --- 296,300 ---- hv = *hvariable; /*copy into register*/ ! if (!newhashtable (htable, true)) { //2004-11-21 aradke: need sorted table disposehandle ((Handle) hv); Index: tablepack.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablepack.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** tablepack.c 31 Oct 2004 20:41:10 -0000 1.3 --- tablepack.c 21 Nov 2004 20:15:27 -0000 1.3.2.1 *************** *** 113,117 **** return (false); ! if (!newhashtable (htable)) { disposehandle (hpackedtable); --- 113,117 ---- return (false); ! if (!newhashtable (htable, true)) { //2004-11-21 aradke: need sorted table disposehandle (hpackedtable); Index: langvalue.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langvalue.c,v retrieving revision 1.5.2.4 retrieving revision 1.5.2.5 diff -C2 -d -r1.5.2.4 -r1.5.2.5 *** langvalue.c 16 Nov 2004 23:37:01 -0000 1.5.2.4 --- langvalue.c 21 Nov 2004 20:15:26 -0000 1.5.2.5 *************** *** 8042,8045 **** --- 8042,8048 ---- 4.1b3 dmb: added call to new langseterrorcallbackline for stack tracing (on error) + + 2004-11-21 aradke: request an unsorted table for our locals if the current process + is not being debugged */ *************** *** 8095,8099 **** } ! if (!newhashtable (&hlocaltable)) /*new table for the function when it runs*/ return (false); --- 8098,8102 ---- } ! if (!newhashtable (&hlocaltable, debuggingcurrentprocess ())) /*new table for the function when it runs*/ return (false); Index: opxml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/opxml.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** opxml.c 15 Nov 2004 20:52:24 -0000 1.3.2.1 --- opxml.c 21 Nov 2004 20:15:26 -0000 1.3.2.2 *************** *** 220,225 **** 7.0b21 PBS -- convert XML text to an outline. - - 7.0b33 PBS: changes to conform to changing spec. Both <head> and <body> are required. <head> may be empty. --- 220,223 ---- *************** *** 241,245 **** /*New local table*/ ! if (!newhashtable (&ht)) goto exit1; --- 239,243 ---- /*New local table*/ ! if (!newhashtable (&ht, true)) //2004-11-21 aradke: need sorted table goto exit1; Index: osacomponent.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/osacomponent.c,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** osacomponent.c 20 Nov 2004 19:14:37 -0000 1.6.2.1 --- osacomponent.c 21 Nov 2004 20:15:26 -0000 1.6.2.2 *************** *** 1043,1047 **** #endif ! fl = newhashtable (&storagetable); #if TARGET_API_MAC_CARBON == 1 --- 1043,1047 ---- #endif ! fl = newhashtable (&storagetable, true); //2004-11-21 aradke: need sorted table? #if TARGET_API_MAC_CARBON == 1 *************** *** 2128,2132 **** tyvaluerecord val; ! if (!newhashtable (hcontext)) return (false); --- 2128,2132 ---- tyvaluerecord val; ! if (!newhashtable (hcontext, true)) //2004-11-21 aradke: need sorted table? return (false); Index: langhtml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhtml.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** langhtml.c 15 Nov 2004 20:52:24 -0000 1.3.2.1 --- langhtml.c 21 Nov 2004 20:15:26 -0000 1.3.2.2 *************** *** 1074,1078 **** return (false); ! if (!newhashtable (&hcontext)) /*new table for the function when it runs*/ return (false); --- 1074,1078 ---- return (false); ! if (!newhashtable (&hcontext, debuggingcurrentprocess ())) /*new table for the function when it runs*/ //2004-11-21 aradke: need sorted table? return (false); *************** *** 6081,6085 **** return (false); ! if (!newhashtable (&ht)) return (false); --- 6081,6085 ---- return (false); ! if (!newhashtable (&ht, true)) //2004-11-21 aradke: need sorted table return (false); *************** *** 6280,6284 **** goto done; ! if (!newhashtable (&ht)) goto done; --- 6280,6284 ---- goto done; ! if (!newhashtable (&ht, true)) //2004-11-21 aradke: need sorted table goto done; Index: langevaluate.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langevaluate.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** langevaluate.c 30 Oct 2004 23:11:36 -0000 1.3 --- langevaluate.c 21 Nov 2004 20:15:26 -0000 1.3.2.1 *************** *** 865,868 **** --- 865,871 ---- 8/31/92 dmb: added supports for multiple with items, object specifiers + + 2004-11-21 aradke: request an unsorted table for our locals if the current process + is not being debugged */ *************** *** 878,882 **** hdlhashnode hnode; ! if (!newhashtable (&hlocaltable)) /*new table for the function when it runs*/ return (false); --- 881,885 ---- hdlhashnode hnode; ! if (!newhashtable (&hlocaltable, debuggingcurrentprocess ())) /*new table for the function when it runs*/ return (false); Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.15 retrieving revision 1.4.2.16 diff -C2 -d -r1.4.2.15 -r1.4.2.16 *** langhash.c 21 Nov 2004 15:04:35 -0000 1.4.2.15 --- langhash.c 21 Nov 2004 20:15:26 -0000 1.4.2.16 *************** *** 502,506 **** ! boolean newhashtable (hdlhashtable *htable) { /* --- 502,506 ---- ! boolean newhashtable (hdlhashtable *htable, boolean flsorted) { /* *************** *** 515,518 **** --- 515,523 ---- 5.0d15 dmb: preserve new cttmpstack field. We're assuming that the reused table pool is mostly for local tables that actually need temp stacks. + + 2004-11-21 aradke: if flsorted is false, don't allocate a sort list and + set the sortedlist handle to nil. symbol tables for local variables + don't need to maintain a sort order unless the process is being + debugged and therefore the symbol table is accessible via the GUI. */ *************** *** 528,531 **** --- 533,541 ---- if (hmagictable != nil) { + #ifdef fltablesortorderisarray + assert (!flsorted || debuggingcurrentprocess ()); + assert ((**hmagictable).sortedlist == nil || debuggingcurrentprocess ()); + #endif + *htable = hmagictable; *************** *** 561,573 **** #ifdef fltablesortorderisarray ! if (!newlist (&hsort)) { ! ! (**ht).prevhashtable = hfirstfreetable; ! hfirstfreetable = ht; ! return (false); } ! (**ht).sortedlist = hsort; #endif --- 571,592 ---- #ifdef fltablesortorderisarray ! if (flsorted) { ! ! if (!newlist (&hsort)) { ! ! (**ht).prevhashtable = hfirstfreetable; ! hfirstfreetable = ht; ! return (false); ! } } ! else { ! ! assert (!debuggingcurrentprocess ()); ! ! hsort = nil; ! } ! (**ht).sortedlist = hsort; #endif *************** *** 1141,1145 **** #ifdef fltablesortorderisarray ! listclear ((**ht).sortedlist); #else --- 1160,1165 ---- #ifdef fltablesortorderisarray ! if ((**ht).sortedlist) ! listclear ((**ht).sortedlist); #else *************** *** 1430,1433 **** --- 1450,1456 ---- #ifdef fltablesortorderisarray + if ((**currenthashtable).sortedlist == nil) + return (true); + if (langcallbacks.comparenodescallback == (langcomparenodescallback) &falsenoop) return (listappend ((**currenthashtable).sortedlist, (Handle) hnode)); *************** *** 1495,1498 **** --- 1518,1524 ---- #ifdef fltablesortorderisarray + + if ((**currenthashtable).sortedlist == nil) + return; assert (langcallbacks.comparenodescallback != (langcomparenodescallback) &falsenoop); *************** *** 2595,2599 **** register hdlhashtable ht = htable; ! assert ((**ht).ctnodes == listcount ((**ht).sortedlist)); --- 2621,2627 ---- register hdlhashtable ht = htable; ! ! assert ((**ht).sortedlist != nil); ! assert ((**ht).ctnodes == listcount ((**ht).sortedlist)); *************** *** 2706,2709 **** --- 2734,2739 ---- #ifdef fltablesortorderisarray + assert ((**ht).sortedlist != nil); + listresort ((**ht).sortedlist, ix, &hashcompare); *************** *** 2785,2788 **** --- 2815,2820 ---- bigstring bsname; + assert ((**htable).sortedlist != nil); + for (k = 0, kmax = listcount ((**htable).sortedlist); k < kmax; k++) { *************** *** 4125,4128 **** --- 4157,4162 ---- register unsigned long k, kmax; + assert ((**htable).sortedlist != nil); + for (k = 0, kmax = listcount ((**htable).sortedlist); k < kmax; k++) { *************** *** 4177,4180 **** --- 4211,4216 ---- #ifdef fltablesortorderisarray + assert ((**htable).sortedlist != nil); + if (!listvalidindex ((**htable).sortedlist, n)) return (false); *************** *** 4228,4231 **** --- 4264,4269 ---- boolean flfound; + assert ((**htable).sortedlist != nil); + pushhashtable (htable); /*for hashcompare*/ |
|
From: Andre R. <and...@us...> - 2004-11-21 20:16:50
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31614/Common/headers Modified Files: Tag: New_Tables_Experiment-branch lang.h Log Message: newhashtable now takes an additional flag indicating whether the new table should maintain a sorted list of nodes. the symbol tables used for managing local variables during execution of UserTalk code don't need a sort order unless the process is being debugged and the stack of symbol tables can be inspected through the GUI. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.6 diff -C2 -d -r1.4.2.5 -r1.4.2.6 *** lang.h 21 Nov 2004 15:04:34 -0000 1.4.2.5 --- lang.h 21 Nov 2004 20:15:25 -0000 1.4.2.6 *************** *** 941,945 **** #endif ! extern boolean newhashtable (hdlhashtable *); /*langhash.c*/ extern void dirtyhashtable (hdlhashtable); --- 941,945 ---- #endif ! extern boolean newhashtable (hdlhashtable *, boolean); /*langhash.c*/ extern void dirtyhashtable (hdlhashtable); |
|
From: Andre R. <and...@us...> - 2004-11-21 15:05:22
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2276/Common/source Modified Files: Tag: New_Tables_Experiment-branch langhash.c langops.c Log Message: Added hashmodify and hashtablemodify for assigning over an existing node in the table. If the caller already performed a lookup in the table and obtained the handle to the hash node, he can use these functions instead of hashassign and hashtableassign to eliminate another lookup in the table. Currently, we can only use this from langsetsymbolval, but since this is called a lot during UserTalk execution, is a worthy optimization. Index: langops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langops.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** langops.c 31 Oct 2004 18:48:51 -0000 1.3 --- langops.c 21 Nov 2004 15:04:35 -0000 1.3.2.1 *************** *** 532,535 **** --- 532,538 ---- 5.0a18 dmb: require declarations! (if user's pref is set) + + 2004-11-21 aradke: if langfindsymbol located the node, use hashtablemodify + to prevent yet another lookup in the hash table */ *************** *** 539,546 **** if (false && langgetuserflag (idrequiredeclarationsscript, false)) { ! if (langfindsymbol (bs, &htable, &hnode) || (htable != nil)) { /*name is defined, or with statement set table*/ ! return (hashtableassign (htable, bs, val)); - } langparamerror (unknownidentifiererror, bs); --- 542,550 ---- if (false && langgetuserflag (idrequiredeclarationsscript, false)) { ! if (langfindsymbol (bs, &htable, &hnode)) /*name exists, htable and hnode are set*/ ! return (hashtablemodify (htable, bs, hnode, val)); ! ! if (htable != nil) /*assign to innermost local table*/ return (hashtableassign (htable, bs, val)); langparamerror (unknownidentifiererror, bs); *************** *** 550,559 **** else { ! if (langfindsymbol (bs, &htable, &hnode) || (htable != nil)) { /*name is defined, or with statement set table*/ ! return (hashtableassign (htable, bs, val)); - } ! return (hashassign (bs, val)); } } /*langsetsymbolval*/ --- 554,564 ---- else { ! if (langfindsymbol (bs, &htable, &hnode)) /*name exists, htable and hnode are set*/ ! return (hashtablemodify (htable, bs, hnode, val)); ! ! if (htable != nil) /*assign to innermost local table*/ return (hashtableassign (htable, bs, val)); ! return (hashassign (bs, val)); /*assign to currenthashtable*/ } } /*langsetsymbolval*/ Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.14 retrieving revision 1.4.2.15 diff -C2 -d -r1.4.2.14 -r1.4.2.15 *** langhash.c 20 Nov 2004 23:03:19 -0000 1.4.2.14 --- langhash.c 21 Nov 2004 15:04:35 -0000 1.4.2.15 *************** *** 2147,2150 **** --- 2147,2247 ---- + static boolean hashmodifynode (const bigstring bs, hdlhashnode hnode, tyvaluerecord val) { + + /* + 2004-11-21 aradke: code shared between the new hashmodify and hashassign (from where + it was stolen) + */ + + tyvaluerecord existingval; + boolean fllocal = (**currenthashtable).fllocaltable; + + existingval = (**hnode).val; + + if (fllanghashassignprotect) { /*protect externals from being smashed by assignment*/ + + if ((existingval.valuetype == externalvaluetype) && (val.valuetype != externalvaluetype)) { + bigstring bstype; + + langexternaltypestring ((hdlexternalhandle) existingval.data.externalvalue, bstype); + + lang2paramerror (badexternalassignmenterror, bstype, bs); + + return (false); + } + } + + /*carefully nuke existing value*/ { + + boolean flneeddatabase = (!fllocal && existingval.fldiskval); + hdldatabaserecord hdb; + + if (flneeddatabase) { + + hdb = tablegetdatabase (currenthashtable); + + if (hdb) + dbpushdatabase (hdb); + } + + disposevaluerecord (existingval, !fllocal); + + if (flneeddatabase && hdb) + dbpopdatabase (); + } + + (**hnode).val = val; + + langsymbolchanged (currenthashtable, bs, hnode, true); /*value changed*/ + + return (true); + } /*hashmodifynode*/ + + + boolean hashmodify (const bigstring bs, hdlhashnode hnode, tyvaluerecord val) { + + /* + 2004-11-21 aradke: call us instead of hashassign if you know the node with the + given name exists and you have its handle. this avoids another lookup in + the hash table. + */ + + if (val.fltmpdata) { /*val doesn't own it's data*/ + + if (val.fltmpstack) + val.fltmpdata = false; + else + if (!copyvaluedata (&val)) + return (false); + } + + val.fltmpstack = false; // 5.0.1: caller is responsible for actually removing it + + hashsetlocality (&val, (**currenthashtable).fllocaltable); + + return (hashmodifynode (bs, hnode, val)); + } /*hashmodify*/ + + + boolean hashtablemodify (hdlhashtable htable, const bigstring bs, hdlhashnode hnode, tyvaluerecord val) { + + /* + 2004-11-21 aradke: call us instead of hashtableassign if you know the node with the + given name exists and you have its handle. this avoids another lookup in + the hash table. + */ + + boolean fl; + + pushhashtable (htable); + + fl = hashmodify (bs, hnode, val); + + pophashtable (); + + return (fl); + } /*hashtablemodify*/ + + boolean hashassign (const bigstring bs, tyvaluerecord val) { *************** *** 2168,2175 **** 5.0.2b13 dmb: set fltmpdata false & call hashsetlocality before hashinsert case */ hdlhashnode hnode, hprev; - tyvaluerecord existingval; boolean fllocal = (**currenthashtable).fllocaltable; --- 2265,2274 ---- 5.0.2b13 dmb: set fltmpdata false & call hashsetlocality before hashinsert case + + 2004-11-21 aradke: move code for assigning over an existing value + to hashmodifynode, shared with hashmodify. */ hdlhashnode hnode, hprev; boolean fllocal = (**currenthashtable).fllocaltable; *************** *** 2199,2241 **** } ! existingval = (**hnode).val; ! ! if (fllanghashassignprotect) { /*protect externals from being smashed by assignment*/ ! ! if ((existingval.valuetype == externalvaluetype) && (val.valuetype != externalvaluetype)) { ! bigstring bstype; ! ! langexternaltypestring ((hdlexternalhandle) existingval.data.externalvalue, bstype); ! ! lang2paramerror (badexternalassignmenterror, bstype, bs); ! ! return (false); ! } ! } ! ! /*carefully nuke existing value*/ { ! ! boolean flneeddatabase = (!fllocal && existingval.fldiskval); ! hdldatabaserecord hdb; ! ! if (flneeddatabase) { ! ! hdb = tablegetdatabase (currenthashtable); ! ! if (hdb) ! dbpushdatabase (hdb); ! } ! ! disposevaluerecord (existingval, !fllocal); ! ! if (flneeddatabase && hdb) ! dbpopdatabase (); ! } ! ! (**hnode).val = val; ! ! langsymbolchanged (currenthashtable, bs, hnode, true); /*value changed*/ ! ! return (true); } /*hashassign*/ --- 2298,2302 ---- } ! return (hashmodifynode (bs, hnode, val)); } /*hashassign*/ |
|
From: Andre R. <and...@us...> - 2004-11-21 15:05:21
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2276/Common/headers Modified Files: Tag: New_Tables_Experiment-branch lang.h Log Message: Added hashmodify and hashtablemodify for assigning over an existing node in the table. If the caller already performed a lookup in the table and obtained the handle to the hash node, he can use these functions instead of hashassign and hashtableassign to eliminate another lookup in the table. Currently, we can only use this from langsetsymbolval, but since this is called a lot during UserTalk execution, is a worthy optimization. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4.2.4 retrieving revision 1.4.2.5 diff -C2 -d -r1.4.2.4 -r1.4.2.5 *** lang.h 20 Nov 2004 23:03:18 -0000 1.4.2.4 --- lang.h 21 Nov 2004 15:04:34 -0000 1.4.2.5 *************** *** 989,992 **** --- 989,996 ---- extern void hashsetlocality (tyvaluerecord *, boolean); /*6.2b16 AR: needed to set locality in langaddlocals [langevaluate.c]*/ + extern boolean hashmodify (const bigstring, hdlhashnode, tyvaluerecord); //2004-11-21 aradke + + extern boolean hashtablemodify (hdlhashtable, const bigstring, hdlhashnode, tyvaluerecord); //2004-11-21 aradke + extern boolean hashassign (const bigstring, tyvaluerecord); |
|
From: Andre R. <and...@us...> - 2004-11-20 23:25:22
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20556/Common/source Modified Files: Tag: New_Tables_Experiment-branch arraylist.c Log Message: Simplified the code for recycling lists. Right now, we always allocate new lists at the default size, so we should only keep lists of that size around instead of disposing. Otherwise, we would end up using memory for lists waiting to be recycled that never will be recycled. Index: arraylist.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/Attic/arraylist.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** arraylist.c 20 Nov 2004 18:53:20 -0000 1.1.2.6 --- arraylist.c 20 Nov 2004 23:24:44 -0000 1.1.2.7 *************** *** 94,105 **** #ifdef flrecyclefreelists ! #define maxfreelistlogsize 14 ! ! static hdllist hfreelists[maxfreelistlogsize]; #ifdef fldebug ! static int hdebuglistsallocated[maxfreelistlogsize]; ! static int hdebuglistsrecycled[maxfreelistlogsize]; #endif --- 94,103 ---- #ifdef flrecyclefreelists ! static hdllist hfreeliststack = nil; #ifdef fldebug ! static int ctdebuglistsallocated = 0; ! static int ctdebuglistsrecycled = 0; #endif *************** *** 348,358 **** #ifdef flrecyclefreelists ! if (logsize < maxfreelistlogsize) { ! if ((h = hfreelists[logsize]) != nil) { assert (gethandlesize ((Handle) h) == sizeof (tylist) + sizeof (Handle) * (1 << logsize)); ! hfreelists[logsize] = (hdllist) (**h).item[0]; /*pop from stack*/ initlist (h, logsize); --- 346,356 ---- #ifdef flrecyclefreelists ! if (logsize == LIST_INITIAL_LOGSIZE) { ! if ((h = hfreeliststack) != nil) { assert (gethandlesize ((Handle) h) == sizeof (tylist) + sizeof (Handle) * (1 << logsize)); ! hfreeliststack = (hdllist) (**h).item[0]; /*pop from stack*/ initlist (h, logsize); *************** *** 361,365 **** #ifdef fldebug ! hdebuglistsrecycled[logsize]++; #endif --- 359,363 ---- #ifdef fldebug ! ctdebuglistsrecycled++; #endif *************** *** 368,372 **** #ifdef fldebug ! hdebuglistsallocated[logsize]++; #endif } --- 366,370 ---- #ifdef fldebug ! ctdebuglistsallocated++; #endif } *************** *** 407,415 **** assert (gethandlesize ((Handle) hlist) == (sizeof (tylist) + sizeof (Handle) * (1 << logsize))); ! if (logsize < maxfreelistlogsize) { ! (**hlist).item[0] = (Handle) hfreelists[logsize]; ! hfreelists[logsize] = hlist; return; --- 405,413 ---- assert (gethandlesize ((Handle) hlist) == (sizeof (tylist) + sizeof (Handle) * (1 << logsize))); ! if (logsize == LIST_INITIAL_LOGSIZE) { ! (**hlist).item[0] = (Handle) hfreeliststack; ! hfreeliststack = hlist; return; *************** *** 427,442 **** hdllist h; ! long k; ! ! for (k = 0; k < maxfreelistlogsize; k++) { ! for (h = (hdllist) hfreelists[k]; h != nil; h = (hdllist) hfreelists[k]) { ! ! hfreelists[k] = (hdllist) (**h).item[0]; ! *ctbytesneeded -= gethandlesize ((Handle) h); ! ! disposehandle ((Handle) h); ! } /*for*/ } /*for*/ --- 425,436 ---- hdllist h; ! ! for (h = hfreeliststack; h != nil; h = hfreeliststack) { ! ! hfreeliststack = (hdllist) (**h).item[0]; ! *ctbytesneeded -= gethandlesize ((Handle) h); ! disposehandle ((Handle) h); } /*for*/ |
|
From: Andre R. <and...@us...> - 2004-11-20 23:04:04
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16602/Common/source Modified Files: Tag: New_Tables_Experiment-branch langhash.c tableops.c tablepopup.c tablescrap.c tableverbs.c Log Message: All callers of hashresort are now expected to supply the position of the node in the current sort order if they only want us to resort that node. This eliminates a costly linear search through the array containing the sort order. The callers have been updated to determine this index before making the change that causes the node to become unsorted. Index: tablescrap.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablescrap.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** tablescrap.c 15 Nov 2004 20:52:24 -0000 1.3.2.1 --- tablescrap.c 20 Nov 2004 23:03:20 -0000 1.3.2.2 *************** *** 522,528 **** tableexiteditmode (); ! #ifdef fltablesortorderisarray ! /*** FIXME: what are we supposed to do here??? ***/ ! #else tableoverridesort ((**hnode).sortedlink); /*retain original sort position*/ #endif --- 522,535 ---- tableexiteditmode (); ! #ifndef fltablesortorderisarray ! /* ! 2004-11-20 aradke: could this potentially destroy the sort order of the table? ! if so, we can no longer allow it with the new table implementation because ! it relies on the table being sorted when locating nodes via a binary search. ! ! as far as i can tell, disabling this override of the sort order doesn't ! have any observable effect anyway. ! */ ! tableoverridesort ((**hnode).sortedlink); /*retain original sort position*/ #endif *************** *** 530,536 **** hashinsertnode (hnode, htable); ! #ifdef fltablesortorderisarray ! /*** FIXME: what are we supposed to do here??? ***/ ! #else tablerestoresort (); #endif --- 537,541 ---- hashinsertnode (hnode, htable); ! #ifndef fltablesortorderisarray tablerestoresort (); #endif Index: tablepopup.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablepopup.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** tablepopup.c 31 Oct 2004 20:41:10 -0000 1.3 --- tablepopup.c 20 Nov 2004 23:03:19 -0000 1.3.2.1 *************** *** 573,576 **** --- 573,578 ---- 6.2b16 AR: Take headnode param instead of bsnew bigstring. + + 2004-11-20 aradke: update for new table implementation */ *************** *** 579,583 **** boolean flvalidate = true; long newlength; ! assert (headnode != nil); --- 581,588 ---- boolean flvalidate = true; long newlength; ! #ifdef fltablesortorderisarray ! long ix; ! #endif ! assert (headnode != nil); *************** *** 625,628 **** --- 630,641 ---- } + #ifdef fltablesortorderisarray + + /*get the index of the node before changing the hash key*/ + + hashgetsortedindex (ht, hnode, &ix); + + #endif + if (!hashsetnodekey (ht, hnode, bsnew)) return (false); *************** *** 631,639 **** if (!(**ht).flxml) #endif ! if (flediting) hashresort (ht, hnode); else tableresort (ht, hnode); return (true); --- 644,658 ---- if (!(**ht).flxml) #endif ! #ifdef fltablesortorderisarray ! if (flediting) ! hashresort (ht, hnode, ix); ! else ! tableresort (ht, hnode, ix); ! #else if (flediting) hashresort (ht, hnode); else tableresort (ht, hnode); + #endif return (true); Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.13 retrieving revision 1.4.2.14 diff -C2 -d -r1.4.2.13 -r1.4.2.14 *** langhash.c 20 Nov 2004 19:18:35 -0000 1.4.2.13 --- langhash.c 20 Nov 2004 23:03:19 -0000 1.4.2.14 *************** *** 2617,2621 **** ! boolean hashresort (hdlhashtable htable, hdlhashnode hresort) { /* --- 2617,2626 ---- ! #ifdef fltablesortorderisarray ! boolean hashresort (hdlhashtable htable, hdlhashnode hresort, long ix) ! #else ! boolean hashresort (hdlhashtable htable, hdlhashnode hresort) ! #endif ! { /* *************** *** 2626,2663 **** node needs to be resorted. using the quicksort routine, it's especially important not to resort a mostly-sorted list just to move one node. */ register hdlhashtable ht = htable; - #ifdef fltablesortorderisarray - unsigned long ix; - #endif if (hresort == nil) return (hashquicksort (ht)); ! pushhashtable (ht); ! #ifdef fltablesortorderisarray ! ! /* ! FIXME: we really should do the search before modifying the value because ! then the list is still sorted and we can do a fast binary search instead. ! */ ! ! if (!listlinearsearch ((**ht).sortedlist, (Handle) hresort, &ix)) { ! pophashtable (); ! return (false); ! } ! ! listresort ((**ht).sortedlist, ix, &hashcompare); ! #else ! hashsorteddelete (hresort); ! ! hashsortedinsert (hresort); ! #endif ! pophashtable (); --- 2631,2658 ---- node needs to be resorted. using the quicksort routine, it's especially important not to resort a mostly-sorted list just to move one node. + + 2004-11-20 aradke: if a single node is affected, we rely on the caller + to determine the index of the node before changing its hash key or value. */ register hdlhashtable ht = htable; if (hresort == nil) return (hashquicksort (ht)); ! pushhashtable (ht); ! #ifdef fltablesortorderisarray ! listresort ((**ht).sortedlist, ix, &hashcompare); ! ! #else ! hashsorteddelete (hresort); ! ! hashsortedinsert (hresort); ! #endif ! pophashtable (); *************** *** 4002,4006 **** --- 3997,4005 ---- if (!flsorted) + #ifdef fltablesortorderisarray + hashresort (htable, nil, -1); + #else hashresort (htable, nil); + #endif if (!fl) *************** *** 4158,4166 **** the index is 0-based. */ #ifdef fltablesortorderisarray ! return (listlinearsearch ((**htable).sortedlist, (Handle) hnode, (unsigned long *) &index)); #else --- 4157,4180 ---- the index is 0-based. + + 2004-11-20 aradke: the table should always be sorted and we know that the node + is in the list, so we can use the binary search successfully. however, just + to be sure we try a linearsearch if the binary search fails. */ #ifdef fltablesortorderisarray ! boolean flfound; ! ! pushhashtable (htable); /*for hashcompare*/ ! ! flfound = listbinarysearchexact ((**htable).sortedlist, (Handle) hnode, index, &hashcompare); ! ! pophashtable (); ! ! if (flfound) ! return (true); ! ! return (listlinearsearch ((**htable).sortedlist, (Handle) hnode, index)); #else Index: tableops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tableops.c,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.4 diff -C2 -d -r1.3.2.3 -r1.3.2.4 *** tableops.c 15 Nov 2004 22:43:07 -0000 1.3.2.3 --- tableops.c 20 Nov 2004 23:03:19 -0000 1.3.2.4 *************** *** 955,959 **** */ ! boolean tableresort (hdlhashtable ht, hdlhashnode hresort) { /* --- 955,964 ---- */ ! #ifdef fltablesortorderisarray ! boolean tableresort (hdlhashtable ht, hdlhashnode hresort, long ix) ! #else ! boolean tableresort (hdlhashtable ht, hdlhashnode hresort) ! #endif ! { /* *************** *** 962,965 **** --- 967,972 ---- 3/31/93 dmb: added hresort parameter. if it's not nil, then only that node needs to be resorted. + + 2004-11-20 aradke: update for new table implementation */ *************** *** 973,978 **** opsaveeditbuffer (); ! fl = hashresort (ht, hresort); ! opmoveto (hcursor); --- 980,989 ---- opsaveeditbuffer (); ! #ifdef fltablesortorderisarray ! fl = hashresort (ht, hresort, ix); ! #else ! fl = hashresort (ht, hresort); ! #endif ! opmoveto (hcursor); *************** *** 993,996 **** --- 1004,1009 ---- /* 3/23/93 dmb: set watch cursor before sorting + + 2004-11-20 aradke: update for new table implementation */ *************** *** 1007,1011 **** shellforcecursoradjust (); /*make sure it reverts ASAP*/ ! tableresort (ht, nil); opvisibarcursor (); --- 1020,1028 ---- shellforcecursoradjust (); /*make sure it reverts ASAP*/ ! #ifdef fltablesortorderisarray ! tableresort (ht, nil, -1); ! #else ! tableresort (ht, nil); ! #endif opvisibarcursor (); Index: tableverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tableverbs.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** tableverbs.c 31 Oct 2004 20:41:10 -0000 1.3 --- tableverbs.c 20 Nov 2004 23:03:20 -0000 1.3.2.1 *************** *** 299,302 **** --- 299,304 ---- 5.1.4 dmb: disallow rename if new name is already in use; generate errors if item doesn't exist + + 2004-11-20 aradke: update for new table implementation */ *************** *** 304,307 **** --- 306,312 ---- bigstring bs, bsname; hdlhashnode hnode; + #ifdef fltablesortorderisarray + long ix; + #endif if (!getvarparam (hparam1, 1, &htable, bs)) *************** *** 319,322 **** --- 324,335 ---- return (false); } + + #ifdef fltablesortorderisarray + + /*get the index of the node before changing the hash key*/ + + hashgetsortedindex (htable, hnode, &ix); + + #endif if (!equalidentifiers (bs, bsname)) { *************** *** 333,337 **** } ! hashresort (htable, hnode); return (setaddressvalue (htable, bsname, v)); --- 346,354 ---- } ! #ifdef fltablesortorderisarray ! hashresort (htable, hnode, ix); ! #else ! hashresort (htable, hnode); ! #endif return (setaddressvalue (htable, bsname, v)); |
|
From: Andre R. <and...@us...> - 2004-11-20 23:04:03
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16602/Common/headers Modified Files: Tag: New_Tables_Experiment-branch lang.h tableinternal.h Log Message: All callers of hashresort are now expected to supply the position of the node in the current sort order if they only want us to resort that node. This eliminates a costly linear search through the array containing the sort order. The callers have been updated to determine this index before making the change that causes the node to become unsorted. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** lang.h 15 Nov 2004 20:52:08 -0000 1.4.2.3 --- lang.h 20 Nov 2004 23:03:18 -0000 1.4.2.4 *************** *** 1003,1007 **** extern boolean hashtablevisit (hdlhashtable, langtablevisitcallback, ptrvoid); ! extern boolean hashresort (hdlhashtable, hdlhashnode); extern boolean hashinversesearch (hdlhashtable, langinversesearchcallback, ptrvoid, bigstring); --- 1003,1011 ---- extern boolean hashtablevisit (hdlhashtable, langtablevisitcallback, ptrvoid); ! #ifdef fltablesortorderisarray ! extern boolean hashresort (hdlhashtable, hdlhashnode, long); ! #else ! extern boolean hashresort (hdlhashtable, hdlhashnode); ! #endif extern boolean hashinversesearch (hdlhashtable, langinversesearchcallback, ptrvoid, bigstring); Index: tableinternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/tableinternal.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** tableinternal.h 9 Oct 2004 21:11:01 -0000 1.1 --- tableinternal.h 20 Nov 2004 23:03:19 -0000 1.1.2.1 *************** *** 199,203 **** extern boolean tablebringtofront (hdlhashtable); ! extern boolean tableresort (hdlhashtable, hdlhashnode); extern boolean tablegetsortorder (hdlhashtable, short *); --- 199,207 ---- extern boolean tablebringtofront (hdlhashtable); ! #ifdef fltablesortorderisarray ! extern boolean tableresort (hdlhashtable, hdlhashnode, long); ! #else ! extern boolean tableresort (hdlhashtable, hdlhashnode); ! #endif extern boolean tablegetsortorder (hdlhashtable, short *); |
|
From: Andre R. <and...@us...> - 2004-11-20 19:18:59
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3982/Common/source Modified Files: Tag: New_Tables_Experiment-branch langhash.c Log Message: In hashflushcache, keep updating ctbytesneeded when disposing cached hash nodes and hash bucket arrays. In hashlinknode, always double the size of the hash bucket array when neccessary -- quadrupling may be too much. Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.12 retrieving revision 1.4.2.13 diff -C2 -d -r1.4.2.12 -r1.4.2.13 *** langhash.c 16 Nov 2004 23:48:39 -0000 1.4.2.12 --- langhash.c 20 Nov 2004 19:18:35 -0000 1.4.2.13 *************** *** 1008,1011 **** --- 1008,1013 ---- hfreenodes [k] = (**hn).hashlink; + + *ctbytesneeded -= gethandlesize ((Handle) hn); disposehandle ((Handle) hn); *************** *** 1023,1026 **** --- 1025,1030 ---- hfreebuckets [j] = (hdlhashbucketarray) (*hb)[0]; + + *ctbytesneeded -= gethandlesize ((Handle) hb); disposehandle ((Handle) hb); *************** *** 1537,1541 **** #ifdef flv10tables ! if (3 * (**htable).ctnodes > 2 * (1 << (**htable).logsize)) { /*more than 2/3rds full, grow it*/ --- 1541,1547 ---- #ifdef flv10tables ! //if ((**htable).ctnodes > (1 << (**htable).logsize)) ! if (3 * (**htable).ctnodes > 2 * (1 << (**htable).logsize)) ! { /*more than 2/3rds full, grow it*/ *************** *** 1545,1551 **** oldlogsize = (**htable).logsize; ! if (oldlogsize < 14) ! newlogsize = oldlogsize + 2; /*quadruple for 8k items or less*/ ! else newlogsize = oldlogsize + 1; /*double for 16k items or more*/ --- 1551,1557 ---- oldlogsize = (**htable).logsize; ! //if (oldlogsize < 14) ! // newlogsize = oldlogsize + 2; /*quadruple for 8k items or less*/ ! //else newlogsize = oldlogsize + 1; /*double for 16k items or more*/ |
|
From: Andre R. <and...@us...> - 2004-11-20 19:14:46
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3268/Common/source Modified Files: Tag: New_Tables_Experiment-branch osacomponent.c Log Message: In disposecomponentglobals, call listflushcache to properly dispose cached lists. Index: osacomponent.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/osacomponent.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** osacomponent.c 31 Oct 2004 19:08:16 -0000 1.6 --- osacomponent.c 20 Nov 2004 19:14:37 -0000 1.6.2.1 *************** *** 905,908 **** --- 905,910 ---- hashflushcache (&ctbytes); // 5.1b23 dmb: don't reuse any handles allocated + + listflushcache (&ctbytes); // 2004-11-20 aradke: don't reuse any handles allocated } /*disposecomponentglobals*/ |
|
From: Andre R. <and...@us...> - 2004-11-20 19:12:06
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2677/Common/source Modified Files: Tag: New_Tables_Experiment-branch shellfile.c Log Message: In shellclose, call listflushcache to properly dispose cached lists on quit. Index: shellfile.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellfile.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** shellfile.c 1 Nov 2004 11:50:16 -0000 1.3 --- shellfile.c 20 Nov 2004 19:11:54 -0000 1.3.2.1 *************** *** 1060,1064 **** hashflushcache (&ctbytes); //rab 6.0b6 free the memory ! return (true); --- 1060,1066 ---- hashflushcache (&ctbytes); //rab 6.0b6 free the memory ! ! listflushcache (&ctbytes); //2004-11-20 aradke ! return (true); |
|
From: Andre R. <and...@us...> - 2004-11-20 19:09:15
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2058/Common/source Modified Files: Tag: New_Tables_Experiment-branch shellsysverbs.c Log Message: Added kernel implementation of Frontier.testHashFunction and Frontier.hashTableStats. Extended the Frontier.reclaimMemory verb to also flush the cache of lists. Index: shellsysverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellsysverbs.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** shellsysverbs.c 27 Oct 2004 18:57:55 -0000 1.3 --- shellsysverbs.c 20 Nov 2004 19:08:52 -0000 1.3.2.1 *************** *** 161,164 **** --- 161,168 ---- isvalidserialnumberfunc, + + hashtablestatsfunc, + + testhashfunctionfunc, ctfrontierverbs *************** *** 795,799 **** extern long fullpathloopcount; ! extern boolean hashstatsverb (tyvaluerecord *v); static boolean frontierfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) { --- 799,803 ---- extern long fullpathloopcount; ! //extern boolean hashstatsverb (tyvaluerecord *v); static boolean frontierfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) { *************** *** 929,932 **** --- 933,938 ---- hashflushcache (&ctbytes); + + listflushcache (&ctbytes); //2004-11-20 aradke return (setlongvalue (longinfinity - ctbytes, v)); *************** *** 983,987 **** --- 989,1029 ---- return (true); } + + case hashtablestatsfunc: { + + hdlhashtable htable; + + flnextparamislast = true; + + if (!gettablevalue (hparam1, 1, &htable)) + return (false); + + return (hashtablestatsverb (htable, v)); + } + + case testhashfunctionfunc: { + + bigstring bskey; + unsigned long ticks, hashval; + long k, kmax; + + if (!getstringvalue (hparam1, 1, bskey)) + return (false); + + flnextparamislast = true; + + if (!getlongvalue (hparam1, 2, &kmax)) + return (false); + ticks = gettickcount (); + + for (k = 0; k < kmax; k++) + hashval = hashfunction (bskey) & 0x000000ff; + + ticks = gettickcount () - ticks; + + return (setlongvalue (ticks, v)); + } + default: return (false); |
|
From: Andre R. <and...@us...> - 2004-11-20 19:05:11
|
Update of /cvsroot/frontierkernel/Frontier/Common/resources/Mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1176/Common/resources/Mac Modified Files: Tag: New_Tables_Experiment-branch kernvelverbs.r Log Message: Added Frontier.testHashFunction and Frontier.hashTableStats verb, used for testing and debugging the new table implementation. Index: kernvelverbs.r =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/resources/Mac/kernvelverbs.r,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** kernvelverbs.r 26 Oct 2004 10:13:00 -0000 1.2 --- kernvelverbs.r 20 Nov 2004 19:05:01 -0000 1.2.2.1 *************** *** 884,888 **** "gethashloopcount", "hideapplication", ! "isvalidserialnumber" } } --- 884,890 ---- "gethashloopcount", "hideapplication", ! "isvalidserialnumber", ! "hashtablestats", ! "testhashfunction" } } |
|
From: Andre R. <and...@us...> - 2004-11-20 19:05:11
|
Update of /cvsroot/frontierkernel/Frontier/Common/resources/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1176/Common/resources/Win32 Modified Files: Tag: New_Tables_Experiment-branch kernvelverbs.rc Log Message: Added Frontier.testHashFunction and Frontier.hashTableStats verb, used for testing and debugging the new table implementation. Index: kernvelverbs.rc =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/resources/Win32/kernvelverbs.rc,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** kernvelverbs.rc 9 Oct 2004 08:50:17 -0000 1.1 --- kernvelverbs.rc 20 Nov 2004 19:05:01 -0000 1.1.2.1 *************** *** 827,831 **** "frontier\0", //Function Processor Name true, //Window required ! 13, //Count of verbs "getprogrampath\0", "getfilepath\0", --- 827,831 ---- "frontier\0", //Function Processor Name true, //Window required ! 15, //Count of verbs "getprogrampath\0", "getfilepath\0", *************** *** 840,844 **** "gethashloopcount\0", "hideapplication\0", ! "isvalidserialnumber\0" END --- 840,846 ---- "gethashloopcount\0", "hideapplication\0", ! "isvalidserialnumber\0", ! "hashtablestats\0", ! "testhashfunction\0" END |
|
From: Andre R. <and...@us...> - 2004-11-20 18:59:59
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32256/Common/source Modified Files: Tag: New_Tables_Experiment-branch langexternal.c Log Message: Added kernel implementation of Frontier.hashTableStats verb. Index: langexternal.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langexternal.c,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** langexternal.c 15 Nov 2004 20:52:24 -0000 1.3.2.2 --- langexternal.c 20 Nov 2004 18:59:48 -0000 1.3.2.3 *************** *** 56,59 **** --- 56,60 ---- #include "menuverbs.h" /*7.0b6 PBS*/ #include "op.h" /*7.0b6 PBS*/ + #include "ops.h" /*2004-11-19 aradke*/ *************** *** 1700,1703 **** --- 1701,1833 ---- + boolean hashtablestatsverb (hdlhashtable ht, tyvaluerecord *v) { + + handlestream s; + hdlhashnode hn; + bigstring bs, bsnum, bsbucket, bsnode; + //bigstring bspath; + long i, n, ctnodes, ctitems; + short ctpad; + + assert (ht != nil); + + openhandlestream (nil, &s); + + /*number of buckets*/ + + copystring ("\x0E" "hash buckets: ", bs); + + pushlong (gethashbucketcount (ht), bs); + + pushchar (chreturn, bs); + + if (!writehandlestreamstring (&s, bs)) + goto exit; + + /*number of nodes*/ + + copystring ("\x0C" "hash nodes: ", bs); + + hashcountitems (ht, &ctitems); + + pushlong (ctitems, bs); + + pushchar (chreturn, bs); + pushchar (chreturn, bs); + + if (!writehandlestreamstring (&s, bs)) + goto exit; + + /*order of magnitude of buckets for padding indices*/ + + for (ctpad = 0, n = gethashbucketcount (ht); n != 0; ctpad++, n /= 10) + ; + + /*visit all buckets*/ + + for (i = 0; i < gethashbucketcount (ht); i++) { + + copystring ("\x07" "bucket ", bsbucket); + + /*bucket number*/ + + numbertostring (i, bsnum); + + padwithzeros (bsnum, ctpad); + + pushstring (bsnum, bsbucket); + + pushstring (STR_Colon_Space, bsbucket); + + /*nodes in bucket*/ + + for (ctnodes = 0, hn = nthhashbucket (ht, i); hn != nil; hn = (**hn).hashlink) + ctnodes++; + + pushlong (ctnodes, bsbucket); + + if (ctnodes == 1) + pushstring ("\x05" " node", bsbucket); + else + pushstring ("\x06" " nodes", bsbucket); + + pushchar (chreturn, bsbucket); + + if (!writehandlestreamstring (&s, bsbucket)) + goto exit; + + /*visit nodes in bucket*/ + + for (hn = nthhashbucket (ht, i); hn != nil; hn = (**hn).hashlink) { + + setemptystring (bsnode); + + pushchar (chtab, bsnode); /*indent*/ + + /*type of value*/ + + ostypetostring (langgettypeid (langgettype ((**hn).val)), bs); + + pushstring (bs, bsnode); + + /*memory address of node handle*/ + + numbertohexstring ((long) hn, bs); + + pushstring (bs, bsnode); + + pushchar (chspace, bsnode); + + pushstring ("\x02" " \"", bsnode); + + if (!writehandlestreamstring (&s, bsnode)) + goto exit; + + /*hash key*/ + + gethashkey (hn, bs); + + if (!writehandlestreamstring (&s, bs)) + goto exit; + + copystring ("\x01" "\"", bs); + + pushchar (chreturn, bs); + + if (!writehandlestreamstring (&s, bs)) + goto exit; + }/*for*/ + + } /*for*/ + + return (setheapvalue (closehandlestream (&s), stringvaluetype, v)); + + exit: + + disposehandlestream (&s); + + return (false); + } /*hashtablestatsverb*/ + static boolean getfullpath (hdlhashtable htable, bigstring bsname, boolean flquote, bigstring bspath, hdlwindowinfo *hroot) { |
|
From: Andre R. <and...@us...> - 2004-11-20 18:59:59
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32256/Common/headers Modified Files: Tag: New_Tables_Experiment-branch langexternal.h Log Message: Added kernel implementation of Frontier.hashTableStats verb. Index: langexternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langexternal.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** langexternal.h 9 Oct 2004 20:57:18 -0000 1.1 --- langexternal.h 20 Nov 2004 18:59:48 -0000 1.1.2.1 *************** *** 302,305 **** --- 302,307 ---- extern boolean hashstatsverb (tyvaluerecord *v); + extern boolean hashtablestatsverb (hdlhashtable ht, tyvaluerecord *v); + extern boolean langexternalsymbolchanged (hdlhashtable htable, const bigstring bsname, hdlhashnode hnode, boolean flvalue); |
|
From: Andre R. <and...@us...> - 2004-11-20 18:53:31
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30901/Common/source Modified Files: Tag: New_Tables_Experiment-branch arraylist.c Log Message: Recycle list handles instead of disposing, at least up to a certain size. Index: arraylist.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/Attic/arraylist.c,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** arraylist.c 19 Nov 2004 11:55:39 -0000 1.1.2.5 --- arraylist.c 20 Nov 2004 18:53:20 -0000 1.1.2.6 *************** *** 66,69 **** --- 66,71 ---- Our public interface remains unchanged. + + 2004-11-20 aradke: recycle lists */ *************** *** 88,91 **** --- 90,110 ---- + #define flrecyclefreelists 1 /*2004-11-20 aradke*/ + + #ifdef flrecyclefreelists + + #define maxfreelistlogsize 14 + + static hdllist hfreelists[maxfreelistlogsize]; + + #ifdef fldebug + static int hdebuglistsallocated[maxfreelistlogsize]; + + static int hdebuglistsrecycled[maxfreelistlogsize]; + #endif + + #endif + + static long getlogsize (long n) { *************** *** 306,329 **** return (true); } /*unwraplist*/ boolean newgrowinglist (hdllist *hlist, long ctitems) { hdllist h; ! long newlogsize = getlogsize (ctitems); ! long ctallocate = 1 << newlogsize; ! ! if (!newhandle (sizeof(tylist) + ctallocate * sizeof(Handle), (Handle*) &h)) ! return (false); ! ! (**h).ctitems = 0; ! (**h).logsize = newlogsize; ! (**h).ix_mask = ctallocate - 1; ! (**h).ix_offset = 0; ! (**h).disposeitemcallback = nil; *hlist = h; --- 325,380 ---- return (true); } /*unwraplist*/ + + + static void initlist (hdllist h, long logsize) { + + (**h).ctitems = 0; + (**h).logsize = logsize; + + (**h).ix_mask = (1 << logsize) - 1; + + (**h).ix_offset = 0; + + (**h).disposeitemcallback = nil; + } /*initlist*/ + boolean newgrowinglist (hdllist *hlist, long ctitems) { hdllist h; ! long logsize = getlogsize (ctitems); ! #ifdef flrecyclefreelists ! ! if (logsize < maxfreelistlogsize) { ! if ((h = hfreelists[logsize]) != nil) { ! ! assert (gethandlesize ((Handle) h) == sizeof (tylist) + sizeof (Handle) * (1 << logsize)); ! hfreelists[logsize] = (hdllist) (**h).item[0]; /*pop from stack*/ ! ! initlist (h, logsize); ! ! *hlist = h; ! #ifdef fldebug ! hdebuglistsrecycled[logsize]++; ! #endif ! ! return (true); ! } ! ! #ifdef fldebug ! hdebuglistsallocated[logsize]++; ! #endif ! } ! #endif ! ! if (!newhandle (sizeof(tylist) + (1 << logsize) * sizeof(Handle), (Handle*) &h)) ! return (false); ! ! initlist (h, logsize); *hlist = h; *************** *** 341,354 **** void disposelist (hdllist hlist) { ! if (hlist != nil) { ! listclear (hlist); /*for dispose callback*/ ! disposehandle ((Handle) hlist); ! } } /*disposelist*/ void listclear (hdllist hlist) { --- 392,450 ---- void disposelist (hdllist hlist) { ! #ifdef flrecyclefreelists ! long logsize; ! #endif ! ! if (hlist == nil) ! return; ! listclear (hlist); /*for dispose callback*/ ! ! #ifdef flrecyclefreelists ! logsize = (**hlist).logsize; + assert (gethandlesize ((Handle) hlist) == (sizeof (tylist) + sizeof (Handle) * (1 << logsize))); + + if (logsize < maxfreelistlogsize) { + + (**hlist).item[0] = (Handle) hfreelists[logsize]; + + hfreelists[logsize] = hlist; + + return; + } + + #endif + + disposehandle ((Handle) hlist); } /*disposelist*/ + boolean listflushcache (long *ctbytesneeded) { + + #ifdef flrecyclefreelists + + hdllist h; + long k; + + for (k = 0; k < maxfreelistlogsize; k++) { + + for (h = (hdllist) hfreelists[k]; h != nil; h = (hdllist) hfreelists[k]) { + + hfreelists[k] = (hdllist) (**h).item[0]; + + *ctbytesneeded -= gethandlesize ((Handle) h); + + disposehandle ((Handle) h); + } /*for*/ + } /*for*/ + + #endif + + return (true); + } /*listflushcache*/ + + void listclear (hdllist hlist) { *************** *** 373,376 **** --- 469,474 ---- (**hlist).ctitems = 0; + + (**hlist).ix_offset = 0; } /*listclear*/ |
|
From: Andre R. <and...@us...> - 2004-11-20 18:53:31
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30901/Common/headers Modified Files: Tag: New_Tables_Experiment-branch arraylist.h Log Message: Recycle list handles instead of disposing, at least up to a certain size. Index: arraylist.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/Attic/arraylist.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 *** arraylist.h 15 Nov 2004 20:52:08 -0000 1.1.2.2 --- arraylist.h 20 Nov 2004 18:53:20 -0000 1.1.2.3 *************** *** 44,47 **** --- 44,49 ---- extern void disposelist (hdllist); + extern boolean listflushcache (long *); + extern void listclear (hdllist); |