<div dir="ltr">I don't think that we need two ways to do the same thing, I would say remove 75 before it spreads<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 7 sept. 2019 à 00:03, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2556.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2556.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-eem.2556<br>
Author: eem<br>
Time: 6 September 2019, 3:03:10.794964 pm<br>
UUID: 4981a174-0196-4d71-8937-a69b4c271462<br>
Ancestors: VMMaker.oscog-eem.2555<br>
<br>
Make primitiveDoMixedArithmetic persist in the image header as bit 6 of the flags.<br>
Make it g/settable via Smalltalk vmParameterAt: 48.<br>
Nicolas, I'll leave it up to you whether you want to keep parameter 75 as an alternative way of setting it.<br>
<br>
=============== Diff against VMMaker.oscog-eem.2555 ===============<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreter>>getCogVMFlags (in category 'internal interpreter access') -----<br>
  getCogVMFlags<br>
        "Answer an array of flags indicating various properties of the Cog VM.<br>
         These are the same as the image header flags shifted right two bits (excluding float order and full screen flags).<br>
         Bit 0: specific to CoInterpreterMT<br>
         Bit 1: if set, methods that are interpreted will have the flag bit set in their header<br>
         Bit 2: if set, implies preempting a process does not put it to the back of its run queue<br>
         Bit 3: specific to CoInterpreterMT<br>
         Bit 4: if set, implies the new finalization scheme where WeakArrays are queued<br>
+        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events<br>
+        Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"<br>
-        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events"<br>
        ^objectMemory integerObjectOf: (flagInterpretedMethods ifTrue: [2] ifFalse: [0])<br>
                                                                        + (preemptionYields ifTrue: [0] ifFalse: [4])<br>
                                                                        + (newFinalization ifTrue: [16] ifFalse: [0])<br>
                                                                        + (sendWheelEvents ifTrue: [32] ifFalse: [0])<br>
+                                                                       + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [64])<br>
+                                                                       + (imageHeaderFlags >> 2 bitClear: 2 + 4 + 16 + 32 + 64)!<br>
-                                                                       + (imageHeaderFlags >> 2 bitClear: 2 + 4 + 16 + 32)!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreter>>getImageHeaderFlags (in category 'image save/restore') -----<br>
  getImageHeaderFlags<br>
        "Answer the flags that are contained in the 7th long of the image header."<br>
        ^fullScreenFlag "0 or 1"<br>
        + (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag"<br>
        + (flagInterpretedMethods ifTrue: [8] ifFalse: [0])<br>
        + (preemptionYields ifTrue: [0] ifFalse: [16r10])<br>
        + (newFinalization ifTrue: [16r40] ifFalse: [0])<br>
        + (sendWheelEvents ifTrue: [16r80] ifFalse: [0])<br>
+       + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100])<br>
+       + (imageHeaderFlags bitClear: 16r1DB) "these are any flags we do not recognize"!<br>
-       + (imageHeaderFlags bitClear: 16rDB) "these are any flags we do not recognize"!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreter>>setCogVMFlags: (in category 'internal interpreter access') -----<br>
  setCogVMFlags: flags<br>
        "Set an array of flags indicating various properties of the Cog VM.<br>
         Bit 0: if set, implies the image's Process class has threadId as its 3rd inst var (zero relative)<br>
         Bit 1: if set, methods that are interpreted will have the flag bit set in their header<br>
         Bit 2: if set, implies preempting a process does not put it to the back of its run queue<br>
         Bit 3: if set, implies a threaded VM will not dosown the VM if owned by the GUI thread<br>
         Bit 4: if set, implies the new finalization scheme where WeakArrays are queued<br>
+        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events<br>
+        Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"<br>
+       flags asUnsignedInteger > 127 ifTrue:<br>
-        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events"<br>
-       flags asUnsignedInteger > 63 ifTrue:<br>
                [^self primitiveFailFor: PrimErrUnsupported].<br>
        "processHasThreadId := flags anyMask: 1. specific to CoInterpreterMT"<br>
        flagInterpretedMethods := flags anyMask: 2.<br>
        preemptionYields := flags noMask: 4.<br>
        "noThreadingOfGUIThread := flags anyMask: 8.. specific to CoInterpreterMT"<br>
        newFinalization := flags anyMask: 16.<br>
+       sendWheelEvents := flags anyMask: 32.<br>
+       primitiveDoMixedArithmetic := flags noMask: 64!<br>
-       sendWheelEvents := flags anyMask: 32!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreter>>setImageHeaderFlagsFrom: (in category 'image save/restore') -----<br>
  setImageHeaderFlagsFrom: headerFlags<br>
        "Set the flags that are contained in the 7th long of the image header."<br>
        imageHeaderFlags := headerFlags. "so as to preserve unrecognised flags."<br>
        fullScreenFlag := headerFlags bitAnd: 1.<br>
        imageFloatsBigEndian := (headerFlags noMask: 2) ifTrue: [1] ifFalse: [0].<br>
        "processHasThreadId := headerFlags anyMask: 4. specific to CoInterpreterMT"<br>
        flagInterpretedMethods := headerFlags anyMask: 8.<br>
        preemptionYields := headerFlags noMask: 16.<br>
        "noThreadingOfGUIThread := headerFlags anyMask: 32. specific to CoInterpreterMT"<br>
        newFinalization := headerFlags anyMask: 64.<br>
+       sendWheelEvents := headerFlags anyMask: 128.<br>
+       primitiveDoMixedArithmetic := headerFlags noMask: 256!<br>
-       sendWheelEvents := headerFlags anyMask: 128!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreterMT>>getCogVMFlags (in category 'internal interpreter access') -----<br>
  getCogVMFlags<br>
        "Answer an array of flags indicating various properties of the Cog VM.<br>
         These are the same as the image header flags shifted right two bits (excluding float order and full screen flags).<br>
         Bit 0: implies the image's Process class has threadId as its 3rd inst var (zero relative)<br>
         Bit 1: if set, methods that are interpreted will have the flag bit set in their header<br>
         Bit 2: if set, implies preempting a process does not put it to the back of its run queue<br>
         Bit 3: if set, implies the GUI will run on the first thread and event queues will not be accessed from other threads<br>
         Bit 4: if set, implies the new finalization scheme where WeakArrays are queued<br>
+        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events<br>
+        Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"<br>
-        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events"<br>
        ^objectMemory integerObjectOf: (processHasThreadId ifTrue: [1] ifFalse: [0])<br>
                                                                        + (flagInterpretedMethods ifTrue: [2] ifFalse: [0])<br>
                                                                        + (preemptionYields ifTrue: [0] ifFalse: [4])<br>
                                                                        + (noThreadingOfGUIThread ifTrue: [8] ifFalse: [0])<br>
                                                                        + (newFinalization ifTrue: [16] ifFalse: [0])<br>
+                                                                       + (sendWheelEvents ifTrue: [32] ifFalse: [0])<br>
+                                                                       + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [64])<br>
+                                                                       + (imageHeaderFlags >> 2 bitClear: 1 + 2 + 4 + 8 + 16 + 32 + 64)!<br>
-                                                                       + (imageHeaderFlags >> 2 bitClear: 1 + 2 + 4 + 8 + 16)!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreterMT>>getImageHeaderFlags (in category 'image save/restore') -----<br>
  getImageHeaderFlags<br>
        "Answer the flags that are contained in the 7th long of the image header."<br>
        ^fullScreenFlag "0 or 1"<br>
        + (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag"<br>
        + (processHasThreadId ifTrue: [4] ifFalse: [0])<br>
        + (flagInterpretedMethods ifTrue: [8] ifFalse: [0])<br>
        + (preemptionYields ifTrue: [0] ifFalse: [16r10])<br>
        + (noThreadingOfGUIThread ifTrue: [16r20] ifFalse: [0])<br>
        + (newFinalization ifTrue: [16r40] ifFalse: [0])<br>
        + (sendWheelEvents ifTrue: [16r80] ifFalse: [0])<br>
+       + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100])<br>
+       + (imageHeaderFlags bitClear: 16r1FF) "these are any flags we do not recognize"!<br>
-       + (imageHeaderFlags bitClear: 16rFF) "these are any flags we do not recognize"!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreterMT>>setCogVMFlags: (in category 'internal interpreter access') -----<br>
  setCogVMFlags: flags<br>
        "Set an array of flags indicating various properties of the Cog VM.<br>
         Bit 0: if set, implies the image's Process class has threadId as its 3rd inst var (zero relative)<br>
         Bit 1: if set, methods that are interpreted will have the flag bit set in their header<br>
         Bit 2: if set, implies preempting a process does not put it to the back of its run queue<br>
         Bit 3: if set, implies a threaded VM will not dosown the VM if owned by the GUI thread<br>
         Bit 4: if set, implies the new finalization scheme where WeakArrays are queued<br>
+        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events<br>
+        Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"<br>
+       flags asUnsignedInteger > 127 ifTrue:<br>
-        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events"<br>
-       flags asUnsignedInteger > 63 ifTrue:<br>
                [^self primitiveFailFor: PrimErrUnsupported].<br>
        processHasThreadId := flags anyMask: 1.<br>
        flagInterpretedMethods := flags anyMask: 2.<br>
        preemptionYields := flags noMask: 4.<br>
        noThreadingOfGUIThread := flags anyMask: 8.<br>
        newFinalization := flags anyMask: 16.<br>
+       sendWheelEvents := flags anyMask: 32.<br>
+       primitiveDoMixedArithmetic := flags noMask: 64!<br>
-       sendWheelEvents := flags anyMask: 32!<br>
<br>
Item was changed:<br>
  ----- Method: CoInterpreterMT>>setImageHeaderFlagsFrom: (in category 'image save/restore') -----<br>
  setImageHeaderFlagsFrom: headerFlags<br>
        "Set the flags that are contained in the 7th long of the image header."<br>
        imageHeaderFlags := headerFlags. "so as to preserve unrecognised flags."<br>
        fullScreenFlag := headerFlags bitAnd: 1.<br>
        imageFloatsBigEndian := (headerFlags noMask: 2) ifTrue: [1] ifFalse: [0].<br>
        processHasThreadId := headerFlags anyMask: 4.<br>
        flagInterpretedMethods := headerFlags anyMask: 8.<br>
        preemptionYields := headerFlags noMask: 16.<br>
        noThreadingOfGUIThread := headerFlags anyMask: 32.<br>
        newFinalization := headerFlags anyMask: 64.<br>
        sendWheelEvents := headerFlags anyMask: 128.<br>
+       primitiveDoMixedArithmetic := headerFlags noMask: 256.<br>
<br>
        processHasThreadId ifFalse:<br>
                [self print: 'warning, processHasThreadId flag is unset; cannot function as a threaded VM if so.'; cr]!<br>
<br>
Item was changed:<br>
  ----- Method: StackInterpreter>>getCogVMFlags (in category 'internal interpreter access') -----<br>
  getCogVMFlags<br>
        "Answer an array of flags indicating various properties of the Cog VM.<br>
         These are the same as the image header flags shifted right two bits (excluding float order and full screen flags).<br>
         Bit 0: specific to CoInterpreterMT<br>
         Bit 1: specific to CoInterpreter<br>
         Bit 2: if set, implies preempting a process does not put it to the back of its run queue<br>
         Bit 3: specific to CoInterpreterMT<br>
         Bit 4: if set, implies the new finalization scheme where WeakArrays are queued<br>
+        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events<br>
+        Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"<br>
-        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events"<br>
        ^objectMemory integerObjectOf: (preemptionYields ifTrue: [0] ifFalse: [4])<br>
                                                                        + (newFinalization ifTrue: [16] ifFalse: [0])<br>
                                                                        + (sendWheelEvents ifTrue: [32] ifFalse: [0])<br>
+                                                                       + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [64])<br>
+                                                                       + (imageHeaderFlags >> 2 bitClear: 4 + 16 + 32 + 64)!<br>
-                                                                       + (imageHeaderFlags >> 2 bitClear: 4 + 16 + 32)!<br>
<br>
Item was changed:<br>
  ----- Method: StackInterpreter>>getImageHeaderFlags (in category 'image save/restore') -----<br>
  getImageHeaderFlags<br>
        "Answer the flags that are contained in the 7th long of the image header."<br>
        ^fullScreenFlag "0 or 1"<br>
        + (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag"<br>
        + (preemptionYields ifTrue: [0] ifFalse: [16r10])<br>
        + (newFinalization ifTrue: [16r40] ifFalse: [0])<br>
        + (sendWheelEvents ifTrue: [16r80] ifFalse: [0])<br>
+       + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100])<br>
+       + (imageHeaderFlags bitClear: 16r1D3) "these are any flags we do not recognize"!<br>
-       + (imageHeaderFlags bitClear: 16rD3) "these are any flags we do not recognize"!<br>
<br>
Item was changed:<br>
  ----- Method: StackInterpreter>>setCogVMFlags: (in category 'internal interpreter access') -----<br>
  setCogVMFlags: flags<br>
        "Set an array of flags indicating various properties of the Cog VM.<br>
         Bit 2: if set, implies preempting a process does not put it to the back of its run queue<br>
         Bit 4: if set, implies the new finalization scheme where WeakArrays are queued<br>
+        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events<br>
+        Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"<br>
+       flags asUnsignedInteger > 127 ifTrue:<br>
-        Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events"<br>
-       flags asUnsignedInteger > 63 ifTrue:<br>
                [^self primitiveFailFor: PrimErrUnsupported].<br>
        "processHasThreadId := flags anyMask: 1. specific to CoInterpreterMT"<br>
        "flagInterpretedMethods := flags anyMask: 2. specific to CoInterpreter"<br>
        preemptionYields := flags noMask: 4.<br>
        "noThreadingOfGUIThread := flags anyMask: 8.. specific to CoInterpreterMT"<br>
        newFinalization := flags anyMask: 16.<br>
+       sendWheelEvents := flags anyMask: 32.<br>
+       primitiveDoMixedArithmetic := flags noMask: 64!<br>
-       sendWheelEvents := flags anyMask: 32!<br>
<br>
Item was changed:<br>
  ----- Method: StackInterpreter>>setImageHeaderFlagsFrom: (in category 'image save/restore') -----<br>
  setImageHeaderFlagsFrom: headerFlags<br>
        "Set the flags that are contained in the 7th long of the image header."<br>
        imageHeaderFlags := headerFlags. "so as to preserve unrecognised flags."<br>
        fullScreenFlag := headerFlags bitAnd: 1.<br>
        imageFloatsBigEndian := (headerFlags noMask: 2) ifTrue: [1] ifFalse: [0].<br>
        "processHasThreadId := headerFlags anyMask: 4. specific to CoInterpreterMT"<br>
        "flagInterpretedMethods := headerFlags anyMask: 8. specific to CoInterpreter"<br>
        preemptionYields := headerFlags noMask: 16.<br>
        "noThreadingOfGUIThread := headerFlags anyMask: 32. specific to CoInterpreterMT"<br>
        newFinalization := headerFlags anyMask: 64.<br>
+       sendWheelEvents := headerFlags anyMask: 128.<br>
+       primitiveDoMixedArithmetic := headerFlags noMask: 256!<br>
-       sendWheelEvents := headerFlags anyMask: 128!<br>
<br>
Item was changed:<br>
  ----- Method: StackInterpreterPrimitives>>primitiveSetVMParameter:arg: (in category 'system control primitives') -----<br>
  primitiveSetVMParameter: index arg: argOop<br>
        "See primitiveVMParameter method comment"<br>
        | arg result |<br>
<br>
        "argOop read & checks; in most cases this is an integer parameter.  In some it is either an integer or a Float"<br>
        index = 75<br>
                ifTrue:<br>
                        [ arg := objectMemory booleanValueOf: argOop.<br>
                        self failed ifTrue: [^self primitiveFailFor: PrimErrBadArgument]]<br>
                ifFalse: [(index = 17 or: [index = 55 or: [index = 68]])<br>
                        ifTrue:<br>
                                [((objectMemory isFloatInstance: argOop)<br>
                                 or: [objectMemory isIntegerObject: argOop]) ifFalse:<br>
                                        [^self primitiveFailFor: PrimErrBadArgument]]<br>
                        ifFalse: [(objectMemory isIntegerObject: argOop) ifFalse:<br>
                                        [^self primitiveFailFor: PrimErrBadArgument].<br>
                                 arg := objectMemory integerValueOf: argOop]].<br>
<br>
        "assume failure, then set success for handled indices"<br>
        self primitiveFailFor: PrimErrBadArgument.<br>
        index caseOf: {<br>
                [5] ->  [objectMemory hasSpurMemoryManagerAPI ifFalse:<br>
                                        ["Was:<br>
                                                        result := allocationsBetweenGCs.<br>
                                                        allocationsBetweenGCs := arg."<br>
                                                "Ignore for now, because old images won't start up otherwise.<br>
                                                 See 45 for eden size setting."<br>
                                         result := objectMemory nilObject.<br>
                                         self initPrimCall]].<br>
                [6] ->  [result := objectMemory integerObjectOf: objectMemory tenuringThreshold.<br>
                                 primFailCode := objectMemory tenuringThreshold: arg].<br>
                [11] -> [arg >= 0 ifTrue:<br>
                                        [result := objectMemory integerObjectOf: objectMemory statTenures.<br>
                                         objectMemory statTenures: arg.<br>
                                         self initPrimCall]].<br>
                [17] -> [(SistaVM and: [self isCog]) ifTrue:<br>
                                        [result := objectMemory floatObjectOf: self getCogCodeZoneThreshold.<br>
                                         primFailCode := self setCogCodeZoneThreshold: (self noInlineLoadFloatOrIntFrom: argOop)]].<br>
                [23] -> [result := objectMemory integerObjectOf: extraVMMemory.<br>
                                 extraVMMemory := arg.<br>
                                 self initPrimCall].<br>
                [24] -> [arg > 0 ifTrue:<br>
                                        [result := objectMemory integerObjectOf: objectMemory shrinkThreshold.<br>
                                         objectMemory shrinkThreshold: arg.<br>
                                         self initPrimCall]].<br>
                [25] -> [arg > 0 ifTrue:<br>
                                        [result := objectMemory integerObjectOf: objectMemory growHeadroom.<br>
                                         objectMemory growHeadroom: arg.<br>
                                         self initPrimCall]].<br>
                [26] -> [arg >= 0 ifTrue: "0 turns off the heartbeat"<br>
                                        [result := objectMemory integerObjectOf: self ioHeartbeatMilliseconds.<br>
                                         self ioSetHeartbeatMilliseconds: arg.<br>
                                         self initPrimCall]].<br>
                [34] -> [(objectMemory hasSpurMemoryManagerAPI "was statAllocationCount; now statAllocatedBytes"<br>
                                  and: [arg >= 0]) ifTrue:<br>
                                        [result := objectMemory positive64BitIntegerFor: objectMemory currentAllocatedBytes.<br>
                                         objectMemory setCurrentAllocatedBytesTo: arg.<br>
                                         self initPrimCall]].<br>
                [43] -> [(arg between: 0 and: 65535) ifTrue:<br>
                                        [result := objectMemory integerObjectOf: desiredNumStackPages.<br>
                                         desiredNumStackPages := arg.<br>
                                         self initPrimCall]].<br>
                [45] -> [arg >= 0 ifTrue:<br>
                                        [result := objectMemory integerObjectOf: desiredEdenBytes.<br>
                                         desiredEdenBytes := arg.<br>
                                         self initPrimCall]].<br>
                [47] -> [(self isCog<br>
                                  and: [arg between: 0 and: self maxCogCodeSize]) ifTrue:<br>
                                        [result := objectMemory integerObjectOf: self getDesiredCogCodeSize.<br>
                                         self setDesiredCogCodeSize: arg.<br>
                                         self initPrimCall]].<br>
                [48] -> [arg >= 0 ifTrue:<br>
+                                       [| oldPrimitiveDoMixedArithmetic |<br>
+                                        oldPrimitiveDoMixedArithmetic := primitiveDoMixedArithmetic.<br>
+                                        result := objectMemory integerObjectOf: self getCogVMFlags.<br>
-                                       [result := objectMemory integerObjectOf: self getCogVMFlags.<br>
                                         self initPrimCall. "i.e. setCogVMFlags: can fail"<br>
+                                        self setCogVMFlags: arg.<br>
+                                        (primFailCode = 0<br>
+                                         and: [oldPrimitiveDoMixedArithmetic ~= primitiveDoMixedArithmetic]) ifTrue:<br>
+                                               [self flushMethodCache.<br>
+                                                self flushMethodsWithMachineCodePrimitivesAndContinueAnswering: result<br>
+                                                "NOT REACHED (in CoInterpreter)"]]].<br>
-                                        self setCogVMFlags: arg]].<br>
                [49] -> [(arg between: 0 and: 65535) ifTrue:<br>
                                        [result := objectMemory integerObjectOf: self ioGetMaxExtSemTableSize.<br>
                                         self initPrimCall. "i.e. ioSetMaxExtSemTableSize: is allowed to fail"<br>
                                         self setMaxExtSemSizeTo: arg]].<br>
                [55] -> [objectMemory hasSpurMemoryManagerAPI ifTrue:<br>
                                        [result := objectMemory floatObjectOf: objectMemory getHeapGrowthToSizeGCRatio.<br>
                                         primFailCode := objectMemory setHeapGrowthToSizeGCRatio: (self noInlineLoadFloatOrIntFrom: argOop)]].<br>
                [67] -> [(arg >= 0<br>
                                  and: [objectMemory hasSpurMemoryManagerAPI]) ifTrue:<br>
                                        [result := objectMemory integerObjectOf: objectMemory maxOldSpaceSize.<br>
                                         primFailCode := objectMemory setMaxOldSpaceSize: arg]].<br>
                [68] -> [result := objectMemory floatObjectOf: stackPages statAverageLivePagesWhenMapping.<br>
                                 self initPrimCall. "i.e. statAverageLivePagesWhenMapping: is allowed to fail"<br>
                                 stackPages statAverageLivePagesWhenMapping: (self noInlineLoadFloatOrIntFrom: argOop)].<br>
                [69] -> [arg >= 0 ifTrue:<br>
                                        [result := objectMemory integerObjectOf: stackPages statMaxPageCountWhenMapping.<br>
                                         stackPages statMaxPageCountWhenMapping: arg.<br>
                                         self initPrimCall]].<br>
                [74] -> [(arg >= 0<br>
                                  and: [objectMemory hasSpurMemoryManagerAPI]) ifTrue:<br>
                                        [result := objectMemory integerObjectOf: objectMemory statMaxAllocSegmentTime + 500 // 1000.<br>
                                         stackPages statMaxAllocSegmentTime: arg. "usually 0"<br>
                                         self initPrimCall]].<br>
                [75] -> [| mustFlush |<br>
                                 result := objectMemory booleanObjectOf: self primitiveDoMixedArithmetic.<br>
                                 self initPrimCall.<br>
                                 mustFlush := primitiveDoMixedArithmetic ~= arg.<br>
                                 primitiveDoMixedArithmetic := arg.<br>
                                 mustFlush ifTrue:<br>
                                        [self flushMethodCache.<br>
                                         self flushMethodsWithMachineCodePrimitivesAndContinueAnswering: result<br>
                                         "NOT REACHED (in CoInterpreter)"]] }<br>
                otherwise: [].<br>
<br>
        self successful<br>
                ifTrue: [self methodReturnValue: result]  "return old value"<br>
                ifFalse: [self primitiveFailFor: PrimErrInappropriate] "attempting to write a read-only or non-existent parameter"!<br>
<br>
</blockquote></div>