1 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;; Copyright
(C
) 2023 Ketmar Dark
// Invisible Vector
5 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6 ;; slightly more complicated OO system than mini
-oof
7 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9 $INCLUDE
-ONCE
<uroof
.f
>
19 MyItem obj
-value
: item
-ptr
26 MyList oof
:method
: item@
( -- addr
)
29 \ MyList oof
:method
-cfa
: item debug
:(decompile
-cfa
)
31 MyList oof
:method
: item
! ( addr
-- )
35 MyList oof
:method
: doit
( -- )
41 \ MyList oof
:method
-cfa
: doit debug
:(decompile
-cfa
)
44 MyItem oof
:method
: mth1
( -- )
49 ." fld: " -> fld @
. cr
53 MyItem oof
:method
: mth2
( -- )
58 ." fld: " -> fld @
. cr
59 ." class-name: " @class oof
:name
-of type cr
60 ." size-of: " @class oof
:size
-of
. cr
61 @class oof
:parent
-of ?dup
if
62 ." parent: " oof
:name
-of type cr
67 MyList oof
:obj
-value head
68 MyList oof
:new
to head
70 MyItem oof
:new dup head item
!
71 head item@
<> " fucka? (0)" ?error
76 MyItem oof
:new dup head item
!
77 head item@
<> " fucka? (1)" ?error