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