diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 1f34cfd271..6991bde3eb 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -8,6 +8,7 @@ - scroll to caret - better listener multi-line expression handling - history doesn't work in a good way if you ^K the input + - history: move caret to end - httpd search tools - remaining HTML issues need fixing diff --git a/library/compiler/inference/words.factor b/library/compiler/inference/words.factor index 60818cae02..91ee6fa3b0 100644 --- a/library/compiler/inference/words.factor +++ b/library/compiler/inference/words.factor @@ -116,13 +116,13 @@ M: object apply-word ( word -- ) #! A primitive with an unknown stack effect. no-effect ; -: save-effect ( word terminates effect -- ) - swap [ 2drop ] [ "infer-effect" set-word-prop ] if ; +: save-effect ( word terminates effect prop -- ) + rot [ 3drop ] [ set-word-prop ] if ; M: compound apply-word ( word -- ) #! Infer a compound word's stack effect. [ - dup f infer-compound save-effect + dup f infer-compound "infer-effect" save-effect ] [ swap t "no-effect" set-word-prop rethrow ] recover ; @@ -153,8 +153,7 @@ M: symbol apply-object ( word -- ) over "inline" word-prop [ inline-base-case ] [ - drop dup t infer-compound swap - [ 2drop ] [ "base-case" set-word-prop ] if + drop dup t infer-compound "base-case" save-effect ] if ; : recursive-word ( word rstate -- )