[Vm-dev] VM Maker: VMMaker.oscog-eem.1303.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri May 15 02:08:43 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1303.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1303
Author: eem
Time: 14 May 2015, 7:05:55.34 pm
UUID: d796217a-dcf4-47eb-9a63-579a7e69a7fa
Ancestors: VMMaker.oscog-eem.1302
Fix the regression with #== in the StackToRegisterMappingCogit;
a spilled constant must still be dropped from the stack.
Mark the genEnsure... stubs in CogObjRep as inline
and fix a signature to eliminate warnings.
=============== Diff against VMMaker.oscog-eem.1302 ===============
Item was changed:
----- Method: CogObjectRepresentation>>genEnsureObjInRegNotForwarded:scratchReg: (in category 'compile abstract instructions') -----
genEnsureObjInRegNotForwarded: reg scratchReg: scratch
"Make sure that the object in reg is not forwarded. By default there is
nothing to do. Subclasses for memory managers that forward will override."
+ <inline: true>
^0!
Item was changed:
----- Method: CogObjectRepresentation>>genEnsureObjInRegNotForwarded:scratchReg:updatingMw:r: (in category 'compile abstract instructions') -----
genEnsureObjInRegNotForwarded: reg scratchReg: scratch updatingMw: offset r: baseReg
"Make sure that the non-immediate oop in reg is not forwarded, updating the field
at offset from baseReg. By default there is nothing to do. Subclasses for memory
managers that forward will override."
+ <inline: true>
^0!
Item was changed:
----- Method: CogObjectRepresentation>>genEnsureOopInRegNotForwarded:scratchReg: (in category 'compile abstract instructions') -----
genEnsureOopInRegNotForwarded: reg scratchReg: scratch
"Make sure that the oop in reg is not forwarded. By default there is
nothing to do. Subclasses for memory managers that forward will override."
+ <inline: true>
^0!
Item was changed:
----- Method: CogObjectRepresentation>>genEnsureOopInRegNotForwarded:scratchReg:ifForwarder:ifNotForwarder: (in category 'compile abstract instructions') -----
genEnsureOopInRegNotForwarded: reg scratchReg: scratch ifForwarder: fwdJumpTarget ifNotForwarder: nonFwdJumpTargetOrZero
"Make sure that the oop in reg is not forwarded. By default there is
nothing to do. Subclasses for memory managers that forward will override."
+ <inline: true>
^0!
Item was changed:
----- Method: CogObjectRepresentation>>genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: (in category 'compile abstract instructions') -----
genEnsureOopInRegNotForwarded: reg scratchReg: scratch jumpBackTo: instruction
"Make sure that the oop in reg is not forwarded. By default there is
nothing to do. Subclasses for memory managers that forward will override."
+ <var: #instruction type: #'AbstractInstruction *'>
+ <inline: true>
^0!
Item was changed:
----- Method: StackToRegisterMappingCogit>>allocateEqualsEqualsRegistersArgNeedsReg:rcvrNeedsReg:into: (in category 'bytecode generator support') -----
allocateEqualsEqualsRegistersArgNeedsReg: argNeedsReg rcvrNeedsReg: rcvrNeedsReg into: binaryBlock
<inline: true>
| argReg rcvrReg |
self assert: (argNeedsReg or: [rcvrNeedsReg]).
argNeedsReg
ifTrue:
[rcvrNeedsReg
ifTrue:
[self allocateRegForStackTopTwoEntriesInto: [:rTop :rNext| argReg := rTop. rcvrReg := rNext].
self ssTop popToReg: argReg.
(self ssValue: 1) popToReg: rcvrReg]
ifFalse:
[argReg := self allocateRegForStackEntryAt: 0.
+ self ssTop popToReg: argReg.
+ "If the receiver is a spilled constant we need to pop it from the stack."
+ (self ssValue: 1) spilled ifTrue:
+ [self AddCq: objectMemory wordSize R: SPReg]]]
- self ssTop popToReg: argReg]]
ifFalse:
[self assert: rcvrNeedsReg.
rcvrReg := self allocateRegForStackEntryAt: 1.
+ (self ssValue: 1) popToReg: rcvrReg].
- (self ssValue:1) popToReg: rcvrReg].
self assert: (argNeedsReg not or: [argReg notNil]).
self assert: (rcvrNeedsReg not or: [rcvrReg notNil]).
+ binaryBlock value: rcvrReg value: argReg!
- binaryBlock value: rcvrReg value: argReg.!
Item was changed:
----- Method: StackToRegisterMappingCogit>>genEqualsEqualsNoBranchArgIsConstant:rcvrIsConstant:argReg:rcvrReg: (in category 'bytecode generator support') -----
genEqualsEqualsNoBranchArgIsConstant: argIsConstant rcvrIsConstant: rcvrIsConstant argReg: argReg rcvrReg: rcvrReg
"Generates the machine code for #== in the case where the instruction is not followed by a branch"
+ | label jumpEqual jumpNotEqual |
+ <var: #label type: #'AbstractInstruction *'>
<var: #jumpEqual type: #'AbstractInstruction *'>
<var: #jumpNotEqual type: #'AbstractInstruction *'>
- | label jumpEqual jumpNotEqual |
label := self Label.
self genEqualsEqualsComparisonArgIsConstant: argIsConstant rcvrIsConstant: rcvrIsConstant argReg: argReg rcvrReg: rcvrReg.
self ssPop: 2.
jumpEqual := self JumpZero: 0.
argIsConstant ifFalse: [ objectRepresentation genEnsureOopInRegNotForwarded: argReg scratchReg: TempReg jumpBackTo: label ].
rcvrIsConstant ifFalse: [ objectRepresentation genEnsureOopInRegNotForwarded: rcvrReg scratchReg: TempReg jumpBackTo: label ].
self genMoveFalseR: rcvrReg.
jumpNotEqual := self Jump: 0.
jumpEqual jmpTarget: (self genMoveTrueR: rcvrReg).
jumpNotEqual jmpTarget: self Label.
self ssPushRegister: rcvrReg.
^0!
More information about the Vm-dev
mailing list