ta - n) CELL+ @ ;
0 VALUE SELF
: SELF+ ( n - a) SELF + ;
: SEND ( a xt) SELF >R SWAP TO SELF EXECUTE R> TO SELF ;
VARIABLE CLS ( contains ta)
: SIZE^ ( - aa) CLS @ ?DUP 0= ABORT" scope?" CELL+ ;
: MFIND ( ta ca u - xt n) 2>R BEGIN DUP WHILE DUP @ 2R@ ROT
SEARCH-WORDLIST ?DUP IF ROT DROP 2R> 2DROP EXIT THEN
CELL+ CELL+ @ REPEAT -1 ABORT" can't?" ;
: SEND' ( a ta "m ") BL WORD COUNT MFIND 0< STATE @ AND
IF SWAP LIT, LIT, POSTPONE SEND ELSE SEND THEN ;
: SUPER ( "m ") SIZE^ CELL+ @ BL WORD COUNT MFIND 0>
IF EXECUTE ELSE COMPILE, THEN ; IMMEDIATE
: DEFS ( n "f ") CREATE SIZE^ @ , SIZE^ +! IMMEDIATE
DOES> @ STATE @ IF LIT, POSTPONE SELF+ ELSE SELF+ THEN ;
: METHODS ( ta) DUP CLS ! @ DUP SET-CURRENT
>R GET-ORDER R> SWAP 1+ SET-ORDER ; ( ALSO CONTEXT !)
: CLASS ( "c ") CREATE HERE 0 , 0 , 0 ,
WORDLIST OVER ! METHODS ;
: SUBCLASS ( ta "c ") CLASS SIZE^ OVER >SIZE OVER ! CELL+ ! ;
: END ( ) SIZE^ DROP PREVIOUS DEFINITIONS 0 CLS ! ;
: NEW ( ta "name ") CREATE DUP , >SIZE ALLOT IMMEDIATE
DOES> DUP CELL+ SWAP @ SEND' ;
what the fuck is this language?
What it do?
Обсуждают сегодня