<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
THANK YOU!!<br>
<br>
<div class="moz-cite-prefix">On 08.12.2014 08:21, Nicolai Hess
wrote:<br>
</div>
<blockquote
cite="mid:CAPED3SRPHS4xh1rQ5TnWi6EcWcvu5M4VY16UEYgzbvhsBNx_jw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hi Trygve,<br>
<br>
</div>
I slightly changed the code for using the
BB1RoleNode class.<br>
</div>
Instead of modifying the encoder scope table, I put
this code <br>
</div>
in the method for parsing (global-)variables :<br>
<br>
Encoder>>encodeVariable: name sourceRange: range
ifUnknown: action<br>
<br>
</div>
Now I can use the current encoder in the BB1RoleNode
class and use it to create <br>
</div>
an Literal entry for the literal set :<br>
</div>
<br>
BB1RoleNode>>asVariable: roleName contextName: ctxNam
withEncoder: enc <br>
...<br>
</div>
enc encodeLiteral: roleName asSymbol.<br>
<br>
<br>
</div>
And I changed the receiver VariableNode to a
LiteralVariableNode, it looks like<br>
the sizeCodeForValue: works now.<br>
<br>
<br>
nicolai<br>
<br>
<div><br>
<div>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2014-12-07 12:42 GMT+01:00 Trygve
Reenskaug <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:trygver@ifi.uio.no" target="_blank">trygver@ifi.uio.no</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> 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.<br>
<br>
Since then, I have isolated the problem into the attached
files that reconstruct the problem independently of the
rest of BabyIDE. <br>
<b>The files should be filed in in sequence: </b><b><i>RoleMethods.st,
</i></b><b><i><a moz-do-not-send="true"
href="http://BB1RoleNode-3.5.st" target="_blank">BB1RoleNode-3.5.st</a>,
</i></b><i><b>Encoder-#<a moz-do-not-send="true"
href="http://BabyIDE-4.5.st" target="_blank">BabyIDE-4.5.st</a>.</b><br>
<br>
</i> <i>RoleMethods.st </i><br>
<br>
is the class with the method that shall be compiled:<br>
<code>RoleMethods>>transferFrom </code><code><br>
</code><code> self increase: AMOUNT. </code><code><br>
</code><code> ^true</code><br>
An extension makes the Encoder understand that <code>AMOUNT
</code>is a very special variable and adds it as a <code>BB1RoleNode
</code>to the parse tree:<br>
<i><br>
</i><i> <a moz-do-not-send="true"
href="http://BB1RoleNode-3.5.st" target="_blank">BB1RoleNode-3.5.st</a></i><i><br>
</i><i> Encoder-#<a moz-do-not-send="true"
href="http://BabyIDE-4.5.st" target="_blank">BabyIDE-4.5.st</a></i><br>
<br>
<code>BB1RoleNode </code>is a new <code>VariableNode.</code>
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.<br>
<br>
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<br>
<br>
<code>RoleMethods>>transferFrom</code><code><br>
</code><code> self increase: (BB1ContextStack
playerForRole: #AMOUNT)</code><code><br>
</code><code> ^true</code><br>
<br>
I hope the above is sufficient for you to find my bug(s).<br>
<br>
Thanks<span class="HOEnZb"><font color="#888888"><br>
--Trygve<br>
</font></span></div>
<br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 10">
<meta name="Originator" content="Microsoft Word 10">
<link rel="File-List" href="TrygveSignature-filer/filelist.xml">
<br>
Trygve Reenskaug mailto: <a class="moz-txt-link-abbreviated" href="mailto:trygver@ifi.uio.no">trygver@ifi.uio.no</a>
<br>
Morgedalsvn. 5A <a class="moz-txt-link-freetext" href="http://folk.uio.no/trygver/">http://folk.uio.no/trygver/</a>
<br>
N-0378 Oslo <a class="moz-txt-link-freetext" href="http://fullOO.info">http://fullOO.info</a>
<br>
Norway Tel: (+47) 22 49 57 27
</div>
</body>
</html>