Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.555.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.555 Author: eem Time: 10 December 2013, 5:22:57.71 pm UUID: 9b99d897-eecb-4b11-97c9-7f7a75c7d8b0 Ancestors: VMMaker.oscog-eem.554 Rescue compilation of the "classic" VMs by making sure the relevant forwarding code is considered dead code. =============== Diff against VMMaker.oscog-eem.554 =============== Item was added: + ----- Method: CoInterpreter>>actuallyFollowNecessaryForwardingInMethod: (in category 'lazy become') ----- + actuallyFollowNecessaryForwardingInMethod: methodObj + "To avoid any chance of a forwarded object during super sends we follow the + methodClassAssociation. The forwarded object send fault only copes with + normal sends to instances." + | cogMethod header | + <var: #cogMethod type: #'CogMethod *'> + super actuallyFollowNecessaryForwardingInMethod: methodObj. + header := self rawHeaderOf: methodObj. + (self isCogMethodReference: header) ifTrue: + [cogMethod := self cCoerceSimple: header to: #'CogMethod *'. + cogMethod cmUsesMethodClass ifTrue: + [cogit followForwardedLiteralsIn: cogMethod]]! Item was removed: - ----- Method: CoInterpreter>>followNecessaryForwardingInMethod: (in category 'lazy become') ----- - followNecessaryForwardingInMethod: methodObj - "To avoid any chance of a forwarded object during super sends we follow the - methodClassAssociation. The forwarded object send fault only copes with - normal sends to instances." - | cogMethod header | - <var: #cogMethod type: #'CogMethod *'> - super followNecessaryForwardingInMethod: methodObj. - header := self rawHeaderOf: methodObj. - (self isCogMethodReference: header) ifTrue: - [cogMethod := self cCoerceSimple: header to: #'CogMethod *'. - cogMethod cmUsesMethodClass ifTrue: - [cogit followForwardedLiteralsIn: cogMethod]]! Item was added: + ----- Method: StackInterpreter>>actuallyFollowNecessaryForwardingInMethod: (in category 'lazy become') ----- + actuallyFollowNecessaryForwardingInMethod: methodObj + "To avoid any chance of a forwarded object during super sends we follow the + methodClassAssociation. The forwarded object send fault only copes with + normal sends to instances." + | assoc classObj | + <option: #SpurObjectMemory> + <inline: true> + assoc := self methodClassAssociationOf: methodObj. + (objectMemory isForwarded: assoc) ifTrue: + [assoc := objectMemory followForwarded: assoc. + self setMethodClassAssociationOf: methodObj to: assoc]. + classObj := objectMemory fetchPointer: ValueIndex ofObject: assoc. + (objectMemory isForwarded: classObj) ifTrue: + [classObj := objectMemory followForwarded: assoc. + objectMemory storePointer: ValueIndex ofObject: assoc withValue: classObj]! Item was changed: ----- Method: StackInterpreter>>followNecessaryForwardingInMethod: (in category 'lazy become') ----- followNecessaryForwardingInMethod: methodObj "To avoid any chance of a forwarded object during super sends we follow the methodClassAssociation. The forwarded object send fault only copes with normal sends to instances." + <inline: false> + objectMemory hasSpurMemoryManagerAPI ifTrue: + [self actuallyFollowNecessaryForwardingInMethod: methodObj]! - | assoc classObj | - assoc := self methodClassAssociationOf: methodObj. - (objectMemory isForwarded: assoc) ifTrue: - [assoc := objectMemory followForwarded: assoc. - self setMethodClassAssociationOf: methodObj to: assoc]. - classObj := objectMemory fetchPointer: ValueIndex ofObject: assoc. - (objectMemory isForwarded: classObj) ifTrue: - [classObj := objectMemory followForwarded: assoc. - objectMemory storePointer: ValueIndex ofObject: assoc withValue: classObj]! Item was changed: ----- Method: StackInterpreter>>handleSpecialSelectorSendFaultFor: (in category 'message sending') ----- handleSpecialSelectorSendFaultFor: obj <inline: true> + <option: #SpurObjectMemory> ^self handleSpecialSelectorSendFaultFor: obj fp: localFP sp: localSP! Item was changed: ----- Method: StackToRegisterMappingCogit>>genPushRegisterArgsForNumArgs: (in category 'compile abstract instructions') ----- genPushRegisterArgsForNumArgs: numArgs "Ensure that the register args are pushed before the retpc for arity <= self numRegArgs." "This won't be as clumsy on a RISC. But putting the receiver and args above the return address means the CoInterpreter has a single machine-code frame format which saves us a lot of work." numArgs <= self numRegArgs ifTrue: + [self assert: self numRegArgs <= 2. + false "these two variants show the same performance on Intel Core i7, but the second one may be shorter." + ifTrue: + [self MoveMw: 0 r: SPReg R: TempReg. "Save return address" + numArgs > 0 ifTrue: + [self PushR: Arg0Reg. + numArgs > 1 ifTrue: + [self PushR: Arg1Reg]]. + self PushR: TempReg. + self MoveR: ReceiverResultReg Mw: BytesPerWord * (1 + numArgs) r: SPReg] + ifFalse: + [self MoveMw: 0 r: SPReg R: TempReg. "Save return address" + self MoveR: ReceiverResultReg Mw: 0 r: SPReg. + numArgs > 0 ifTrue: + [self PushR: Arg0Reg. + numArgs > 1 ifTrue: + [self PushR: Arg1Reg]]. + self PushR: TempReg]] "Restore return address"! - [self MoveMw: 0 r: SPReg R: TempReg. "Save return address" - self MoveR: ReceiverResultReg Mw: 0 r: SPReg. - self assert: self numRegArgs <= 2. - numArgs > 0 ifTrue: - [self PushR: Arg0Reg. - numArgs > 1 ifTrue: - [self PushR: Arg1Reg]]. - self PushR: TempReg] "Restore return address"! |
Free forum by Nabble | Edit this page |