inferred-effect word prop is just a boolean now, not an effect object

db4
Slava Pestov 2009-02-23 20:51:14 -06:00
parent 1951d739a0
commit f1d20719b2
2 changed files with 5 additions and 8 deletions

View File

@ -146,11 +146,10 @@ M: object apply-object push-literal ;
[ 3drop ] [ effect-error ] if ; [ 3drop ] [ effect-error ] if ;
: finish-word ( word -- ) : finish-word ( word -- )
current-effect [ current-effect check-effect ]
[ check-effect ] [ recorded get push ]
[ drop recorded get push ] [ t "inferred-effect" set-word-prop ]
[ "inferred-effect" set-word-prop ] tri ;
2tri ;
: cannot-infer-effect ( word -- * ) : cannot-infer-effect ( word -- * )
"cannot-infer" word-prop throw ; "cannot-infer" word-prop throw ;

View File

@ -44,9 +44,7 @@ M: effect effect>string ( effect -- string )
GENERIC: stack-effect ( word -- effect/f ) GENERIC: stack-effect ( word -- effect/f )
M: word stack-effect M: word stack-effect "declared-effect" word-prop ;
{ "declared-effect" "inferred-effect" }
swap props>> [ at ] curry map [ ] find nip ;
M: deferred stack-effect call-next-method (( -- * )) or ; M: deferred stack-effect call-next-method (( -- * )) or ;