gensyms don't output a number in the name now

db4
Doug Coleman 2008-04-11 12:52:56 -05:00
parent ce57aca4f5
commit 9348b9b8a7
1 changed files with 7 additions and 8 deletions

View File

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