From f75743ecf7a6b9b123ef020769022129530deb3a Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 5 May 2017 08:38:49 -0700 Subject: [PATCH] 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 ( -- ). --- core/compiler/units/units-docs.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/compiler/units/units-docs.factor b/core/compiler/units/units-docs.factor index a65dddb81a..8fb41c24a5 100644 --- a/core/compiler/units/units-docs.factor +++ b/core/compiler/units/units-docs.factor @@ -104,7 +104,8 @@ $nl "Manually creating a word using the non-optimizing compiler:" { $example "USING: compiler.units io ;" - "IN: test SYMBOL: foo" + "IN: scratchpad" + ": foo ( -- ) ;" "{ { foo [ \"hello!\" write nl ] } } t t modify-code-heap foo" "hello!" }