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

commits at source.squeak.org commits at source.squeak.org
Fri Oct 24 20:38:52 UTC 2014


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

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

Name: VMMaker.oscog-eem.912
Author: eem
Time: 24 October 2014, 1:36:10.594 pm
UUID: d8b9d04a-adc6-44f8-b460-225d5ab73f6c
Ancestors: VMMaker.oscog-eem.911

Fix another assert fail case in 
ceInterpretMethodFromPIC:receiver:

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

Item was changed:
  ----- Method: CoInterpreter>>ceInterpretMethodFromPIC:receiver: (in category 'trampolines') -----
  ceInterpretMethodFromPIC: aMethodObj receiver: rcvr
  	<api>
  	| pic primitiveIndex |
  	<var: #pic type: #'CogMethod *'>
+ 	"pop off inner return and locate open or closed PIC"
- 	self assert: (self methodHasCogMethod: aMethodObj) not.
- 	"pop off inner return and locate open PIC"
  	pic := self cCoerceSimple: self popStack - cogit interpretOffset to: #'CogMethod *'.
  	self assert: (pic cmType = CMOpenPIC or: [pic cmType = CMClosedPIC]).
  	"If found from an open PIC then it must be an uncogged method and, since it's been found
+ 	 in the method cache, should be cogged if possible.  If found from a closed PIC then at the
+ 	 time the closed PIC was created the method was uncoggable, either because there was
+ 	 no space, it had too many literals or it contained an illegal bytecode).  So don't try and cog
+ 	 it, but subsequently it may have been cogged via another path.  If the method is, or ends up
+ 	 cogged, jump to machine code, otherwise interpret."
- 	 in the method cache, should be cogged if possible.  If found from a closed PIC it should
- 	 be interpreted (since being reached by that route implies it is uncoggable, either because
- 	 there was no space, it had too many literals or it contained an illegal bytecode)."
  	pic cmType = CMOpenPIC ifTrue:
+ 		[self assert: (self methodHasCogMethod: aMethodObj) not.
+ 		 (self methodShouldBeCogged: aMethodObj) ifTrue:
+ 			[cogit cog: aMethodObj selector: pic selector]].
+ 	(self methodHasCogMethod: aMethodObj) ifTrue:
+ 		[self executeCogMethod: (self cogMethodOf: aMethodObj)
+ 			fromUnlinkedSendWithReceiver: rcvr
+ 		 "NOTREACHED"].
- 		[(self methodShouldBeCogged: aMethodObj) ifTrue:
- 			[cogit cog: aMethodObj selector: pic selector.
- 			 (self methodHasCogMethod: aMethodObj) ifTrue:
- 				[self executeCogMethod: (self cogMethodOf: aMethodObj)
- 					fromUnlinkedSendWithReceiver: rcvr]]].
  	messageSelector := pic selector.
  	newMethod := aMethodObj.
  	primitiveIndex := self primitiveIndexOf: aMethodObj.
  	primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: objectMemory nilObject.
  	argumentCount := pic cmNumArgs.
  	instructionPointer := self popStack.
  	^self interpretMethodFromMachineCode
  	"NOTREACHED"!



More information about the Vm-dev mailing list