<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Feb 23, 2014 at 9:48 AM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
On Sun, Feb 23, 2014 at 08:48:28AM -0800, Eliot Miranda wrote:<br>
><br>
> Hi David, you might want to check the accessors. For example, in the below you added getNilObj but (at least in Cog) there's already nilObject, trueObject et al to access nilObj, trueObj et al.<br>
><br>
> Eliot (phone)<br>
<br>
</div>I'll double check when I get a chance. It's quite likely that I've made<br>
some unnecessary changes along the way. The general problem was the case<br>
of a variable foo with accessors #foo and #foo: such that the generated<br>
code would be:<br>
sqInt foo;<br>
sqInt foo(void);<br>
sqInt foo(sqInt bar);<br></blockquote><div><br></div><div>Right. And the easiest pattern for that is</div><div><br></div><div>sqInt foo;</div><div><br></div><div>foo</div> <cmacro: '() GIV(foo)'><div>
^foo</div><div><br></div><div>foo: aFoo</div><div> foo := aFoo</div><div><br></div><div>=></div><div><br></div><div><div>sqInt foo;</div><div>#define foo() GIV(foo)</div></div><div>void foo(sqInt aFoo) { GIV(foo) = aFoo; }</div>
<div><br></div><div>e.g. memory in ObjectMemory and SpurObjectMemory in Cog.</div><div><br></div><div>This because the C preprocessor will fail to match a zero-argument marco against a 1-argument use of that macro. So</div>
<div><br></div><div>foo() => GIV(foo)<br></div><div>foo(bar) => foo(bar)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Dave<br>
<div class=""><div class="h5"><br>
<br>
><br>
> On Feb 23, 2014, at 8:36 AM, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
><br>
> ><br>
> > David T. Lewis uploaded a new version of VMMaker to project VM Maker:<br>
> > <a href="http://source.squeak.org/VMMaker/VMMaker-dtl.342.mcz" target="_blank">http://source.squeak.org/VMMaker/VMMaker-dtl.342.mcz</a><br>
> ><br>
> > ==================== Summary ====================<br>
> ><br>
> > Name: VMMaker-dtl.342<br>
> > Author: dtl<br>
> > Time: 23 February 2014, 10:37:08.672 am<br>
> > UUID: b96b3f58-94e9-45e0-a1b5-833b62ca2284<br>
> > Ancestors: VMMaker-dtl.341<br>
> ><br>
> > VMMaker 4.13.3<br>
> ><br>
> > Make it possible to produce a working VM with inlining disabled.<br>
> ><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>