Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.399.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.399 Author: eem Time: 20 September 2013, 6:28:56.308 pm UUID: 89f8fefe-b59d-42d7-9c11-7f848d0e5131 Ancestors: VMMaker.oscog-eem.398 A few isIntegerObject:'s => isImmediate:'s in primitives. More protocol. The Spur VM now draws its first window!! =============== Diff against VMMaker.oscog-eem.398 =============== Item was changed: ----- Method: BalloonEngineBase>>loadWorkBufferFrom: (in category 'loading state') ----- loadWorkBufferFrom: wbOop "Load the working buffer from the given oop" <inline: false> + (interpreterProxy isImmediate: wbOop) ifTrue:[^GEFWorkBufferIsInteger]. - (interpreterProxy isIntegerObject: wbOop) ifTrue:[^GEFWorkBufferIsInteger]. (interpreterProxy isWords: wbOop) ifFalse:[^GEFWorkBufferIsPointers]. (interpreterProxy slotSizeOf: wbOop) < GWMinimalSize ifTrue:[^GEFWorkBufferTooSmall]. self workBufferPut: wbOop. self magicNumberGet = GWMagicNumber ifFalse:[^GEFWorkBufferBadMagic]. "Sanity checks" (self wbSizeGet = (interpreterProxy slotSizeOf: wbOop)) ifFalse:[^GEFWorkBufferWrongSize]. self objStartGet = GWHeaderSize ifFalse:[^GEFWorkBufferStartWrong]. "Load buffers" objBuffer := workBuffer + self objStartGet. getBuffer := objBuffer + self objUsedGet. aetBuffer := getBuffer + self getUsedGet. "Make sure we don't exceed the work buffer" GWHeaderSize + self objUsedGet + self getUsedGet + self aetUsedGet > self wbSizeGet ifTrue:[^GEFWorkTooBig]. ^0! Item was changed: ----- Method: BalloonEngineBase>>quickLoadEngineFrom: (in category 'loading state') ----- quickLoadEngineFrom: engineOop "Load the minimal required state from the engineOop, e.g., just the work buffer. Answer 0 on success or non-zero a failure code on failure" <inline: false> | failCode | interpreterProxy failed ifTrue:[^GEFAlreadyFailed]. + (interpreterProxy isImmediate: engineOop) ifTrue:[^GEFEngineIsInteger]. - (interpreterProxy isIntegerObject: engineOop) ifTrue:[^GEFEngineIsInteger]. (interpreterProxy isPointers: engineOop) ifFalse:[^GEFEngineIsWords]. (interpreterProxy slotSizeOf: engineOop) < BEBalloonEngineSize ifTrue:[^GEFEngineTooSmall]. engine := engineOop. (failCode := self loadWorkBufferFrom: (interpreterProxy fetchPointer: BEWorkBufferIndex ofObject: engineOop)) = 0 ifFalse: [^failCode]. self stopReasonPut: 0. objUsed := self objUsedGet. engineStopped := false. ^0! Item was changed: ----- Method: FilePlugin>>primitiveFileSetPosition (in category 'file primitives') ----- primitiveFileSetPosition | newPosition file sz | <var: 'file' type: 'SQFile *'> <var: 'newPosition' type: 'squeakFileOffsetType'> <export: true> + (interpreterProxy isImmediate: (interpreterProxy stackValue: 0)) ifFalse: - (interpreterProxy isIntegerObject: (interpreterProxy stackValue: 0)) ifFalse: [sz := self cCode: 'sizeof(squeakFileOffsetType)'. (interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) > sz ifTrue: [^interpreterProxy primitiveFail]]. newPosition := interpreterProxy positive64BitValueOf: (interpreterProxy stackValue: 0). file := self fileValueOf: (interpreterProxy stackValue: 1). interpreterProxy failed ifFalse:[ self sqFile: file SetPosition: newPosition ]. interpreterProxy failed ifFalse:[ interpreterProxy pop: 2 "pop position, file; leave rcvr on stack" ].! Item was added: + ----- Method: Spur32BitMMLESimulator>>positive32BitIntegerFor: (in category 'simulation only') ----- + positive32BitIntegerFor: integerValue + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter positive32BitIntegerFor: integerValue! Item was added: + ----- Method: Spur32BitMMLESimulator>>positive32BitValueOf: (in category 'simulation only') ----- + positive32BitValueOf: oop + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter positive32BitValueOf: oop! Item was added: + ----- Method: Spur32BitMMLESimulator>>positive64BitIntegerFor: (in category 'simulation only') ----- + positive64BitIntegerFor: integerValue + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter positive64BitIntegerFor: integerValue! Item was added: + ----- Method: Spur32BitMMLESimulator>>positive64BitValueOf: (in category 'simulation only') ----- + positive64BitValueOf: oop + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter positive64BitValueOf: oop! Item was added: + ----- Method: Spur32BitMMLESimulator>>primitiveFailureCode (in category 'simulation only') ----- + primitiveFailureCode + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter primitiveFailureCode! Item was added: + ----- Method: Spur32BitMMLESimulator>>push: (in category 'simulation only') ----- + push: oop + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter push: oop! Item was added: + ----- Method: Spur32BitMMLESimulator>>pushInteger: (in category 'simulation only') ----- + pushInteger: integerValue + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter pushInteger: integerValue! Item was added: + ----- Method: Spur32BitMMLESimulator>>stackIntegerValue: (in category 'simulation only') ----- + stackIntegerValue: offset + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter stackIntegerValue: offset! Item was added: + ----- Method: Spur32BitMMLESimulator>>stackObjectValue: (in category 'simulation only') ----- + stackObjectValue: offset + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter stackObjectValue: offset! Item was added: + ----- Method: Spur32BitMMLESimulator>>stringOf: (in category 'simulation only') ----- + stringOf: oop + "hack around the CoInterpreter/ObjectMemory split refactoring" + ^coInterpreter stringOf: oop! Item was added: + ----- Method: SpurMemoryManager>>classBitmap (in category 'plugin support') ----- + classBitmap + ^self splObj: ClassBitmap! Item was changed: + ----- Method: SpurMemoryManager>>classByteArray (in category 'plugin support') ----- - ----- Method: SpurMemoryManager>>classByteArray (in category 'interpreter access') ----- classByteArray "a.k.a. self fetchPointer: ClassByteArrayCompactIndex ofObject: classTableFirstPage" ^self splObj: ClassByteArray! Item was added: + ----- Method: SpurMemoryManager>>classPoint (in category 'plugin support') ----- + classPoint + ^self splObj: ClassPoint! Item was changed: ----- Method: SpurMemoryManager>>isIntegerObject: (in category 'object testing') ----- isIntegerObject: oop "This list records the valid senders of isIntegerObject: as we replace uses of isIntegerObject: by isImmediate: where appropriate." | sel | sel := thisContext sender method selector. (#( DoIt DoItIn: on:do: "from the debugger" makeBaseFrameFor: quickFetchInteger:ofObject: frameOfMarriedContext: objCouldBeClassObj: isMarriedOrWidowedContext: shortPrint: bytecodePrimAt bytecodePrimAtPut commonAt: commonAtPut: loadFloatOrIntFrom: positive32BitValueOf: primitiveExternalCall checkedIntegerValueOf: bytecodePrimAtPut commonAtPut: primitiveVMParameter checkIsStillMarriedContext:currentFP: displayBitsOf:Left:Top:Right:Bottom: fetchStackPointerOf: primitiveContextAt primitiveContextAtPut subscript:with:storing:format: printContext: compare31or32Bits:equal: signed64BitValueOf: primDigitMultiply:negative: digitLength: isNegativeIntegerValueOf: magnitude64BitValueOf: primitiveMakePoint primitiveAsCharacter primitiveInputSemaphore baseFrameReturn primitiveExternalCall primDigitCompare: isLiveContext: numPointerSlotsOf: fileValueOf: loadBitBltDestForm fetchIntOrFloat:ofObject:ifNil: fetchIntOrFloat:ofObject: + loadBitBltSourceForm + loadPoint:from: + primDigitAdd: + primDigitSubtract: + positive64BitValueOf:) includes: sel) ifFalse: - loadBitBltSourceForm) includes: sel) ifFalse: [self halt]. ^(oop bitAnd: 1) ~= 0! |
Free forum by Nabble | Edit this page |