[squeak-dev] The Trunk: Compiler-eem.416.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 19 01:39:21 UTC 2020


Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.416.mcz

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

Name: Compiler-eem.416
Author: eem
Time: 18 January 2020, 5:39:19.465227 pm
UUID: dc1deb74-569c-4fab-8b57-c4513cbead96
Ancestors: Compiler-ct.415

Fix compiler bug with cascaded caseOf:[otherwise:] nodes. When an optimized block form is used in a cascade the form's message is sent ensureCanCascade:, whicharranges to send deoptimize to any and all previously optimized blocks in the form.  The bug was that ensureCanCascade: failed to identify the brace node in the optimized caseOf:[otherwise:] form and hence neglected to deoptimize the blocks in the case.  The fix is to provide both an isBraceNode to make it easy for ensureCanCascade: to identify braces, and BraceNode>>deoptimize: to do the work.

=============== Diff against Compiler-ct.415 ===============

Item was added:
+ ----- Method: BraceNode>>deoptimize (in category 'closure analysis') -----
+ deoptimize
+ 	"Deoptimize the blocks in a caseOf:[otherwise:] that is being used in a cascade."
+ 	elements do:
+ 		[:aMessage|
+ 		self assert: aMessage selector key == #->.
+ 		aMessage receiver deoptimize.
+ 		aMessage arguments first deoptimize]!

Item was added:
+ ----- Method: BraceNode>>isBraceNode (in category 'testing') -----
+ isBraceNode
+ 	^true!

Item was changed:
  ----- Method: MessageNode>>ensureCanCascade: (in category 'cascading') -----
  ensureCanCascade: encoder
  	special > 0 ifTrue:
  		[special := 0.
  		receiver := originalReceiver.
  		selector := encoder encodeSelector: originalSelector.
  		arguments := originalArguments.
  		receiver isBlockNode ifTrue: [receiver deoptimize].
  		arguments do:
  			[:each|
+ 			(each isBlockNode or: [each isBraceNode]) ifTrue:
- 			each isBlockNode ifTrue:
  				[each deoptimize]]]!

Item was added:
+ ----- Method: ParseNode>>isBraceNode (in category 'testing') -----
+ isBraceNode
+ 	^false!



More information about the Squeak-dev mailing list