[squeak-dev] 4.5 compiler
Trygve Reenskaug
trygver at ifi.uio.no
Mon Dec 8 09:48:16 UTC 2014
THANK YOU!!
On 08.12.2014 08:21, Nicolai Hess wrote:
> Hi Trygve,
>
> I slightly changed the code for using the BB1RoleNode class.
> Instead of modifying the encoder scope table, I put this code
> in the method for parsing (global-)variables :
>
> Encoder>>encodeVariable: name sourceRange: range ifUnknown: action
>
> Now I can use the current encoder in the BB1RoleNode class and use it
> to create
> an Literal entry for the literal set :
>
> BB1RoleNode>>asVariable: roleName contextName: ctxNam withEncoder: enc
> ...
> enc encodeLiteral: roleName asSymbol.
>
>
> And I changed the receiver VariableNode to a LiteralVariableNode, it
> looks like
> the sizeCodeForValue: works now.
>
>
> nicolai
>
>
>
>
>
> 2014-12-07 12:42 GMT+01:00 Trygve Reenskaug <trygver at ifi.uio.no
> <mailto:trygver at ifi.uio.no>>:
>
> 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 <http://BB1RoleNode-3.5.st>,
> /*/*Encoder-#BabyIDE-4.5.st <http://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 <http://BB1RoleNode-3.5.st>//
> // Encoder-#BabyIDE-4.5.st <http://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
>
>
>
>
>
>
--
Trygve Reenskaug mailto: trygver at ifi.uio.no
Morgedalsvn. 5A http://folk.uio.no/trygver/
N-0378 Oslo http://fullOO.info
Norway Tel: (+47) 22 49 57 27
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141208/5d886ea7/attachment.htm
More information about the Squeak-dev
mailing list
|