From 70e370f69de600c593bc1188e21641d1c66a0ffb Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 7 Jul 2008 19:26:58 -0500 Subject: [PATCH] Fix walker --- Makefile | 1 + extra/tools/walker/walker-tests.factor | 6 +++++- vm/quotations.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48d4e214db..769aeacb8c 100755 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ AR = ar LD = ld EXECUTABLE = factor +VERSION = 0.92 IMAGE = factor.image BUNDLE = Factor.app diff --git a/extra/tools/walker/walker-tests.factor b/extra/tools/walker/walker-tests.factor index 7f154a4dbf..e002af8f6d 100755 --- a/extra/tools/walker/walker-tests.factor +++ b/extra/tools/walker/walker-tests.factor @@ -1,7 +1,7 @@ USING: tools.walker io io.streams.string kernel math math.private namespaces prettyprint sequences tools.test continuations math.parser threads arrays tools.walker.debug -generic.standard ; +generic.standard sequences.private kernel.private ; IN: tools.walker.tests [ { } ] [ @@ -50,6 +50,10 @@ IN: tools.walker.tests [ 5 6 number= ] test-walker ] unit-test +[ { 0 } ] [ + [ 0 { array-capacity } declare ] test-walker +] unit-test + [ { f } ] [ [ "XYZ" "XYZ" mismatch ] test-walker ] unit-test diff --git a/vm/quotations.c b/vm/quotations.c index 0f60eea3e1..7eab41688a 100755 --- a/vm/quotations.c +++ b/vm/quotations.c @@ -422,7 +422,10 @@ F_FIXNUM quot_code_offset_to_scan(CELL quot, F_FIXNUM offset) } if(jit_ignore_declare_p(untag_object(array),i)) { + if(offset == 0) return i; + i++; + break; } default: