<div dir="ltr">Hi David,<div><br></div><div>    can you please delete this for me?  ANother example of inadvertently nudging the mouse and changing keyboard focus.  Got to update my image to pull in Karl&#39;s fix pronto :-)</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 28, 2014 at 7:20 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>
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/Fix" target="_blank">http://source.squeak.org/VMMaker/Fix</a> VMMaker.oscog-eem.787.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Fix VMMaker.oscog-eem.787<br>
Author: eem<br>
Time: 28 June 2014, 7:19:54.984 pm<br>
UUID: a9fe951c-7914-49b0-a008-20c39417cae0<br>
Ancestors: VMMaker.oscog-eem.786<br>
<br>
Fix return types for positive[64/32]BitValueOf: in InterpreterProxy<br>
(&amp; hence in sqVirtualMachine.[ch] soon).<br>
<br>
Use positiveMachineIntegerValueOf: to decode arg in<br>
primitiveNewWithArg and ensure positiveMachineIntegerValueOf:<br>
is inlined there-in.<br>
<br>
=============== Diff against VMMaker.oscog-eem.786 ===============<br>
<br>
Item was changed:<br>
  ----- Method: InterpreterPrimitives&gt;&gt;positiveMachineIntegerValueOf: (in category &#39;primitive support&#39;) -----<br>
  positiveMachineIntegerValueOf: oop<br>
        &quot;Answer a value of an integer in address range, i.e up to the size of a machine word.<br>
        The object may be either a positive SmallInteger or a LargePositiveInteger of size &lt;= word size.&quot;<br>
        &lt;returnTypeC: #&#39;unsigned long&#39;&gt;<br>
+       &lt;inline: true&gt; &quot;only two callers &amp; one is primitiveNewWithArg&quot;<br>
        | value bs ok |<br>
        (objectMemory isIntegerObject: oop) ifTrue:<br>
                [value := objectMemory integerValueOf: oop.<br>
                 value &lt; 0 ifTrue: [^self primitiveFail].<br>
                ^value].<br>
<br>
        ok := objectMemory<br>
                        isClassOfNonImm: oop<br>
                        equalTo: (objectMemory splObj: ClassLargePositiveInteger)<br>
                        compactClassIndex: ClassLargePositiveIntegerCompactIndex.<br>
        (ok and: [(bs := objectMemory lengthOf: oop) &lt;= (self sizeof: #&#39;unsigned long&#39;)]) ifFalse:<br>
                [^self primitiveFail].<br>
<br>
        ((self sizeof: #&#39;unsigned long&#39;) = 8<br>
        and: [bs &gt; 4]) ifTrue:<br>
                [^  (objectMemory fetchByte: 0 ofObject: oop)<br>
                 + ((objectMemory fetchByte: 1 ofObject: oop) &lt;&lt;  8)<br>
                 + ((objectMemory fetchByte: 2 ofObject: oop) &lt;&lt; 16)<br>
                 + ((objectMemory fetchByte: 3 ofObject: oop) &lt;&lt; 24)<br>
                 + ((objectMemory fetchByte: 4 ofObject: oop) &lt;&lt; 32)<br>
                 + ((objectMemory fetchByte: 5 ofObject: oop) &lt;&lt; 40)<br>
                 + ((objectMemory fetchByte: 6 ofObject: oop) &lt;&lt; 48)<br>
                 + ((objectMemory fetchByte: 7 ofObject: oop) &lt;&lt; 56)].<br>
<br>
        ^  (objectMemory fetchByte: 0 ofObject: oop)<br>
        + ((objectMemory fetchByte: 1 ofObject: oop) &lt;&lt;  8)<br>
        + ((objectMemory fetchByte: 2 ofObject: oop) &lt;&lt; 16)<br>
        + ((objectMemory fetchByte: 3 ofObject: oop) &lt;&lt; 24)!<br>
<br>
Item was changed:<br>
  ----- Method: InterpreterPrimitives&gt;&gt;primitiveNewWithArg (in category &#39;object access primitives&#39;) -----<br>
  primitiveNewWithArg<br>
        &quot;Allocate a new indexable instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. May cause a GC.&quot;<br>
        | size spaceOkay |<br>
+       size := self positiveMachineIntegerValueOf: self stackTop.<br>
-       size := self positive32BitValueOf: self stackTop.<br>
        self cppIf: NewspeakVM<br>
                ifTrue: &quot;For the mirror prims check that the class obj is actually a valid class.&quot;<br>
                        [(argumentCount &lt; 2<br>
                          or: [self addressCouldBeClassObj: (self stackValue: 1)]) ifFalse:<br>
                                [self primitiveFailFor: PrimErrBadArgument]].<br>
+       self successful &quot;positiveMachineIntegerValueOf: succeeds only for non-negative integers.&quot;<br>
-       self successful &quot;positive32BitValueOf: succeds only for non-negative integers &lt; 2^32&quot;<br>
                ifTrue:<br>
                        [objectMemory hasSpurMemoryManagerAPI<br>
                                ifTrue:<br>
                                        [(objectMemory instantiateClass: (self stackValue: 1) indexableSize: size)<br>
                                                ifNotNil: [:obj| self pop: argumentCount + 1 thenPush: obj]<br>
                                                ifNil: [self primitiveFailFor: PrimErrNoMemory]]<br>
                                ifFalse:<br>
                                        [spaceOkay := objectMemory sufficientSpaceToInstantiate: (self stackValue: 1) indexableSize: size.<br>
                                         spaceOkay<br>
                                                ifTrue:<br>
                                                        [self<br>
                                                                pop: argumentCount + 1<br>
                                                                thenPush: (objectMemory instantiateClass: (self stackValue: 1) indexableSize: size)]<br>
                                                ifFalse:<br>
                                                        [self primitiveFailFor: PrimErrNoMemory]]]<br>
                ifFalse:<br>
                        [self primitiveFailFor: PrimErrBadArgument]!<br>
<br>
Item was changed:<br>
  ----- Method: InterpreterProxy&gt;&gt;positive32BitValueOf: (in category &#39;converting&#39;) -----<br>
  positive32BitValueOf: oop<br>
+       &lt;returnTypeC: #usqInt&gt;<br>
        oop isInteger ifFalse:[self error:&#39;Not an integer object&#39;].<br>
        oop &lt; 0<br>
                ifTrue:[self primitiveFail. ^0]<br>
                ifFalse:[^oop]!<br>
<br>
Item was changed:<br>
  ----- Method: InterpreterProxy&gt;&gt;positive64BitValueOf: (in category &#39;converting&#39;) -----<br>
  positive64BitValueOf: oop<br>
+       &lt;returnTypeC: #usqLong&gt;<br>
-       &lt;returnTypeC: #sqLong&gt;<br>
        oop isInteger ifFalse:[self error:&#39;Not an integer object&#39;].<br>
        oop &lt; 0<br>
                ifTrue:[self primitiveFail. ^0]<br>
                ifFalse:[^oop]!<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>