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

commits at source.squeak.org commits at source.squeak.org
Fri May 29 18:59:29 UTC 2015


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

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

Name: Compiler-eem.298
Author: eem
Time: 29 May 2015, 11:59:13.77 am
UUID: b06cc000-4a40-45cd-a0b2-a2d1c0309e39
Ancestors: Compiler-cmm.297

Provide multiple-bytecode-sets aware support for markerOrNil

=============== Diff against Compiler-cmm.297 ===============

Item was added:
+ ----- Method: BytecodeEncoder 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"
+ 	^self subclassResponsibility!

Item was added:
+ ----- 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"
+ 	| e |
+ 	^(((e := aMethod endPC) = 19 or: [e = 20])
+ 	  and: [aMethod numLiterals = 3
+ 	  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