[Vm-dev] VM Maker: Cog-eem.317.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 30 17:53:39 UTC 2016


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

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

Name: Cog-eem.317
Author: eem
Time: 30 April 2016, 10:53:05.924588 am
UUID: 421df5c5-c733-442e-9a19-0db0e78025d9
Ancestors: Cog-eem.316

Eliminate ARM-specific code from abstract disassembler ,ethodf overridden in ARM subclass.

=============== Diff against Cog-eem.316 ===============

Item was changed:
  ----- Method: CogProcessorAlien>>disassembleFrom:to:in:for:labels:on: (in category 'disassembly') -----
  disassembleFrom: startAddress to: endAddress in: memory for: aSymbolManager "<Cogit>" labels: labelDictionary on: aStream
  	| address |
  	address := startAddress.
  	[address <= endAddress] whileTrue:
+ 		[[:sizeArg :stringArg| | size string |
+ 		  size := sizeArg.
+ 		  string := stringArg.
+ 		  (aSymbolManager labelForPC: address) ifNotNil:
- 		[[:sizeArg :stringArg| | size string index offset |
- 		size := sizeArg.
- 		string := stringArg.
- 		(aSymbolManager labelForPC: address) ifNotNil:
  			[:label| aStream nextPutAll: label; nextPut: $:; cr].
+ 		  (labelDictionary at: address ifAbsent: []) ifNotNil:
- 		(labelDictionary at: address ifAbsent: []) ifNotNil:
  			[:label|
  			label isArray
  				ifTrue: [label first == #literal
  							ifTrue:
  								[aStream
  									nextPutAll: (address printStringBase: 16 length: 8 padded: true) asLowercase;
  									nextPut: $:; space;
  									nextPutAll: (aSymbolManager lookupAddress: (aSymbolManager objectMemory longAt: address))]
  							ifFalse:
  								[aStream
  									nextPutAll: label first;
  									nextPut: $:; cr;
  									nextPutAll: (address printStringBase: 16 length: 8 padded: true) asLowercase;
  									nextPut: $:; space;
  									nextPutAll: (aSymbolManager perform: label second with: address) asString].
  						string := nil.
  						size := label third]
  				ifFalse: [aStream nextPutAll: label; nextPut: $:; cr]].
+ 		  string ifNotNil:
+ 			[aStream nextPutAll: (self decorateDisassembly: string for: aSymbolManager fromAddress: address)].
+ 		  aStream cr; flush.
+ 		  address := address + size]
- 		string ifNotNil:
- 			[aStream nextPutAll: (self decorateDisassembly: string for: aSymbolManager fromAddress: address).
- 			 ((string includesSubString: ': ldr ')
- 			  and: [(index := string indexOfSubCollection: ' [pc, #' startingAt: 1) > 0]) ifTrue:
- 				[offset := Integer readFrom: (ReadStream on: string from: index + 6 to: string size).
- 				 offset := address + 8 + offset.
- 				 labelDictionary
- 					at: offset
- 					ifAbsentPut: []]].
- 		aStream cr; flush.
- 		address := address + size]
  			valueWithArguments: (self
  									primitiveDisassembleAt: address
  									inMemory: memory)]!



More information about the Vm-dev mailing list