<div dir="ltr">Hi David,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 17, 2015 at 8:03 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Mon, May 18, 2015 at 01:46:36AM +0200, Levente Uzonyi wrote:<br>
&gt;<br>
&gt; On Sun, 17 May 2015, <a href="mailto:commits@squeakvm.org">commits@squeakvm.org</a> wrote:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;Revision: 3348<br>
&gt; &gt;Author:   eliot<br>
&gt; &gt;Date:     2015-05-17 16:03:01 -0700 (Sun, 17 May 2015)<br>
&gt; &gt;Log Message:<br>
&gt; &gt;-----------<br>
&gt; &gt;CogVM source as per VMMaker.oscog-eem.1311<br>
&gt; &gt;<br>
&gt; &gt;General:<br>
&gt; &gt;Make the bounds check in primitiveObject:perform:...<br>
&gt; &gt;more restrictive and fix bugs in the commentary.<br>
&gt; &gt;<br>
&gt; &gt;Make stack pages a reasonable size.  My math was<br>
&gt; &gt;wrong and the size was half as big as intended.<br>
&gt; &gt;<br>
&gt; &gt;Extend the fastPrimTrace scheme to trace stack overflow, prim failure and<br>
&gt; &gt;prim<br>
&gt; &gt;retry to help debug the phantom stack frame bug in Cog Spur.<br>
&gt; &gt;<br>
&gt; &gt;Cogit:<br>
&gt; &gt;Revamp icache flushing in the Cogit for ARM.  Move icache flush for<br>
&gt; &gt;generated<br>
&gt; &gt;methods/pics to the fillIn*Header: routines.  Make sure the cache is<br>
&gt; &gt;flushed<br>
&gt; &gt;in generateCaptureCStackPointers:.  Flush the entire PIC when extending it.<br>
&gt; &gt;<br>
&gt; &gt;Spur:<br>
&gt; &gt;Fix ceActivateFailingPrimitiveMethod: to return properly after retrying<br>
&gt; &gt;a primitive after checkForAndFollowForwardedPrimitiveState. e.g. fixes<br>
&gt; &gt; | s | 1 to: 5 do: [:i| s := &#39;bar&#39;. s becomeForward: &#39;bzzt&#39; copy. &#39;foo&#39; &lt;=<br>
&gt; &gt; s]<br>
&gt; &gt;<br>
&gt; &gt;Fix bug in followForwardedFrameContents:stackPointer: so that arguments are<br>
&gt; &gt;actually followed.  N.B. drives the above bug underground ;-).<br>
&gt; &gt;so that named constants (defines) are not elided.<br>
&gt; &gt;<br>
&gt; &gt;Newspeak:<br>
&gt; &gt;Remove landmine left from restructing implicit receiver and outer sends as<br>
&gt; &gt;clean sends.<br>
&gt; &gt;<br>
&gt; &gt;Slang:<br>
&gt; &gt;Fix constant elimination on arithmetic generation.<br>
&gt; &gt;<br>
&gt; &gt;Plugins:<br>
&gt; &gt;Regenerated because of changes in accessorDepth calculation,<br>
&gt; &gt;constant elimination, and read-before-use initialization.<br>
&gt;<br>
&gt; My compiler is unhappy about assigning integers to various structs. I<br>
&gt; guess a few type declarations are missing. See below.<br>
&gt;<br>
<br>
This looks like a change to the code generator, possibly to force<br>
initialization of variables. The variable declarations are in the<br>
Smalltalk source for OSProcessPlugin. There is no explicit assignment<br>
of zero to those structure variables in OSPP. I am guessing this was<br>
added to the C code generator (slang). Maybe that is not a good thing<br>
to do.<br></blockquote><div><br></div><div>But in <span class="Apple-style-span" style="border-collapse:collapse;font-size:14px;color:rgb(0,0,0)">CogVM source as per VMMaker.oscog-eem.1313</span></div><span class="Apple-style-span" style="border-collapse:collapse;font-size:14px;color:rgb(0,0,0)"><br>Make accessor depth calculation more accurate by not considering<br>fetchInteger:ofObject: and arraySize: et al as object accessors.<br><br>Make the read-before-written initializer safer, only initialzing simple types.<br></span><div><br></div><div><br></div><div>The point is that Smalltalk initializes all temporaries to nil, so for faithful translation Slang should initialize those variables read-before-written with 0.  But there is plugin code for which a naive approach won&#39;t work.  Still, the changes made to Slang have settled down and no longer is Slang generating erroneous initializations.  So, IMO, this /is/ a good idea, it just needed polishing.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Dave<br>
<br>
<br>
<br>
&gt; &gt;Modified:<br>
&gt; &gt;branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c<br>
&gt; &gt;===================================================================<br>
&gt; &gt;---<br>
&gt; &gt;branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c<br>
&gt; &gt;2015-05-17 20:13:47 UTC (rev 3347)<br>
&gt; &gt;+++<br>
&gt; &gt;branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c<br>
&gt; &gt;2015-05-17 23:03:01 UTC (rev 3348)<br>
&gt; &gt;@@ -1,5 +1,5 @@<br>
&gt; &gt;/* Automatically generated by<br>
&gt; &gt;-    VMPluginCodeGenerator VMMaker.oscog-eem.1113 uuid:<br>
&gt; &gt;9b08eea7-d3db-440f-ba64-16abc799fcf8<br>
&gt; &gt;+    VMPluginCodeGenerator VMMaker.oscog-eem.1311 uuid:<br>
&gt; &gt;61f8144b-089d-4ca4-9e81-4ccfa6de0fc3<br>
&gt; &gt;   from<br>
&gt; &gt;     UnixOSProcessPlugin<br>
&gt; &gt;     VMConstruction-Plugins-OSProcessPlugin.oscog-eem.50 uuid:<br>
&gt; &gt;     67b1e805-4efd-476c-8cf3-b4a5e14e22a9<br>
&gt; &gt; */<br>
&gt; &gt;@@ -1221,6 +1221,7 @@<br>
&gt; &gt;    sqInt SigStackSize;<br>
&gt; &gt;    stack_t sigstack;<br>
&gt; &gt;<br>
&gt; &gt;+    sigstack = 0;<br>
&gt;<br>
&gt; sigstack is of type stack_t<br>
&gt;<br>
&gt; &gt;     if (useSignalStack &gt;= 0) {<br>
&gt; &gt;             return useSignalStack != 0;<br>
&gt; &gt;     }<br>
&gt; &gt;@@ -1456,6 +1457,8 @@<br>
&gt; &gt;    FILEHANDLETYPE *writerIOStreamPtr;<br>
&gt; &gt;    SQFile *writerPtr;<br>
&gt; &gt;<br>
&gt; &gt;+    readerIOStream = 0;<br>
&gt; &gt;+    writerIOStream = 0;<br>
&gt; &gt;<br>
&gt; &gt;     /* Create the anonymous OS pipe */<br>
&gt; &gt;<br>
&gt; &gt;@@ -1517,6 +1520,8 @@<br>
&gt; &gt;    FILEHANDLETYPE *writerIOStreamPtr;<br>
&gt; &gt;    SQFile *writerPtr;<br>
&gt; &gt;<br>
&gt; &gt;+    readerIOStream = 0;<br>
&gt; &gt;+    writerIOStream = 0;<br>
&gt; &gt;<br>
&gt; &gt;     /* Create the anonymous OS pipe */<br>
&gt; &gt;<br>
&gt; &gt;@@ -1945,6 +1950,7 @@<br>
&gt; &gt;    sqInt semaphoreIndex;<br>
&gt; &gt;    sqInt sigNum;<br>
&gt; &gt;<br>
&gt; &gt;+    semaphoreIndex = 0;<br>
&gt; &gt;     index = stackValue(0);<br>
&gt; &gt;     if (index == (nilObject())) {<br>
&gt; &gt;             semaphoreIndex = 0;<br>
&gt; &gt;@@ -2440,6 +2446,8 @@<br>
&gt; &gt;    FILEHANDLETYPE *writerIOStreamPtr;<br>
&gt; &gt;    SQFile *writerPtr;<br>
&gt; &gt;<br>
&gt; &gt;+    readerIOStream = 0;<br>
&gt; &gt;+    writerIOStream = 0;<br>
&gt; &gt;<br>
&gt; &gt;     /* Create the anonymous OS pipe */<br>
&gt; &gt;<br>
&gt; &gt;@@ -2502,6 +2510,8 @@<br>
&gt; &gt;    FILEHANDLETYPE *writerIOStreamPtr;<br>
&gt; &gt;    SQFile *writerPtr;<br>
&gt; &gt;<br>
&gt; &gt;+    readerIOStream = 0;<br>
&gt; &gt;+    writerIOStream = 0;<br>
&gt; &gt;<br>
&gt; &gt;     /* Create the anonymous OS pipe */<br>
&gt; &gt;<br>
&gt; &gt;@@ -4147,6 +4157,7 @@<br>
&gt; &gt;{<br>
&gt; &gt;    struct sigaction sigchldHandlerAction;<br>
&gt; &gt;<br>
&gt; &gt;+    sigchldHandlerAction = 0;<br>
&gt; &gt;<br>
&gt; &gt;#  if defined(SA_NOCLDSTOP)<br>
&gt; &gt;     sigchldHandlerAction.sa_sigaction = reapChildProcess;<br>
&gt; &gt;@@ -4192,6 +4203,8 @@<br>
&gt; &gt;    struct sigaction oldHandlerAction;<br>
&gt; &gt;    struct sigaction sigHandlerAction;<br>
&gt; &gt;<br>
&gt; &gt;+    oldHandlerAction = 0;<br>
&gt; &gt;+    sigHandlerAction = 0;<br>
&gt;<br>
&gt; The above two have the type struct sigaction.<br>
&gt;<br>
&gt;<br>
&gt; Levente<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>