VM Maker: VMMaker.oscog-cb.2238.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-cb.2238.mcz

commits-2
 
ClementBera uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-cb.2238.mcz

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

Name: VMMaker.oscog-cb.2238
Author: cb
Time: 9 June 2017, 9:05:13.698892 pm
UUID: 51e6a4b3-de49-41ac-a793-87fe0abd5ba9
Ancestors: VMMaker.oscog-eem.2237

Fixed a regression where primitiveCollectCogCodeConstituents would not extract the details of CogMethods anymore if the first parameter is true.

Reverted the implementation of inlined allocation to the pre-duff device to be able to run benchmarks using the travis-compiled VMs instead of hand-compiled VMs (Even with a reproducible case from image start-up since May 16th, neither I or Eliot have found enough time / have been able to fix it, so it clearly makes sense to keep it disabled for now).Working VMs allow Tim F. to keep benchmarks comparisons such as this one up-to-date:

http://speed.squeak.org/comparison/?exe=11%2BL%2BCog%2C13%2BL%2BCog&ben=1%2C8%2C2%2C19%2C9%2C37%2C5%2C14%2C66%2C67%2C58%2C59%2C60%2C61%2C15%2C68%2C69%2C7%2C62%2C6%2C34%2C70%2C71%2C72%2C73%2C74%2C75%2C35%2C21%2C20%2C76%2C77%2C65%2C31%2C12%2C11%2C39%2C40%2C41%2C42%2C43%2C44%2C45%2C46%2C47%2C48%2C52%2C53%2C54%2C18&env=4&hor=true&bas=13%2BL%2BCog&chart=normal+bars

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

Item was changed:
  ----- Method: CoInterpreterPrimitives>>primitiveCollectCogCodeConstituents (in category 'process primitives') -----
  primitiveCollectCogCodeConstituents
  "Answer the contents of the code zone as an array of pair-wise element, address in ascending
  address order. Answer a string for a runtime routine or abstract label (beginning, end, etc),
  a CompiledMethod for a CMMethod, or a selector (presumably a Symbol) for a PIC.
  If there is an argument and it is true, then collect inner information about the CogMethod."
  | constituents withDetails |
  argumentCount = 0
  ifTrue: [withDetails := false]
  ifFalse:
  [withDetails := self stackTop.
  (withDetails = objectMemory trueObject
   or: [withDetails = objectMemory falseObject]) ifFalse:
  [^self primitiveFailFor: PrimErrBadArgument].
   withDetails := withDetails = objectMemory trueObject].
+ constituents := cogit cogCodeConstituents: withDetails.
- constituents := cogit cogCodeConstituents: withDetails = objectMemory trueObject.
  constituents ifNil:
  [^self primitiveFailFor: PrimErrNoMemory].
  self pop: argumentCount + 1 thenPush: constituents!

Item was changed:
  ----- Method: SistaCogit>>genUnaryInlinePrimitive: (in category 'inline primitive generators') -----
  genUnaryInlinePrimitive: prim
  "Unary inline primitives."
  "SistaV1: 248 11111000 iiiiiiii mjjjjjjj Call Primitive #iiiiiiii + (jjjjjjj * 256) m=1 means inlined primitive, no hard return after execution.
  See EncoderForSistaV1's class comment and StackInterpreter>>#unaryInlinePrimitive:"
  | rcvrReg resultReg |
  rcvrReg := self allocateRegForStackEntryAt: 0.
  resultReg := self allocateRegNotConflictingWith: (self registerMaskFor: rcvrReg).
  prim
  caseOf: {
  "00 unchecked class"
  [1] -> "01 unchecked pointer numSlots"
  [self ssTop popToReg: rcvrReg.
  self ssPop: 1.
  objectRepresentation
  genGetNumSlotsOf: rcvrReg into: resultReg;
  genConvertIntegerToSmallIntegerInReg: resultReg].
  "02 unchecked pointer basicSize"
  [3] -> "03 unchecked byte numBytes"
  [self ssTop popToReg: rcvrReg.
  self ssPop: 1.
  objectRepresentation
  genGetNumBytesOf: rcvrReg into: resultReg;
  genConvertIntegerToSmallIntegerInReg: resultReg].
  "04 unchecked short16Type format numShorts"
  "05 unchecked word32Type format numWords"
  "06 unchecked doubleWord64Type format numDoubleWords"
  [11] -> "11 unchecked fixed pointer basicNew"
  [self ssTop type ~= SSConstant ifTrue:
  [^EncounteredUnknownBytecode].
  (objectRepresentation
+ genGetInstanceOf: self ssTop constant
- genGetInstanceOfFixedClass: self ssTop constant
  into: resultReg
+ initializingIf: self extBSpecifiesInitializeInstance) ~= 0 ifTrue:
- initializingIf: self extBSpecifiesInitializeInstance) ~= 0 ifTrue:
  [^ShouldNotJIT]. "e.g. bad class"
  self ssPop: 1] .
  [20] -> "20 identityHash"
  [objectRepresentation genGetIdentityHash: rcvrReg resultReg: resultReg.
  self ssPop: 1] .
  "21 identityHash (SmallInteger)"
  "22 identityHash (Character)"
  "23 identityHash (SmallFloat64)"
  "24 identityHash (Behavior)"
  "30 immediateAsInteger (Character)
  31 immediateAsInteger (SmallFloat64)
  35 immediateAsFloat  (SmallInteger) "
  [30] ->
  [self ssTop popToReg: resultReg.
  objectRepresentation genConvertCharacterToSmallIntegerInReg: resultReg.
  self ssPop: 1].
  [35] ->
  [self assert: self processorHasDoublePrecisionFloatingPointSupport.
  self MoveR: rcvrReg R: TempReg.
  self genConvertSmallIntegerToIntegerInReg: TempReg.
  self ConvertR: TempReg Rd: DPFPReg0.
  self flag: #TODO. "Should never fail"
  self
  genAllocFloatValue: DPFPReg0
  into: resultReg
  scratchReg: TempReg
  scratchReg: NoReg. "scratch2 for V3 only"]
   }
 
  otherwise:
  [^EncounteredUnknownBytecode].
  extB := 0.
  numExtB := 0.
  self ssPushRegister: resultReg.
  ^0!