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

commits at source.squeak.org commits at source.squeak.org
Sat Jan 6 02:52:48 UTC 2018


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

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

Name: VMMaker.oscog-eem.2310
Author: eem
Time: 5 January 2018, 6:52:19.253773 pm
UUID: ecb88457-93a0-47c1-9d8a-69a576c283b3
Ancestors: VMMaker.oscog-eem.2309

Simulation:
Fix charsOf: so that longPrintOop:/shortPrint: prints the full 8-bit character range, not the 7 bit character range.
Provide accessors for breakCount and nuke the unused (and composable runWithBreakCount:).
Make sure trhat click step in the StackInterpreter updates the bytecCount display.

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

Item was added:
+ ----- Method: CogVMSimulator>>breakCount (in category 'accessing') -----
+ breakCount
+ 	^breakCount!

Item was removed:
- ----- Method: CogVMSimulator>>charsOfLong: (in category 'debug support') -----
- charsOfLong: long
- 	^self subclassResponsibility!

Item was changed:
  ----- Method: CogVMSimulator>>incrementByteCount (in category 'interpreter shell') -----
  incrementByteCount
  	(byteCount := byteCount + 1) = breakCount ifTrue:
  		[self doOrDefer: [self changed: #byteCountText; changed: #composeAll].
+ 		 self halt: 'breakCount reached'].
- 		 self halt].
  	byteCount \\ 1000 = 0 ifTrue:
  		[self doOrDefer: [self changed: #byteCountText; changed: #composeAll].
  		 self forceInterruptCheck]!

Item was removed:
- ----- Method: CogVMSimulator>>runWithBreakCount: (in category 'testing') -----
- runWithBreakCount: theBreakCount
- 	"Just run, halting when byteCount is reached"
- 	quitBlock := [displayView ifNotNil:
- 				   [displayView containingWindow ifNotNil:
- 					[:topWindow|
- 					((World submorphs includes: topWindow)
- 					 and: [UIManager default confirm: 'close?']) ifTrue:
- 						[topWindow delete]]].
- 				  ^self close].
- 	breakCount := theBreakCount.
- 	self initStackPages.
- 	self loadInitialContext.
- 	self initialEnterSmalltalkExecutive!

Item was added:
+ ----- Method: CogVMSimulator>>setBreakCount: (in category 'accessing') -----
+ setBreakCount: anInteger
+ 	breakCount := anInteger!

Item was removed:
- ----- Method: CogVMSimulatorLSB>>charsOfLong: (in category 'debug support') -----
- charsOfLong: long
- 	^ (1 to: objectMemory wordSize) collect:
- 		[:i | ((long digitAt: i) between: 14 and: 126)
- 					ifTrue: [(long digitAt: i) asCharacter]
- 					ifFalse: [$?]]!

Item was removed:
- ----- Method: InterpreterSimulator>>runWithBreakCount: (in category 'testing') -----
- runWithBreakCount: breakCount
- 	self internalizeIPandSP.
- 	self fetchNextBytecode.
- 	[true] whileTrue:
- 		[self dispatchOn: currentBytecode in: BytecodeTable.
- 		 (byteCount := byteCount + 1) = breakCount ifTrue:
- 			[self halt]].
- 	localIP := localIP - 1.
- 	"undo the pre-increment of IP before returning"
- 	self externalizeIPandSP!

Item was added:
+ ----- Method: StackInterpreter>>charsOfLong: (in category 'debug support') -----
+ charsOfLong: long
+ 	"N.B. This will need to be overridden in big-endian simulator subclasses."
+ 	<doNotGenerate>
+ 	^ (1 to: objectMemory wordSize) collect:
+ 		[:i | | d |
+ 		(d := long digitAt: i) >= 14
+ 			ifTrue: [d asCharacter]
+ 			ifFalse: [$?]]!

Item was added:
+ ----- Method: StackInterpreterSimulator>>breakCount (in category 'accessing') -----
+ breakCount
+ 	^breakCount!

Item was removed:
- ----- Method: StackInterpreterSimulator>>charsOfLong: (in category 'debug support') -----
- charsOfLong: long
- 	^self subclassResponsibility!

Item was changed:
  ----- Method: StackInterpreterSimulator>>incrementByteCount (in category 'interpreter shell') -----
  incrementByteCount
  	(byteCount := byteCount + 1) = breakCount ifTrue:
  		[self doOrDefer: [self changed: #byteCountText].
+ 		 self halt: 'breakCount reached'].
- 		 self halt].
  	byteCount \\ 1000 = 0 ifTrue:
  		[self doOrDefer: [self changed: #byteCountText].
  		 self forceInterruptCheck]!

Item was removed:
- ----- Method: StackInterpreterSimulator>>runWithBreakCount: (in category 'testing') -----
- runWithBreakCount: theBreakCount
- 	"Just run, halting when byteCount is reached"
- 	quitBlock := [displayView ifNotNil:
- 				   [displayView containingWindow ifNotNil:
- 					[:topWindow|
- 					((World submorphs includes: topWindow)
- 					 and: [UIManager default confirm: 'close?']) ifTrue:
- 						[topWindow delete]]].
- 				  ^self close].
- 	breakCount := theBreakCount.
- 	self initStackPages.
- 	self loadInitialContext.
- 	self internalizeIPandSP.
- 	self fetchNextBytecode.
- 	[true] whileTrue:
- 		[self assertValidExecutionPointers.
- 		 self dispatchOn: currentBytecode in: BytecodeTable.
- 		 self incrementByteCount].
- 	localIP := localIP - 1.
- 	"undo the pre-increment of IP before returning"
- 	self externalizeIPandSP!

Item was added:
+ ----- Method: StackInterpreterSimulator>>setBreakCount: (in category 'accessing') -----
+ setBreakCount: anInteger
+ 	breakCount := anInteger!

Item was changed:
  ----- Method: StackInterpreterSimulator>>setClickStepBreakBlock (in category 'UI') -----
  setClickStepBreakBlock
  	"Set the break block to present a confirmer, breaking if true, and restoring the previous break block.
  	 If an open debugger on the receiver can be found, proceed it."
  	<doNotGenerate>
  	| previousAtEachStepBlock |
  	(atEachStepBlock isNil or: [atEachStepBlock method ~~ thisContext method]) ifTrue:
  		[previousAtEachStepBlock := atEachStepBlock.
  		 atEachStepBlock :=
  							[previousAtEachStepBlock value.
+ 							 self changed: #byteCountText.
  							 (UIManager confirm: 'step?') ifFalse:
  								[atEachStepBlock := previousAtEachStepBlock.
  								 self halt]]].
  	(World submorphs
  		detect:
  			[:m|
  			 m model class == Debugger
  			 and: [(m model interruptedProcess suspendedContext findContextSuchThat:
  					[:ctxt|
  					 ctxt receiver == self
  					 and: [ctxt selector == #run]]) notNil]]
  		ifNone: []) ifNotNil:
  			[:debuggerWindow|
  			 WorldState addDeferredUIMessage:
  				[debuggerWindow model proceed]]!

Item was removed:
- ----- Method: StackInterpreterSimulatorLSB>>charsOfLong: (in category 'debug support') -----
- charsOfLong: long
- 	^ (1 to: objectMemory wordSize) collect:
- 		[:i | ((long digitAt: i) between: 14 and: 126)
- 					ifTrue: [(long digitAt: i) asCharacter]
- 					ifFalse: [$?]]!



More information about the Vm-dev mailing list