From 577f4b26ff643d655f2d5a91a51c3d7f19022fb8 Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 12 Aug 2006 19:58:32 +0000 Subject: [PATCH] Compiler and module system fix --- TODO.FACTOR.txt | 1 + library/compiler/generator/xt.factor | 3 +-- library/modules.factor | 6 ++++-- library/test/benchmark/empty-loop.factor | 1 - 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 8cb62e2bd3..d17b366cac 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -105,6 +105,7 @@ + misc: +- loading the image should not exhaust nursery space - compiler tests are not as reliable now - problem if major gc happens during relocation - in fact relocation should not cons at all diff --git a/library/compiler/generator/xt.factor b/library/compiler/generator/xt.factor index b58786c50c..bf8e6e9a0a 100644 --- a/library/compiler/generator/xt.factor +++ b/library/compiler/generator/xt.factor @@ -83,8 +83,7 @@ SYMBOL: label-table { { [ dup compiled-xts get hash-member? ] [ drop t ] } { [ dup changed-words get hash-member? ] [ drop f ] } - { [ dup compiled? ] [ drop t ] } - { [ t ] [ drop f ] } + { [ t ] [ compiled? ] } } cond ; : with-compiler ( quot -- ) diff --git a/library/modules.factor b/library/modules.factor index cb3da55e6b..6726691569 100644 --- a/library/modules.factor +++ b/library/modules.factor @@ -28,8 +28,10 @@ H{ } clone modules set-global : module modules get hash ; : load-module ( name -- ) - "Loading module " write dup write "..." print - [ dup module-def run-resource ] assert-depth drop ; + [ + "Loading module " write dup write "..." print + [ dup module-def run-resource ] assert-depth drop + ] no-parse-hook ; : (require) ( name -- ) dup module [ drop ] [ load-module ] if ; diff --git a/library/test/benchmark/empty-loop.factor b/library/test/benchmark/empty-loop.factor index 8f9ba87b38..fdf69b6d13 100644 --- a/library/test/benchmark/empty-loop.factor +++ b/library/test/benchmark/empty-loop.factor @@ -3,7 +3,6 @@ USING: compiler kernel math math-internals sequences test ; : empty-loop-0 ( n -- ) dup 0 fixnum< [ drop ] [ 1 fixnum-fast empty-loop-0 ] if ; - : empty-loop-1 ( n -- ) [ ] times ;