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

commits at source.squeak.org commits at source.squeak.org
Thu Jul 25 17:08:29 UTC 2013


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

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

Name: VMMaker.oscog-eem.310
Author: eem
Time: 25 July 2013, 10:06:49.832 am
UUID: d05bf462-ca3e-4094-9350-b57f667e30ec
Ancestors: VMMaker.oscog-eem.309

Fix some assert:s that should be assert:l:s

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

Item was changed:
  ----- Method: CoInterpreter>>assertValidStackedInstructionPointersIn:line: (in category 'debug support') -----
  assertValidStackedInstructionPointersIn: aStackPage line: ln
  	"Check that the stacked instruction pointers in the given page are correct.
  	 Checks the interpreter sender/machine code callee contract."
  	<var: #aStackPage type: #'StackPage *'>
  	<var: #theFP type: #'char *'>
  	<var: #callerFP type: #'char *'>
  	<var: #theIP type: #usqInt>
  	<var: #theMethod type: #'CogMethod *'>
  	<inline: false>
  	| prevFrameWasCogged theFP callerFP theMethod theIP methodObj |
  	(self asserta: (stackPages isFree: aStackPage) not l: ln) ifFalse:
  		[^false].
  	prevFrameWasCogged := false.
  	"The top of stack of an inactive page is always the instructionPointer.
  	 The top of stack of the active page may be the instructionPointer if it has been pushed,
  	 which is indicated by a 0 instructionPointer."
  	(stackPage = aStackPage and: [instructionPointer ~= 0])
  		ifTrue:
  			[theIP := instructionPointer.
  			theFP := framePointer]
  		ifFalse:
  			[theIP := (stackPages longAt: aStackPage headSP) asUnsignedInteger.
  			 theFP := aStackPage headFP.
  			 stackPage = aStackPage ifTrue:
+ 				[self assert: framePointer = theFP l: ln]].
- 				[self assert: framePointer = theFP]].
  	[(self isMachineCodeFrame: theFP)
  		ifTrue:
  			[theMethod := self mframeHomeMethod: theFP.
  			 self assert: (theIP = cogit ceCannotResumePC
+ 						  or: [theIP >= theMethod asUnsignedInteger
+ 							   and: [theIP < (theMethod asUnsignedInteger + theMethod blockSize)]])
+ 					l: ln.
- 						  or: [self asserta: (theIP >= theMethod asUnsignedInteger
- 							   and: [theIP < (theMethod asUnsignedInteger + theMethod blockSize)])])
- 				l: ln.
  			prevFrameWasCogged := true]
  		ifFalse: "assert-check the interpreter frame."
  			[methodObj := self iframeMethod: theFP.
  			 prevFrameWasCogged ifTrue:
  				[self assert: theIP = cogit ceReturnToInterpreterPC l: ln].
  			 theIP = cogit ceReturnToInterpreterPC ifTrue:
  				[theIP := self iframeSavedIP: theFP].
  			 self assert: (theIP >= (methodObj + (objectMemory lastPointerOf: methodObj) + BaseHeaderSize - 1)
  						  and: [theIP < (methodObj + (objectMemory byteLengthOf: methodObj) + BaseHeaderSize)])
  				l: ln.
  			 prevFrameWasCogged := false].
  	 theIP := (stackPages longAt: theFP + FoxCallerSavedIP) asUnsignedInteger.
  	 (callerFP := self frameCallerFP: theFP) ~= 0] whileTrue:
  		[theFP := callerFP].
  	self assert: theIP = cogit ceBaseFrameReturnPC l: ln.
  	^true!



More information about the Vm-dev mailing list