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

commits at source.squeak.org commits at source.squeak.org
Tue Nov 17 21:46:41 UTC 2015


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

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

Name: VMMaker.oscog-eem.1521
Author: eem
Time: 17 November 2015, 1:44:42.026 pm
UUID: 4e7fb348-e709-4cb4-8752-c48d71d5e011
Ancestors: VMMaker.oscog-rmacnak.1520

Fix accessor generartor for surrogates when BytesPerWord=8 and hence generate correct accessors for the CogStackPageSurrogate64.

=============== Diff against VMMaker.oscog-rmacnak.1520 ===============

Item was changed:
  ----- Method: CogStackPageSurrogate64>>padToWord (in category 'accessing') -----
  padToWord
+ 	^memory longAt: address + 61!
- 	^memory long64At: address + 65!

Item was changed:
  ----- Method: CogStackPageSurrogate64>>padToWord: (in category 'accessing') -----
  padToWord: aValue
+ 	self assert: (address + 60 >= zoneBase and: [address + 63 < zoneLimit]).
+ 	^memory longAt: address + 61 put: aValue!
- 	self assert: (address + 64 >= zoneBase and: [address + 71 < zoneLimit]).
- 	^memory long64At: address + 65 put: aValue!

Item was changed:
  ----- Method: CogStackPageSurrogate64>>trace (in category 'accessing') -----
  trace
+ 	^memory longAt: address + 57!
- 	^memory long64At: address + 57!

Item was changed:
  ----- Method: CogStackPageSurrogate64>>trace: (in category 'accessing') -----
  trace: aValue
+ 	self assert: (address + 56 >= zoneBase and: [address + 59 < zoneLimit]).
+ 	^memory longAt: address + 57 put: aValue!
- 	self assert: (address + 56 >= zoneBase and: [address + 63 < zoneLimit]).
- 	^memory long64At: address + 57 put: aValue!

Item was changed:
  ----- Method: VMStructType class>>fieldAccessorsForBytesPerWord: (in category 'code generation') -----
  fieldAccessorsForBytesPerWord: bytesPerWord
  	| fieldSpecs |
  	fieldSpecs := OrderedCollection new.
  	self instVarNamesAndTypesForTranslationDo:
  		[:ivn :typeTuple| | index replacement |
  		(index := typeTuple indexOf: #BytesPerWord ifAbsent: 0) > 0
  			ifTrue:
  				[(typeTuple at: index + 1) = bytesPerWord ifTrue:
  					[replacement := typeTuple copyReplaceFrom: index to: index + 1 with: #().
  					 replacement size = 1 ifTrue:
  						[replacement := replacement first].
  					fieldSpecs add: { ivn. replacement }]]
  			ifFalse:
  				[fieldSpecs add: { ivn. typeTuple }]].
  	^fieldSpecs collect:
  		[:tuple|
  			[:ivn :typeTuple|
  			{ ('*unused*' match: ivn) ifTrue: [#unused] ifFalse: [ivn].
  			  (typeTuple isArray and: ['unsigned' = typeTuple first])
  				ifTrue:
  					[Integer readFrom: (typeTuple last readStream skipTo: $:; skipSeparators)]
  				ifFalse:
  					[typeTuple
  						caseOf: {
+ 								[#char]				->	[8].
+ 								[#'unsigned char']	->	[8].
+ 								[#short]			->	[16].
+ 								[#'unsigned short']	->	[16].
+ 								[#int]				->	[32].
+ 								[#'unsigned int']	->	[32] }
- 								['unsigned char']	->	[8].
- 								['unsigned short']	->	[16].
- 								['unsigned int']		->	[32] }
  						otherwise: [bytesPerWord * 8]].
  			typeTuple isArray
  				ifTrue:
  					[(typeTuple size >= 3 and: [typeTuple second = #Boolean]) ifTrue:
  						[#Boolean]]
  				ifFalse:
  					[typeTuple last = $* ifTrue:
  						[(typeTuple beginsWith: 'struct _') "remove struct tag if any"
  							ifTrue: [(typeTuple allButFirst: 8) asSymbol]
  							ifFalse: [typeTuple]]] }] valueWithArguments: tuple]
  
  	"#(4 8) collect: [:bpw| (CogBlockMethod fieldAccessorsForBytesPerWord: bpw) asArray]"
  	"#(4 8) collect: [:bpw| (CogMethod fieldAccessorsForBytesPerWord: bpw) asArray]"!



More information about the Vm-dev mailing list