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

commits at source.squeak.org commits at source.squeak.org
Tue Mar 18 18:28:28 UTC 2014


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

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

Name: VMMaker.oscog-eem.644
Author: eem
Time: 18 March 2014, 11:26:15.913 am
UUID: e798bf3c-ca76-49c5-9cd2-b9de38d00b7a
Ancestors: VMMaker.oscog-eem.643

Add a flag to traceFlags so that stack depth is tested in
ceTraceLinkedSend:, instead of only unlinked sends.

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

Item was changed:
  ----- Method: CoInterpreter>>ceTraceLinkedSend: (in category 'debug support') -----
  ceTraceLinkedSend: theReceiver
  	| cogMethod |
  	<api>
  	<var: #cogMethod type: #'CogMethod *'>
  	cogMethod := self cCoerceSimple: (self stackTop - cogit traceLinkedSendOffset)
  						to: #'CogMethod *'.
+ 	self cCode: [] inSmalltalk:
+ 		[cogit checkStackDepthOnSend ifTrue:
+ 			[self maybeCheckStackDepth: (cogMethod cmNumArgs > cogit numRegArgs
+ 											ifTrue: [cogMethod cmNumArgs + 1]
+ 											ifFalse: [0])
+ 				sp: stackPointer + BytesPerWord
+ 				pc: (self stackValue: 1)]].
  	"cogit recordSendTrace ifTrue: is implicit; wouldn't compile the call otherwise."
  	self recordTrace: (objectMemory fetchClassOf: theReceiver)
  		thing: cogMethod selector
  		source: TraceIsFromMachineCode.
  	cogit printOnTrace ifTrue:
  		[self printActivationNameFor: cogMethod methodObject
  			receiver: theReceiver
  			isBlock: false
  			firstTemporary: nil;
  			cr].
  	self sendBreakpoint: cogMethod selector receiver: theReceiver!

Item was added:
+ ----- Method: Cogit>>checkStackDepthOnSend (in category 'debugging') -----
+ checkStackDepthOnSend
+ 	<doNotGenerate>
+ 	^(traceFlags bitAnd: 128) ~= 0!

Item was changed:
  ----- Method: Cogit>>sendTrace: (in category 'debugging') -----
  sendTrace: aBooleanOrInteger
  	<doNotGenerate>
  	"traceFlags is a set of flags.
  	 1 => print trace (if something below is selected)
  	 2 => trace sends
  	 4 => trace block activations
  	 8 => trace interpreter primitives
  	 16 => trace events (context switches, GCs, etc)
  	 32 => trace stack overflow
+ 	 64 => send breakpoint on implicit receiver (Newspeak VM only)
+ 	128 => check stack depth on send (simulation only)"
- 	 64 => send breakpoint on implicit receiver (Newspeak VM only)"
  	traceFlags := aBooleanOrInteger isInteger
  							ifTrue: [aBooleanOrInteger]
  							ifFalse: [aBooleanOrInteger ifTrue: [6] ifFalse: [0]]!



More information about the Vm-dev mailing list