fix namespace bug in meta-interpreter
parent
b022dfd1d9
commit
68d034d7eb
|
@ -7,7 +7,6 @@
|
|||
<magnus--> http://clozure.com/cgi-bin/viewcvs.cgi/ccl/lisp-kernel/lisp-exceptions.c?rev=1.9&content-type=text/vnd.viewcvs-markup
|
||||
|
||||
<erg> if write returns -1 and errno == EINTR then it's not a real error, you can try again
|
||||
- single-stepper and variable access: wrong namespace?
|
||||
- http keep alive, and range get
|
||||
- sleep word
|
||||
- fix i/o on generic x86/ppc unix
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
IN: temporary
|
||||
USING: unparser ;
|
||||
USE: vectors
|
||||
USE: interpreter
|
||||
USE: test
|
||||
|
@ -63,6 +64,26 @@ USE: sequences
|
|||
[ 2 2 + ] test-interpreter
|
||||
] unit-test
|
||||
|
||||
[ { 3 } ] [
|
||||
[ 3 "x" set "x" get ] test-interpreter
|
||||
] unit-test
|
||||
|
||||
[ { } ] [
|
||||
[ 2 2 + . ] test-interpreter
|
||||
] unit-test
|
||||
|
||||
[ { "hi\n" } ] [
|
||||
[ [ "hi" print ] with-string ] test-interpreter
|
||||
] unit-test
|
||||
|
||||
[ { "4\n" } ] [
|
||||
[ [ 2 2 + unparse print ] with-string ] test-interpreter
|
||||
] unit-test
|
||||
|
||||
[ { "4" } ] [
|
||||
[ [ 0 2 2 + prettyprint* drop ] with-string ] test-interpreter
|
||||
] unit-test
|
||||
|
||||
[ { "4\n" } ] [
|
||||
[ [ 2 2 + . ] with-string ] test-interpreter
|
||||
] unit-test
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2004, 2005 Slava Pestov.
|
||||
! See http://factor.sf.net/license.txt for BSD license.
|
||||
IN: interpreter
|
||||
USING: errors kernel lists math namespaces prettyprint sequences
|
||||
stdio strings vectors words ;
|
||||
USING: errors kernel kernel-internals lists math namespaces
|
||||
prettyprint sequences stdio strings vectors words ;
|
||||
|
||||
! A Factor interpreter written in Factor. Used by compiler for
|
||||
! partial evaluation, also by the walker.
|
||||
|
@ -93,5 +93,6 @@ SYMBOL: meta-executing
|
|||
\ call [ pop-d meta-call ] set-meta-word
|
||||
\ execute [ pop-d meta-word ] set-meta-word
|
||||
\ ifte [ pop-d pop-d pop-d [ nip ] [ drop ] ifte meta-call ] set-meta-word
|
||||
\ dispatch [ pop-d pop-d swap nth meta-call ] set-meta-word
|
||||
|
||||
\ set-meta-word forget
|
||||
|
|
Loading…
Reference in New Issue