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

commits at source.squeak.org commits at source.squeak.org
Fri Sep 10 00:29:24 UTC 2021


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

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

Name: VMMaker.oscog-eem.3064
Author: eem
Time: 9 September 2021, 5:29:12.77927 pm
UUID: a7ef63ae-f087-4e44-b79d-cec537a27460
Ancestors: VMMaker.oscog-eem.3063

Simulation: allow shoe-horning a different simulator class in to test LittleEndianBitmap vs DoubleWordArray as a memory class.

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

Item was changed:
  ----- Method: CogVMSimulator>>initialize (in category 'initialize-release') -----
  initialize
  	"Initialize the CogVMSimulator when running the interpreter inside Smalltalk.  The
  	 primary responsibility of this method is to allocate Smalltalk Arrays for variables
  	 that will be declared as statically-allocated global arrays in the translated code."
  	super initialize.
  
  	transcript := Transcript.
  
  	objectMemory ifNil:
+ 		[objectMemory := InitializationOptions
+ 								at: #ObjectMemorySimulator
+ 								ifPresent: [:className| (Smalltalk classNamed: className) new]
+ 								ifAbsent: [self class objectMemoryClass simulatorClass new]].
- 		[objectMemory := self class objectMemoryClass simulatorClass new].
  	cogit ifNil:
  		[cogit := self class cogitClass new setInterpreter: self].
  	objectMemory coInterpreter: self cogit: cogit.
  
  	(cogit numRegArgs > 0
  	 and: [VMClass initializationOptions at: #CheckStackDepth ifAbsent: [true]]) ifTrue:
  		[debugStackDepthDictionary := Dictionary new].
  
  	cogThreadManager ifNotNil:
  		[super initialize].
  
  	self assert: ConstMinusOne = (objectMemory integerObjectOf: -1).
  
  	cogMethodZone := cogit methodZone. "Because Slang can't remove intermediate implicit receivers (cogit methodZone foo doesn't reduce to foo())"
  	enableCog := true.
  
  	methodCache := Array new: MethodCacheSize.
  	nsMethodCache := Array new: NSMethodCacheSize.
  	atCache := nil.
  	self flushMethodCache.
  	cogCompiledCodeCompactionCalledFor := false.
  	gcSemaphoreIndex := 0.
  	externalSemaphoreSignalRequests := externalSemaphoreSignalResponses := #().
  	externalPrimitiveTable := CArrayAccessor on: (Array new: MaxExternalPrimitiveTableSize).
  	externalPrimitiveTableFirstFreeIndex := 0.
  	primitiveTable := self class primitiveTable copy.
  	self initializePluginEntries.
  	desiredNumStackPages := InitializationOptions at: #desiredNumStackPages ifAbsent: [0].
  	desiredEdenBytes := InitializationOptions at: #desiredEdenBytes ifAbsent: [0].
  	desiredCogCodeSize  := InitializationOptions at: #desiredCogCodeSize ifAbsent: [0].
  	"This is initialized on loading the image, but convenient for testing stack page values..."
  	numStackPages := self defaultNumStackPages. 
  	startMicroseconds := lastYieldMicroseconds := self ioUTCStartMicroseconds.
  	maxLiteralCountForCompile := MaxLiteralCountForCompile.
  	minBackwardJumpCountForCompile := MinBackwardJumpCountForCompile.
  	flagInterpretedMethods := false.
  
  	"initialize InterpreterSimulator variables used for debugging"
  	byteCount := lastPollCount := sendCount := lookupCount := 0.
  	quitBlock := [^self close].
  	traceOn := true.
  	printSends := printFrameAtEachStep := printBytecodeAtEachStep := false.
  	myBitBlt := BitBltSimulator new setInterpreter: self.
  	displayForm := fakeForm := 'Display has not yet been installed' asDisplayText form.
  	suppressHeartbeatFlag := deferSmash := deferredSmash := false.
  	systemAttributes := Dictionary new.
  	primTraceLog := CArrayAccessor on: (Array new: 256 withAll: 0).
  	primTraceLogIndex := 0.
  	traceLog := CArrayAccessor on: (Array new: TraceBufferSize withAll: 0).
  	traceLogIndex := 0.
  	traceSources := TraceSources.
  	statCodeCompactionCount := 0.
  	statCodeCompactionUsecs := 0.
  	extSemTabSize := 256.
  	zeroNextProfileTickCount := 0!

Item was changed:
  ----- Method: StackInterpreterSimulator class>>onObjectMemory:options: (in category 'instance creation') -----
  onObjectMemory: anObjectMemory options: optionsDictionaryOrArray
  	| simulatorClass |
  	^self == StackInterpreterSimulator
  		ifTrue:
  			[simulatorClass := SmalltalkImage current endianness == #big
  								ifTrue: [self notYetImplemented"StackInterpreterSimulatorMSB"]
  								ifFalse: [StackInterpreterSimulatorLSB].
  			simulatorClass initializeWithOptions: optionsDictionaryOrArray
  				objectMemoryClass: (anObjectMemory ifNotNil: [anObjectMemory class]).
  			 simulatorClass
  				onObjectMemory: (anObjectMemory ifNil:
+ 										[InitializationOptions
+ 											at: #ObjectMemorySimulator
+ 											ifPresent: [:className| (Smalltalk classNamed: className) new]
+ 											ifAbsent: [self objectMemoryClass simulatorClass new]])
- 										[self objectMemoryClass simulatorClass new])
  				options: optionsDictionaryOrArray]
  		ifFalse: [super basicNew objectMemory: anObjectMemory; initialize]!



More information about the Vm-dev mailing list