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

commits at source.squeak.org commits at source.squeak.org
Tue Feb 24 19:42:32 UTC 2015

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscog-eem.1078
Author: eem
Time: 24 February 2015, 11:41:02.64 am
UUID: 4f7efca2-6dd0-40ea-9abb-2b1f68ee8269
Ancestors: VMMaker.oscog-eem.1077

Fix a typing bug in initializeOldSpaceFirstFree:.
Add breakpoint in inferReturnTypeFromReturnsIn:

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

Item was changed:
  ----- Method: SpurMemoryManager>>initializeOldSpaceFirstFree: (in category 'free space') -----
  initializeOldSpaceFirstFree: startOfFreeOldSpace
+ 	<var: 'startOfFreeOldSpace' type: #usqInt>
- 	<var: 'startOfFreeOldSpace' type: #usqLong>
  	| limit freeOldStart freeChunk |
+ 	<var: 'limit' type: #usqInt>
+ 	<var: 'freeOldStart' type: #usqInt>
- 	<var: 'limit' type: #usqLong>
- 	<var: 'freeOldStart' type: #usqLong>
  	limit := endOfMemory - self bridgeSize.
  	limit > startOfFreeOldSpace ifTrue:
  		[totalFreeOldSpace := totalFreeOldSpace + (limit - startOfFreeOldSpace).
  		 freeOldStart := startOfFreeOldSpace.
  		 self wordSize > 4 ifTrue:
  			[[limit - freeOldStart >= (1 << 32)] whileTrue:
  				[freeChunk := self freeChunkWithBytes: (1 << 32) at: freeOldStart.
  				 freeOldStart := freeOldStart + (1 << 32).
  				 self assert: freeOldStart = (self addressAfter: freeChunk)]].
  		freeOldStart < limit ifTrue:
  			[freeChunk := self freeChunkWithBytes: limit - freeOldStart at: freeOldStart.
  			 self assert: (self addressAfter: freeChunk) = limit]].
  	endOfMemory := endOfMemory - self bridgeSize.
  	freeOldSpaceStart := endOfMemory.
  	self checkFreeSpace!

Item was changed:
  ----- Method: TMethod>>inferReturnTypeFromReturnsIn: (in category 'type inference') -----
  inferReturnTypeFromReturnsIn: aCodeGen
  	"Attempt to infer the return type of the receiver from returns in the parse tree."
  	"this for determining which returns have which return types:"
  		pushScope: declarations
  		while: [parseTree
  				nodesSelect: [:n| n isReturn]
  				thenCollect: [:n| | s |
  					s := Set new.
  					self addTypesFor: n expression to: s in: aCodeGen.
  					{n. s}]]"
+ 	aCodeGen maybeBreakForTestToInline: selector in: self.
  	returnType ifNil: "the initial default"
  			pushScope: declarations
  				[| hasReturn returnTypes |
  				 hasReturn := false.
  				 returnTypes := Set new.
  				 (| rettypes |
  				  rettypes := Dictionary new.
  				  parseTree nodesDo:
  					node isReturn ifTrue:
  						[| types |
  						 self addTypesFor: node expression to: (types := Set new) in: aCodeGen.
  						 rettypes at: node expression put: types]].
  				 parseTree nodesDo:
  					node isReturn ifTrue:
  						[hasReturn := true.
  						 self addTypesFor: node expression to: returnTypes in: aCodeGen]].
  				returnTypes remove: #implicit ifAbsent: [].
  				returnTypes := aCodeGen harmonizeReturnTypesIn: returnTypes.
  						[returnTypes size > 1 ifTrue:
  							[| message |
  							 message := String streamContents:
  											 s nextPutAll: 'conflicting return types '.
  												do: [:t| s nextPutAll: t]
  												separatedBy: [s nextPutAll: ', '].
  											 s nextPutAll: ' in '; nextPutAll: selector; cr].
  							 Notification signal: message.
  							 aCodeGen logger show: message].
  						 returnTypes size = 1 ifTrue:
  							[self returnType: returnTypes anyOne]]
  						[self returnType: (aCodeGen implicitReturnTypeFor: selector)]]]!

More information about the Vm-dev mailing list