VM Maker: VMMaker.oscog-eem.2664.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.2664.mcz

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

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

Name: VMMaker.oscog-eem.2664
Author: eem
Time: 18 January 2020, 4:08:43.922984 pm
UUID: 5f602dc6-2388-4c17-b9a6-0eec94bbf796
Ancestors: VMMaker.oscog-eem.2663

Fix instruction reporting when using integer arrays to hold integerRegisterState. isArray is methinks too restrictive :-(

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

Item was changed:
  ----- Method: Cogit>>reportLastNInstructions (in category 'debugging') -----
  reportLastNInstructions
  <doNotGenerate>
  | skipNext printInst |
  skipNext := false.
  printInst := [:inst|
  coInterpreter transcript nextPutAll:
  (EagerInstructionDecoration
  ifTrue: [inst]
  ifFalse: [processor
  decorateDisassembly: inst
  for: self
  fromAddress: ((inst at: 3) = $r
  ifTrue: [Integer readFrom: inst readStream]
  ifFalse: [Integer readFrom: inst readStream base: 16])]); cr].
  lastNInstructions withIndexDo:
  [:thing :idx|
  skipNext
  ifTrue: [skipNext := false]
  ifFalse:
+ [thing isString
+ ifFalse:
- [thing isArray
- ifTrue:
  [thing first isString "i.e. { '(simulated return to '. processor retpcIn: coInterpreter memory. ')'}"
  ifTrue:
  [thing do:
  [:stringOrNumber|
  coInterpreter transcript nextPutAll: (stringOrNumber isString
  ifTrue: [stringOrNumber]
  ifFalse: [stringOrNumber hex])].
  coInterpreter transcript cr]
  ifFalse: "if possible, add the label to the instruction line to condense the output"
  [coInterpreter transcript cr.
  (thing at: processor registerStatePCIndex ifAbsent: []) ifNotNil:
  [:pc| | next label |
  label := self relativeLabelForPC: pc.
  ((next := lastNInstructions at: idx + 1 ifAbsent: []) notNil
   and: [next isString
   and: [(Integer readFrom: next readStream radix: 16) = pc]])
  ifTrue: "Decorate instruction and eliminate pc line"
  [skipNext := true.
  processor printRegisterStateExceptPC: thing on: coInterpreter transcript.
  label ifNotNil: [coInterpreter transcript nextPutAll: label; space].
  printInst value: next]
  ifFalse:
  [label ifNotNil: [coInterpreter transcript nextPutAll: label; nextPut: $:; cr].
  processor printRegisterState: thing on: coInterpreter transcript]]]]
+ ifTrue:
- ifFalse:
  [printInst value: thing]]].
  coInterpreter transcript flush!