factor compilation unit from tools.annotations:reset
parent
c0e99e738e
commit
4b8132d777
|
@ -7,19 +7,24 @@ tools.time generic inspector fry tools.continuations
|
||||||
locals generalizations macros ;
|
locals generalizations macros ;
|
||||||
IN: tools.annotations
|
IN: tools.annotations
|
||||||
|
|
||||||
GENERIC: reset ( word -- )
|
<PRIVATE
|
||||||
|
|
||||||
M: generic reset
|
GENERIC: (reset) ( word -- )
|
||||||
subwords [ reset ] each ;
|
|
||||||
|
|
||||||
M: word reset
|
M: generic (reset)
|
||||||
|
subwords [ (reset) ] each ;
|
||||||
|
|
||||||
|
M: word (reset)
|
||||||
dup "unannotated-def" word-prop [
|
dup "unannotated-def" word-prop [
|
||||||
[
|
dup dup "unannotated-def" word-prop define
|
||||||
dup dup "unannotated-def" word-prop define
|
|
||||||
] with-compilation-unit
|
|
||||||
f "unannotated-def" set-word-prop
|
f "unannotated-def" set-word-prop
|
||||||
] [ drop ] if ;
|
] [ drop ] if ;
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
||||||
|
: reset ( word -- )
|
||||||
|
[ (reset) ] with-compilation-unit ;
|
||||||
|
|
||||||
ERROR: cannot-annotate-twice word ;
|
ERROR: cannot-annotate-twice word ;
|
||||||
|
|
||||||
M: cannot-annotate-twice summary drop "Cannot annotate a word twice" ;
|
M: cannot-annotate-twice summary drop "Cannot annotate a word twice" ;
|
||||||
|
|
Loading…
Reference in New Issue