David,<div><br></div><div>&nbsp;&nbsp; &nbsp;can you hum a few bars on how the Smalltalk code looks using this and not using this?</div><div><br></div><div>One of the things I hate most about Slang is the exposed bit twiddlng for object headers. &nbsp;i.e. there is nothing that maps to the level of a C struct with bit fields. &nbsp;In my Cog Stack interpreter I made a class InterpreterStackPage map to a struct. &nbsp;this class is only a container. &nbsp;I&#39;d like to do the same for the object header so in Smalltalk one would have a proper object type that one could send messages like classFormatField and markBit to and have that map down onto a struct bitfield dereference which would improve readability in both Smalltalk and C. &nbsp;Any thoughts on that?<br>
<br><div class="gmail_quote">On Sat, Dec 13, 2008 at 2:24 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
&nbsp;<br>I made a separate package for MemoryAccess (Slang implementation of<br>
sqMemoryAccess.h) and uploaded it to the VMMaker project on SqueakSource.<br>
In the VMMaker project, VMMaker-dtl.110.mcz contains all prerequisites<br>
for MemoryAccess-dtl.1.mcz.<br>
<br>
Some support code patches are required to use this for Unix VM generation<br>
(patches attached). See also <a href="http://wiki.squeak.org/squeak/6081" target="_blank">http://wiki.squeak.org/squeak/6081</a> for an<br>
overview that may be useful if merging into another VMMaker code base.<br>
<br>
MemoryAccess makes no changes to generated VM code until it is enabled<br>
(&quot;MemoryAccess enable&quot;), so it can be safely loaded into an image and<br>
used as needed.<br>
<br>
I find that using MemoryAccess helps the C compiler find type casting<br>
errors, and produces code that is easier to follow in a debugger. On my<br>
computer, there is no performance difference between the MemoryAccess<br>
slang versus CPP macros in sqMemoryAccess.h.<br>
<br>
Dave<br>
<br>
<br></blockquote></div><br></div>