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

commits at source.squeak.org commits at source.squeak.org
Mon Apr 3 23:41:41 UTC 2017


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

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

Name: Compiler-eem.339
Author: eem
Time: 3 April 2017, 4:41:32.232382 pm
UUID: fc3a8d3e-45e0-4d89-adde-ae01ce361263
Ancestors: Compiler-eem.338

Have the Parser obey the bytecode set preference in CompiledCode preferredBytecodeSetEncoderClass.  Fix a restriction in BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: that caused EToys to have to implement an unnecessary override.
Fix the literal limit in that same method.  The max number of literals is 32767 now that we reserve bit 15 for the "do not jit-compile with counters' bit in Sista VMs.

=============== Diff against Compiler-eem.338 ===============

Item was changed:
  ----- Method: BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') -----
  computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex
  	numArgs > 15 ifTrue:
  		[^self error: 'Cannot compile -- too many arguments'].
  	numTemps > 63 ifTrue:
  		[^self error: 'Cannot compile -- too many temporary variables'].	
+ 	numLits > 32767 ifTrue:
- 	numLits > 65535 ifTrue:
  		[^self error: 'Cannot compile -- too many literals'].
  	^(CompiledMethod headerFlagForEncoder: self)
  	+ (numArgs bitShift: 24)
  	+ (numTemps bitShift: 18)
  	"+ (largeBit bitShift: 17)" "largeBit gets filled in later"
  	+ (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0])
+ 	"+ (optimizedBit bitShift: 15)" "Sista marker may get filled in later"
  	+ numLits!

Item was changed:
  ----- Method: Parser>>encoder (in category 'public access') -----
  encoder
  	^encoder ifNil:
+ 		[encoder := CompiledMethod preferredBytecodeSetEncoderClass new]!
- 		[encoder := EncoderForV3PlusClosures new]!



More information about the Squeak-dev mailing list