VM Maker: VMMaker.oscog-eem.2230.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2230.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2230.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2230
Author: eem
Time: 30 May 2017, 7:07:42.695696 pm
UUID: a4967978-7879-4681-a1e2-7eddeaae213e
Ancestors: VMMaker.oscog-eem.2229

Spur:
Fix an assert fail with receiverTagBitsForMethod: for mixin methods in the Newspeak VM.

ThreadedFFIPlugin:
ThreadedFFICalloutStateForX64 can save a little space using chars for the register indices and format.

=============== Diff against VMMaker.oscog-eem.2229 ===============

Item was changed:
  ----- Method: Spur32BitCoMemoryManager>>receiverTagBitsForMethod: (in category 'cog jit support') -----
  receiverTagBitsForMethod: aMethodObj
  "Answer the tag bits for the receiver based on the method's methodClass, if any."
  <api>
  | methodClassOrNil |
  methodClassOrNil := coInterpreter methodClassOf: aMethodObj.
+ NewspeakVM "Mixins don't necessarily have a format inst var; filter out non-integer format."
+ ifTrue:
+ [| instSpec |
+ (methodClassOrNil = nilObj
+ or: [(self isNonIntegerObject: (instSpec := self fetchPointer: InstanceSpecificationIndex ofObject: methodClassOrNil))
+ or: [(self self instSpecOfClassFormat: (self integerValueOf: instSpec)) ~= self forwardedFormat]]) ifTrue:
+ [^0]]
+ ifFalse:
+ [(methodClassOrNil = nilObj
+ or: [(self instSpecOfClass: methodClassOrNil) ~= self forwardedFormat]) ifTrue:
+ [^0]].
- (methodClassOrNil = nilObj
- or: [(self instSpecOfClass: methodClassOrNil) ~= self forwardedFormat]) ifTrue:
- [^0].
  ^methodClassOrNil = (self fetchPointer: self smallIntegerTag ofObject: classTableFirstPage)
  ifTrue: [self smallIntegerTag]
  ifFalse: [self assert: methodClassOrNil = (self fetchPointer: self characterTag ofObject: classTableFirstPage).
  self characterTag]!

Item was changed:
  ----- Method: Spur64BitCoMemoryManager>>receiverTagBitsForMethod: (in category 'cog jit support') -----
  receiverTagBitsForMethod: aMethodObj
  "Answer the tag bits for the receiver based on the method's methodClass, if any."
  <api>
  | methodClassOrNil |
  methodClassOrNil := coInterpreter methodClassOf: aMethodObj.
+ NewspeakVM "Mixins don't necessarily have a format inst var; filter out non-integer format."
+ ifTrue:
+ [| instSpec |
+ (methodClassOrNil = nilObj
+ or: [(self isNonIntegerObject: (instSpec := self fetchPointer: InstanceSpecificationIndex ofObject: methodClassOrNil))
+ or: [(self self instSpecOfClassFormat: (self integerValueOf: instSpec)) ~= self forwardedFormat]]) ifTrue:
+ [^0]]
+ ifFalse:
+ [(methodClassOrNil = nilObj
+ or: [(self instSpecOfClass: methodClassOrNil) ~= self forwardedFormat]) ifTrue:
+ [^0]].
- (methodClassOrNil = nilObj
- or: [(self instSpecOfClass: methodClassOrNil) ~= self forwardedFormat]) ifTrue:
- [^0].
  methodClassOrNil = (self fetchPointer: self smallIntegerTag ofObject: classTableFirstPage) ifTrue:
  [^self smallIntegerTag].
  methodClassOrNil = (self fetchPointer: self characterTag ofObject: classTableFirstPage) ifTrue:
  [^self characterTag].
  self assert: methodClassOrNil = (self fetchPointer: self smallFloatTag ofObject: classTableFirstPage).
  ^self smallFloatTag!

Item was changed:
  ----- Method: ThreadedFFICalloutStateForX64 class>>instVarNamesAndTypesForTranslationDo: (in category 'translation') -----
  instVarNamesAndTypesForTranslationDo: aBinaryBlock
  "enumerate aBinaryBlock with the names and C type strings for the inst vars to include in a ThreadedFFICalloutState struct."
+ "self subclasses collect: [:ea| ea -> ea typdef]"
-
  ThreadedFFICalloutState instVarNamesAndTypesForTranslationDo: aBinaryBlock.
+ self instVarNames, ThreadedFFICalloutStateForX64 instVarNames do:
- ThreadedFFICalloutStateForX64 instVarNames do:
  [:ivn|
  aBinaryBlock
  value: ivn
  value: (ivn caseOf: {
  ['integerRegisters'] -> [{#sqInt. '[NumIntRegArgs]'}].
  ['floatRegisters'] -> [{#double. '[NumFloatRegArgs]'}] }
  otherwise:
+ [#char])]!
- [#sqInt])]!

Item was removed:
- ----- Method: ThreadedFFICalloutStateForX64Win64 class>>instVarNamesAndTypesForTranslationDo: (in category 'translation') -----
- instVarNamesAndTypesForTranslationDo: aBinaryBlock
- "enumerate aBinaryBlock with the names and C type strings for the inst vars to include in a ThreadedFFICalloutState struct."
-
- ThreadedFFICalloutStateForX64 instVarNamesAndTypesForTranslationDo: aBinaryBlock.
- ThreadedFFICalloutStateForX64Win64 instVarNames do:
- [:ivn|
- aBinaryBlock
- value: ivn
- value: (ivn caseOf: {
- ['floatRegisterSignature'] -> [#int] }
- otherwise:
- [#sqInt])]!