Oops
parent
34952ff5c4
commit
e1a2bfc048
|
@ -222,3 +222,17 @@ M: integer a-generic a-word ;
|
||||||
M: boii jeah ;
|
M: boii jeah ;
|
||||||
"> eval
|
"> eval
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
! call-next-method cache test
|
||||||
|
GENERIC: c-n-m-cache ( a -- b )
|
||||||
|
|
||||||
|
! Force it to be unoptimized
|
||||||
|
M: fixnum c-n-m-cache { } [ ] like call call-next-method ;
|
||||||
|
M: integer c-n-m-cache 1 + ;
|
||||||
|
M: number c-n-m-cache ;
|
||||||
|
|
||||||
|
[ 3 ] [ 2 c-n-m-cache ] unit-test
|
||||||
|
|
||||||
|
[ ] [ [ { integer c-n-m-cache } forget ] with-compilation-unit ] unit-test
|
||||||
|
|
||||||
|
[ 2 ] [ 2 c-n-m-cache ] unit-test
|
||||||
|
|
|
@ -152,8 +152,8 @@ M: method-body forget*
|
||||||
] keep eq?
|
] keep eq?
|
||||||
[
|
[
|
||||||
[ [ delete-at ] with-methods ]
|
[ [ delete-at ] with-methods ]
|
||||||
[ [ delete-at ] with-implementors ]
|
[ [ delete-at ] with-implementors ] 2bi
|
||||||
2bi
|
reset-caches
|
||||||
] [ 2drop ] if
|
] [ 2drop ] if
|
||||||
] if
|
] if
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue