[Pkg] The Trunk: Compiler-eem.350.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 10 18:54:41 UTC 2017

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

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

Name: Compiler-eem.350
Author: eem
Time: 10 April 2017, 11:54:17.562394 am
UUID: 2ea4f497-05f7-4dbd-b6af-31821d794e22
Ancestors: Compiler-eem.349

Have decompileMethod: access the method from its argument, aBlock, so that FullBlockClosures have a chance of decompiling correctly.

=============== Diff against Compiler-eem.349 ===============

Item was changed:
  ----- Method: Decompiler>>decompileBlock: (in category 'public access') -----
  decompileBlock: aBlock 
  	"Decompile aBlock, returning the result as a BlockNode.  
  	Show temp names from source if available."
  	"Decompiler new decompileBlock: [3 + 4]"
  	| startpc end homeClass blockNode methodNode home |
+ 	(home := aBlock home) ifNil: [^nil].
+ 	(homeClass := home methodClass) == #unknown ifTrue: [^nil].
+ 	method := aBlock method.
- 	(home := aBlock home) ifNil: [^ nil].
- 	method := home method.
- 	(homeClass := home methodClass) == #unknown ifTrue: [^ nil].
  	aBlock isClosure ifTrue:
  		[(methodNode := method decompileWithTemps)
  			ifNil: [^nil]
  			ifNotNil: [methodNode nodesDo: [:node| node pc = aBlock startpc ifTrue: [^node]]].
  		 ^self error: 'cannot find block node matching aBlock'].
  	constructor := self constructorForMethod: aBlock method.
  	self withTempNames: method methodNode tempNames.
  	self initSymbols: homeClass.
  	startpc := aBlock startpc.
  	end := aBlock endPC.
  	stack := OrderedCollection new: method frameSize.
  	lastJumpIfPcStack := OrderedCollection new.
  	caseExits := OrderedCollection new.
  	statements := OrderedCollection new: 20.
  	super method: method pc: startpc - 5.
  	blockNode := self blockTo: end.
  	stack isEmpty ifFalse: [self error: 'stack not empty'].
  	^blockNode statements first!

More information about the Packages mailing list