Update of /cvsroot/win32forth/win32forth/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8565/win32forth/src
Modified Files:
Class.f
Log Message:
gah: Modified :CLASS to hide the name till after <SUPER executes so a class can specify a previous class of the same name as super-class the same as :OBJECT
Index: Class.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/src/Class.f,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Class.f 6 Feb 2006 17:48:17 -0000 1.15
--- Class.f 8 Feb 2006 10:54:43 -0000 1.16
***************
*** 442,445 ****
--- 442,451 ----
0 value oldcurrent
+ also forth definitions
+
+ 0 value Obj-CLASS
+
+ previous definitions
+
\ Build a class header with its superclass pointer
: inherit ( pfa -- )
***************
*** 455,463 ****
\ add to search order
^Class XFA OFF
! also ^class body> vcfa>voc context ! definitions ;
forth definitions
- here 0 , value Obj-CLASS
0 value Obj-LOADLINE
--- 461,469 ----
\ add to search order
^Class XFA OFF
! also ^class body> vcfa>voc context ! definitions
! obj-class 0= if reveal then ;
forth definitions
0 value Obj-LOADLINE
***************
*** 482,485 ****
--- 488,497 ----
then to Obj-LOADLINE ;
+ : (class) ( -- )
+ hide
+ 0 to Obj-CLASS
+ here to ^Class
+ 0 op! ; \ for error checking in runIvarRef
+
: :Class ( -<class-name>- )
\ *G Define a class for creating a group of similar objects.
***************
*** 487,493 ****
false to ?:M
create
! 0 to Obj-CLASS
! here to ^Class
! 0 op! \ for error checking in runIvarRef
does>
[ code-here 12 - to doClass ] \ a dirty trick!
--- 499,503 ----
false to ?:M
create
! (class)
does>
[ code-here 12 - to doClass ] \ a dirty trick!
***************
*** 541,547 ****
false to ?:M
create
! 0 to Obj-CLASS
! here to ^Class
! 0 op! \ for error checking in runIvarRef
does>
[ code-here 12 - to do|Class ] \ a dirty trick!
--- 551,555 ----
false to ?:M
create
! (class)
does>
[ code-here 12 - to do|Class ] \ a dirty trick!
***************
*** 1107,1110 ****
--- 1115,1120 ----
\ cells class-allot ;
+ module
+
forth definitions
***************
*** 1122,1126 ****
\ Revised by -rbs July 9th, 2002
! \ *P Since ClassRoot inherits from the pseodo class consisting of the classes
\ ** Vocabulary plus the five added vectors MFA IFA DFA XFA and SFA ( see primhash.f
\ ** for more details ) DO NOT add any more definitions to CLASSES from here on.
--- 1132,1136 ----
\ Revised by -rbs July 9th, 2002
! \ *P Since ClassRoot inherits from the pseudo class consisting of the classes
\ ** Vocabulary plus the five added vectors MFA IFA DFA XFA and SFA ( see primhash.f
\ ** for more details ) DO NOT add any more definitions to CLASSES from here on.
|