The Trunk: Kernel-eem.1210.mcz

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

The Trunk: Kernel-eem.1210.mcz

Eliot Miranda uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-eem.1210
Author: eem
Time: 4 January 2019, 4:38:17.37951 pm
UUID: d4fc9cd7-ac05-442d-bfe6-8b29ee965a98
Ancestors: Kernel-eem.1209

Have printInstructionsOn: (but not printInstructionsOn:do:, which is used by the explorer) print nested full blocks indented inline, for compatibility with the behavior for embedded blocks.

=============== Diff against Kernel-eem.1209 ===============

Item was changed:
  InstructionClient subclass: #InstructionPrinter
+ instanceVariableNames: 'method scanner stream oldPC innerIndents indent printPC indentSpanOfFollowingJump fullBlockRecursionSelector'
- instanceVariableNames: 'method scanner stream oldPC innerIndents indent printPC indentSpanOfFollowingJump'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Kernel-Methods'!
  !InstructionPrinter commentStamp: 'md 4/8/2003 12:47' prior: 0!
  My instances can print the object code of a CompiledMethod in symbolic format. They print into an instance variable, stream, and uses oldPC to determine how many bytes to print in the listing. The variable method  is used to hold the method being printed.!

Item was changed:
  ----- Method: InstructionPrinter>>printInstructionsOn: (in category 'initialize-release') -----
  printInstructionsOn: aStream
  "Append to the stream, aStream, a description of each bytecode in the
  instruction stream."
  | end |
  stream := aStream.
  scanner := InstructionStream on: method.
  end := method endPC.
  oldPC := scanner pc.
  innerIndents := Array new: end withAll: 0.
+ fullBlockRecursionSelector := #printInstructionsOn:.
  [scanner pc <= end] whileTrue:
  [scanner interpretNextInstructionFor: self]!

Item was changed:
  ----- Method: InstructionPrinter>>pushFullClosure:numCopied: (in category 'printing') -----
  pushFullClosure: aCompiledBlock numCopied: numCopied
  | literalIndex |
  literalIndex := method literals identityIndexOf: aCompiledBlock.
  literalIndex = 0
  [self print: 'closureNumCopied: ', numCopied printString
  , ' numArgs: ', aCompiledBlock numArgs printString]
  [self print: 'pushFullClosure: (self literalAt: ', literalIndex printString,
  ') numCopied: ', numCopied printString,
+ ' "numArgs: ', aCompiledBlock numArgs printString, '"'].
+ fullBlockRecursionSelector ifNotNil:
+ [(self class on: aCompiledBlock)
+ indent: indent + 1;
+ perform: fullBlockRecursionSelector with: stream]!
- ' "numArgs: ', aCompiledBlock numArgs printString, '"']!