[Vm-dev] VM Maker: VMMakerUI-eem.16.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 9 02:52:02 UTC 2020


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

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

Name: VMMakerUI-eem.16
Author: eem
Time: 8 January 2020, 6:52:00.804348 pm
UUID: 98d9af6d-64ed-40df-89f0-962a7f3c31d0
Ancestors: VMMakerUI-eem.15

Add a primitive memory inspector (has no oop highlighting/subsequent isnpection abilities yet)

=============== Diff against VMMakerUI-eem.15 ===============

Item was removed:
- ----- Method: CogVMObjectInspector>>stepIn: (in category 'stepping') -----
- stepIn: window
- 	self changed: #text!

Item was removed:
- ----- Method: CogVMObjectInspector>>stepTimeIn: (in category 'stepping') -----
- stepTimeIn: window
- 	"The minimum update time in milliseconds."
- 	^500!

Item was removed:
- ----- Method: CogVMObjectInspector>>wantsStepsIn: (in category 'stepping') -----
- wantsStepsIn: window
- 	^true!

Item was added:
+ VMObjectInspector subclass: #VMMemoryInspector
+ 	instanceVariableNames: 'start limit currentValues'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMakerUI-SqueakInspectors'!

Item was added:
+ ----- Method: VMMemoryInspector class>>on:from:to: (in category 'instance creation') -----
+ on: aCoInterpreter from: start to: end
+ 	^self new
+ 		coInterpreter: aCoInterpreter;
+ 		start: start - (start \\ 8);
+ 		limit: (end + 8 roundTo: 8);
+ 		yourself!

Item was added:
+ ----- Method: VMMemoryInspector class>>openFor:from:to: (in category 'instance creation') -----
+ openFor: aCoInterpreter from: start to: end
+ 	^ToolBuilder open: (self on: aCoInterpreter from: start to: end)!

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

Item was added:
+ ----- Method: VMMemoryInspector>>limit: (in category 'accessing') -----
+ limit: anObject
+ 
+ 	limit := anObject.!

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

Item was added:
+ ----- Method: VMMemoryInspector>>start: (in category 'accessing') -----
+ start: anObject
+ 
+ 	start := anObject.!

Item was added:
+ ----- Method: VMMemoryInspector>>text (in category 'accessing - ui') -----
+ text
+ 	| index |
+ 	currentValues ifNil: [currentValues := Array new: limit - start // 8 + 1 withAll: 0].
+ 	^Text streamContents:
+ 		[:s| | addressLength value |
+ 		addressLength := limit digitLength * 2.
+ 		start to: limit - 1 by: 8 do:
+ 			[:address|
+ 			 address printOn: s base: 16 length: addressLength padded: true.
+ 			 s tab.
+ 			 value := objectMemory long64At: address.
+ 			 index := address - start // 8 + 1.
+ 			 value ~= (currentValues at: index)
+ 				ifTrue: [currentValues at: index put: value.
+ 					s nextPutAll: ((value printStringBase: 16 length: 16 padded: true)
+ 									asText addAllAttributes: {TextEmphasis bold. TextColor color: Color red darker darker})]
+ 				ifFalse: [value printOn: s base: 16 length: 16 padded: true].
+ 			 s cr]]!

Item was added:
+ ----- Method: VMObjectInspector>>stepIn: (in category 'stepping') -----
+ stepIn: window
+ 	self changed: #text!

Item was added:
+ ----- Method: VMObjectInspector>>stepTimeIn: (in category 'stepping') -----
+ stepTimeIn: window
+ 	"The minimum update time in milliseconds."
+ 	^500!

Item was added:
+ ----- Method: VMObjectInspector>>wantsStepsIn: (in category 'stepping') -----
+ wantsStepsIn: window
+ 	^true!



More information about the Vm-dev mailing list