compiler.units: fix modify-code-heap example.

Make sure ``foo`` has the same stack effect as the quotation that is
set on ``foo`` with ``modify-code-heap``.  The symbol had a stack
effect of ( -- x ) since it pushes itself when it is called. The
quotation in the example had stack effect ( -- ).
char-rename
John Benediktsson 2017-05-05 08:38:49 -07:00
parent 1898c2bb3a
commit f75743ecf7
1 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,8 @@ $nl
"Manually creating a word using the non-optimizing compiler:" "Manually creating a word using the non-optimizing compiler:"
{ $example { $example
"USING: compiler.units io ;" "USING: compiler.units io ;"
"IN: test SYMBOL: foo" "IN: scratchpad"
": foo ( -- ) ;"
"{ { foo [ \"hello!\" write nl ] } } t t modify-code-heap foo" "{ { foo [ \"hello!\" write nl ] } } t t modify-code-heap foo"
"hello!" "hello!"
} }