gensyms don't output a number in the name now
parent
ce57aca4f5
commit
9348b9b8a7
core/words
|
@ -2,8 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: arrays definitions graphs assocs kernel kernel.private
|
||||
slots.private math namespaces sequences strings vectors sbufs
|
||||
quotations assocs hashtables sorting math.parser words.private
|
||||
vocabs combinators ;
|
||||
quotations assocs hashtables sorting words.private vocabs ;
|
||||
IN: words
|
||||
|
||||
: word ( -- word ) \ word get-global ;
|
||||
|
@ -66,11 +65,11 @@ SYMBOL: bootstrapping?
|
|||
GENERIC: crossref? ( word -- ? )
|
||||
|
||||
M: word crossref?
|
||||
{
|
||||
{ [ dup "forgotten" word-prop ] [ f ] }
|
||||
{ [ dup word-vocabulary ] [ t ] }
|
||||
{ [ t ] [ f ] }
|
||||
} cond nip ;
|
||||
dup "forgotten" word-prop [
|
||||
drop f
|
||||
] [
|
||||
word-vocabulary >boolean
|
||||
] if ;
|
||||
|
||||
GENERIC# (quot-uses) 1 ( obj assoc -- )
|
||||
|
||||
|
@ -191,7 +190,7 @@ M: word subwords drop f ;
|
|||
{ "methods" "combination" "default-method" } reset-props ;
|
||||
|
||||
: gensym ( -- word )
|
||||
"G:" \ gensym counter number>string append f <word> ;
|
||||
"( gensym )" f <word> ;
|
||||
|
||||
: define-temp ( quot -- word )
|
||||
gensym dup rot define ;
|
||||
|
|
Loading…
Reference in New Issue