This commit is contained in:
Brad Nelson
2023-05-26 12:14:31 -07:00
parent a50a33cae8
commit 60447dd11a

View File

@ -39,7 +39,6 @@ variable methods variable last-method
: m: ( "name" ) method drop ; m: .construct ( make this 0 ) : m: ( "name" ) method drop ; m: .construct ( make this 0 )
: m! ( xt n class ) swap 3 + cells + ! ; : m! ( xt n class ) swap 3 + cells + ! ;
: nop-construct ;
m: .fallback m: .fallback
: undefined last-method @ 2 cells - ( body> ) this .fallback ; : undefined last-method @ 2 cells - ( body> ) this .fallback ;
: error-fallback ( xt -- ) ." Undefined method: " >name type cr throw -1 ; : error-fallback ( xt -- ) ." Undefined method: " >name type cr throw -1 ;
@ -50,6 +49,7 @@ create ClassClass
oofda-max-methods 3 + cells , ( size ) oofda-max-methods 3 + cells , ( size )
blank-vtable ( vtable[] ) blank-vtable ( vtable[] )
: nop-construct ;
m: .size m: .grow m: .vtable m: .parent m: .getClass m: .size m: .grow m: .vtable m: .parent m: .getClass
:noname ( xt n ) this m! ; m# .setMethod ClassClass m! :noname ( xt n ) this m! ; m# .setMethod ClassClass m!