From 3366640fb12b25f6bfe4b7761a05caf447c6b8cc Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 4 Aug 2005 04:48:07 +0000 Subject: [PATCH] further code cleanups, unit test fixes --- library/continuations.factor | 2 +- library/inference/inline-methods.factor | 3 ++- library/inference/print-dataflow.factor | 2 +- library/test/compiler/optimizer.factor | 12 ++++-------- library/ui/presentations.factor | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/library/continuations.factor b/library/continuations.factor index 558906f1ec..d6f9411144 100644 --- a/library/continuations.factor +++ b/library/continuations.factor @@ -28,4 +28,4 @@ TUPLE: interp data call name catch ; : callcc1 ( quot ++ obj | quot: cont -- | cont: obj ++ obj ) continuation - [ swap literalize set-interp ] cons swap call ; + [ swap literalize unit set-interp ] cons swap call ; diff --git a/library/inference/inline-methods.factor b/library/inference/inline-methods.factor index ed0c3de085..7f7b6c23c2 100644 --- a/library/inference/inline-methods.factor +++ b/library/inference/inline-methods.factor @@ -83,7 +83,8 @@ M: 2generic dispatching-values drop node-in-d 2 swap tail* ; : subst-literal ( successor literal -- #push ) #! Make #push -> #return -> successor - literalize dataflow [ last-node set-node-successor ] keep ; + literalize unit dataflow + [ last-node set-node-successor ] keep ; : inline-literal ( node literal -- node ) over drop-inputs diff --git a/library/inference/print-dataflow.factor b/library/inference/print-dataflow.factor index d3584bb156..731f62ab94 100644 --- a/library/inference/print-dataflow.factor +++ b/library/inference/print-dataflow.factor @@ -30,7 +30,7 @@ M: comment prettyprint* ( ann -- ) ] make-string ; M: #push node>quot ( ? node -- ) - node-out-d [ literal-value literalize ] map concat % drop ; + node-out-d [ literal-value literalize ] map % drop ; M: #drop node>quot ( ? node -- ) node-in-d length dup 3 > [ diff --git a/library/test/compiler/optimizer.factor b/library/test/compiler/optimizer.factor index 828ca6baa2..5bb2b9ca1d 100644 --- a/library/test/compiler/optimizer.factor +++ b/library/test/compiler/optimizer.factor @@ -1,8 +1,4 @@ - -GENERIC: xyz -M: cons xyz xyz ; - -[ ] [ \ xyz compile ] unit-testIN: temporary +IN: temporary USING: generic kernel-internals strings vectors ; USE: test USE: assembler @@ -79,11 +75,11 @@ USE: sequences [ 4 ] [ 2 2 literal-kill-test-7 ] unit-test -[ t ] [ +[ string ] [ \ string [ range repeated integer string mirror array reversed sbuf slice vector diagonal general-list ] - min-class? + min-class ] unit-test [ f ] [ @@ -144,7 +140,7 @@ TUPLE: pred-test ; "not a tuple" ] ifte ; compiled -[ 1 "pred-test" ] [ << pred-test >> pred-test-3 ] unit-test +[ << pred-test >> "pred-test" ] [ << pred-test >> pred-test-3 ] unit-test : pred-test-4 dup pred-test? [ diff --git a/library/ui/presentations.factor b/library/ui/presentations.factor index dee5c62fbc..47fa520d73 100644 --- a/library/ui/presentations.factor +++ b/library/ui/presentations.factor @@ -27,7 +27,7 @@ global [ 100 commands set ] bind dup presented paint-prop dup [ [ \ drop , - literal, + literalize , [ command-menu show-menu ] % ] make-list button-gestures