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

commits at source.squeak.org commits at source.squeak.org
Wed Dec 1 19:08:00 UTC 2021


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

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

Name: VMMaker.oscog-eem.3116
Author: eem
Time: 1 December 2021, 11:07:46.469774 am
UUID: d757936e-c3f3-48be-9435-9a3a60b14615
Ancestors: VMMaker.oscog-eem.3115

Spur: eliminate duplicate enableObjectEnumerationFrom:'s in both senders of allEntitiesFrom:do:.

Slang: TMethod's writtenToGlobalVarsCache should be voided more agressively to ensure endOfMemory is inlined in allEntitiesFrom:do:.

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

Item was changed:
  ----- Method: SpurMemoryManager>>allObjectsDo: (in category 'object enumeration') -----
  allObjectsDo: aBlock
  	<inline: true>
  	| startObject |
  	startObject := self objectStartingAt: self startAddressForBridgedHeapEnumeration.
- 	self enableObjectEnumerationFrom: startObject.
  	self allEntitiesFrom: startObject
  		do: [:objOop|
  			 (self isEnumerableObject: objOop) ifTrue:
  				[aBlock value: objOop]]!

Item was changed:
  ----- Method: SpurMemoryManager>>allObjectsDoSafely: (in category 'object enumeration') -----
  allObjectsDoSafely: aBlock
  	"Enumerate, not being confised by forwarding pointers.
  	 This is chosen for compatiblity with [New]Objectmemory, but the semantics differ.
  	 Here we're interested in enumerating ordinary objects, ignoring forwarding pointers,
  	 and puns."
  	<inline: true>
  	| startObject |
  	startObject := self objectStartingAt: self startAddressForBridgedHeapEnumeration.
- 	self enableObjectEnumerationFrom: startObject.
  	self allEntitiesFrom: startObject
  		do: [:objOop|
  			 (self isNormalObject: objOop) ifTrue:
  				[aBlock value: objOop]]!

Item was changed:
  ----- Method: TMethod>>maySubstituteGlobal:in: (in category 'inlining support') -----
  maySubstituteGlobal: globalVar in: aCodeGen
  	"We can substitute globalVar into this method provided globalVar is only read, not written."
  
+ 	writtenToGlobalVarsCache ifNil:
- 	writtenToGlobalVarsCache = nil ifTrue:
  		[self computePossibleSideEffectsInto: (Set new: 50) visited: (Set new: 50) in: aCodeGen].
  	^(writtenToGlobalVarsCache includes: globalVar) not!

Item was changed:
  ----- Method: TMethod>>tryToInlineMethodsIn: (in category 'inlining') -----
  tryToInlineMethodsIn: aCodeGen
  	"Expand any (complete) inline methods sent by this method.
  	 Set the complete flag when all inlining has been done.
  	 Answer if something was inlined."
  
  	self definedAsMacro ifTrue:
  		[complete ifTrue:
  			[^false].
  		 ^complete := true].
  
  	^aCodeGen
  		pushScope: declarations
  		while:
  			[| didSomething statementLists |
  			self ensureConditionalAssignmentsAreTransformedIn: aCodeGen.
  			didSomething := self tryToInlineMethodStatementsIn: aCodeGen statementListsInto: [:stmtLists| statementLists := stmtLists].
  			didSomething := (self tryToInlineMethodExpressionsIn: aCodeGen) or: [didSomething].
  
- 			didSomething ifTrue:
- 				[writtenToGlobalVarsCache := nil].
- 
  			complete ifFalse:
  				[self checkForCompletenessIn: aCodeGen.
  				 complete ifTrue: [didSomething := true]].  "marking a method complete is progress"
+ 
+ 			didSomething ifTrue:
+ 				[writtenToGlobalVarsCache := nil].
+ 
  			didSomething]!



More information about the Vm-dev mailing list