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

commits at source.squeak.org commits at source.squeak.org
Thu Apr 6 21:20:06 UTC 2017


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

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

Name: Compiler-eem.348
Author: eem
Time: 6 April 2017, 2:19:56.941332 pm
UUID: 3b6b4b75-ce1d-4b07-baf7-d880050399b7
Ancestors: Compiler-eem.347

Fix block temp scanning with multiple bytecode sets.  Fix a comment typo.

=============== Diff against Compiler-eem.347 ===============

Item was changed:
  ----- Method: BlockLocalTempCounter>>tempCountForBlockAt:in: (in category 'initialize-release') -----
  tempCountForBlockAt: pc in: method
  	"Compute the number of local temporaries in a block.
  	 If the block begins with a sequence of push: nil bytecodes then some of
  	 These could be initializing local temps.  We can only reliably disambuguate
  	 them from other uses of nil by parsing the stack and seeing what the offset
  	 of the stack pointer is at the end of the block.
  
  	 There are short-cuts.  The ones we take here are
  		- if there is no sequence of push nils there can be no local temps
  		- we follow forward jumps to shorten the amount of scanning"
  	stackPointer := 0.
  	scanner := InstructionStream new method: method pc: pc.
  	scanner interpretNextInstructionFor: self.
  	blockEnd ifNil:
  		[self error: 'pc is not that of a block'].
+ 	scanner nextByte = method encoderClass pushNilCode ifTrue:
- 	scanner nextByte = Encoder pushNilCode ifTrue:
  		[joinOffsets := Dictionary new.
  		 [scanner pc < blockEnd] whileTrue:
  			[scanner interpretNextInstructionFor: self]].
  	^stackPointer!

Item was changed:
  ----- Method: BytecodeEncoder class>>pushNewArrayCode (in category 'bytecode decoding') -----
  pushNewArrayCode
+ 	"Answer the pushNewArray bytecode, if it exists in the encoder's bytecode set, or nil if not."
- 	"Answer the pushNewArray bytecode, if it exists in the encoder's byetcode set, or nil if not."
  	^nil!

Item was added:
+ ----- Method: BytecodeEncoder class>>pushNilCode (in category 'bytecode decoding') -----
+ pushNilCode
+ 	"Answer the pushNil bytecode."
+ 	^self subclassResponsibility!

Item was added:
+ ----- Method: EncoderForSistaV1 class>>pushNilCode (in category 'bytecode decoding') -----
+ pushNilCode
+ 	"Answer the pushNil bytecode.
+ 	 79			01001111			Push nil"
+ 	^79!

Item was added:
+ ----- Method: EncoderForV3 class>>pushNilCode (in category 'bytecode decoding') -----
+ pushNilCode
+ 	"Answer the pushNil bytecode.
+ 	 112-119 	01110iii 	Push (receiver, true, false, nil, -1, 0, 1, 2) [iii]"
+ 	^115!



More information about the Squeak-dev mailing list