ClementBera uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1921.mcz
==================== Summary ====================
Name: VMMaker.oscog-cb.1921 Author: cb Time: 30 August 2016, 11:05:36.920661 am UUID: 2ecc27e4-cf4e-455e-941a-6993d9470dfe Ancestors: VMMaker.oscog-cb.1920
Improving assert used during debugging bytecode sets.
=============== Diff against VMMaker.oscog-cb.1920 ===============
Item was added: + ----- Method: Cogit class>>maxNegativeErrorCode (in category 'accessing') ----- + maxNegativeErrorCode + ^MaxNegativeErrorCode!
Item was changed: ----- Method: Integer>>asUnsignedInteger (in category '*VMMaker-interpreter simulator') ----- asUnsignedInteger "Since the simulator deals with positive integers most of the time we assert that the receiver is greater than zero. But one major exception is stack pointers in the StackInterpreterSimulator, which are negative. So don't fail if the sender is a StackInterpreter and the receiver could be a stack pointer." self >= 0 ifFalse: + [self assert: (((thisContext sender methodClass includesBehavior: CoInterpreter) + and: [self between: Cogit maxNegativeErrorCode and: -1]) + or: [(thisContext sender methodClass includesBehavior: StackInterpreter) + and: [thisContext sender receiver stackPages couldBeFramePointer: self]])]. - [self assert: ((thisContext sender methodClass includesBehavior: StackInterpreter) - and: [thisContext sender receiver stackPages couldBeFramePointer: self])]. ^self!
Item was changed: ----- Method: SimpleStackBasedCogit>>genCallPrimitiveBytecode (in category 'bytecode generators') ----- genCallPrimitiveBytecode "V3PlusClosures: 139 10001011 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256) NewsqueakV4: 249 11111001 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256) SistaV1: 248 11111000 iiiiiiii mjjjjjjj Call Primitive #iiiiiiii + ( jjjjjjj * 256) m=1 means inlined primitive, no hard return after execution." + (bytecodePC = initialPC and: [byte2 < 128]) ifFalse: [^EncounteredUnknownBytecode]. - bytecodePC ~= initialPC ifTrue: - [^EncounteredUnknownBytecode]. - byte2 < 128 ifFalse: [^EncounteredUnknownBytecode]. - self assert: (primitiveIndex = (byte1 + (byte2 << 8)) - or: [primitiveIndex = 0 "disabled primitives, e.g. stream prims" - and: [(coInterpreter primitiveIndexOf: methodObj) = (byte1 + (byte2 << 8))]]). ^0!
vm-dev@lists.squeakfoundation.org