<div dir="ltr">Hi David,<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 6:07 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
David T. Lewis uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.1730.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.1730.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-dtl.1730<br>
Author: dtl<br>
Time: 16 March 2016, 9:06:26.74934 pm<br>
UUID: ad4e53e1-bdbc-4cb9-b5fb-f1229ca4e19f<br>
Ancestors: VMMaker.oscog-nice.1729<br>
<br>
Allow primitiveUtcWithOffset to accept an optional parameter with an array or object with two or more slots to store UTC posix microseconds and time zone offset in seconds. Compatibility with VMM trunk. Note, consider incorporating ioUtcWithOffset from SVN trunk to provide true atomic primitive.<br></blockquote><div><br></div><div>Feel free to move the code over.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
=============== Diff against VMMaker.oscog-nice.1729 ===============<br>
<br>
Item was changed:<br>
  ----- Method: InterpreterPrimitives&gt;&gt;primitiveUtcWithOffset (in category &#39;system control primitives&#39;) -----<br>
  primitiveUtcWithOffset<br>
+       &quot;Answer an array with UTC microseconds since the Posix epoch and the<br>
+       current seconds offset from GMT in the local time zone. An empty two<br>
+       element array (or any object with two or more slots) may be supplied<br>
+       as a parameter.<br>
-       &quot;Answer an array with UTC microseconds since the Posix epoch and<br>
-       the current seconds offset from GMT in the local time zone.<br>
        This is a named (not numbered) primitive in the null module (ie the VM)&quot;<br>
        | epochDelta offset resultArray utcMicroseconds |<br>
<br>
        &lt;export: true&gt;<br>
        &lt;var: #epochDelta declareC: &#39;static usqLong epochDelta= 2177452800000000ULL&#39;&gt;<br>
        &lt;var: #utcMicroseconds type: #usqLong&gt;<br>
        &lt;var: #offset type: #sqLong&gt;<br>
+       argumentCount &gt; 1 ifTrue: [^self primitiveFailFor: PrimErrBadNumArgs].<br>
        self cCode: &#39;&#39; inSmalltalk: [epochDelta := 2177452800000000].<br>
        utcMicroseconds := self ioUTCMicroseconds.<br>
        offset := self ioLocalMicroseconds - utcMicroseconds.<br>
        offset := offset / 1000000.<br>
        objectMemory pushRemappableOop: (self positive64BitIntegerFor: utcMicroseconds - epochDelta).<br>
+       argumentCount &gt; 0<br>
+               ifTrue: [resultArray := self popStack.<br>
+                       ((objectMemory isPointers: resultArray)<br>
+                               and: [(objectMemory lengthOf: resultArray) &gt;= 2])<br>
+                                       ifFalse: [^self primitiveFailFor: PrimErrBadArgument]]<br>
+               ifFalse: [resultArray := objectMemory instantiateClass: objectMemory classArray indexableSize: 2].<br>
-       resultArray := objectMemory instantiateClass: objectMemory classArray indexableSize: 2.<br>
        objectMemory storePointer: 0 ofObject: resultArray withValue: objectMemory popRemappableOop.<br>
        objectMemory storePointerUnchecked: 1 ofObject: resultArray withValue: (objectMemory integerObjectOf: offset).<br>
        self pop: 1 thenPush: resultArray<br>
  !<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>