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

commits at source.squeak.org commits at source.squeak.org
Thu Aug 22 16:02:08 UTC 2013


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

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

Name: VMMaker.oscog-eem.333
Author: eem
Time: 22 August 2013, 8:59:24.657 am
UUID: 84da9cb8-7f30-4cb7-b4fb-239a11f63b54
Ancestors: VMMaker.oscog-eem.332

Fix cogit.c for non-Newspeak by marking the unpaired method list
methods with <option: #NewspeakVM>.

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

Item was changed:
  ----- Method: CogMethodZone>>addToUnpairedMethodList: (in category 'accessing') -----
  addToUnpairedMethodList: aCogMethod
+ 	<option: #NewspeakVM>
  	<var: #aCogMethod type: #'CogMethod *'>
  	self assert: aCogMethod cmType = CMMethod.
  	self assert: (unpairedMethodList == nil
  				or: [unpairedMethodList cmType = CMMethod]).
  	aCogMethod nextMethod: unpairedMethodList.
  	unpairedMethodList := aCogMethod!

Item was changed:
  ----- Method: CogMethodZone>>findPreviouslyCompiledVersionOf:with: (in category 'accessing') -----
  findPreviouslyCompiledVersionOf: aMethodObj with: aSelectorOop
  	"Newspeak uses a set of methods to implement accessors, a setter and a getter for
  	 each inst var offset (e.g. 0 to 255).  These accessors are installed under the relevant
  	 selectors in different method dictionaries as required.  These methods effectively
  	 have multiple selectors.  The current inline cache design stores the selector of a
  	 linked send in the header of the target method.  So this requires a one-to-many
  	 mapping of bytecoded method to cog method, with the bytecoded method referring
  	 directly to only one cog method, which will have a specific selector, not necessarily
  	 the right one.  It is therefore worth-while searching for a cog method on this bytecoded
  	 method that has the right selector.  To speed up the search we maintain all such unpaired
  	 methods on the unpairedMethodList."
  	<returnTypeC: #'CogMethod *'>
+ 	<option: #NewspeakVM>
  	| cogMethod |
  	<var: #cogMethod type: #'CogMethod *'>
  	((coInterpreter methodHasCogMethod: aMethodObj)
  	 and: [(coInterpreter methodClassAssociationOf: aMethodObj) = objectMemory nilObject]) ifTrue:
  		[cogMethod := unpairedMethodList.
  		[cogMethod notNil] whileTrue:
  			[self assert: cogMethod cmType = CMMethod.
  			 (cogMethod selector = aSelectorOop
  			  and: [cogMethod methodObject = aMethodObj]) ifTrue:
  				[^cogMethod].
  			 cogMethod := cogMethod nextMethod]].
  	^nil!

Item was changed:
  ----- Method: CogMethodZone>>removeFromUnpairedMethodList: (in category 'accessing') -----
  removeFromUnpairedMethodList: aCogMethod
+ 	<option: #NewspeakVM>
  	<var: #aCogMethod type: #'CogMethod *'>
  	| prevMethod |
  	<var: #prevMethod type: #'CogMethod *'>
  	self assert: aCogMethod cmType = CMMethod.
  	aCogMethod = unpairedMethodList ifTrue:
  		[unpairedMethodList := aCogMethod nextMethod.
  		 ^nil].
  	prevMethod := unpairedMethodList.
  	[prevMethod notNil] whileTrue:
  		[self assert: (prevMethod ~~ nil and: [prevMethod cmType = CMMethod]).
  		 prevMethod nextMethod = aCogMethod ifTrue:
  			[prevMethod nextMethod: aCogMethod nextMethod.
  			 ^nil].
  		  prevMethod := aCogMethod nextMethod]!



More information about the Vm-dev mailing list