[Vm-dev] VM Maker: VMMaker.oscog-eem.1621.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jan 9 00:15:10 UTC 2016
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1621.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1621
Author: eem
Time: 8 January 2016, 4:13:32.748993 pm
UUID: 45817ea7-f2d1-4538-bfe4-c748be944bf2
Ancestors: VMMaker.oscog-eem.1620
Cogit:
Fix translation changes needed for last commit.
=============== Diff against VMMaker.oscog-eem.1620 ===============
Item was changed:
----- Method: CCodeGenerator>>emitCConstants:on: (in category 'C code generator') -----
emitCConstants: constList on: aStream
"Store the global variable declarations on the given stream."
constList isEmpty ifTrue: [^self].
aStream cr; nextPutAll: '/*** Constants ***/'; cr.
(self sortStrings: constList) do:
[:varName| | node default value |
node := constants at: varName.
node name isEmpty ifFalse:
["If the definition includes a C comment, take it as is, otherwise convert the value from Smalltalk to C.
Allow the class to provide an alternative definition, either of just the value or the whole shebang."
default := (node value isString and: [node value includesSubString: '/*'])
ifTrue: [node value]
ifFalse: [self cLiteralFor: node value name: varName].
+ default = #undefined
+ ifTrue: [aStream nextPutAll: '#undef '; nextPutAll: node name; cr]
+ ifFalse:
+ [value := vmClass
+ ifNotNil:
+ [(vmClass specialValueForConstant: node name default: default)
+ ifNotNil: [:specialDef| specialDef]
+ ifNil: [default]]
+ ifNil: [default].
+ value first ~= $# ifTrue:
+ [aStream nextPutAll: '#define '; nextPutAll: node name; space].
+ aStream nextPutAll: value; cr]]].
- value := vmClass
- ifNotNil:
- [(vmClass specialValueForConstant: node name default: default)
- ifNotNil: [:specialDef| specialDef]
- ifNil: [default]]
- ifNil: [default].
- value first ~= $# ifTrue:
- [aStream nextPutAll: '#define '; nextPutAll: node name; space].
- aStream nextPutAll: value; cr]].
aStream cr!
Item was changed:
VMStructType subclass: #CogPrimitiveDescriptor
+ instanceVariableNames: 'primitiveGenerator primNumArgs'
- instanceVariableNames: 'primitiveGenerator primNumArgs enabled'
classVariableNames: ''
poolDictionaries: ''
category: 'VMMaker-JIT'!
Item was changed:
----- Method: Cogit class>>tableFunctions (in category 'translation') -----
tableFunctions
"self tableFunctions"
self cogitClass ~= self ifTrue: [^Set new].
generatorTable ifNil:
[^Set new].
^Set new
addAll: (generatorTable object
collect: [:ea| ea generator]);
addAll: (generatorTable object
select: [:ea| ea spanFunction notNil]
thenCollect: [:ea| ea spanFunction]);
addAll: (generatorTable object
select: [:ea| ea needsFrameFunction notNil]
thenCollect: [:ea| ea needsFrameFunction]);
addAll: (primitiveTable object
select: [:ea| ea notNil and: [ea primitiveGenerator notNil]]
thenCollect: [:ea| ea primitiveGenerator]);
- addAll: (primitiveTable object
- select: [:ea| ea notNil and: [ea enabled notNil]]
- thenCollect: [:ea| ea enabled]);
asSortedCollection: [:a :b| a caseInsensitiveLessOrEqual: b]!
Item was changed:
----- Method: SimpleStackBasedCogit class>>declareCVarsIn: (in category 'translation') -----
declareCVarsIn: aCCodeGenerator
+ aCCodeGenerator vmClass primitiveTable ifNotNil:
- aCCodeGenerator vmClass primitiveGeneratorTable ifNotNil:
[:bytecodeGenTable|
aCCodeGenerator
var: #primitiveGeneratorTable
declareC: 'static PrimitiveDescriptor primitiveGeneratorTable[MaxCompiledPrimitiveIndex+1]',
(self tableInitializerFor: aCCodeGenerator vmClass primitiveTable
in: aCCodeGenerator)].
aCCodeGenerator
var: #externalPrimCallOffsets
declareC: 'sqInt externalPrimCallOffsets[MaxNumArgs + 1]';
var: #externalPrimJumpOffsets
declareC: 'sqInt externalPrimJumpOffsets[MaxNumArgs + 1]';
var: #externalSetPrimOffsets
declareC: 'sqInt externalSetPrimOffsets[MaxNumArgs + 1]';
var: #primSetFunctionLabel type: #'AbstractInstruction *';
var: #primInvokeInstruction type: #'AbstractInstruction *'!
More information about the Vm-dev
mailing list