[Vm-dev] VM Maker: VMMaker.oscog-eem.1361.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 17 03:31:56 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1361.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1361
Author: eem
Time: 16 June 2015, 8:29:45.641 pm
UUID: 000b1a0b-f89e-415f-aae5-405d3a401928
Ancestors: VMMaker.oscog-eem.1360
Cogit:
Fix return type calculation for mapEntrySize (handle
unsigned char + unsigned long).
Fix a warning in picDataFor:Annotation:Mcpc:Bcpc:Method:
=============== Diff against VMMaker.oscog-eem.1360 ===============
Item was changed:
----- Method: CCodeGenerator>>harmonizeReturnTypesIn: (in category 'type inference') -----
harmonizeReturnTypesIn: aSetOfTypes
"Eliminate signed/unsigned conflicts in aSetOfTypes"
| sqs usqs |
+ #(char short int #'unsigned char' #'unsigned short' #'unsigned int' #'unsigned long')
+ with: #(sqInt sqInt sqInt #usqInt #usqInt #usqInt #usqInt)
- #(char short int #'unsigned char' #'unsigned short' #'unsigned int')
- with: #(sqInt sqInt sqInt #usqInt #usqInt #usqInt)
do: [:type :replacement|
(aSetOfTypes includes: type) ifTrue:
[aSetOfTypes remove: type; add: replacement]].
sqs := aSetOfTypes select: [:t| t beginsWith: 'sq'].
usqs := aSetOfTypes select: [:t| t beginsWith: 'usq'].
^(sqs size + usqs size = aSetOfTypes size
and: [sqs notEmpty
and: [sqs allSatisfy: [:t| usqs includes: 'u', t]]])
ifTrue: [sqs]
ifFalse: [aSetOfTypes]!
Item was changed:
----- Method: SistaStackToRegisterMappingCogit>>picDataFor:Annotation:Mcpc:Bcpc:Method: (in category 'method introspection') -----
picDataFor: descriptor Annotation: annotation Mcpc: mcpc Bcpc: bcpc Method: cogMethodArg
<var: #descriptor type: #'BytecodeDescriptor *'>
<var: #mcpc type: #'char *'>
<var: #cogMethodArg type: #'void *'>
| entryPoint tuple counter |
<var: #counter type: #'unsigned long'>
descriptor isNil ifTrue:
[^0].
descriptor isBranch ifTrue:
["it's a branch; conditional?"
(descriptor isBranchTrue or: [descriptor isBranchFalse]) ifTrue:
[counter := (self
cCoerce: ((self
cCoerceSimple: cogMethodArg
to: #'CogMethod *') counters)
to: #'unsigned long *')
at: counterIndex.
tuple := self picDataForCounter: counter at: bcpc + 1.
tuple = 0 ifTrue: [^PrimErrNoMemory].
objectMemory storePointer: picDataIndex ofObject: picData withValue: tuple.
picDataIndex := picDataIndex + 1.
counterIndex := counterIndex + 1].
^0].
((self isPureSendAnnotation: annotation)
and: [entryPoint := backEnd callTargetFromReturnAddress: mcpc asUnsignedInteger.
entryPoint > methodZoneBase]) ifFalse: "send is not linked, or is not a send"
[^0].
self targetMethodAndSendTableFor: entryPoint "It's a linked send; find which kind."
annotation: annotation
into: [:targetMethod :sendTable| | methodClassIfSuper association |
methodClassIfSuper := nil.
sendTable = superSendTrampolines ifTrue:
[methodClassIfSuper := coInterpreter methodClassOf: (self cCoerceSimple: cogMethodArg to: #'CogMethod *') methodObject].
sendTable = directedSuperSendTrampolines ifTrue:
+ [association := backEnd literalBeforeInlineCacheTagAt: mcpc asUnsignedInteger.
- [association := backEnd literalBeforeInlineCacheTagAt: mcpc.
methodClassIfSuper := objectRepresentation valueOfAssociation: association].
tuple := self picDataForSendTo: targetMethod
methodClassIfSuper: methodClassIfSuper
at: mcpc
bcpc: bcpc + 1].
tuple = 0 ifTrue: [^PrimErrNoMemory].
objectMemory storePointer: picDataIndex ofObject: picData withValue: tuple.
picDataIndex := picDataIndex + 1.
^0!
More information about the Vm-dev
mailing list