From: George H. <geo...@us...> - 2005-10-17 08:56:28
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13786/win32forth/src Modified Files: Class.f Dc.f Log Message: gah: minor optimizations to Dc.f Added code to Class.f so object IVARs also create a word (internal to the class and it's descendants) of the same name that returns the ivar address (compile only). Index: Dc.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Dc.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Dc.f 8 Oct 2005 11:50:36 -0000 1.8 --- Dc.f 17 Oct 2005 08:56:21 -0000 1.9 *************** *** 154,159 **** ;M ! :M PenColor: { color_object -- } ! color_object LineColor: self ;M --- 154,159 ---- ;M ! :M PenColor: ( color_object -- ) ! LineColor: self ;M Index: Class.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Class.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Class.f 29 Aug 2005 15:56:27 -0000 1.5 --- Class.f 17 Oct 2005 08:56:21 -0000 1.6 *************** *** 17,21 **** cell newuser (NewObject) \ Newest object being created : NewObject (NewObject) @ ; ! IN-SYSTEM --- 17,21 ---- cell newuser (NewObject) \ Newest object being created : NewObject (NewObject) @ ; ! IN-SYSTEM *************** *** 119,123 **** ?win-error-enabled TURNKEYED? 0= AND if false to ?win-error-enabled ! \+ forth-io forth-io cr cr unhash type ." NULL" \IN-SYSTEM-OK .rstack --- 119,123 ---- ?win-error-enabled TURNKEYED? 0= AND if false to ?win-error-enabled ! \+ forth-io forth-io cr cr unhash type ." NULL" \IN-SYSTEM-OK .rstack *************** *** 132,136 **** BYE then ; ! : (Defer) ( ^obj -- ) \ look up SelID at IP and run the method @(ip) swap ( SelID ^obj ) --- 132,136 ---- BYE then ; ! : (Defer) ( ^obj -- ) \ look up SelID at IP and run the method @(ip) swap ( SelID ^obj ) *************** *** 190,194 **** 0 Value ^Self 0 Value ^Super \ nfa of SUPER pseudo-Ivar ! in-system --- 190,194 ---- 0 Value ^Self 0 Value ^Super \ nfa of SUPER pseudo-Ivar ! in-system *************** *** 298,305 **** --- 298,309 ---- 0 value contiguous-data? + defer ivar-name + \ Compile an instance variable dictionary entry : <VAR ( #elems ^class OR ^class -- ) dup XFA @ >r dup>r \ save XFA contents and class ptr + >in @ @word Vfind abort" Duplicate Instance Variable" + swap >in ! contiguous-data? \ if contiguous flag non zero if -1 r@ XFA ! \ set XFA to -1 *************** *** 319,322 **** --- 323,327 ---- if rot dup , * 4 + then 0max \ #elems + ivar-name swap DFA @ + \ Account for named ivar lengths class-allot *************** *** 380,384 **** THEN obAddr (newObject) ! ! theClass IFA @ 0 Itrav classinit obAddr ; in-system --- 385,389 ---- THEN obAddr (newObject) ! ! theClass IFA @ 0 Itrav classinit obAddr ; in-system *************** *** 462,466 **** here to ^Class 0 op! \ for error checking in runIvarRef ! ?loading if loadline @ else -1 --- 467,471 ---- here to ^Class 0 op! \ for error checking in runIvarRef ! ?loading if loadline @ else -1 *************** *** 794,798 **** VFIND IF getIvarRef ! ELSE getRef THEN ELSE VFIND --- 799,803 ---- VFIND IF getIvarRef ! ELSE getRef THEN ELSE VFIND *************** *** 962,965 **** --- 967,972 ---- class-allot ; + :noname 0 bytes ; is ivar-name + : byte ( -<name>- ) \ byte (8bit) instance variable header *************** *** 1231,1232 **** --- 1238,1240 ---- only forth also definitions + |