From e63be4d157bc19eb9573756dc148a581819aabd2 Mon Sep 17 00:00:00 2001 From: slava Date: Mon, 15 May 2006 05:49:07 +0000 Subject: [PATCH] More test fixes --- library/compiler/inference/dataflow.factor | 6 +++--- library/compiler/inference/inference.factor | 3 ++- library/compiler/inference/words.factor | 8 ++++---- library/test/continuations.factor | 1 - library/test/interpreter.factor | 2 +- library/tools/interpreter.factor | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/library/compiler/inference/dataflow.factor b/library/compiler/inference/dataflow.factor index 5c96f5858c..9747528793 100644 --- a/library/compiler/inference/dataflow.factor +++ b/library/compiler/inference/dataflow.factor @@ -34,7 +34,7 @@ M: node = eq? ; : meta-d-node meta-d get clone in-node ; : d-tail ( n -- list ) meta-d get tail* ; -: c-tail ( n -- list ) meta-c get tail* ; +: r-tail ( n -- list ) meta-r get tail* ; : node-child node-children first ; @@ -97,12 +97,12 @@ C: #declare make-node ; : node-inputs ( d-count r-count node -- ) tuck - >r c-tail r> set-node-in-r + >r r-tail r> set-node-in-r >r d-tail r> set-node-in-d ; : node-outputs ( d-count r-count node -- ) tuck - >r c-tail r> set-node-out-r + >r r-tail r> set-node-out-r >r d-tail r> set-node-out-d ; ! Variable holding dataflow graph being built. diff --git a/library/compiler/inference/inference.factor b/library/compiler/inference/inference.factor index b318e0a173..c89866f368 100644 --- a/library/compiler/inference/inference.factor +++ b/library/compiler/inference/inference.factor @@ -15,7 +15,7 @@ SYMBOL: base-case-continuation TUPLE: inference-error message rstate data-stack call-stack ; : inference-error ( msg -- ) - recursive-state get meta-d get meta-c get + recursive-state get meta-d get meta-r get throw ; M: inference-error error. ( error -- ) @@ -109,6 +109,7 @@ M: quotation infer-quot ( quot -- ) [ inferring-base-case off base-case-continuation off + { } recursive-state set f init-inference call check-return diff --git a/library/compiler/inference/words.factor b/library/compiler/inference/words.factor index 4e2a150b9d..4c6e4b9bff 100644 --- a/library/compiler/inference/words.factor +++ b/library/compiler/inference/words.factor @@ -1,7 +1,7 @@ -! Copyright (C) 2004, 2005 Slava Pestov. -! See http://factor.sf.net/license.txt for BSD license. +! Copyright (C) 2004, 2006 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. IN: inference -USING: arrays errors generic hashtables interpreter kernel lists +USING: arrays errors generic hashtables interpreter kernel math math-internals namespaces parser prettyprint sequences strings vectors words ; @@ -37,7 +37,7 @@ TUPLE: rstate label base-case? ; r> current-node set ; : with-recursive-state ( word label base-case quot -- ) - >r 2array recursive-state [ cons ] change r> + >r 2array recursive-state [ swap add ] change r> nest-node 2slip unnest-node ; inline : inline-block ( word base-case -- node-block variables ) diff --git a/library/test/continuations.factor b/library/test/continuations.factor index 087076ab18..86e3869c78 100644 --- a/library/test/continuations.factor +++ b/library/test/continuations.factor @@ -1,6 +1,5 @@ IN: temporary USE: kernel -USE: lists USE: math USE: namespaces USE: io diff --git a/library/test/interpreter.factor b/library/test/interpreter.factor index 655e8151ab..ac331176fe 100644 --- a/library/test/interpreter.factor +++ b/library/test/interpreter.factor @@ -69,5 +69,5 @@ namespaces prettyprint sequences test ; ] unit-test [ V{ "4\n" } ] [ - [ [ 2 2 + . ] string-out ] test-interpreter + [ [ 2 2 + number>string print ] string-out ] test-interpreter ] unit-test diff --git a/library/tools/interpreter.factor b/library/tools/interpreter.factor index d42cf8681e..846eb81053 100644 --- a/library/tools/interpreter.factor +++ b/library/tools/interpreter.factor @@ -1,5 +1,5 @@ -! Copyright (C) 2004, 2005 Slava Pestov. -! See http://factor.sf.net/license.txt for BSD license. +! Copyright (C) 2004, 2006 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. IN: interpreter USING: errors generic io kernel kernel-internals lists math namespaces prettyprint sequences strings vectors words ;