[Vm-dev] VM Maker: VMMaker.oscog-eem.2856.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 28 00:18:25 UTC 2020
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2856.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2856
Author: eem
Time: 27 October 2020, 5:18:12.906826 pm
UUID: b69f3483-0563-40a4-9aab-a408455f740f
Ancestors: VMMaker.oscog-eem.2855
CogAbstractInstruction: follow the format when printing an instruction, hence avoiding printing garbage operands from previous compilations.
CoInterpreterMT: make the processor initialization not change the stack range of processor 0/threadIndex 0
Slang: handle SmartSyntaxPlugin simulation for the WordsOrShorts type (now used in the SoundPlugin).
=============== Diff against VMMaker.oscog-eem.2855 ===============
Item was changed:
----- Method: CoInterpreterMT>>cStackRangeForThreadIndex: (in category 'simulation') -----
cStackRangeForThreadIndex: threadIndex
"Each simulated processor thread gets 4k of the rump C stack.
The top-most section is reserved for in-memory variables such as vmOwnerLock."
<doNotGenerate>
| top |
^(threadIndex between: 1 and: cogThreadManager maxNumThreads) ifTrue:
+ [top := self rumpCStackAddress - (threadIndex - 1 * RumpCStackSize).
- [top := self rumpCStackAddress - (threadIndex * RumpCStackSize).
top - RumpCStackSize + 1 to: top]!
Item was changed:
----- Method: CoInterpreterMT>>initializeProcessorForThreadIndex: (in category 'simulation') -----
initializeProcessorForThreadIndex: threadIndex
"Each simulated processor thread gets 4k of the rump C stack."
<doNotGenerate>
+ threadIndex > 1 ifTrue:
+ [cogit initializeProcessorStack: (self cStackRangeForThreadIndex: threadIndex) last]!
- cogit initializeProcessorStack: (self cStackRangeForThreadIndex: threadIndex) last!
Item was changed:
----- Method: CogAbstractInstruction>>printStateOn: (in category 'printing') -----
printStateOn: aStream
| opcodeName orneryOperands format |
<doNotGenerate> "Smalltalk-side only"
opcode ifNil:
[^self].
aStream space; nextPut: $(; nextPutAll: (opcodeName := self class nameForOpcode: opcode).
orneryOperands := operands isCObjectAccessor
ifTrue: [operands object]
ifFalse: [operands].
format := ((CogRTLOpcodes classPool includesKey: opcodeName)
ifTrue: [CogRTLOpcodes]
ifFalse: [self class]) printFormatForOpcodeName: opcodeName.
+ (format ifNil: [orneryOperands] ifNotNil: [orneryOperands first: format size]) withIndexDo:
- orneryOperands withIndexDo:
[:operand :index|
operand ifNotNil:
[aStream space.
index >= (orneryOperands identityIndexOf: nil ifAbsent: [orneryOperands size + 1]) ifTrue:
[aStream print: index - 1; nextPut: $:].
(format notNil and: ['rf' includes: (format at: index ifAbsent: $-)])
ifTrue: [aStream nextPutAll: ((format at: index) = $r
ifTrue: [self nameForRegister: operand]
ifFalse: [self nameForFPRegister: operand])]
ifFalse:
[| operandNameOrNil |
operandNameOrNil := operand isInteger ifTrue:
[(cogit coInterpreter lookupAddress: operand) ifNil:
[objectMemory lookupAddress: operand]].
operandNameOrNil ifNotNil: [aStream nextPut: ${].
aStream print: operand.
(operand isInteger and: [operand > 16 and: [opcode ~= Label]]) ifTrue:
[objectMemory wordSize = 8
ifTrue:
[(operand allMask: 1 << 63) ifTrue:
[aStream nextPut: $/; print: operand signedIntFromLong64]]
ifFalse:
[(operand allMask: 1 << 31) ifTrue:
[aStream nextPut: $/; print: operand signedIntFromLong]].
aStream nextPut: $/.
operand printOn: aStream base: 16.
operandNameOrNil ifNotNil:
[aStream nextPut: $=; nextPutAll: operandNameOrNil; nextPut: $}]]]]].
machineCodeSize ifNotNil:
[(machineCodeSize between: 1 and: machineCode size) ifTrue:
[0 to: machineCodeSize - 1 by: self codeGranularity do:
[:i|
aStream space.
(self machineCodeAt: i)
ifNil: [aStream nextPut: $.]
ifNotNil:
[:mc|
mc isInteger
ifTrue: [mc printOn: aStream base: 16]
ifFalse: [mc printOn: aStream]]]]].
address ifNotNil:
[aStream space; nextPut: $@.
address printOn: aStream base: 16].
aStream nextPut: $)!
Item was changed:
----- Method: SmartSyntaxPluginSimulator>>ccgValBlock: (in category 'simulation') -----
ccgValBlock: aString
^aString caseOf: {
['isBytes'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isBytes: oop).
oop]].
['isShorts'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isShorts: oop).
oop]].
['isWords'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isWords: oop).
oop]].
['isLong64s'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isLong64s: oop).
oop]].
['isWordsOrBytes'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isWordsOrBytes: oop).
oop]].
+ ['isIndexable'] -> [ [:oop|
- ['isIndexable'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isIndexable: oop).
+ oop]].
+ ['isWordsOrShorts'] -> [ [:oop|
+ interpreterProxy success: (interpreterProxy isWordsOrShorts: oop).
oop]] }!
More information about the Vm-dev
mailing list