[Vm-dev] VM Maker: VMMaker.oscog-eem.2079.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jan 9 20:24:24 UTC 2017
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2079.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2079
Author: eem
Time: 9 January 2017, 12:23:31.735273 pm
UUID: 00ef0ca2-fca0-4dc0-baa9-e65e98fda15a
Ancestors: VMMaker.oscog-eem.2078
Slang:
Fix code generation for bitInvert64, fixing recently generated 64-bit sources.
Fix indenting for not.
Fix cogitClass for StackInterpreter[Primitives] to avoid unnecessary CCodeGenerator initialization.
=============== Diff against VMMaker.oscog-eem.2078 ===============
Item was changed:
----- Method: CCodeGenerator>>generateBitInvert:on:indent: (in category 'C translation') -----
generateBitInvert: msgNode on: aStream indent: level
"Generate the C code for this message onto the given stream.
If the selector is bitInvert32 then cast to unsigned int to ensure
a 32-bit value on 64-bit platforms."
+ | castToUnsignedInt castToUnsignedLong castToUnsignedLongLong |
+ (castToUnsignedInt := msgNode selector = #bitInvert32) ifTrue:
- | castToUnsignedInt |
- castToUnsignedInt := msgNode selector = #bitInvert32.
- castToUnsignedInt ifTrue:
[aStream nextPutAll: '(unsigned int)'].
aStream nextPut: $~.
+ (castToUnsignedLong := msgNode selector = #bitInvert64 and: [vmClass notNil and: [vmClass objectMemoryClass wordSize = 8]]) ifTrue:
+ [aStream nextPutAll: '(usqIntptr_t)'].
+ (castToUnsignedLongLong := msgNode selector = #bitInvert64 and: [vmClass isNil or: [vmClass objectMemoryClass wordSize = 4]]) ifTrue:
+ [aStream nextPutAll: '(unsigned long long)'].
+ self assert: castToUnsignedInt asBit + castToUnsignedLong asBit + castToUnsignedLongLong asBit <= 1. "We should only do a single cast"
self emitCExpression: msgNode receiver on: aStream!
Item was changed:
----- Method: CCodeGenerator>>generateNot:on:indent: (in category 'C translation') -----
generateNot: msgNode on: aStream indent: level
"Generate the C code for this message onto the given stream."
aStream nextPutAll: '!!'.
+ self emitCExpression: msgNode receiver on: aStream indent: level!
- self emitCExpression: msgNode receiver on: aStream.!
Item was changed:
----- Method: VMClass class>>cogitClass (in category 'accessing class hierarchy') -----
cogitClass
+ "Answer the cogitClass in effect. Ensure that StackInterpreter has a nil cogitClass."
+ (self isInterpreterClass and: [self hasCogit not]) ifTrue:
+ [^nil].
^initializationOptions ifNotNil:
[Smalltalk classNamed: (initializationOptions
at: #Cogit
ifAbsent: [#SimpleStackBasedCogit])]!
More information about the Vm-dev
mailing list