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
core/words

View File

@ -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 ;