[Vm-dev] VM Maker: VMMaker.oscog-eem.713.mcz

commits at source.squeak.org commits at source.squeak.org
Sat May 10 15:39:48 UTC 2014


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.713.mcz

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

Name: VMMaker.oscog-eem.713
Author: eem
Time: 10 May 2014, 8:36:58.406 am
UUID: 5b3f6116-8cfd-4972-b9db-35af8de02111
Ancestors: VMMaker.oscog-eem.712

Fix the regression introduced by VMMaker.oscog-eem.709.
When "adding" a method marked <doNotImplement> make
sure that any inherited version of the method is removed.
The old code also removed methods that weren't inherited.

=============== Diff against VMMaker.oscog-eem.712 ===============

Item was changed:
  ----- Method: CCodeGenerator>>addMethodFor:selector: (in category 'utilities') -----
  addMethodFor: aClass selector: selector
  	"Add the given method to the code base and answer its translation
  	 or nil if it shouldn't be translated."
  
  	| method tmethod |
  	selector == #initialize ifTrue:
  		[^nil].
  	method := aClass compiledMethodAt: selector.
  	(method pragmaAt: #doNotGenerate) ifNotNil:
+ 		["only remove a previous method if this one overrides it, i.e. this is a subclass method.
+ 		 If the existing method is in a different hierarchy this method must be merely a redeirect."
+ 		 (methods at: selector) ifNotNil:
+ 			[:tm|
+ 			(aClass includesBehavior: tm definingClass) ifTrue:
+ 				[methods removeKey: selector]].
- 		[methods removeKey: selector ifAbsent: [].
  		 ^nil].
  	method isSubclassResponsibility ifTrue:
  		[methods removeKey: selector ifAbsent: [].
  		 ^nil].
  	(self shouldIncludeMethodFor: aClass selector: selector) ifFalse:
  		[methods removeKey: selector ifAbsent: [].
  		 ^nil].
  	tmethod := self addMethod: (self compileToTMethodSelector: selector in: aClass).
  	"If the method has a macro then add the macro.  But keep the method
  	 for analysis purposes (e.g. its variable accesses)."
  	(method pragmaAt: #cmacro:) ifNotNil:
  		[:pragma|
  		self addMacro: (pragma argumentAt: 1) for: selector.
  		(inlineList includes: selector) ifTrue:
  			[inlineList := inlineList copyWithout: selector]].
  	(method propertyValueAt: #cmacro:) ifNotNil:
  		[:macro|
  		self addMacro: macro for: selector.
  		(inlineList includes: selector) ifTrue:
  			[inlineList := inlineList copyWithout: selector]].
  	^tmethod!



More information about the Vm-dev mailing list