I'm still trying to port my BabyIDE (my DCI programming environment)
from 3.10.2 to 4.5. The stumbling block is that my 3.10.2 compiler
hacks do not work in 4.5. I posted a request for help on
2014.11.29. For some reason, that message got garbled and was hard
to understand.
Since then, I have isolated the problem into the attached files that reconstruct the problem independently of the rest of BabyIDE. The files should be filed in in sequence: RoleMethods.st, BB1RoleNode-3.5.st, Encoder-#BabyIDE-4.5.st. RoleMethods.st is the class with the method that shall be compiled: RoleMethods>>transferFrom
self increase: AMOUNT.
^true An extension makes the Encoder understand that AMOUNT is
a very special variable and adds it as a BB1RoleNode to
the parse tree:BB1RoleNode-3.5.st Encoder-#BabyIDE-4.5.st BB1RoleNode is a new VariableNode. It
acts a kind of preprocessor that translates the reference to AMOUNT
into a runtime lookup. This lookup can be seen by decompiling the
CompiledMethod. This is what makes DCI master the runtime.The 3.10.2 versions work in 3.10.2. The 4.5 versions compile the source with a couple of old halts. (May be they are warnings because the BB1RoleNode is a mixture of VariableNode and MessageNode). The result after proceeds is a CompiledMethod. It's faulty and cannot be decompiled. The decompiled code should read RoleMethods>>transferFrom
self increase: (BB1ContextStack playerForRole: #AMOUNT)
^true I hope the above is sufficient for you to find my bug(s). Thanks --Trygve 16-Squeak7179-filein.zip (6K) Download Attachment |
Hi Trygve, I slightly changed the code for using the BB1RoleNode class.Encoder>>encodeVariable: name sourceRange: range ifUnknown: action BB1RoleNode>>asVariable: roleName contextName: ctxNam withEncoder: enc ... the sizeCodeForValue: works now. nicolai 2014-12-07 12:42 GMT+01:00 Trygve Reenskaug <[hidden email]>:
role_methods_wrapper.2.cs (8K) Download Attachment |
THANK YOU!!
On 08.12.2014 08:21, Nicolai Hess
wrote:
--
Trygve Reenskaug mailto: [hidden email] Morgedalsvn. 5A http://folk.uio.no/trygver/ N-0378 Oslo http://fullOO.info Norway Tel: (+47) 22 49 57 27 |
Free forum by Nabble | Edit this page |