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

commits at source.squeak.org commits at source.squeak.org
Wed Aug 22 17:48:50 UTC 2012


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

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

Name: VMMaker.oscog-eem.206
Author: eem
Time: 22 August 2012, 10:46:10.191 am
UUID: 01f091ac-8e0a-4e7c-86ff-ba89dd10fafd
Ancestors: VMMaker.oscog-lw.205

Rename compileProlog to compileAbort.

=============== Diff against VMMaker.oscog-lw.205 ===============

Item was added:
+ ----- Method: Cogit>>compileAbort (in category 'compile abstract instructions') -----
+ compileAbort
+ 	"The start of a CogMethod has a call to a run-time abort routine that either
+ 	 handles an in-line cache failure or a stack overflow.  The routine selects the
+ 	 path depending on ReceiverResultReg; if zero it takes the stack overflow
+ 	 path; if nonzero the in-line cache miss path.  Neither of these paths returns.
+ 	 The abort routine must be called;  In the callee the method is located by
+ 	 adding the relevant offset to the return address of the call."
+ 	stackOverflowCall := self MoveCq: 0 R: ReceiverResultReg.
+ 	sendMissCall := self Call: (self methodAbortTrampolineFor: methodOrBlockNumArgs)!

Item was changed:
  ----- Method: Cogit>>compileEntireMethod (in category 'compile abstract instructions') -----
  compileEntireMethod
  	"Compile the abstract instructions for the entire method, including blocks."
  	| result |
+ 	self compileAbort.
- 	self compileProlog.
  	self compileEntry.
  	(result := self compilePrimitive) < 0 ifTrue:
  		[^result].
  	self compileFrameBuild.
  	blockCount := 0.
  	(result := self compileMethodBody) < 0 ifTrue:
  		[^result].
  	blockCount = 0 ifTrue:
  		[^0].
  	(result := self compileBlockBodies) < 0 ifTrue:
  		[^result].
  	^self compileBlockDispatch!

Item was changed:
  ----- Method: Cogit>>computeEntryOffsets (in category 'initialization') -----
  computeEntryOffsets
  	"Generate the entry code for a method to determine cmEntryOffset and cmNoCheckEntryOffset.  We
  	 need cmNoCheckEntryOffset up front to be able to generate the map starting from cmNoCheckEntryOffset"
  	"stack allocate the various collections so that they
  	 are effectively garbage collected on return."
  	self allocateOpcodes: 20 bytecodes: 0.
  	methodOrBlockNumArgs := 0.
+ 	self compileAbort.
- 	self compileProlog.
  	self compileEntry.
  	self computeMaximumSizes.
  	self generateInstructionsAt: methodZoneBase + (self sizeof: CogMethod).
  	cmEntryOffset := entry address - methodZoneBase.
  	cmNoCheckEntryOffset := noCheckEntry address - methodZoneBase.
  	self cppIf: NewspeakVM
  		ifTrue: [cmDynSuperEntryOffset := dynSuperEntry address - methodZoneBase].
  	missOffset := sendMissCall address + sendMissCall machineCodeSize - methodZoneBase.
  	entryPointMask := BytesPerWord - 1.
  	[self cppIf: NewspeakVM
  		ifTrue: [(cmEntryOffset bitAnd: entryPointMask) = (cmNoCheckEntryOffset bitAnd: entryPointMask)
  				or: [(cmEntryOffset bitAnd: entryPointMask) = (cmDynSuperEntryOffset bitAnd: entryPointMask)
  				or: [(cmNoCheckEntryOffset bitAnd: entryPointMask) = (cmDynSuperEntryOffset bitAnd: entryPointMask)]]]
  		ifFalse: [(cmEntryOffset bitAnd: entryPointMask) = (cmNoCheckEntryOffset bitAnd: entryPointMask)]] whileTrue:
  		[entryPointMask := entryPointMask + entryPointMask + 1].
  	entryPointMask >= (methodZone roundUpLength: 1) ifTrue:
  		[self error: 'cannot differentiate checked and unchecked entry-points with current cog method alignment'].
  	checkedEntryAlignment := cmEntryOffset bitAnd: entryPointMask.
  	self assert: checkedEntryAlignment ~= (cmNoCheckEntryOffset bitAnd: entryPointMask).
  	self cppIf: NewspeakVM
  		ifTrue:
  			[cmDynSuperEntryOffset := dynSuperEntry address - methodZoneBase.
  			 dynSuperEntryAlignment := cmDynSuperEntryOffset bitAnd: entryPointMask.
  			self assert: (cmDynSuperEntryOffset bitAnd: entryPointMask) ~= (cmEntryOffset bitAnd: entryPointMask).
  			self assert: (cmDynSuperEntryOffset bitAnd: entryPointMask) ~= (cmNoCheckEntryOffset bitAnd: entryPointMask)]!



More information about the Vm-dev mailing list