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

commits at source.squeak.org commits at source.squeak.org
Thu Jan 15 21:01:04 UTC 2015


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

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

Name: VMMaker.oscog-eem.1021
Author: eem
Time: 15 January 2015, 12:59:45.824 pm
UUID: 8d22d520-7ec6-4a2e-b554-441ae57f5453
Ancestors: VMMaker.oscog-eem.1020

Fix in-image compilation for the at:put: primitive.

Bow to the inevitable and add a manual override for
primitive accessor depth.  Use it in at: & at:put:.

If manual override is not used then the automatically
computed depth is too deep because of context
access.

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

Item was changed:
  ----- Method: CCodeGenerator>>accessorDepthForMethod: (in category 'spur primitive compilation') -----
  accessorDepthForMethod: method
  	"Compute the depth the method traverses object structure, assuming it is a primitive.
  	 This is in support of Spur's lazy become.  A primitive may fail because it may encounter
  	 a forwarder.  The primitive failure code needs to know to what depth it must follow
  	  arguments to follow forwarders and, if any are found and followed, retry the primitive.
  	 This method determines that depth. It starts by collecting references to the stack and
  	 then follows these through assignments to variables and use of accessor methods
  	 such as fetchPointer:ofObject:. For example
  		| obj field  |
  		obj := self stackTop.
  		field := objectMemory fetchPointer: 1 ofObject: obj.
  		self storePointer: 1 ofObject: field withValue: (self stackValue: 1)
  	has depth 2, since field is accessed, and field is an element of obj."
  
+ 	^((method definingClass >> method selector) pragmaAt: #accessorDepth:)
+ 		ifNil:
+ 			[((self
+ 					accessorChainsForMethod: method
+ 					interpreterClass: (vmClass ifNil: [StackInterpreter]))
+ 				inject: 0
+ 				into: [:length :chain| length max: (self accessorDepthForChain: chain)]) - 1]
+ 		ifNotNil: [:pragma| pragma arguments first]!
- 	^((self
- 			accessorChainsForMethod: method
- 			interpreterClass: (vmClass ifNil: [StackInterpreter]))
- 		inject: 0
- 		into: [:length :chain| length max: (self accessorDepthForChain: chain)]) - 1!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacade>>firstByteFormat (in category 'accessing') -----
+ firstByteFormat
+ 	^objectMemory firstByteFormat!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacade>>firstCompiledMethodFormat (in category 'accessing') -----
+ firstCompiledMethodFormat
+ 	^objectMemory firstCompiledMethodFormat!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacade>>firstLongFormat (in category 'accessing') -----
+ firstLongFormat
+ 	^objectMemory firstLongFormat!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacade>>weakArrayFormat (in category 'accessing') -----
+ weakArrayFormat
+ 	^objectMemory weakArrayFormat!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacadeForSpurObjectRepresentation>>accessorDepthForPrimitiveIndex: (in category 'accessing') -----
+ accessorDepthForPrimitiveIndex: anInteger
+ 	^StackInterpreterPrimitives primitiveAccessorDepthTable at: anInteger + 1!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacadeForSpurObjectRepresentation>>ceCheckForAndFollowForwardedPrimitiveState (in category 'accessing') -----
+ ceCheckForAndFollowForwardedPrimitiveState
+ 	^coInterpreter ceCheckForAndFollowForwardedPrimitiveState!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacadeForSpurObjectRepresentation>>firstShortFormat (in category 'accessing') -----
+ firstShortFormat
+ 	^objectMemory firstShortFormat!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacadeForSpurObjectRepresentation>>fixedFieldsOfClassFormatMask (in category 'accessing') -----
+ fixedFieldsOfClassFormatMask
+ 	^objectMemory fixedFieldsOfClassFormatMask!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacadeForSpurObjectRepresentation>>formatMask (in category 'accessing') -----
+ formatMask
+ 	^objectMemory formatMask!

Item was added:
+ ----- Method: CurrentImageCoInterpreterFacadeForSpurObjectRepresentation>>formatShift (in category 'accessing') -----
+ formatShift
+ 	^objectMemory formatShift!

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveAt (in category 'indexing primitives') -----
  primitiveAt
+ 	<accessorDepth: 0>
+ 	self commonAt: false!
- 
- 	self commonAt: false.!

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveAtPut (in category 'indexing primitives') -----
  primitiveAtPut
+ 	<accessorDepth: 0>
+ 	self commonAtPut: false!
- 
- 	self commonAtPut: false.!

Item was changed:
  ----- Method: StackInterpreter class>>primitiveAccessorDepthTable (in category 'constants') -----
  primitiveAccessorDepthTable
  	| cg |
  	cg := CCodeGenerator new.
  	cg vmClass: StackInterpreter.
  	^self primitiveTable collect:
+ 		[:thing| | implementingClass method |
- 		[:thing| |class  method |
  		(thing isInteger "quick prims, 0 for fast primitve fail"
  		 or: [thing == #primitiveFail
+ 		 or: [(implementingClass := self primitivesClass whichClassIncludesSelector: thing) isNil]])
- 		 or: [(class := self primitivesClass whichClassIncludesSelector: thing) isNil]])
  			ifTrue: [-1]
  			ifFalse:
+ 				[method := cg compileToTMethodSelector: thing in: implementingClass.
- 				[method := (class >> thing) methodNode asTranslationMethodOfClass: TMethod.
  				 cg accessorDepthForMethod: method]]!

Item was added:
+ ----- Method: VMClass class>>isNonArgumentImplicitReceiverVariableName: (in category 'translation') -----
+ isNonArgumentImplicitReceiverVariableName: aString
+ 	^false!



More information about the Vm-dev mailing list