<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-14190</id>
	<title>Nabble - Squeak - VM Dev</title>
	<updated>2006-07-20T03:01:00Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Squeak---VM-Dev-f14190.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Squeak---VM-Dev-f14190.html" />
	<subtitle type="html">Squeak Virtual Machine Development Discussion.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-5411264</id>
	<title>Fwd: vm-dev moving to lists.squeakfoundation.org</title>
	<published>2006-07-20T03:01:00Z</published>
	<updated>2006-07-20T03:01:00Z</updated>
	<author>
		<name>Bert Freudenberg-3</name>
	</author>
	<content type="html">Forwarded on behalf of Marcus The List Admin:
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: Marcus Denker &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5411264&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;denker@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: 19. Juli 2006 23:11:31 GMT+02:00
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The list &amp;quot;vm-dev&amp;quot; is moving to Mailman.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; new adress: &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5411264&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;vm-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Please subscribe to the new list:
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://lists.squeakfoundation.org/mailman/listinfo/vm-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.squeakfoundation.org/mailman/listinfo/vm-dev&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Existing substriptions are *not* moved over, you need to re-subsribe!
&lt;br&gt;&amp;gt; (The archives have been moved over).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Posting to the old discuss list will be possible till tommorow, &amp;nbsp;
&lt;br&gt;&amp;gt; then it will be
&lt;br&gt;&amp;gt; de-activated.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Marcus
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Fwd%3A-vm-dev-moving-to-lists.squeakfoundation.org-tp5411264p5411264.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5249344</id>
	<title>One-click plugin development</title>
	<published>2006-07-10T04:34:19Z</published>
	<updated>2006-07-10T04:34:19Z</updated>
	<author>
		<name>Bert Freudenberg-3</name>
	</author>
	<content type="html">I found myself doing this a gazillion times over the last days: click &amp;nbsp;
&lt;br&gt;the VMMaker's &amp;quot;generate plugin&amp;quot; button, switch to XCode, invoke the &amp;nbsp;
&lt;br&gt;plugin build, switch back to Squeak, unload the plugin to test the &amp;nbsp;
&lt;br&gt;new one.
&lt;br&gt;&lt;br&gt;No more.
&lt;br&gt;&lt;br&gt;A few lines of code automate all of this:
&lt;br&gt;&lt;br&gt;VMMaker&amp;gt;&amp;gt;generateExternalPlugins
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; externalPlugins size = 1 ifTrue: [
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | result |
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logger show: 'XCode: building ', externalPlugins first, ' ... '.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result := Applescript doIt: 'tell application &amp;quot;XCode&amp;quot; to build'.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logger show: result; cr.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (result beginsWith: '&amp;quot;Build succeeded')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ifTrue: [Smalltalk unloadModule: externalPlugins first]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ifFalse: [Applescript doIt: 'tell application &amp;quot;XCode&amp;quot; to activate']].
&lt;br&gt;&lt;br&gt;Now I just click &amp;quot;generate plugin&amp;quot; and debug on. Life is bright &amp;nbsp;
&lt;br&gt;again. Except for the occasional crash, of course :)
&lt;br&gt;&lt;br&gt;- Bert -
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/One-click-plugin-development-tp5249344p5249344.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5226347</id>
	<title>Re: Mac build setup?</title>
	<published>2006-07-07T17:49:28Z</published>
	<updated>2006-07-07T17:49:28Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Thanks John. Just what I was looking for.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br&gt;John M McIntosh wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Download the SVN tree, there is a readme document in the mac document 
&lt;br&gt;&amp;gt; folder that explains how to build
&lt;br&gt;&amp;gt; we try to keep it current, so start with that and let me know if problem.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; final test of course is if bytecode/send rate is same as published vm
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 7-Jul-06, at 3:41 PM, Andreas Raab wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Hi John -
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I need to do a bit of work with a custom Mac VM and I was wondering 
&lt;br&gt;&amp;gt;&amp;gt; what setup you use these days to build VMs. Is there any document 
&lt;br&gt;&amp;gt;&amp;gt; somewhere that describes your setup, steps to take etc. to build a Mac 
&lt;br&gt;&amp;gt;&amp;gt; VM?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; ===========================================================================
&lt;br&gt;&amp;gt; John M. McIntosh &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5226347&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;johnmci@...&lt;/a&gt;&amp;gt; 1-800-477-2659
&lt;br&gt;&amp;gt; Corporate Smalltalk Consulting Ltd. &amp;nbsp;&lt;a href=&quot;http://www.smalltalkconsulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.smalltalkconsulting.com&lt;/a&gt;&lt;br&gt;&amp;gt; ===========================================================================
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Mac-build-setup--tp5225764p5226347.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5226120</id>
	<title>Re: Mac build setup?</title>
	<published>2006-07-07T17:20:10Z</published>
	<updated>2006-07-07T17:20:10Z</updated>
	<author>
		<name>John M McIntosh</name>
	</author>
	<content type="html">Download the SVN tree, there is a readme document in the mac document &amp;nbsp;
&lt;br&gt;folder that explains how to build
&lt;br&gt;we try to keep it current, so start with that and let me know if &amp;nbsp;
&lt;br&gt;problem.
&lt;br&gt;&lt;br&gt;&lt;br&gt;final test of course is if bytecode/send rate is same as published vm
&lt;br&gt;&lt;br&gt;On 7-Jul-06, at 3:41 PM, Andreas Raab wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi John -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I need to do a bit of work with a custom Mac VM and I was wondering &amp;nbsp;
&lt;br&gt;&amp;gt; what setup you use these days to build VMs. Is there any document &amp;nbsp;
&lt;br&gt;&amp;gt; somewhere that describes your setup, steps to take etc. to build a &amp;nbsp;
&lt;br&gt;&amp;gt; Mac VM?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;======================================================================== 
&lt;br&gt;===
&lt;br&gt;John M. McIntosh &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5226120&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;johnmci@...&lt;/a&gt;&amp;gt; 1-800-477-2659
&lt;br&gt;Corporate Smalltalk Consulting Ltd. &amp;nbsp;&lt;a href=&quot;http://www.smalltalkconsulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.smalltalkconsulting.com&lt;/a&gt;&lt;br&gt;======================================================================== 
&lt;br&gt;===
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Mac-build-setup--tp5225764p5226120.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5225764</id>
	<title>Mac build setup?</title>
	<published>2006-07-07T16:41:57Z</published>
	<updated>2006-07-07T16:41:57Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Hi John -
&lt;br&gt;&lt;br&gt;I need to do a bit of work with a custom Mac VM and I was wondering what 
&lt;br&gt;setup you use these days to build VMs. Is there any document somewhere 
&lt;br&gt;that describes your setup, steps to take etc. to build a Mac VM?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Mac-build-setup--tp5225764p5225764.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5213403</id>
	<title>Re: [FIX] lockSurfaces</title>
	<published>2006-07-07T02:09:54Z</published>
	<updated>2006-07-07T02:09:54Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Yup. Small but important fix - if this ever hits you you're dead in the 
&lt;br&gt;water. Thanks for finding it!
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br&gt;Bert Freudenberg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; There is a wrong condition in an almost never-taken branch of 
&lt;br&gt;&amp;gt; BitBltSimulation&amp;gt;&amp;gt;lockSurfaces (when src=dst):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isWarping ifFalse:[
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;When warping we always need the entire surface for 
&lt;br&gt;&amp;gt; the source&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sourceBits _ self cCode:'fn(sourceHandle, 
&lt;br&gt;&amp;gt; &amp;sourcePitch, 0,0, sourceWidth, sourceHeight)'.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] ifTrue:[
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;Otherwise use overlapping area&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; l _ sx min: dx. r _ (sx max: dx) + bbW.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t _ sy min: dy. b _ (sy max: sy) + bbH.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sourceBits _ self cCode:'fn(sourceHandle, 
&lt;br&gt;&amp;gt; &amp;sourcePitch, l, t, r-l, b-t)'.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ].
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As the comments indicate, the condition is reversed. Please include 
&lt;br&gt;&amp;gt; attached fix in VMMaker.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - Bert -
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-FIX--lockSurfaces-tp5213374p5213403.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5213374</id>
	<title>[FIX] lockSurfaces</title>
	<published>2006-07-07T02:08:26Z</published>
	<updated>2006-07-07T02:08:26Z</updated>
	<author>
		<name>Bert Freudenberg-3</name>
	</author>
	<content type="html">There is a wrong condition in an almost never-taken branch of &amp;nbsp;
&lt;br&gt;BitBltSimulation&amp;gt;&amp;gt;lockSurfaces (when src=dst):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;isWarping ifFalse:[
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;When warping we always need the entire surface &amp;nbsp;
&lt;br&gt;for the source&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sourceBits _ self cCode:'fn(sourceHandle, &amp;nbsp;
&lt;br&gt;&amp;sourcePitch, 0,0, sourceWidth, sourceHeight)'.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;] ifTrue:[
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Otherwise use overlapping area&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;l _ sx min: dx. r _ (sx max: dx) + bbW.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;t _ sy min: dy. b _ (sy max: sy) + bbH.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sourceBits _ self cCode:'fn(sourceHandle, &amp;nbsp;
&lt;br&gt;&amp;sourcePitch, l, t, r-l, b-t)'.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;].
&lt;br&gt;&lt;br&gt;As the comments indicate, the condition is reversed. Please include &amp;nbsp;
&lt;br&gt;attached fix in VMMaker.
&lt;br&gt;&lt;br&gt;- Bert -
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;bltBltLockFix-bf.1.cs.gz&lt;/strong&gt; (2K) &lt;a href=&quot;http://www.nabble.com/attachment/5213374/0/bltBltLockFix-bf.1.cs.gz&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-FIX--lockSurfaces-tp5213374p5213374.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5157437</id>
	<title>Re: Re: newbie trouble building Squeak VM on Mac</title>
	<published>2006-07-03T14:08:37Z</published>
	<updated>2006-07-03T14:08:37Z</updated>
	<author>
		<name>Michael Haupt-3</name>
	</author>
	<content type="html">Hi Ian,
&lt;br&gt;&lt;br&gt;On 7/3/06, Ian Piumarta &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5157437&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;piumarta@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; The usual reason for confusion about gl.h availability is that the
&lt;br&gt;&amp;gt; build cannot find the xmkmf program. &amp;nbsp;If you do have the X11 SDK
&lt;br&gt;&amp;gt; installed then make absolutely sure /usr/X11R6/bin is in your PATH
&lt;br&gt;&amp;gt; before you try to build the VM.
&lt;br&gt;&lt;br&gt;thank you very much! Indeed, the X11 bin directory is not in the path,
&lt;br&gt;so I'll try it once more with that. (Even though it works fine with
&lt;br&gt;the --without-x option...)
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/newbie-trouble-building-Squeak-VM-on-Mac-tp5154581p5157437.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5157393</id>
	<title>Re: newbie trouble building Squeak VM on Mac</title>
	<published>2006-07-03T14:05:02Z</published>
	<updated>2006-07-03T14:05:02Z</updated>
	<author>
		<name>piumarta@speakeasy.net</name>
	</author>
	<content type="html">Hi Michael,
&lt;br&gt;&lt;br&gt;&amp;gt; /Users/haupt/squeakvm/squeak-svn/platforms/unix/plugins/ 
&lt;br&gt;&amp;gt; B3DAcceleratorPlugin/sqUnixOpenGL.h:26:7:
&lt;br&gt;&amp;gt; error: #error *** cannot find gl.h
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Huh. Apparently the configure script thought there was OpenGL on the
&lt;br&gt;&amp;gt; machine, didn't it? Anyway, where / how can I obtain that file
&lt;br&gt;&lt;br&gt;If you're building vm-display-X11 then gl.h is /usr/X11R6/include/GL/ 
&lt;br&gt;gl.h. &amp;nbsp;It comes with the X11 SDK.
&lt;br&gt;&lt;br&gt;For vm-display-Quartz the file is part of the OpenGL framework: /Sys/ 
&lt;br&gt;Lib/Frameworks/OpenGL.framework/Headers/gl.h. &amp;nbsp;It comes with Mac OS X.
&lt;br&gt;&lt;br&gt;The usual reason for confusion about gl.h availability is that the &amp;nbsp;
&lt;br&gt;build cannot find the xmkmf program. &amp;nbsp;If you do have the X11 SDK &amp;nbsp;
&lt;br&gt;installed then make absolutely sure /usr/X11R6/bin is in your PATH &amp;nbsp;
&lt;br&gt;before you try to build the VM.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Ian
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/newbie-trouble-building-Squeak-VM-on-Mac-tp5154581p5157393.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5157358</id>
	<title>Re: newbie trouble building Squeak VM on Mac</title>
	<published>2006-07-03T14:01:43Z</published>
	<updated>2006-07-03T14:01:43Z</updated>
	<author>
		<name>Michael Haupt-3</name>
	</author>
	<content type="html">Hi again,
&lt;br&gt;&lt;br&gt;On 7/3/06, Michael Haupt &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5157358&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mhaupt@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I have checked out the latest VM sources from svn today, run the
&lt;br&gt;&amp;gt; configure script (for the unix platform - I have a G4 PowerBook
&lt;br&gt;&amp;gt; running Mac OS X 10.4.7), and issued &amp;quot;make Squeak.app&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Eventually, the build stops with an error:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Users/haupt/squeakvm/squeak-svn/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h:26:7:
&lt;br&gt;&amp;gt; error: #error *** cannot find gl.h
&lt;br&gt;&lt;br&gt;now that was a stupid question. :-)
&lt;br&gt;&lt;br&gt;Running configure with the --without-x option did the trick. Quite obviously so.
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/newbie-trouble-building-Squeak-VM-on-Mac-tp5154581p5157358.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5154581</id>
	<title>newbie trouble building Squeak VM on Mac</title>
	<published>2006-07-03T10:24:09Z</published>
	<updated>2006-07-03T10:24:09Z</updated>
	<author>
		<name>Michael Haupt-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;it's my first attempt ever to actually build a Squeak VM, hence the
&lt;br&gt;crosspost to both the beginners' and VM dev lists.
&lt;br&gt;&lt;br&gt;I have checked out the latest VM sources from svn today, run the
&lt;br&gt;configure script (for the unix platform - I have a G4 PowerBook
&lt;br&gt;running Mac OS X 10.4.7), and issued &amp;quot;make Squeak.app&amp;quot;.
&lt;br&gt;&lt;br&gt;Eventually, the build stops with an error:
&lt;br&gt;&lt;br&gt;/Users/haupt/squeakvm/squeak-svn/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h:26:7:
&lt;br&gt;error: #error *** cannot find gl.h
&lt;br&gt;&lt;br&gt;Huh. Apparently the configure script thought there was OpenGL on the
&lt;br&gt;machine, didn't it? Anyway, where / how can I obtain that file or
&lt;br&gt;exclude OpenGL support?
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/newbie-trouble-building-Squeak-VM-on-Mac-tp5154581p5154581.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5031378</id>
	<title>Re: InterpreterSimulator and friends</title>
	<published>2006-06-24T23:04:34Z</published>
	<updated>2006-06-24T23:04:34Z</updated>
	<author>
		<name>Michael van der Gulik</name>
	</author>
	<content type="html">Thanks for the quick reply!
&lt;br&gt;&lt;br&gt;It might be useful adding the following information to SqueakVM.org:
&lt;br&gt;&lt;br&gt;- How to find the Squeak-VM mailing list.
&lt;br&gt;&lt;br&gt;- Where the code is and how to get it (i.e. svn://squeakvm.org/... and 
&lt;br&gt;SqueakMap).
&lt;br&gt;&lt;br&gt;- How to contribute changes.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Mikevdg.
&lt;br&gt;&lt;br&gt;tim Rowledge wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 23-Jun-06, at 8:49 PM, Michael van der Gulik wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi all.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Where is the latest stable version of VMMaker? Is it &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; VMMaker-3.8b6.mcz from SqueakMap
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; , or VMMaker-tpr-5.mcz (which seems old) from SqueakSource.com?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No - after a few attempts with squeaksource a long time ago I gave &amp;nbsp;
&lt;br&gt;&amp;gt; up; not particularly because of any fault but it simply didn't suit &amp;nbsp;
&lt;br&gt;&amp;gt; my working habits.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Or somewhere else?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Nope. SM is it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I see that squeakvm.org has an SVN server, but where do you keep &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; your Monticello files?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When the swiki is running (I can't access it right now) search for &amp;nbsp;
&lt;br&gt;&amp;gt; VMMaker and you should find all the documentation you need. If you &amp;nbsp;
&lt;br&gt;&amp;gt; don't, let us know what you think it missing and it has a chance of &amp;nbsp;
&lt;br&gt;&amp;gt; getting improved!
&lt;br&gt;&amp;gt; I don't keep all the MC files publically accessible because &amp;nbsp;
&lt;br&gt;&amp;gt; intermediate states are normally not usable. Releases on SM are known &amp;nbsp;
&lt;br&gt;&amp;gt; to have built working VMs on at least two OSs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I've got a bug, probably in my code but maybe in the VM, involving &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; becomeForward:copyHash:. The primitive is failing for no apparant &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; reason. I plan to try running this code in the InterpreterSimulator &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; to find exactly why primitive 239 is failing.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The immediate things I can think of involve some checks early in the &amp;nbsp;
&lt;br&gt;&amp;gt; prim that protect you against catastrophe.
&lt;br&gt;&amp;gt; Comment from ObjectMemory&amp;gt;prepareForwardingTableForBecoming: array1 &amp;nbsp;
&lt;br&gt;&amp;gt; with: array2 twoWay: twoWayFlag
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;quot;Important note on multiple references to same object &amp;nbsp;- since 
&lt;br&gt;&amp;gt; the &amp;nbsp;preparation of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; fwdBlocks is NOT idempotent we get VM crashes if the same object 
&lt;br&gt;&amp;gt; is &amp;nbsp;referenced more
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; than once in such a way as to require multiple fwdBlocks.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; oop1 forwardBecome: oop1 is ok since only a single fwdBlock is 
&lt;br&gt;&amp;gt; needed.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; oop1 become: oop1 would fail because the second fwdBlock woudl 
&lt;br&gt;&amp;gt; not &amp;nbsp;have the actual object
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; header but rather the mutated ref to the first fwdBlock.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Further problems can arise with an array1 or array2 that refer &amp;nbsp;
&lt;br&gt;&amp;gt; multiply to the same
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; object. This would notbe expected input for programmer writen 
&lt;br&gt;&amp;gt; code &amp;nbsp;but might arise from
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; automatic usage such as in ImageSegment loading.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; To avoid the simple and rather common case of oop1 become*: oop1, 
&lt;br&gt;&amp;gt; we &amp;nbsp;skip such pairs
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; and simply avoid making fwdBlocks - it is redundant anyway&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Currently I've tried both VMMaker-tpr.58.mcz and VMMaker-3.8b6.mcz, &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; but the InterpreterSimulator doesn't want to work.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I make no guarantee on the state of InterpreterSimulator. I was under &amp;nbsp;
&lt;br&gt;&amp;gt; the impression that it was functional in the current version, mostly &amp;nbsp;
&lt;br&gt;&amp;gt; because of a lot of work Craig did to support his Spoon project. I &amp;nbsp;
&lt;br&gt;&amp;gt; simply don't have enough spare time to do all the work and the &amp;nbsp;
&lt;br&gt;&amp;gt; simulator is one area I have to leave for others to worry about.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I get a DNU, which I fixed, but then I get another DNU, which I &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; fixed, but then I got another, so I threw the whole thing away in &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; disgust. I have a bog standard 32-bit AMD-based PC running Ubuntu.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sometimes you just have to keep bashing those balrogs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; tim
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; tim Rowledge; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=5031378&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tim@...&lt;/a&gt;; &lt;a href=&quot;http://www.rowledge.org/tim&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.rowledge.org/tim&lt;/a&gt;&lt;br&gt;&amp;gt; Press [ESC] to detonate or any other key to explode.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/InterpreterSimulator-and-friends-tp5030284p5031378.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5030894</id>
	<title>Re: ObjectiveCPlugin, VMMaker usage</title>
	<published>2006-06-24T21:02:31Z</published>
	<updated>2006-06-24T21:02:31Z</updated>
	<author>
		<name>Damien Pollet</name>
	</author>
	<content type="html">OK, following Goran's instructions at &lt;a href=&quot;http://goran.krampe.se/blog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://goran.krampe.se/blog&lt;/a&gt;, I
&lt;br&gt;can now build a VM. But when I add a plugin (ObjC or GTK) I get
&lt;br&gt;strange compile errors...
&lt;br&gt;&lt;br&gt;for the ObjC plugin:
&lt;br&gt;&lt;br&gt;In file included from Squeak-3.9-7/build/config.h:184,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from Squeak-3.9-7/platforms/Cross/vm/sqMemoryAccess.h:19,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from Squeak-3.9-7/platforms/Cross/vm/sqVirtualMachine.h:15,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from
&lt;br&gt;Squeak-3.9-7/platforms/unix/plugins/ObjectiveCPlugin/sqUnixObjC.m:2:
&lt;br&gt;Squeak-3.9-7/platforms/unix/vm/glibc.h:6: error: syntax error before 'c'
&lt;br&gt;Squeak-3.9-7/platforms/unix/vm/glibc.h:6: error: syntax error before '&amp;' token
&lt;br&gt;Squeak-3.9-7/platforms/unix/vm/glibc.h:7: error: syntax error before 'c'
&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;is it a compiler problem, or some preprocessor stuff that the objc
&lt;br&gt;compiler doesn't like ?
&lt;br&gt;&lt;br&gt;for the GtkPlugin:
&lt;br&gt;&lt;br&gt;Squeak-3.9-7/platforms/unix/plugins/GtkPlugin/sqUnixGtkPrims.c: In
&lt;br&gt;function 'GenericCallback':
&lt;br&gt;Squeak-3.9-7/platforms/unix/plugins/GtkPlugin/sqUnixGtkPrims.c:123:
&lt;br&gt;error: 'struct VirtualMachine' has no member named 'callbackEnter'
&lt;br&gt;Squeak-3.9-7/platforms/unix/plugins/GtkPlugin/sqUnixGtkPrims.c: In
&lt;br&gt;function 'gReturnFromCallback':
&lt;br&gt;Squeak-3.9-7/platforms/unix/plugins/GtkPlugin/sqUnixGtkPrims.c:149:
&lt;br&gt;error: 'struct VirtualMachine' has no member named 'callbackLeave'
&lt;br&gt;&lt;br&gt;This one is really funny because I grepped the sources (both 3.9-7 and
&lt;br&gt;svn) and these identifiers appear nowhere else...
&lt;br&gt;&lt;br&gt;I'm on Linux x86, using GNUstep for the Foundation libs. Any idea?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp;Damien Pollet
&lt;br&gt;&amp;nbsp;type less, do more
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/ObjectiveCPlugin%2C-VMMaker-usage-tp4909323p5030894.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-5030284</id>
	<title>InterpreterSimulator and friends</title>
	<published>2006-06-23T21:49:34Z</published>
	<updated>2006-06-23T21:49:34Z</updated>
	<author>
		<name>Michael van der Gulik</name>
	</author>
	<content type="html">Hi all.
&lt;br&gt;&lt;br&gt;Where is the latest stable version of VMMaker? Is it VMMaker-3.8b6.mcz 
&lt;br&gt;from SqueakMap, or VMMaker-tpr-5.mcz (which seems old) from 
&lt;br&gt;SqueakSource.com? Or somewhere else?
&lt;br&gt;&lt;br&gt;I see that squeakvm.org has an SVN server, but where do you keep your 
&lt;br&gt;Monticello files?
&lt;br&gt;&lt;br&gt;I've got a bug, probably in my code but maybe in the VM, involving 
&lt;br&gt;becomeForward:copyHash:. The primitive is failing for no apparant 
&lt;br&gt;reason. I plan to try running this code in the InterpreterSimulator to 
&lt;br&gt;find exactly why primitive 239 is failing.
&lt;br&gt;&lt;br&gt;Currently I've tried both VMMaker-tpr.58.mcz and VMMaker-3.8b6.mcz, but 
&lt;br&gt;the InterpreterSimulator doesn't want to work. I get a DNU, which I 
&lt;br&gt;fixed, but then I get another DNU, which I fixed, but then I got 
&lt;br&gt;another, so I threw the whole thing away in disgust. I have a bog 
&lt;br&gt;standard 32-bit AMD-based PC running Ubuntu.
&lt;br&gt;&lt;br&gt;Mikevdg.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/InterpreterSimulator-and-friends-tp5030284p5030284.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4909323</id>
	<title>ObjectiveCPlugin, VMMaker usage</title>
	<published>2006-06-16T16:53:23Z</published>
	<updated>2006-06-16T16:53:23Z</updated>
	<author>
		<name>Damien Pollet</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;tonight I've been trying without success to build Alain's ObjectiveCPlugin:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.apple.com/archives/objc-language/2004/Apr/msg00002.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.apple.com/archives/objc-language/2004/Apr/msg00002.html&lt;/a&gt;&lt;br&gt;I'm using the latest tarball of the VM source, VMMaker from SqueakMap,
&lt;br&gt;and a 3.9 7033 image.
&lt;br&gt;&lt;br&gt;I got VMM to generate an ObjectiveCPlugin.c file, but the build system
&lt;br&gt;doesn't seem to see it, even after running make in unix/config,
&lt;br&gt;re-configuring, and RTFMing:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://squeakvm.org/unix/devel.html#html/devel.m4.3.1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://squeakvm.org/unix/devel.html#html/devel.m4.3.1&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://minnow.cc.gatech.edu/squeak/VMMaker&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://minnow.cc.gatech.edu/squeak/VMMaker&lt;/a&gt;&lt;br&gt;&lt;br&gt;That's my first attempt at this kind of stunt, and I would welcome
&lt;br&gt;pointers and suggestions :-)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp;Damien Pollet
&lt;br&gt;&amp;nbsp;type less, do more
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/ObjectiveCPlugin%2C-VMMaker-usage-tp4909323p4909323.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4859119</id>
	<title>Re: VM (callback+variables) changes</title>
	<published>2006-06-13T23:11:16Z</published>
	<updated>2006-06-13T23:11:16Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Hi Rob -
&lt;br&gt;&lt;br&gt;Rob Gayvert wrote:
&lt;br&gt;&amp;gt; My callback usage is intense but of limited variety, so the callback ids
&lt;br&gt;&amp;gt; are not much of a burden. Without an id, there would be no way to check 
&lt;br&gt;&amp;gt; whether the callbacks were being exited in the proper order. For some 
&lt;br&gt;&amp;gt; cases that might not be important, but it might also result in some 
&lt;br&gt;&amp;gt; nasty bugs. How about making it optional by passing a null value?
&lt;br&gt;&lt;br&gt;Well, in this case let's just leave it the way it is. There is nothing 
&lt;br&gt;worse than somebody else (who is not using the interface) screwing up 
&lt;br&gt;your callback return ;-)
&lt;br&gt;&lt;br&gt;&amp;gt; On the process management question, I'm afraid I don't understand this
&lt;br&gt;&amp;gt; area well enough. Is your concern as aesthetic one, or are there
&lt;br&gt;&amp;gt; performance or correctness issues with your current implementation?
&lt;br&gt;&lt;br&gt;Well, I just kinda dislike the idea of an array holding onto a bunch of 
&lt;br&gt;processes without a way about reflecting about them. At some point this 
&lt;br&gt;is going to get us into trouble when somebody wonders why the heck this 
&lt;br&gt;process doesn't get garbage collected. It would be better if there were 
&lt;br&gt;an explicit reference to it somewhere. So I guess it ain't critical (and 
&lt;br&gt;requires some image-side support too).
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/VM-%28callback%2Bvariables%29-changes-tp4802361p4859119.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4852924</id>
	<title>Re: VM (callback+variables) changes</title>
	<published>2006-06-13T13:29:52Z</published>
	<updated>2006-06-13T13:29:52Z</updated>
	<author>
		<name>Rob Gayvert</name>
	</author>
	<content type="html">My callback usage is intense but of limited variety, so the callback ids
&lt;br&gt;are not much of a burden. Without an id, there would be no way to check 
&lt;br&gt;whether the callbacks were being exited in the proper order. For some 
&lt;br&gt;cases that might not be important, but it might also result in some 
&lt;br&gt;nasty bugs. How about making it optional by passing a null value?
&lt;br&gt;&lt;br&gt;On the process management question, I'm afraid I don't understand this
&lt;br&gt;area well enough. Is your concern as aesthetic one, or are there
&lt;br&gt;performance or correctness issues with your current implementation?
&lt;br&gt;&lt;br&gt;.. Rob
&lt;br&gt;&lt;br&gt;&lt;br&gt;Andreas Raab wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Rob -
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Good to hear it works. There are two things that bothers me slightly and 
&lt;br&gt;&amp;gt; I'd like to get some feedback from someone who's been in that area 
&lt;br&gt;&amp;gt; before: First, the callback identifier. While it seems a good safeguard 
&lt;br&gt;&amp;gt; at first it gets into ones way pretty quickly (like in the example 
&lt;br&gt;&amp;gt; plugin where the absence of callback-id management makes it impossible 
&lt;br&gt;&amp;gt; to have more than one callback). So... do you think it's worthwhile to 
&lt;br&gt;&amp;gt; keep it and force people to go through the hoops of maintaining it?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Second, I'm somewhat unhappy about the management of the suspended 
&lt;br&gt;&amp;gt; processs. I am wondering if we shouldn't use a semaphore in the 
&lt;br&gt;&amp;gt; splObjects for this purpose and link/unlink properly. This has the 
&lt;br&gt;&amp;gt; disadvantage that some image-side changes are required but it might be 
&lt;br&gt;&amp;gt; worth it for better house-keeping.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Comments welcome!
&lt;br&gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Rob Gayvert wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Andreas,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This looks great. I tried this out with a fresh 3.9-7033 image and
&lt;br&gt;&amp;gt;&amp;gt; latest Win32 VM source, and your example worked as advertised. It also
&lt;br&gt;&amp;gt;&amp;gt; works fine as a replacement for my wxSqueak setjmp/longjmp calls, and 
&lt;br&gt;&amp;gt;&amp;gt; removes the need for an extra semaphore on the calling process. Thanks!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; .. Rob
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi Folks -
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Attached my proposed changes for both, the variable tracking as well 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; as the callback support. I'll respond in the individual threads about 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; more specific issues; let's leave this one to discuss the more 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;mechanical&amp;quot; issues if there are any. Included files:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - ExtraGCRoots.cs: The change set for tracking variables in plugins
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - Callbacks.cs: The change set for VM callback support
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - ExampleCallbacks.cs: An example plugin making use of both of the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; above features
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - sqVirtualMachine[.h|.c]: The (updated) VM proxy
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If you install all of the above and build a complete VM you should be 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; able to execute the ExampleCallbackPlugin's exampleCallback and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; successfully compute 3+4 using a callback.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Let me know if you have any problems.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/VM-%28callback%2Bvariables%29-changes-tp4802361p4852924.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4835869</id>
	<title>Re: VM (callback+variables) changes</title>
	<published>2006-06-12T14:36:57Z</published>
	<updated>2006-06-12T14:36:57Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Hi Rob -
&lt;br&gt;&lt;br&gt;Good to hear it works. There are two things that bothers me slightly and 
&lt;br&gt;I'd like to get some feedback from someone who's been in that area 
&lt;br&gt;before: First, the callback identifier. While it seems a good safeguard 
&lt;br&gt;at first it gets into ones way pretty quickly (like in the example 
&lt;br&gt;plugin where the absence of callback-id management makes it impossible 
&lt;br&gt;to have more than one callback). So... do you think it's worthwhile to 
&lt;br&gt;keep it and force people to go through the hoops of maintaining it?
&lt;br&gt;&lt;br&gt;Second, I'm somewhat unhappy about the management of the suspended 
&lt;br&gt;processs. I am wondering if we shouldn't use a semaphore in the 
&lt;br&gt;splObjects for this purpose and link/unlink properly. This has the 
&lt;br&gt;disadvantage that some image-side changes are required but it might be 
&lt;br&gt;worth it for better house-keeping.
&lt;br&gt;&lt;br&gt;Comments welcome!
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br&gt;Rob Gayvert wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Andreas,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This looks great. I tried this out with a fresh 3.9-7033 image and
&lt;br&gt;&amp;gt; latest Win32 VM source, and your example worked as advertised. It also
&lt;br&gt;&amp;gt; works fine as a replacement for my wxSqueak setjmp/longjmp calls, and 
&lt;br&gt;&amp;gt; removes the need for an extra semaphore on the calling process. Thanks!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; .. Rob
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi Folks -
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Attached my proposed changes for both, the variable tracking as well 
&lt;br&gt;&amp;gt;&amp;gt; as the callback support. I'll respond in the individual threads about 
&lt;br&gt;&amp;gt;&amp;gt; more specific issues; let's leave this one to discuss the more 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;mechanical&amp;quot; issues if there are any. Included files:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; - ExtraGCRoots.cs: The change set for tracking variables in plugins
&lt;br&gt;&amp;gt;&amp;gt; - Callbacks.cs: The change set for VM callback support
&lt;br&gt;&amp;gt;&amp;gt; - ExampleCallbacks.cs: An example plugin making use of both of the 
&lt;br&gt;&amp;gt;&amp;gt; above features
&lt;br&gt;&amp;gt;&amp;gt; - sqVirtualMachine[.h|.c]: The (updated) VM proxy
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If you install all of the above and build a complete VM you should be 
&lt;br&gt;&amp;gt;&amp;gt; able to execute the ExampleCallbackPlugin's exampleCallback and 
&lt;br&gt;&amp;gt;&amp;gt; successfully compute 3+4 using a callback.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Let me know if you have any problems.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/VM-%28callback%2Bvariables%29-changes-tp4802361p4835869.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4828451</id>
	<title>Re: VM (callback+variables) changes</title>
	<published>2006-06-12T07:14:30Z</published>
	<updated>2006-06-12T07:14:30Z</updated>
	<author>
		<name>Rob Gayvert</name>
	</author>
	<content type="html">Andreas,
&lt;br&gt;&lt;br&gt;This looks great. I tried this out with a fresh 3.9-7033 image and
&lt;br&gt;latest Win32 VM source, and your example worked as advertised. It also
&lt;br&gt;works fine as a replacement for my wxSqueak setjmp/longjmp calls, and 
&lt;br&gt;removes the need for an extra semaphore on the calling process. Thanks!
&lt;br&gt;&lt;br&gt;.. Rob
&lt;br&gt;&lt;br&gt;&lt;br&gt;Andreas Raab wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Folks -
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Attached my proposed changes for both, the variable tracking as well as 
&lt;br&gt;&amp;gt; the callback support. I'll respond in the individual threads about more 
&lt;br&gt;&amp;gt; specific issues; let's leave this one to discuss the more &amp;quot;mechanical&amp;quot; 
&lt;br&gt;&amp;gt; issues if there are any. Included files:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - ExtraGCRoots.cs: The change set for tracking variables in plugins
&lt;br&gt;&amp;gt; - Callbacks.cs: The change set for VM callback support
&lt;br&gt;&amp;gt; - ExampleCallbacks.cs: An example plugin making use of both of the above 
&lt;br&gt;&amp;gt; features
&lt;br&gt;&amp;gt; - sqVirtualMachine[.h|.c]: The (updated) VM proxy
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you install all of the above and build a complete VM you should be 
&lt;br&gt;&amp;gt; able to execute the ExampleCallbackPlugin's exampleCallback and 
&lt;br&gt;&amp;gt; successfully compute 3+4 using a callback.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Let me know if you have any problems.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/VM-%28callback%2Bvariables%29-changes-tp4802361p4828451.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4813726</id>
	<title>Re: Squeak port to Amiga progress 6-10</title>
	<published>2006-06-10T21:48:24Z</published>
	<updated>2006-06-10T21:48:24Z</updated>
	<author>
		<name>Tim Johnson-6</name>
	</author>
	<content type="html">&lt;br&gt;On Jun 10, 2006, at 6:44 PM, Tim Johnson wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; A sticking point right now is noticeable on the current screenshot. &amp;nbsp;
&lt;br&gt;&amp;gt; After the image has loaded with its initial project setup, any 
&lt;br&gt;&amp;gt; newly-opened windows (browser, transcript, or zooming any of the Play 
&lt;br&gt;&amp;gt; With Me's) causes two window gadgets to appear, but no actual window. &amp;nbsp;
&lt;br&gt;&amp;gt; Nicely, PopUpMenus work great. &amp;nbsp;I am at a loss.
&lt;br&gt;&lt;br&gt;Whoops! &amp;nbsp;Fixed this... changed a few #defines in sqConfig.h and deleted 
&lt;br&gt;old object files... *blush*
&lt;br&gt;&lt;br&gt;&amp;gt; Also I have not yet dug deeply into the file code. &amp;nbsp;I have a feeling 
&lt;br&gt;&amp;gt; my directory delineators will not work, as the Amiga uses a 
&lt;br&gt;&amp;gt; combination of :'s and /'s; &amp;nbsp;i.e. &amp;quot;DH0:Development/Squeak/SqueakVM&amp;quot;. &amp;nbsp;
&lt;br&gt;&amp;gt; Why this would keep a browser from opening, I am not sure.
&lt;br&gt;&lt;br&gt;Thanks to a tip from Mr. Rowledge, I'll be able to whip up some file 
&lt;br&gt;directory support...
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Squeak-port-to-Amiga-progress-6-10-tp4812698p4813726.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4812698</id>
	<title>Squeak port to Amiga progress 6-10</title>
	<published>2006-06-10T17:44:10Z</published>
	<updated>2006-06-10T17:44:10Z</updated>
	<author>
		<name>Tim Johnson-6</name>
	</author>
	<content type="html">Hello Everyone,
&lt;br&gt;&lt;br&gt;As of today I have speedy bitmap display working correctly, through the 
&lt;br&gt;use of the Amiga system's native WriteChunkyPixels() function and 
&lt;br&gt;built-in clipping functionality of the layers library. &amp;nbsp;Mouse clicking 
&lt;br&gt;works and windows can be moved around successfully, scroll-bars scroll, 
&lt;br&gt;text can be selected.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://metaphorse.com/amiga/squeak/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://metaphorse.com/amiga/squeak/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Alas, the colors are wrong, as I have not yet done any color mapping. &amp;nbsp;
&lt;br&gt;I also seem to be stuck to 8-bit depths with this 2.3 VM, which is 
&lt;br&gt;strange, but may make my life easier right now. &amp;nbsp;(I believe that the 
&lt;br&gt;Amiga's graphics system will automatically handle writing different 
&lt;br&gt;bit-depths to any depth screen, which would be nice. &amp;nbsp;I am crossing my 
&lt;br&gt;fingers. &amp;nbsp;I have been able to use this 8-bit display on 8-bit and 
&lt;br&gt;15-bit displays with no changed code).
&lt;br&gt;&lt;br&gt;A sticking point right now is noticeable on the current screenshot. &amp;nbsp;
&lt;br&gt;After the image has loaded with its initial project setup, any 
&lt;br&gt;newly-opened windows (browser, transcript, or zooming any of the Play 
&lt;br&gt;With Me's) causes two window gadgets to appear, but no actual window. &amp;nbsp;
&lt;br&gt;Nicely, PopUpMenus work great. &amp;nbsp;I am at a loss.
&lt;br&gt;&lt;br&gt;Also I have not yet dug deeply into the file code. &amp;nbsp;I have a feeling my 
&lt;br&gt;directory delineators will not work, as the Amiga uses a combination of 
&lt;br&gt;:'s and /'s; &amp;nbsp;i.e. &amp;quot;DH0:Development/Squeak/SqueakVM&amp;quot;. &amp;nbsp;Why this would 
&lt;br&gt;keep a browser from opening, I am not sure.
&lt;br&gt;&lt;br&gt;Thanks everyone for your help so far. &amp;nbsp;This is turning out to be quite 
&lt;br&gt;the adventure.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Tim J.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Squeak-port-to-Amiga-progress-6-10-tp4812698p4812698.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4802439</id>
	<title>Re: [Fwd: Re: Keeping oops across primitives]</title>
	<published>2006-06-09T16:29:18Z</published>
	<updated>2006-06-09T16:29:18Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Tony Garnock-Jones wrote:
&lt;br&gt;&amp;gt; Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt; Actually, this is an interesting thought. I have the need for managing a
&lt;br&gt;&amp;gt;&amp;gt; dynamic array of roots but this could be handled just as easily by
&lt;br&gt;&amp;gt;&amp;gt; tracking a variable pointing to a Squeak array.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; A variable in C is more-or-less a one-place array, so perhaps supporting
&lt;br&gt;&amp;gt; arrays is the simpler option?
&lt;br&gt;&lt;br&gt;Turns out not. The code is much simpler supporting just individual oop 
&lt;br&gt;locations (variables) so I decided to go with the following interface:
&lt;br&gt;&lt;br&gt;sqInt oopVar; /* declare a global that we wish to track */
&lt;br&gt;&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;...
&lt;br&gt;&amp;nbsp; &amp;nbsp;oopVar = vm-&amp;gt;nilObject(); /* don't forget to initialize it !!! */
&lt;br&gt;&amp;nbsp; &amp;nbsp;vm-&amp;gt;addGCRoot(&amp;oopVar); /* update it */
&lt;br&gt;&amp;nbsp; &amp;nbsp;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;and to undo that
&lt;br&gt;&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;...
&lt;br&gt;&amp;nbsp; &amp;nbsp;vm-&amp;gt;removeGCRoot(&amp;oopVar);
&lt;br&gt;&amp;nbsp; &amp;nbsp;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-Fwd%3A-Re%3A-Keeping-oops-across-primitives--tp4781102p4802439.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4802416</id>
	<title>Re: Callbacks, simplified.</title>
	<published>2006-06-09T16:27:01Z</published>
	<updated>2006-06-09T16:27:01Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Hi Rob -
&lt;br&gt;&lt;br&gt;Rob Gayvert wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;&amp;gt; Do you have any thoughts on how this could be handled better?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; How about we just suspend the currently active process when we 
&lt;br&gt;&amp;gt;&amp;gt; re-enter the interpreter? As long as the callback is synchronous (it 
&lt;br&gt;&amp;gt;&amp;gt; better be) this should work just fine, right?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yes, that should do the trick. I tried doing something like this awhile 
&lt;br&gt;&amp;gt; back, but couldn't get it to work reliably. I suspect the problem was 
&lt;br&gt;&amp;gt; that the process oop might move during a callback, in which case trying 
&lt;br&gt;&amp;gt; to resume it would cause a crash. It sounds like your other changes to 
&lt;br&gt;&amp;gt; keep oops across primitives would solve this.
&lt;/div&gt;&lt;br&gt;Yes, although (if you look at the changes) I decided to keep this 
&lt;br&gt;internal in the VM because it is also necessary to ensure proper 
&lt;br&gt;resumption upon callback return (otherwise the return value will be 
&lt;br&gt;inaccurate). So the ultimate solution goes like this:
&lt;br&gt;&lt;br&gt;Upon entering the callback, suspend the active process forcefully. Upon 
&lt;br&gt;returning from the callback resume the active process forcefully(!) so 
&lt;br&gt;that the &amp;quot;returning primitive&amp;quot; (e.g., the primitive which invoked the 
&lt;br&gt;callback) can set the proper return value.
&lt;br&gt;&lt;br&gt;As far as I am aware that solves the trick completely (check out the 
&lt;br&gt;code) at the cost of requiring that callbacks are only entered during 
&lt;br&gt;the execution of primitives (meaning that the interpreter's state is 
&lt;br&gt;externalized).
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Callbacks%2C-simplified.-tp4725255p4802416.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4802361</id>
	<title>VM (callback+variables) changes</title>
	<published>2006-06-09T16:22:39Z</published>
	<updated>2006-06-09T16:22:39Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Hi Folks -
&lt;br&gt;&lt;br&gt;Attached my proposed changes for both, the variable tracking as well as 
&lt;br&gt;the callback support. I'll respond in the individual threads about more 
&lt;br&gt;specific issues; let's leave this one to discuss the more &amp;quot;mechanical&amp;quot; 
&lt;br&gt;issues if there are any. Included files:
&lt;br&gt;&lt;br&gt;- ExtraGCRoots.cs: The change set for tracking variables in plugins
&lt;br&gt;- Callbacks.cs: The change set for VM callback support
&lt;br&gt;- ExampleCallbacks.cs: An example plugin making use of both of the above 
&lt;br&gt;features
&lt;br&gt;- sqVirtualMachine[.h|.c]: The (updated) VM proxy
&lt;br&gt;&lt;br&gt;If you install all of the above and build a complete VM you should be 
&lt;br&gt;able to execute the ExampleCallbackPlugin's exampleCallback and 
&lt;br&gt;successfully compute 3+4 using a callback.
&lt;br&gt;&lt;br&gt;Let me know if you have any problems.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;#include &amp;lt;math.h&amp;gt;
&lt;br&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;#include &amp;lt;stdlib.h&amp;gt;
&lt;br&gt;#include &amp;lt;string.h&amp;gt;
&lt;br&gt;#include &amp;lt;time.h&amp;gt;
&lt;br&gt;#include &amp;quot;sqVirtualMachine.h&amp;quot;
&lt;br&gt;&lt;br&gt;/*** Function prototypes ***/
&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'stack access' */
&lt;br&gt;sqInt &amp;nbsp;pop(sqInt nItems);
&lt;br&gt;sqInt &amp;nbsp;popthenPush(sqInt nItems, sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;push(sqInt object);
&lt;br&gt;sqInt &amp;nbsp;pushBool(sqInt trueOrFalse);
&lt;br&gt;sqInt &amp;nbsp;pushFloat(double f);
&lt;br&gt;sqInt &amp;nbsp;pushInteger(sqInt integerValue);
&lt;br&gt;double stackFloatValue(sqInt offset);
&lt;br&gt;sqInt &amp;nbsp;stackIntegerValue(sqInt offset);
&lt;br&gt;sqInt &amp;nbsp;stackObjectValue(sqInt offset);
&lt;br&gt;sqInt &amp;nbsp;stackValue(sqInt offset);
&lt;br&gt;&lt;br&gt;/*** variables ***/
&lt;br&gt;&lt;br&gt;extern sqInt (*compilerHooks[])();
&lt;br&gt;extern sqInt setCompilerInitialized(sqInt flagValue);
&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'object access' */
&lt;br&gt;sqInt &amp;nbsp;argumentCountOf(sqInt methodPointer);
&lt;br&gt;void &amp;nbsp;*arrayValueOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;byteSizeOf(sqInt oop);
&lt;br&gt;void &amp;nbsp;*fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer);
&lt;br&gt;sqInt &amp;nbsp;fetchClassOf(sqInt oop);
&lt;br&gt;double fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer);
&lt;br&gt;sqInt &amp;nbsp;fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer);
&lt;br&gt;sqInt &amp;nbsp;fetchPointerofObject(sqInt index, sqInt oop);
&lt;br&gt;/* sqInt &amp;nbsp;fetchWordofObject(sqInt fieldIndex, sqInt oop); &amp;nbsp; &amp;nbsp; *
&lt;br&gt;&amp;nbsp;* has been rescinded as of VMMaker 3.8 and the 64bitclean VM *
&lt;br&gt;&amp;nbsp;* work. To support old plugins we keep a valid function in &amp;nbsp; *
&lt;br&gt;&amp;nbsp;* the same location in the VM struct but rename it to &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp;* something utterly horrible to scare off the natives. A new *
&lt;br&gt;&amp;nbsp;* equivalent but 64 bit valid function is added as &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;&amp;nbsp;* 'fetchLong32OfObject' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;sqInt &amp;nbsp;obsoleteDontUseThisFetchWordofObject(sqInt index, sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;fetchLong32ofObject(sqInt index, sqInt oop); 
&lt;br&gt;void &amp;nbsp;*firstFixedField(sqInt oop);
&lt;br&gt;void &amp;nbsp;*firstIndexableField(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;literalofMethod(sqInt offset, sqInt methodPointer);
&lt;br&gt;sqInt &amp;nbsp;literalCountOf(sqInt methodPointer);
&lt;br&gt;sqInt &amp;nbsp;methodArgumentCount(void);
&lt;br&gt;sqInt &amp;nbsp;methodPrimitiveIndex(void);
&lt;br&gt;sqInt &amp;nbsp;primitiveMethod(void);
&lt;br&gt;sqInt &amp;nbsp;primitiveIndexOf(sqInt methodPointer);
&lt;br&gt;sqInt &amp;nbsp;sizeOfSTArrayFromCPrimitive(void *cPtr);
&lt;br&gt;sqInt &amp;nbsp;slotSizeOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;stObjectat(sqInt array, sqInt index);
&lt;br&gt;sqInt &amp;nbsp;stObjectatput(sqInt array, sqInt index, sqInt value);
&lt;br&gt;sqInt &amp;nbsp;stSizeOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;storeIntegerofObjectwithValue(sqInt index, sqInt oop, sqInt integer);
&lt;br&gt;sqInt &amp;nbsp;storePointerofObjectwithValue(sqInt index, sqInt oop, sqInt valuePointer);
&lt;br&gt;&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'testing' */
&lt;br&gt;sqInt isKindOf(sqInt oop, char *aString);
&lt;br&gt;sqInt isMemberOf(sqInt oop, char *aString);
&lt;br&gt;sqInt isBytes(sqInt oop);
&lt;br&gt;sqInt isFloatObject(sqInt oop);
&lt;br&gt;sqInt isIndexable(sqInt oop);
&lt;br&gt;sqInt isIntegerObject(sqInt objectPointer);
&lt;br&gt;sqInt isIntegerValue(sqInt intValue);
&lt;br&gt;sqInt isPointers(sqInt oop);
&lt;br&gt;sqInt isWeak(sqInt oop);
&lt;br&gt;sqInt isWords(sqInt oop);
&lt;br&gt;sqInt isWordsOrBytes(sqInt oop);
&lt;br&gt;sqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperClass);
&lt;br&gt;sqInt isArray(sqInt oop);
&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'converting' */
&lt;br&gt;sqInt &amp;nbsp;booleanValueOf(sqInt obj);
&lt;br&gt;sqInt &amp;nbsp;checkedIntegerValueOf(sqInt intOop);
&lt;br&gt;sqInt &amp;nbsp;floatObjectOf(double aFloat);
&lt;br&gt;double floatValueOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;integerObjectOf(sqInt value);
&lt;br&gt;sqInt &amp;nbsp;integerValueOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;positive32BitIntegerFor(sqInt integerValue);
&lt;br&gt;sqInt &amp;nbsp;positive32BitValueOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;signed32BitIntegerFor(sqInt integerValue);
&lt;br&gt;sqInt &amp;nbsp;signed32BitValueOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;positive64BitIntegerFor(sqLong integerValue);
&lt;br&gt;sqLong positive64BitValueOf(sqInt oop);
&lt;br&gt;sqInt &amp;nbsp;signed64BitIntegerFor(sqLong integerValue);
&lt;br&gt;sqLong signed64BitValueOf(sqInt oop);
&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'special objects' */
&lt;br&gt;sqInt characterTable(void);
&lt;br&gt;sqInt displayObject(void);
&lt;br&gt;sqInt falseObject(void);
&lt;br&gt;sqInt nilObject(void);
&lt;br&gt;sqInt trueObject(void);
&lt;br&gt;&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'special classes' */
&lt;br&gt;sqInt classArray(void);
&lt;br&gt;sqInt classBitmap(void);
&lt;br&gt;sqInt classByteArray(void);
&lt;br&gt;sqInt classCharacter(void);
&lt;br&gt;sqInt classFloat(void);
&lt;br&gt;sqInt classLargePositiveInteger(void);
&lt;br&gt;sqInt classLargeNegativeInteger(void);
&lt;br&gt;sqInt classPoint(void);
&lt;br&gt;sqInt classSemaphore(void);
&lt;br&gt;sqInt classSmallInteger(void);
&lt;br&gt;sqInt classString(void);
&lt;br&gt;&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'instance creation' */
&lt;br&gt;sqInt clone(sqInt oop);
&lt;br&gt;sqInt instantiateClassindexableSize(sqInt classPointer, sqInt size);
&lt;br&gt;sqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue);
&lt;br&gt;sqInt popRemappableOop(void);
&lt;br&gt;sqInt pushRemappableOop(sqInt oop);
&lt;br&gt;&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'other' */
&lt;br&gt;sqInt becomewith(sqInt array1, sqInt array2);
&lt;br&gt;sqInt byteSwapped(sqInt w);
&lt;br&gt;sqInt failed(void);
&lt;br&gt;sqInt fullDisplayUpdate(void);
&lt;br&gt;sqInt fullGC(void);
&lt;br&gt;sqInt incrementalGC(void);
&lt;br&gt;sqInt primitiveFail(void);
&lt;br&gt;sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
&lt;br&gt;sqInt signalSemaphoreWithIndex(sqInt semaIndex);
&lt;br&gt;sqInt success(sqInt aBoolean);
&lt;br&gt;sqInt superclassOf(sqInt classPointer);
&lt;br&gt;sqInt ioMicroMSecs(void);
&lt;br&gt;sqInt forceInterruptCheck(void);
&lt;br&gt;sqInt getThisSessionID(void);
&lt;br&gt;sqInt ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);
&lt;br&gt;sqInt &amp;nbsp;vmEndianness(void);	
&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'BitBlt support' */
&lt;br&gt;sqInt loadBitBltFrom(sqInt bbOop);
&lt;br&gt;sqInt copyBits(void);
&lt;br&gt;sqInt copyBitsFromtoat(sqInt leftX, sqInt rightX, sqInt yValue);
&lt;br&gt;&lt;br&gt;/* InterpreterProxy methodsFor: 'FFI support' */
&lt;br&gt;sqInt classExternalAddress(void);
&lt;br&gt;sqInt classExternalData(void);
&lt;br&gt;sqInt classExternalFunction(void);
&lt;br&gt;sqInt classExternalLibrary(void);
&lt;br&gt;sqInt classExternalStructure(void);
&lt;br&gt;sqInt ioLoadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength);
&lt;br&gt;sqInt ioLoadSymbolOfLengthFromModule(sqInt functionNameIndex, sqInt functionNameLength, sqInt moduleHandle);
&lt;br&gt;sqInt isInMemory(sqInt address);
&lt;br&gt;&lt;br&gt;void *ioLoadFunctionFrom(char *fnName, char *modName);
&lt;br&gt;&lt;br&gt;&lt;br&gt;/* Proxy declarations for v1.8 */
&lt;br&gt;sqInt callbackEnter(sqInt *callbackID);
&lt;br&gt;sqInt callbackLeave(sqInt &amp;nbsp;callbackID);
&lt;br&gt;sqInt addGCRoot(sqInt *varLoc);
&lt;br&gt;sqInt removeGCRoot(sqInt *varLoc);
&lt;br&gt;&lt;br&gt;struct VirtualMachine *VM = NULL;
&lt;br&gt;&lt;br&gt;static sqInt majorVersion(void) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return VM_PROXY_MAJOR;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static sqInt minorVersion(void) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return VM_PROXY_MINOR;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;static CompilerHook *compilerHookVector(void) {
&lt;br&gt;&amp;nbsp; return compilerHooks;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;struct VirtualMachine* sqGetInterpreterProxy(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(VM) return VM;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM = (struct VirtualMachine *)calloc(1, sizeof(VirtualMachine));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Initialize Function pointers */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;majorVersion = majorVersion;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;minorVersion = minorVersion;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'stack access' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;pop = pop;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;popthenPush = popthenPush;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;push = push;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;pushBool = pushBool;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;pushFloat = pushFloat;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;pushInteger = pushInteger;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stackFloatValue = stackFloatValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stackIntegerValue = stackIntegerValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stackObjectValue = stackObjectValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stackValue = stackValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'object access' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;argumentCountOf = argumentCountOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;arrayValueOf = arrayValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;byteSizeOf = byteSizeOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fetchArrayofObject = fetchArrayofObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fetchClassOf = fetchClassOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fetchFloatofObject = fetchFloatofObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fetchIntegerofObject = fetchIntegerofObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fetchPointerofObject = fetchPointerofObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;obsoleteDontUseThisFetchWordofObject = obsoleteDontUseThisFetchWordofObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;firstFixedField = firstFixedField;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;firstIndexableField = firstIndexableField;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;literalofMethod = literalofMethod;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;literalCountOf = literalCountOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;methodArgumentCount = methodArgumentCount;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;methodPrimitiveIndex = methodPrimitiveIndex;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;primitiveIndexOf = primitiveIndexOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;primitiveMethod = primitiveMethod;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;sizeOfSTArrayFromCPrimitive = sizeOfSTArrayFromCPrimitive;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;slotSizeOf = slotSizeOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stObjectat = stObjectat;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stObjectatput = stObjectatput;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;stSizeOf = stSizeOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;storeIntegerofObjectwithValue = storeIntegerofObjectwithValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;storePointerofObjectwithValue = storePointerofObjectwithValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'testing' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isKindOf = isKindOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isMemberOf = isMemberOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isBytes = isBytes;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isFloatObject = isFloatObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isIndexable = isIndexable;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isIntegerObject = isIntegerObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isIntegerValue = isIntegerValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isPointers = isPointers;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isWeak = isWeak;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isWords = isWords;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isWordsOrBytes = isWordsOrBytes;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'converting' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;booleanValueOf = booleanValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;checkedIntegerValueOf = checkedIntegerValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;floatObjectOf = floatObjectOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;floatValueOf = floatValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;integerObjectOf = integerObjectOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;integerValueOf = integerValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;positive32BitIntegerFor = positive32BitIntegerFor;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;positive32BitValueOf = positive32BitValueOf;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'special objects' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;characterTable = characterTable;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;displayObject = displayObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;falseObject = falseObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;nilObject = nilObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;trueObject = trueObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'special classes' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classArray = classArray;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classBitmap = classBitmap;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classByteArray = classByteArray;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classCharacter = classCharacter;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classFloat = classFloat;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classLargePositiveInteger = classLargePositiveInteger;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classPoint = classPoint;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classSemaphore = classSemaphore;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classSmallInteger = classSmallInteger;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classString = classString;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'instance creation' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;clone = clone;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;instantiateClassindexableSize = instantiateClassindexableSize;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;makePointwithxValueyValue = makePointwithxValueyValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;popRemappableOop = popRemappableOop;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;pushRemappableOop = pushRemappableOop;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'other' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;becomewith = becomewith;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;byteSwapped = byteSwapped;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;failed = failed;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fullDisplayUpdate = fullDisplayUpdate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fullGC = fullGC;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;incrementalGC = incrementalGC;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;primitiveFail = primitiveFail;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;showDisplayBitsLeftTopRightBottom = showDisplayBitsLeftTopRightBottom;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;signalSemaphoreWithIndex = signalSemaphoreWithIndex;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;success = success;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;superclassOf = superclassOf;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;compilerHookVector= compilerHookVector;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;setCompilerInitialized= setCompilerInitialized;
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 1
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'BitBlt support' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;loadBitBltFrom = loadBitBltFrom;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;copyBits = copyBits;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;copyBitsFromtoat = copyBitsFromtoat;
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 2
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'FFI support' */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classExternalAddress = classExternalAddress;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classExternalData = classExternalData;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classExternalFunction = classExternalFunction;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classExternalLibrary = classExternalLibrary;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classExternalStructure = classExternalStructure;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;ioLoadModuleOfLength = ioLoadModuleOfLength;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;ioLoadSymbolOfLengthFromModule = ioLoadSymbolOfLengthFromModule;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isInMemory = isInMemory;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;signed32BitIntegerFor = signed32BitIntegerFor;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;signed32BitValueOf = signed32BitValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;includesBehaviorThatOf = includesBehaviorThatOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;classLargeNegativeInteger = classLargeNegativeInteger;
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 3
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;ioLoadFunctionFrom = ioLoadFunctionFrom;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;ioMicroMSecs = ioMicroMSecs;
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 4
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;positive64BitIntegerFor = positive64BitIntegerFor;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;positive64BitValueOf = positive64BitValueOf;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;signed64BitIntegerFor = signed64BitIntegerFor;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;signed64BitValueOf = signed64BitValueOf;
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 5
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;isArray = isArray;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;forceInterruptCheck = forceInterruptCheck;
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 6
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;fetchLong32ofObject = fetchLong32ofObject;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;getThisSessionID = getThisSessionID;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;ioFilenamefromStringofLengthresolveAliases = ioFilenamefromStringofLengthresolveAliases;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;vmEndianness = vmEndianness;
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 7
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;callbackEnter = callbackEnter;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;callbackLeave = callbackLeave;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;addGCRoot = addGCRoot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VM-&amp;gt;removeGCRoot = removeGCRoot;
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return VM;
&lt;br&gt;}
&lt;br&gt;&lt;br /&gt;#ifndef _SqueakVM_H
&lt;br&gt;#define _SqueakVM_H
&lt;br&gt;&lt;br&gt;/* Increment the following number if you change the order of
&lt;br&gt;&amp;nbsp; &amp;nbsp;functions listed or if you remove functions */
&lt;br&gt;#define VM_PROXY_MAJOR 1
&lt;br&gt;&lt;br&gt;/* Note: You can define a different VM_PROXY_MINOR if the plugin
&lt;br&gt;&amp;nbsp; &amp;nbsp;should work with older VMs. */
&lt;br&gt;#ifndef VM_PROXY_MINOR
&lt;br&gt;/* Increment the following number if you add functions at the end */
&lt;br&gt;#define VM_PROXY_MINOR 8
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#include &amp;quot;sqMemoryAccess.h&amp;quot;
&lt;br&gt;&lt;br&gt;typedef sqInt (*CompilerHook)();
&lt;br&gt;&lt;br&gt;struct VirtualMachine* sqGetInterpreterProxy(void);
&lt;br&gt;&lt;br&gt;typedef struct VirtualMachine {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*minorVersion)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*majorVersion)(void);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'stack access' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*pop)(sqInt nItems);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*popthenPush)(sqInt nItems, sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*push)(sqInt object);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*pushBool)(sqInt trueOrFalse);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*pushFloat)(double f);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*pushInteger)(sqInt integerValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double (*stackFloatValue)(sqInt offset);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*stackIntegerValue)(sqInt offset);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*stackObjectValue)(sqInt offset);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*stackValue)(sqInt offset);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'object access' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*argumentCountOf)(sqInt methodPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void &amp;nbsp;*(*arrayValueOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*byteSizeOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void &amp;nbsp;*(*fetchArrayofObject)(sqInt fieldIndex, sqInt objectPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*fetchClassOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double (*fetchFloatofObject)(sqInt fieldIndex, sqInt objectPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*fetchIntegerofObject)(sqInt fieldIndex, sqInt objectPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*fetchPointerofObject)(sqInt fieldIndex, sqInt oop);
&lt;br&gt;/* &amp;nbsp;sqInt &amp;nbsp;(*fetchWordofObject)(sqInt fieldFieldIndex, sqInt oop); *
&lt;br&gt;&amp;nbsp;* has been rescinded as of VMMaker 3.8 and the 64bitclean VM &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp;* work. To support old plugins we keep a valid function in &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp;* the same location in the VM struct but rename it to &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;&amp;nbsp;* something utterly horrible to scare off the natives. A new &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp;* equivalent but 64 bit valid function is added as &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp;* 'fetchLong32OfObject' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*obsoleteDontUseThisFetchWordofObject)(sqInt fieldFieldIndex, sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void &amp;nbsp;*(*firstFixedField)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void &amp;nbsp;*(*firstIndexableField)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*literalofMethod)(sqInt offset, sqInt methodPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*literalCountOf)(sqInt methodPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*methodArgumentCount)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*methodPrimitiveIndex)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*primitiveIndexOf)(sqInt methodPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*sizeOfSTArrayFromCPrimitive)(void *cPtr);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*slotSizeOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*stObjectat)(sqInt array, sqInt fieldIndex);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*stObjectatput)(sqInt array, sqInt fieldIndex, sqInt value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*stSizeOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*storeIntegerofObjectwithValue)(sqInt fieldIndex, sqInt oop, sqInt integer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*storePointerofObjectwithValue)(sqInt fieldIndex, sqInt oop, sqInt valuePointer);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'testing' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isKindOf)(sqInt oop, char *aString);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isMemberOf)(sqInt oop, char *aString);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isBytes)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isFloatObject)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isIndexable)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isIntegerObject)(sqInt objectPointer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isIntegerValue)(sqInt intValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isPointers)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isWeak)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isWords)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isWordsOrBytes)(sqInt oop);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'converting' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*booleanValueOf)(sqInt obj);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*checkedIntegerValueOf)(sqInt intOop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*floatObjectOf)(double aFloat);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double (*floatValueOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*integerObjectOf)(sqInt value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*integerValueOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*positive32BitIntegerFor)(sqInt integerValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*positive32BitValueOf)(sqInt oop);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'special objects' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*characterTable)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*displayObject)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*falseObject)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*nilObject)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*trueObject)(void);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'special classes' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classArray)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classBitmap)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classByteArray)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classCharacter)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classFloat)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classLargePositiveInteger)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classPoint)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classSemaphore)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classSmallInteger)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classString)(void);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'instance creation' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*clone)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*instantiateClassindexableSize)(sqInt classPointer, sqInt size);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*makePointwithxValueyValue)(sqInt xValue, sqInt yValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*popRemappableOop)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*pushRemappableOop)(sqInt oop);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'other' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*becomewith)(sqInt array1, sqInt array2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*byteSwapped)(sqInt w);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*failed)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*fullDisplayUpdate)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*fullGC)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*incrementalGC)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*primitiveFail)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*showDisplayBitsLeftTopRightBottom)(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*signalSemaphoreWithIndex)(sqInt semaIndex);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*success)(sqInt aBoolean);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*superclassOf)(sqInt classPointer);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'compiler' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompilerHook *(*compilerHookVector)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(*setCompilerInitialized)(sqInt initFlag);
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 1
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'BitBlt support' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*loadBitBltFrom)(sqInt bbOop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*copyBits)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*copyBitsFromtoat)(sqInt leftX, sqInt rightX, sqInt yValue);
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 2
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classLargeNegativeInteger)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*signed32BitIntegerFor)(sqInt integerValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*signed32BitValueOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*includesBehaviorThatOf)(sqInt aClass, sqInt aSuperClass);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*primitiveMethod)(void);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* InterpreterProxy methodsFor: 'FFI support' */
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classExternalAddress)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classExternalData)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classExternalFunction)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classExternalLibrary)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*classExternalStructure)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*ioLoadModuleOfLength)(sqInt modIndex, sqInt modLength);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*ioLoadSymbolOfLengthFromModule)(sqInt fnIndex, sqInt fnLength, sqInt handle);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isInMemory)(sqInt address);
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 3
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void *(*ioLoadFunctionFrom)(char *fnName, char *modName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*ioMicroMSecs)(void);
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 4
&lt;br&gt;&lt;br&gt;# &amp;nbsp;if !defined(sqLong)
&lt;br&gt;# &amp;nbsp; if _MSC_VER
&lt;br&gt;# &amp;nbsp; &amp;nbsp; define sqLong __int64
&lt;br&gt;# &amp;nbsp; else
&lt;br&gt;# &amp;nbsp; &amp;nbsp; define sqLong long long
&lt;br&gt;# &amp;nbsp; endif
&lt;br&gt;# &amp;nbsp;endif
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*positive64BitIntegerFor)(sqLong integerValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqLong (*positive64BitValueOf)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*signed64BitIntegerFor)(sqLong integerValue);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqLong (*signed64BitValueOf)(sqInt oop);
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 5
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*isArray)(sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt (*forceInterruptCheck)(void);
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 6
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*fetchLong32ofObject)(sqInt fieldFieldIndex, sqInt oop);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*getThisSessionID)(void);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt	 &amp;nbsp;(*ioFilenamefromStringofLengthresolveAliases)(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sqInt &amp;nbsp;(*vmEndianness)(void);	
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#if VM_PROXY_MINOR &amp;gt; 7
&lt;br&gt;&amp;nbsp; /* New methods for proxy version 1.8 */
&lt;br&gt;&lt;br&gt;&amp;nbsp; /* callbackEnter: Re-enter the interpreter loop for a callback.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Arguments:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;callbackID: Pointer to a location receiving the callback ID
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;used in callbackLeave
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Returns: True if successful, false otherwise */
&lt;br&gt;&amp;nbsp; sqInt (*callbackEnter)(sqInt *callbackID);
&lt;br&gt;&lt;br&gt;&amp;nbsp; /* callbackLeave: Leave the interpreter from a previous callback
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Arguments:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;callbackID: The ID of the callback received from callbackEnter()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Returns: True if succcessful, false otherwise. */
&lt;br&gt;&amp;nbsp; sqInt (*callbackLeave)(sqInt &amp;nbsp;callbackID);
&lt;br&gt;&lt;br&gt;&amp;nbsp; /* addGCRoot: Add a variable location to the garbage collector.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;The contents of the variable location will be updated accordingly.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Arguments:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;varLoc: Pointer to the variable location
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Returns: True if successful, false otherwise. */
&lt;br&gt;&amp;nbsp; sqInt (*addGCRoot)(sqInt *varLoc);
&lt;br&gt;&lt;br&gt;&amp;nbsp; /* removeGCRoot: Remove a variable location from the garbage collector.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Arguments:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;varLoc: Pointer to the variable location
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Returns: True if successful, false otherwise.
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;&amp;nbsp; sqInt (*removeGCRoot)(sqInt *varLoc);
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;} VirtualMachine;
&lt;br&gt;&lt;br&gt;#endif /* _SqueakVM_H */
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;ExtraGCRoots.cs.gz&lt;/strong&gt; (5K) &lt;a href=&quot;http://www.nabble.com/attachment/4802361/0/ExtraGCRoots.cs.gz&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;Callbacks.cs.gz&lt;/strong&gt; (10K) &lt;a href=&quot;http://www.nabble.com/attachment/4802361/1/Callbacks.cs.gz&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;ExampleCallbacks.cs.gz&lt;/strong&gt; (2K) &lt;a href=&quot;http://www.nabble.com/attachment/4802361/2/ExampleCallbacks.cs.gz&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/VM-%28callback%2Bvariables%29-changes-tp4802361p4802361.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4797459</id>
	<title>Re: Inliner strangeness</title>
	<published>2006-06-09T11:15:44Z</published>
	<updated>2006-06-09T11:15:44Z</updated>
	<author>
		<name>John M McIntosh</name>
	</author>
	<content type="html">Actually I think I've seen
&lt;br&gt;&lt;br&gt;self touch: foo
&lt;br&gt;&lt;br&gt;which is removed by the CCodeGenerator, mind I've not check this to &amp;nbsp;
&lt;br&gt;see when it's removed in relationship to the inliner logic.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 9-Jun-06, at 1:08 AM, Bert Freudenberg wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The pattern to avoid this inlining &amp;quot;strangeness&amp;quot; would be
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Interpreter&amp;gt;&amp;gt;getFoo
&lt;br&gt;&amp;gt; 	^self cCode: 'foo' inSmalltalk: [foo]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; so the inliner sees the second access.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Bert -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am 09.06.2006 um 00:47 schrieb John M McIntosh:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This was done on purpose years ago to inline all the variables in &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; the GC logic.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If you have one accessor and one usage of the variable in another &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; routine and say not to inline the accessor,
&lt;br&gt;&amp;gt;&amp;gt; then the inliner won't fold the global into a local variable. &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Your code example follows the rules nicely because you've only
&lt;br&gt;&amp;gt;&amp;gt; one usage of the foo variable we can see and why make it a global...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 8-Jun-06, at 1:53 PM, Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi -
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I don't know if this behavior has been in the CCode inliner &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; before but I just noticed that the inliner will forcefully &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; convert iVars to temps if that iVar is only explicitly referred &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to in a single method. Like, for example here:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Interpreter&amp;gt;&amp;gt;getFoo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; ^self cCode: 'foo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Interpreter&amp;gt;&amp;gt;setFoo: fooValue
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; foo := fooValue.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The above will cause the inliner to remove foo from the regular &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; interpreter variables (even if declared via #declareCVarsIn:) and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; move it into #setFoo:. With the foreseeable result of creating &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; total and utter nonsense in the resulting C code.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Has anyone seen that before?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;======================================================================== 
&lt;br&gt;===
&lt;br&gt;John M. McIntosh &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4797459&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;johnmci@...&lt;/a&gt;&amp;gt; 1-800-477-2659
&lt;br&gt;Corporate Smalltalk Consulting Ltd. &amp;nbsp;&lt;a href=&quot;http://www.smalltalkconsulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.smalltalkconsulting.com&lt;/a&gt;&lt;br&gt;======================================================================== 
&lt;br&gt;===
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Inliner-strangeness-tp4782436p4797459.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4789716</id>
	<title>Re: [Fwd: Re: Keeping oops across primitives]</title>
	<published>2006-06-09T03:01:32Z</published>
	<updated>2006-06-09T03:01:32Z</updated>
	<author>
		<name>Tony Garnock-Jones-2</name>
	</author>
	<content type="html">Andreas Raab wrote:
&lt;br&gt;&amp;gt; Actually, this is an interesting thought. I have the need for managing a
&lt;br&gt;&amp;gt; dynamic array of roots but this could be handled just as easily by
&lt;br&gt;&amp;gt; tracking a variable pointing to a Squeak array.
&lt;br&gt;&lt;br&gt;A variable in C is more-or-less a one-place array, so perhaps supporting
&lt;br&gt;arrays is the simpler option?
&lt;br&gt;&lt;br&gt;{
&lt;br&gt;&amp;nbsp; sqInt myRoot = ...;
&lt;br&gt;&amp;nbsp; vm-&amp;gt;addToVmRoots(&amp;myRoot, 1, NULL);
&lt;br&gt;&amp;nbsp; ...
&lt;br&gt;&amp;nbsp; vm-&amp;gt;addToVmRoots(NULL, 0, &amp;myRoot);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;#define WITH_ROOT(vm, var, blk) \
&lt;br&gt;&amp;nbsp; { (vm)-&amp;gt;addToVmRoots(&amp;(var), 1, NULL); \
&lt;br&gt;&amp;nbsp; &amp;nbsp; blk; \
&lt;br&gt;&amp;nbsp; &amp;nbsp; (vm)-&amp;gt;addToVmRoots(NULL, 0, &amp;(var)); }
&lt;br&gt;&lt;br&gt;{
&lt;br&gt;&amp;nbsp; sqInt myRoot2 = ...;
&lt;br&gt;&amp;nbsp; WITH_ROOT(vm, myRoot2, {
&lt;br&gt;&amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; });
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-Fwd%3A-Re%3A-Keeping-oops-across-primitives--tp4781102p4789716.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4789081</id>
	<title>Re: Inliner strangeness</title>
	<published>2006-06-09T02:08:13Z</published>
	<updated>2006-06-09T02:08:13Z</updated>
	<author>
		<name>Bert Freudenberg-3</name>
	</author>
	<content type="html">The pattern to avoid this inlining &amp;quot;strangeness&amp;quot; would be
&lt;br&gt;&lt;br&gt;Interpreter&amp;gt;&amp;gt;getFoo
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^self cCode: 'foo' inSmalltalk: [foo]
&lt;br&gt;&lt;br&gt;so the inliner sees the second access.
&lt;br&gt;&lt;br&gt;- Bert -
&lt;br&gt;&lt;br&gt;Am 09.06.2006 um 00:47 schrieb John M McIntosh:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This was done on purpose years ago to inline all the variables in &amp;nbsp;
&lt;br&gt;&amp;gt; the GC logic.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you have one accessor and one usage of the variable in another &amp;nbsp;
&lt;br&gt;&amp;gt; routine and say not to inline the accessor,
&lt;br&gt;&amp;gt; then the inliner won't fold the global into a local variable. &amp;nbsp;Your &amp;nbsp;
&lt;br&gt;&amp;gt; code example follows the rules nicely because you've only
&lt;br&gt;&amp;gt; one usage of the foo variable we can see and why make it a global...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 8-Jun-06, at 1:53 PM, Andreas Raab wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi -
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I don't know if this behavior has been in the CCode inliner before &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; but I just noticed that the inliner will forcefully convert iVars &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; to temps if that iVar is only explicitly referred to in a single &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; method. Like, for example here:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Interpreter&amp;gt;&amp;gt;getFoo
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; ^self cCode: 'foo'
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Interpreter&amp;gt;&amp;gt;setFoo: fooValue
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; foo := fooValue.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The above will cause the inliner to remove foo from the regular &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; interpreter variables (even if declared via #declareCVarsIn:) and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; move it into #setFoo:. With the foreseeable result of creating &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; total and utter nonsense in the resulting C code.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Has anyone seen that before?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; - Andreas
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Inliner-strangeness-tp4782436p4789081.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4784165</id>
	<title>Re: Inliner strangeness</title>
	<published>2006-06-08T16:47:37Z</published>
	<updated>2006-06-08T16:47:37Z</updated>
	<author>
		<name>John M McIntosh</name>
	</author>
	<content type="html">This was done on purpose years ago to inline all the variables in the &amp;nbsp;
&lt;br&gt;GC logic.
&lt;br&gt;&lt;br&gt;If you have one accessor and one usage of the variable in another &amp;nbsp;
&lt;br&gt;routine and say not to inline the accessor,
&lt;br&gt;then the inliner won't fold the global into a local variable. &amp;nbsp;Your &amp;nbsp;
&lt;br&gt;code example follows the rules nicely because you've only
&lt;br&gt;one usage of the foo variable we can see and why make it a global...
&lt;br&gt;&lt;br&gt;&lt;br&gt;On 8-Jun-06, at 1:53 PM, Andreas Raab wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't know if this behavior has been in the CCode inliner before &amp;nbsp;
&lt;br&gt;&amp;gt; but I just noticed that the inliner will forcefully convert iVars &amp;nbsp;
&lt;br&gt;&amp;gt; to temps if that iVar is only explicitly referred to in a single &amp;nbsp;
&lt;br&gt;&amp;gt; method. Like, for example here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Interpreter&amp;gt;&amp;gt;getFoo
&lt;br&gt;&amp;gt; &amp;nbsp; ^self cCode: 'foo'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Interpreter&amp;gt;&amp;gt;setFoo: fooValue
&lt;br&gt;&amp;gt; &amp;nbsp; foo := fooValue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The above will cause the inliner to remove foo from the regular &amp;nbsp;
&lt;br&gt;&amp;gt; interpreter variables (even if declared via #declareCVarsIn:) and &amp;nbsp;
&lt;br&gt;&amp;gt; move it into #setFoo:. With the foreseeable result of creating &amp;nbsp;
&lt;br&gt;&amp;gt; total and utter nonsense in the resulting C code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Has anyone seen that before?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; &amp;nbsp; - Andreas
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;======================================================================== 
&lt;br&gt;===
&lt;br&gt;John M. McIntosh &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4784165&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;johnmci@...&lt;/a&gt;&amp;gt; 1-800-477-2659
&lt;br&gt;Corporate Smalltalk Consulting Ltd. &amp;nbsp;&lt;a href=&quot;http://www.smalltalkconsulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.smalltalkconsulting.com&lt;/a&gt;&lt;br&gt;======================================================================== 
&lt;br&gt;===
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Inliner-strangeness-tp4782436p4784165.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4782507</id>
	<title>Re: Callbacks, simplified.</title>
	<published>2006-06-08T14:57:18Z</published>
	<updated>2006-06-08T14:57:18Z</updated>
	<author>
		<name>Rob Gayvert</name>
	</author>
	<content type="html">Andreas Raab wrote:
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Do you have any thoughts on how this could be handled better?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; How about we just suspend the currently active process when we re-enter 
&lt;br&gt;&amp;gt; the interpreter? As long as the callback is synchronous (it better be) 
&lt;br&gt;&amp;gt; this should work just fine, right?
&lt;br&gt;&lt;br&gt;Yes, that should do the trick. I tried doing something like this awhile 
&lt;br&gt;back, but couldn't get it to work reliably. I suspect the problem was 
&lt;br&gt;that the process oop might move during a callback, in which case trying 
&lt;br&gt;to resume it would cause a crash. It sounds like your other changes to 
&lt;br&gt;keep oops across primitives would solve this.
&lt;br&gt;&lt;br&gt;.. Rob
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Rob Gayvert wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; tim Rowledge wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On 6-Jun-06, at 5:00 PM, Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tim Rowledge wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; How are you proposing to deal with the callback at the higher &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; levels? Is the plugin going to be allowed to cons up a message and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 'send' it? Or.....?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This should be up to the plugin. I can't think of a good interface &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; right now given that we don't have enough examples to look at and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; learn from. Personally, I'm just signaling a semaphore before the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; callback and have the image &amp;quot;pull up&amp;quot; the arguments via primitives. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This avoids the need to do too much at the primitive level.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; So would simply using the normal semaphore signalling be ok? We &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; already have external semaphore capability so it would certainly be &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; simple to provide! If we implemented callbacks by taking a block (or &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a MessageSend?), making a Process that will use it, make the process &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; wait on a Semaphore and pass the semaphore index &amp;nbsp;down to the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; plugin, &amp;nbsp;then signalling the semaphore would run the block/whatever 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and &amp;nbsp;presumably ask the plugin for relevant arguments. As long as it 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; can &amp;nbsp;be non-synchronous that should work for a lot of cases, surely?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This is basically what I'm currently doing in wxSqueak. I have two 
&lt;br&gt;&amp;gt;&amp;gt; different flavors of callbacks, one for event loops and another for 
&lt;br&gt;&amp;gt;&amp;gt; other callbacks. The only real difference between these two is that 
&lt;br&gt;&amp;gt;&amp;gt; the non-event callbacks have to handle a variety of arguments. In both 
&lt;br&gt;&amp;gt;&amp;gt; cases the callbacks must appear to be handled synchronously from the 
&lt;br&gt;&amp;gt;&amp;gt; viewpoint of the (wx) calling routine. The only serious difficulty 
&lt;br&gt;&amp;gt;&amp;gt; I've encountered with this scheme is with nested callbacks. I have a 
&lt;br&gt;&amp;gt;&amp;gt; number of cases where a callback handler triggers another callback. 
&lt;br&gt;&amp;gt;&amp;gt; The problem is that when the second callback is handled, the process 
&lt;br&gt;&amp;gt;&amp;gt; in which the first primitive was called may resume prematurely, 
&lt;br&gt;&amp;gt;&amp;gt; causing the first primitive to get an incorrect return value.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The only way I found to reliably handle this scenario is to have the 
&lt;br&gt;&amp;gt;&amp;gt; first primitive pass in another semaphore and a pointer in which to 
&lt;br&gt;&amp;gt;&amp;gt; store the return value, and have the primitive signal the semphore 
&lt;br&gt;&amp;gt;&amp;gt; when it's done. It's a bit ugly, but it does work. It would be much 
&lt;br&gt;&amp;gt;&amp;gt; better if the processes involved could be controlled by the framework.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Do you have any thoughts on how this could be handled better?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; .. Rob
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Callbacks%2C-simplified.-tp4725255p4782507.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4782436</id>
	<title>Inliner strangeness</title>
	<published>2006-06-08T14:53:33Z</published>
	<updated>2006-06-08T14:53:33Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Hi -
&lt;br&gt;&lt;br&gt;I don't know if this behavior has been in the CCode inliner before but I 
&lt;br&gt;just noticed that the inliner will forcefully convert iVars to temps if 
&lt;br&gt;that iVar is only explicitly referred to in a single method. Like, for 
&lt;br&gt;example here:
&lt;br&gt;&lt;br&gt;Interpreter&amp;gt;&amp;gt;getFoo
&lt;br&gt;&amp;nbsp; &amp;nbsp;^self cCode: 'foo'
&lt;br&gt;&lt;br&gt;Interpreter&amp;gt;&amp;gt;setFoo: fooValue
&lt;br&gt;&amp;nbsp; &amp;nbsp;foo := fooValue.
&lt;br&gt;&lt;br&gt;The above will cause the inliner to remove foo from the regular 
&lt;br&gt;interpreter variables (even if declared via #declareCVarsIn:) and move 
&lt;br&gt;it into #setFoo:. With the foreseeable result of creating total and 
&lt;br&gt;utter nonsense in the resulting C code.
&lt;br&gt;&lt;br&gt;Has anyone seen that before?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Inliner-strangeness-tp4782436p4782436.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4781102</id>
	<title>[Fwd: Re: Keeping oops across primitives]</title>
	<published>2006-06-08T13:33:30Z</published>
	<updated>2006-06-08T13:33:30Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">Oops, I sent this accidentally only to Bryce...
&lt;br&gt;&lt;br&gt;-------- Original Message --------
&lt;br&gt;Subject: Re: Keeping oops across primitives
&lt;br&gt;Date: Thu, 08 Jun 2006 10:50:54 -0700
&lt;br&gt;From: Andreas Raab &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4781102&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andreas.raab@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: Bryce Kampjes &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4781102&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bryce@...&lt;/a&gt;&amp;gt;
&lt;br&gt;References: &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4781102&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;4484D055.8020603@...&lt;/a&gt;&amp;gt; 
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4781102&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;17543.20996.659703.227330@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Hi Bryce -
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; Question: Does anyone see a serious problem with the above proposal? I'm 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; about to implement this right away so if you see an issue with it, 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; please let me know.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Your solution sounds fine. I'd prefer to be able to register variables
&lt;br&gt;&amp;gt; as roots rather than having to place things in arrays for my use. But
&lt;br&gt;&amp;gt; then I'm just tracking entry points rather than individual objects (a
&lt;br&gt;&amp;gt; dictionary that maps classes and selectors to natively compiled
&lt;br&gt;&amp;gt; methods and an array of objects so natively compiled code can access
&lt;br&gt;&amp;gt; objects).
&lt;/div&gt;&lt;br&gt;Actually, this is an interesting thought. I have the need for managing a
&lt;br&gt;dynamic array of roots but this could be handled just as easily by
&lt;br&gt;tracking a variable pointing to a Squeak array.
&lt;br&gt;&lt;br&gt;So, does anyone feel strongly about going either way?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-Fwd%3A-Re%3A-Keeping-oops-across-primitives--tp4781102p4781102.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4777614</id>
	<title>Re: Callbacks, simplified.</title>
	<published>2006-06-08T12:03:12Z</published>
	<updated>2006-06-08T12:03:12Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">&amp;nbsp;&amp;gt; Do you have any thoughts on how this could be handled better?
&lt;br&gt;&lt;br&gt;How about we just suspend the currently active process when we re-enter 
&lt;br&gt;the interpreter? As long as the callback is synchronous (it better be) 
&lt;br&gt;this should work just fine, right?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br&gt;Rob Gayvert wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; tim Rowledge wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 6-Jun-06, at 5:00 PM, Andreas Raab wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; tim Rowledge wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; How are you proposing to deal with the callback at the higher &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; levels? Is the plugin going to be allowed to cons up a message and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 'send' it? Or.....?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This should be up to the plugin. I can't think of a good interface &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; right now given that we don't have enough examples to look at and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; learn from. Personally, I'm just signaling a semaphore before the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; callback and have the image &amp;quot;pull up&amp;quot; the arguments via primitives. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This avoids the need to do too much at the primitive level.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So would simply using the normal semaphore signalling be ok? We &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; already have external semaphore capability so it would certainly be &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; simple to provide! If we implemented callbacks by taking a block (or &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; a MessageSend?), making a Process that will use it, make the process &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; wait on a Semaphore and pass the semaphore index &amp;nbsp;down to the plugin, &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; then signalling the semaphore would run the block/whatever and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; presumably ask the plugin for relevant arguments. As long as it can &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; be non-synchronous that should work for a lot of cases, surely?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is basically what I'm currently doing in wxSqueak. I have two 
&lt;br&gt;&amp;gt; different flavors of callbacks, one for event loops and another for 
&lt;br&gt;&amp;gt; other callbacks. The only real difference between these two is that the 
&lt;br&gt;&amp;gt; non-event callbacks have to handle a variety of arguments. In both cases 
&lt;br&gt;&amp;gt; the callbacks must appear to be handled synchronously from the viewpoint 
&lt;br&gt;&amp;gt; of the (wx) calling routine. The only serious difficulty I've 
&lt;br&gt;&amp;gt; encountered with this scheme is with nested callbacks. I have a number 
&lt;br&gt;&amp;gt; of cases where a callback handler triggers another callback. The problem 
&lt;br&gt;&amp;gt; is that when the second callback is handled, the process in which the 
&lt;br&gt;&amp;gt; first primitive was called may resume prematurely, causing the first 
&lt;br&gt;&amp;gt; primitive to get an incorrect return value.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The only way I found to reliably handle this scenario is to have the 
&lt;br&gt;&amp;gt; first primitive pass in another semaphore and a pointer in which to 
&lt;br&gt;&amp;gt; store the return value, and have the primitive signal the semphore when 
&lt;br&gt;&amp;gt; it's done. It's a bit ugly, but it does work. It would be much better if 
&lt;br&gt;&amp;gt; the processes involved could be controlled by the framework.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Do you have any thoughts on how this could be handled better?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; .. Rob
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Callbacks%2C-simplified.-tp4725255p4777614.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4766155</id>
	<title>Re: InterpreterProxy&gt;&gt;signed64BitIntegerFor: badly broken</title>
	<published>2006-06-07T23:02:40Z</published>
	<updated>2006-06-07T23:02:40Z</updated>
	<author>
		<name>tim Rowledge</name>
	</author>
	<content type="html">&lt;br&gt;On 7-Jun-06, at 6:58 PM, Andreas Raab wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Guys -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't know if you ever used the above method but it's horribly, &amp;nbsp;
&lt;br&gt;&amp;gt; horribly broken. I wrote a little test primitive (see below) that &amp;nbsp;
&lt;br&gt;&amp;gt; simply used signed64BitIntegerFor(signed64BitValueOf(oop)) and then &amp;nbsp;
&lt;br&gt;&amp;gt; a loop like here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	0 to: 63 do:[:i|
&lt;br&gt;&amp;gt; 		n := 1 bitShift: i.
&lt;br&gt;&amp;gt; 		(self test64BitInt: n) = n ifFalse:[self halt: i].
&lt;br&gt;&amp;gt; 	].
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Starting from i = 31 Every. Last. Result. Is Wrong. Can you imagine?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It gets even better, since it's broken in different ways: For i=31 &amp;nbsp;
&lt;br&gt;&amp;gt; the result is negated, for everything beyound 31 the resulting &amp;nbsp;
&lt;br&gt;&amp;gt; large integer is non-normalized (and therefore not comparing &amp;nbsp;
&lt;br&gt;&amp;gt; correctly).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any ideas?
&lt;/div&gt;&lt;br&gt;Well for starters the signed64BitIntegerFor: code assumes an 8 byte &amp;nbsp;
&lt;br&gt;large integer no matter what the value being converted so that's &amp;nbsp;
&lt;br&gt;going to cause your non-normalized problem. I'm fairly sure you can &amp;nbsp;
&lt;br&gt;work out how to fix that bit quickly enough.
&lt;br&gt;&lt;br&gt;I'm not absolutely sure(and I can't be bothered to look it up right &amp;nbsp;
&lt;br&gt;now) but wouldn't 1&amp;lt;&amp;lt;31 be a negative value when treated as a 32 bit &amp;nbsp;
&lt;br&gt;word? It looks to me as if signed32BitInteger might be the wrong &amp;nbsp;
&lt;br&gt;thing to use in signed64itInteger, with positive32BitInteger a bit &amp;nbsp;
&lt;br&gt;more plausible.
&lt;br&gt;&lt;br&gt;I have vague memories of when this code was written, mostly of it &amp;nbsp;
&lt;br&gt;being related to long file pointers in OSs I wasn't running at that &amp;nbsp;
&lt;br&gt;time. Thus I would have relied upon testing by involved parties and &amp;nbsp;
&lt;br&gt;taken their word as to the viability of the code. I guess that once &amp;nbsp;
&lt;br&gt;again the value of good tests is demonstrated.
&lt;br&gt;&lt;br&gt;tim
&lt;br&gt;--
&lt;br&gt;tim Rowledge; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=4766155&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tim@...&lt;/a&gt;; &lt;a href=&quot;http://www.rowledge.org/tim&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.rowledge.org/tim&lt;/a&gt;&lt;br&gt;Strange OpCodes: VMB: Verify, then Make Bad
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/InterpreterProxy%3E%3Esigned64BitIntegerFor%3A-badly-broken-tp4764666p4766155.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-4764686</id>
	<title>Re: InterpreterProxy&gt;&gt;signed64BitIntegerFor: badly broken</title>
	<published>2006-06-07T20:00:07Z</published>
	<updated>2006-06-07T20:00:07Z</updated>
	<author>
		<name>Andreas Raab</name>
	</author>
	<content type="html">PS. Once we fix that, let's increase the VM_Proxy's minor version. I 
&lt;br&gt;need that function to work correctly.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- Andreas
&lt;br&gt;&lt;br&gt;Andreas Raab wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Guys -
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't know if you ever used the above method but it's horribly, 
&lt;br&gt;&amp;gt; horribly broken. I wrote a little test primitive (see below) that simply 
&lt;br&gt;&amp;gt; used signed64BitIntegerFor(signed64BitValueOf(oop)) and then a loop like 
&lt;br&gt;&amp;gt; here:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; 0 to: 63 do:[:i|
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n := 1 bitShift: i.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (self test64BitInt: n) = n ifFalse:[self halt: i].
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ].
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Starting from i = 31 Every. Last. Result. Is Wrong. Can you imagine?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It gets even better, since it's broken in different ways: For i=31 the 
&lt;br&gt;&amp;gt; result is negated, for everything beyound 31 the resulting large integer 
&lt;br&gt;&amp;gt; is non-normalized (and therefore not comparing correctly).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any ideas?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; - Andreas
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PS. The primitive:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; TestPlugin&amp;gt;&amp;gt;testSigned64BitInt
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; | oop |
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; self export: true.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; interpreterProxy methodArgumentCount = 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ifFalse:[^interpreterProxy primitiveFail].
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; oop := interpreterProxy stackValue: 0.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; oop := interpreterProxy signed64BitIntegerFor: (interpreterProxy 
&lt;br&gt;&amp;gt; signed64BitValueOf: oop).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; interpreterProxy failed ifFalse:[
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interpreterProxy pop: 2 thenPush: oop.
&lt;br&gt;&amp;gt; &a