Fix bootstrap

db4
Slava Pestov 2009-11-13 07:55:47 -06:00
parent 5470330c45
commit ea36783fb3
4 changed files with 93 additions and 87 deletions

View File

@ -69,6 +69,6 @@ TUPLE: alien-callback-params < alien-node-params quot xt ;
pop-literal nip >>abi pop-literal nip >>abi
pop-literal nip >>parameters pop-literal nip >>parameters
pop-literal nip >>return pop-literal nip >>return
"( callback )" f <word> >>xt "( callback )" <uninterned-word> >>xt
dup callback-bottom dup callback-bottom
#alien-callback, ; #alien-callback, ;

View File

@ -1,90 +1,93 @@
! Copyright (C) 2007, 2008 Slava Pestov. ! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: words words.symbol sequences vocabs kernel ; USING: words words.symbol sequences vocabs kernel
compiler.units ;
IN: bootstrap.syntax IN: bootstrap.syntax
"syntax" create-vocab drop [
"syntax" create-vocab drop
{ {
"!" "!"
"\"" "\""
"#!" "#!"
"(" "("
"((" "(("
":" ":"
";" ";"
"<PRIVATE" "<PRIVATE"
"BIN:" "BIN:"
"B{" "B{"
"BV{" "BV{"
"C:" "C:"
"CHAR:" "CHAR:"
"DEFER:" "DEFER:"
"ERROR:" "ERROR:"
"FORGET:" "FORGET:"
"GENERIC#" "GENERIC#"
"GENERIC:" "GENERIC:"
"HEX:" "HEX:"
"HOOK:" "HOOK:"
"H{" "H{"
"IN:" "IN:"
"INSTANCE:" "INSTANCE:"
"M:" "M:"
"MAIN:" "MAIN:"
"MATH:" "MATH:"
"MIXIN:" "MIXIN:"
"NAN:" "NAN:"
"OCT:" "OCT:"
"P\"" "P\""
"POSTPONE:" "POSTPONE:"
"PREDICATE:" "PREDICATE:"
"PRIMITIVE:" "PRIMITIVE:"
"PRIVATE>" "PRIVATE>"
"SBUF\"" "SBUF\""
"SINGLETON:" "SINGLETON:"
"SINGLETONS:" "SINGLETONS:"
"SYMBOL:" "SYMBOL:"
"SYMBOLS:" "SYMBOLS:"
"CONSTANT:" "CONSTANT:"
"TUPLE:" "TUPLE:"
"SLOT:" "SLOT:"
"T{" "T{"
"UNION:" "UNION:"
"INTERSECTION:" "INTERSECTION:"
"USE:" "USE:"
"UNUSE:" "UNUSE:"
"USING:" "USING:"
"QUALIFIED:" "QUALIFIED:"
"QUALIFIED-WITH:" "QUALIFIED-WITH:"
"FROM:" "FROM:"
"EXCLUDE:" "EXCLUDE:"
"RENAME:" "RENAME:"
"ALIAS:" "ALIAS:"
"SYNTAX:" "SYNTAX:"
"V{" "V{"
"W{" "W{"
"[" "["
"\\" "\\"
"M\\" "M\\"
"]" "]"
"delimiter" "delimiter"
"deprecated" "deprecated"
"f" "f"
"flushable" "flushable"
"foldable" "foldable"
"inline" "inline"
"recursive" "recursive"
"t" "t"
"{" "{"
"}" "}"
"CS{" "CS{"
"<<" "<<"
">>" ">>"
"call-next-method" "call-next-method"
"initial:" "initial:"
"read-only" "read-only"
"call(" "call("
"execute(" "execute("
} [ "syntax" create drop ] each } [ "syntax" create drop ] each
"t" "syntax" lookup define-symbol "t" "syntax" lookup define-symbol
] with-compilation-unit

View File

@ -7,7 +7,7 @@ IN: compiler.units.tests
! Non-optimizing compiler bugs ! Non-optimizing compiler bugs
[ 1 1 ] [ [ 1 1 ] [
"A" "B" <word> [ [ [ 1 ] dip ] 2array 1array modify-code-heap ] keep "A" <uninterned-word> [ [ [ 1 ] dip ] 2array 1array modify-code-heap ] keep
1 swap execute 1 swap execute
] unit-test ] unit-test

View File

@ -137,8 +137,11 @@ M: word reset-word
: <word> ( name vocab -- word ) : <word> ( name vocab -- word )
2dup [ hashcode ] bi@ bitxor >fixnum (word) dup new-word ; 2dup [ hashcode ] bi@ bitxor >fixnum (word) dup new-word ;
: <uninterned-word> ( name -- word )
f \ <uninterned-word> counter >fixnum (word) ;
: gensym ( -- word ) : gensym ( -- word )
"( gensym )" f \ gensym counter >fixnum (word) ; "( gensym )" <uninterned-word> ;
: define-temp ( quot effect -- word ) : define-temp ( quot effect -- word )
[ gensym dup ] 2dip define-declared ; [ gensym dup ] 2dip define-declared ;