Inference cleanups
parent
e18191daf4
commit
e9c2fbb835
|
@ -8,6 +8,7 @@
|
||||||
- scroll to caret
|
- scroll to caret
|
||||||
- better listener multi-line expression handling
|
- better listener multi-line expression handling
|
||||||
- history doesn't work in a good way if you ^K the input
|
- history doesn't work in a good way if you ^K the input
|
||||||
|
- history: move caret to end
|
||||||
|
|
||||||
- httpd search tools
|
- httpd search tools
|
||||||
- remaining HTML issues need fixing
|
- remaining HTML issues need fixing
|
||||||
|
|
|
@ -116,13 +116,13 @@ M: object apply-word ( word -- )
|
||||||
#! A primitive with an unknown stack effect.
|
#! A primitive with an unknown stack effect.
|
||||||
no-effect ;
|
no-effect ;
|
||||||
|
|
||||||
: save-effect ( word terminates effect -- )
|
: save-effect ( word terminates effect prop -- )
|
||||||
swap [ 2drop ] [ "infer-effect" set-word-prop ] if ;
|
rot [ 3drop ] [ set-word-prop ] if ;
|
||||||
|
|
||||||
M: compound apply-word ( word -- )
|
M: compound apply-word ( word -- )
|
||||||
#! Infer a compound word's stack effect.
|
#! 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
|
swap t "no-effect" set-word-prop rethrow
|
||||||
] recover ;
|
] recover ;
|
||||||
|
@ -153,8 +153,7 @@ M: symbol apply-object ( word -- )
|
||||||
over "inline" word-prop [
|
over "inline" word-prop [
|
||||||
inline-base-case
|
inline-base-case
|
||||||
] [
|
] [
|
||||||
drop dup t infer-compound swap
|
drop dup t infer-compound "base-case" save-effect
|
||||||
[ 2drop ] [ "base-case" set-word-prop ] if
|
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: recursive-word ( word rstate -- )
|
: recursive-word ( word rstate -- )
|
||||||
|
|
Loading…
Reference in New Issue