Fix bootstrap
parent
5470330c45
commit
ea36783fb3
|
@ -69,6 +69,6 @@ TUPLE: alien-callback-params < alien-node-params quot xt ;
|
|||
pop-literal nip >>abi
|
||||
pop-literal nip >>parameters
|
||||
pop-literal nip >>return
|
||||
"( callback )" f <word> >>xt
|
||||
"( callback )" <uninterned-word> >>xt
|
||||
dup callback-bottom
|
||||
#alien-callback, ;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||
! 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
|
||||
|
||||
"syntax" create-vocab drop
|
||||
[
|
||||
"syntax" create-vocab drop
|
||||
|
||||
{
|
||||
{
|
||||
"!"
|
||||
"\""
|
||||
"#!"
|
||||
|
@ -85,6 +87,7 @@ IN: bootstrap.syntax
|
|||
"read-only"
|
||||
"call("
|
||||
"execute("
|
||||
} [ "syntax" create drop ] each
|
||||
} [ "syntax" create drop ] each
|
||||
|
||||
"t" "syntax" lookup define-symbol
|
||||
"t" "syntax" lookup define-symbol
|
||||
] with-compilation-unit
|
||||
|
|
|
@ -7,7 +7,7 @@ IN: compiler.units.tests
|
|||
|
||||
! Non-optimizing compiler bugs
|
||||
[ 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
|
||||
] unit-test
|
||||
|
||||
|
|
|
@ -137,8 +137,11 @@ M: word reset-word
|
|||
: <word> ( name vocab -- word )
|
||||
2dup [ hashcode ] bi@ bitxor >fixnum (word) dup new-word ;
|
||||
|
||||
: <uninterned-word> ( name -- word )
|
||||
f \ <uninterned-word> counter >fixnum (word) ;
|
||||
|
||||
: gensym ( -- word )
|
||||
"( gensym )" f \ gensym counter >fixnum (word) ;
|
||||
"( gensym )" <uninterned-word> ;
|
||||
|
||||
: define-temp ( quot effect -- word )
|
||||
[ gensym dup ] 2dip define-declared ;
|
||||
|
|
Loading…
Reference in New Issue