[squeak-dev] The Trunk: Compiler-nice.316.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Oct 31 17:25:15 UTC 2015


Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.316.mcz

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

Name: Compiler-nice.316
Author: nice
Time: 31 October 2015, 6:24:53.362 pm
UUID: 7a0893b3-8e86-4fa0-9d0c-5e80104c8278
Ancestors: Compiler-cmm.315

Make markerOrNil 64bits spur compatible by not hardcoding wordSize.

=============== Diff against Compiler-cmm.315 ===============

Item was changed:
  ----- Method: EncoderForV3 class>>markerOrNilFor: (in category 'compiled method support') -----
  markerOrNilFor: aMethod
  	"If aMethod is a marker method, answer the symbol used to mark it.  Otherwise
  	 answer nil.  What is a marker method?  It is method with body like 
  		'self subclassResponsibility' or '^ self subclassResponsibility' 
  	 used to indicate ('mark') a special property.
  
  	Marker methods compile to two bytecode forms, this:
  		self
  		send: <literal 1>
  		pop
  		returnSelf
  	or this:
  		self
  		send: <literal 1>
  		returnTop"
+ 	| expectedHeaderPlusLliteralSize e |
+ 	expectedHeaderPlusLliteralSize := Smalltalk wordSize * 4.
+ 	^(((e := aMethod endPC - expectedHeaderPlusLliteralSize) = 3 or: [e = 4]) 
- 	| e |
- 	^(((e := aMethod endPC) = 19 or: [e = 20])
  	  and: [aMethod numLiterals = 3
+ 	  and: [(aMethod at:  expectedHeaderPlusLliteralSize + 1) = 16r70	"push self"
+ 	  and: [(aMethod at: expectedHeaderPlusLliteralSize + 2) = 16rD0]]])	"send <literal 1>"
- 	  and: [(aMethod at: 17) = 16r70	"push self"
- 	  and: [(aMethod at: 18) = 16rD0]]])	"send <literal 1>"
  		ifTrue: [aMethod literalAt: 1]!



More information about the Squeak-dev mailing list