[Vm-dev] VM Maker: VMMaker.oscog-eem.1217.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Apr 18 02:46:37 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1217.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1217
Author: eem
Time: 17 April 2015, 7:44:40.717 pm
UUID: 87d89bfd-be60-4963-983c-67eef2ea907f
Ancestors: VMMaker.oscog-cb.1216
Fix printing of CogFooInstructions with code LastRTLCode.
Make read-before-written initializer not initialize arrays.
=============== Diff against VMMaker.oscog-cb.1216 ===============
Item was changed:
----- Method: CogRTLOpcodes class>>nameForOpcode: (in category 'debug printing') -----
nameForOpcode: opcode "<Integer>"
+ ^opcode < LastRTLCode ifTrue:
+ [(classPool keyAtValue: opcode ifAbsent: []) ifNotNil:
+ [:opcodeName|
+ ((opcodeName beginsWith: 'First')
+ or: [opcodeName beginsWith: 'Last'])
+ ifTrue: [#(JumpFull JumpLong JumpBelowOrEqual Jump) detect: [:k| (classPool at: k) = opcode]]
+ ifFalse: [opcodeName]]]!
- ^(classPool keyAtValue: opcode ifAbsent: []) ifNotNil:
- [:opcodeName|
- ((opcodeName beginsWith: 'First')
- or: [opcodeName beginsWith: 'Last'])
- ifTrue: [#(JumpFull JumpLong JumpBelowOrEqual Jump) detect: [:k| (classPool at: k) = opcode]]
- ifFalse: [opcodeName]]!
Item was changed:
----- Method: TMethod>>removeUnusedTempsAndNilIfRequiredIn: (in category 'utilities') -----
removeUnusedTempsAndNilIfRequiredIn: aCodeGen
"Remove all of the unused temps in this method. Answer a set of the references.
As a side-effect introduce explicit temp := nil statements for temps that are
tested for nil before necessarily being assigned."
| refs readBeforeAssigned |
refs := self removeUnusedTempsIn: aCodeGen.
"reset the locals to be only those still referred to"
locals := locals select: [:e| refs includes: e].
(locals notEmpty
and: [(readBeforeAssigned := (self findReadBeforeAssignedIn: locals)) notEmpty]) ifTrue:
+ [readBeforeAssigned := readBeforeAssigned reject:
+ [:v| | d | "don't initialize externa and/or arrays"
+ d := self declarationAt: v.
+ (d beginsWith: 'extern') or: [d includes: $[]].
- [readBeforeAssigned := readBeforeAssigned reject: [:v| (self declarationAt: v) beginsWith: 'extern'].
parseTree statements addAllFirst:
(readBeforeAssigned asSortedCollection collect:
[:var|
TAssignmentNode new
setVariable: (TVariableNode new setName: var; yourself)
expression: (TConstantNode new setValue: 0; yourself)])].
^refs!
More information about the Vm-dev
mailing list