<div dir="ltr">Yep, I corrected in 1733<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-18 21:54 GMT+01:00 Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Hi Nicolas,<div><br></div><div> the right form for that stSizeOf: implementation is</div><div><br></div><div><div>stSizeOf: integerValue</div><div><span style="white-space:pre-wrap">        </span>"hack around the CoInterpreter/ObjectMemory split refactoring"</div><div><span style="white-space:pre-wrap">        </span><doNotGenerate></div><div><span style="white-space:pre-wrap">        </span>^coInterpreter stSizeOf: integerValue</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 2:35 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-nice.1731.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-nice.1731.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-nice.1731<br>
Author: nice<br>
Time: 17 March 2016, 10:33:40.804 pm<br>
UUID: 5a57b844-0803-41bd-b772-73cf6c7dfb0a<br>
Ancestors: VMMaker.oscog-dtl.1730<br>
<br>
Fix a shift in BitBltSimulation. The shift must be signed but the simulator incorrectly makes it unsigned leading to memory exhaustion error.<br>
<br>
Let FilePlugin>>primitiveDirectoryDelete primitiveFail rather than raising a mustBeBoolean error.<br>
<br>
Fix 64bits simulation of long64At:put: that would fail for negative put value.<br>
<br>
Provide a SpurMemoryManager stSizeOf: for simulation purpose (the message is used by some plugins).<br>
<br>
Restore a more intention revealing literal in reverseDisplayFrom:to:<br>
<br>
=============== Diff against VMMaker.oscog-dtl.1730 ===============<br>
<br>
Item was changed:<br>
----- Method: BitBltSimulation>>rgbMapPixel:flags: (in category 'color mapping') -----<br>
rgbMapPixel: sourcePixel flags: mapperFlags<br>
"Perform the RGBA conversion for the given source pixel"<br>
| val |<br>
<inline: true><br>
+ val := ((sourcePixel bitAnd: (cmMaskTable at: 0)) bitShift: (cmShiftTable at: 0) signedIntFromLong).<br>
+ val := val bitOr: ((sourcePixel bitAnd: (cmMaskTable at: 1)) bitShift: (cmShiftTable at: 1) signedIntFromLong).<br>
+ val := val bitOr: ((sourcePixel bitAnd: (cmMaskTable at: 2)) bitShift: (cmShiftTable at: 2) signedIntFromLong).<br>
+ ^val bitOr: ((sourcePixel bitAnd: (cmMaskTable at: 3)) bitShift: (cmShiftTable at: 3) signedIntFromLong).<br>
- val := ((sourcePixel bitAnd: (cmMaskTable at: 0)) bitShift: (cmShiftTable at: 0)).<br>
- val := val bitOr: ((sourcePixel bitAnd: (cmMaskTable at: 1)) bitShift: (cmShiftTable at: 1)).<br>
- val := val bitOr: ((sourcePixel bitAnd: (cmMaskTable at: 2)) bitShift: (cmShiftTable at: 2)).<br>
- ^val bitOr: ((sourcePixel bitAnd: (cmMaskTable at: 3)) bitShift: (cmShiftTable at: 3)).<br>
!<br>
<br>
Item was changed:<br>
----- Method: FilePlugin>>primitiveDirectoryDelete (in category 'directory primitives') -----<br>
primitiveDirectoryDelete<br>
<br>
| dirName dirNameIndex dirNameSize okToDelete |<br>
<var: #dirNameIndex type: 'char *'><br>
<export: true><br>
<br>
dirName := interpreterProxy stackValue: 0.<br>
(interpreterProxy isBytes: dirName)<br>
ifFalse: [^interpreterProxy primitiveFail].<br>
dirNameIndex := interpreterProxy firstIndexableField: dirName.<br>
dirNameSize := interpreterProxy byteSizeOf: dirName.<br>
"If the security plugin can be loaded, use it to check for permission.<br>
If not, assume it's ok"<br>
sCDPfn ~= 0<br>
+ ifTrue: [okToDelete := self cCode: ' ((sqInt (*)(char *, sqInt))sCDPfn)(dirNameIndex, dirNameSize)' inSmalltalk: [false].<br>
- ifTrue: [okToDelete := self cCode: ' ((sqInt (*)(char *, sqInt))sCDPfn)(dirNameIndex, dirNameSize)'.<br>
okToDelete<br>
ifFalse: [^interpreterProxy primitiveFail]].<br>
(self<br>
cCode: 'dir_Delete(dirNameIndex, dirNameSize)'<br>
inSmalltalk: [false])<br>
ifFalse: [^interpreterProxy primitiveFail].<br>
interpreterProxy pop: 1!<br>
<br>
Item was changed:<br>
----- Method: Spur64BitMMLESimulator>>long64At:put: (in category 'memory access') -----<br>
long64At: byteAddress put: a64BitValue<br>
byteAddress \\ 8 ~= 0 ifTrue: [self unalignedAccessError].<br>
self<br>
long32At: byteAddress put: (a64BitValue bitAnd: 16rffffffff);<br>
+ long32At: byteAddress + 4 put: (a64BitValue >> 32 bitAnd: 16rffffffff).<br>
- long32At: byteAddress + 4 put: a64BitValue >> 32.<br>
^a64BitValue!<br>
<br>
Item was added:<br>
+ ----- Method: SpurMemoryManager>>stSizeOf: (in category 'object access') -----<br>
+ stSizeOf: oop<br>
+ "Return the number of indexable fields in the receiver"<br>
+ ^oop basicSize!<br>
<br>
Item was changed:<br>
----- Method: StackInterpreter>>reverseDisplayFrom:to: (in category 'I/O primitive support') -----<br>
reverseDisplayFrom: startIndex to: endIndex<br>
"Reverse the given range of Display words (at different bit<br>
depths, this will reverse different numbers of pixels). Used to<br>
give feedback during VM activities such as garbage<br>
collection when debugging. It is assumed that the given<br>
word range falls entirely within the first line of the Display."<br>
| displayObj displayBits w wordStartIndex wordEndIndex primFailCodeValue |<br>
displayObj := objectMemory splObj: TheDisplay.<br>
((objectMemory isPointers: displayObj) and: [(objectMemory lengthOf: displayObj) >= 4]) ifFalse: [^ nil].<br>
w := objectMemory fetchPointer: 1 ofObject: displayObj.<br>
displayBits := objectMemory fetchPointer: 0 ofObject: displayObj.<br>
((objectMemory isImmediate: displayBits)<br>
or: [(objectMemory isNonIntegerObject: w)<br>
or: [objectMemory isPointersNonImm: displayBits]]) ifTrue: [^ nil].<br>
wordStartIndex := startIndex * 4.<br>
wordEndIndex := endIndex * 4 min: (objectMemory sizeBitsOf: displayBits).<br>
displayBits := displayBits + objectMemory baseHeaderSize.<br>
displayBits + wordStartIndex to: displayBits + wordEndIndex by: 4 do:<br>
[:ptr | | reversed |<br>
+ reversed := (objectMemory long32At: ptr) bitXor: 16rFFFFFFFF.<br>
- reversed := (objectMemory long32At: ptr) bitXor: 4294967295.<br>
objectMemory long32At: ptr put: reversed].<br>
primFailCodeValue := primFailCode.<br>
self initPrimCall.<br>
self displayBitsOf: displayObj Left: 0 Top: 0 Right: (objectMemory integerValueOf: w) Bottom: 1.<br>
self ioForceDisplayUpdate.<br>
primFailCode := primFailCodeValue!<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div>
<br></blockquote></div><br></div>