Skip to content

Commit

Permalink
Fix test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
PalumboN committed Feb 25, 2022
1 parent 79c374e commit 7a3ff14
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion smalltalksrc/VMMaker/StackInterpreterSimulator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ StackInterpreterSimulator class >> new [
^self onObjectMemory: nil options: #()
]

{ #category : #'instance creation' }
StackInterpreterSimulator class >> newBasicWithOptions: optionsDictionaryOrArray [

^ self
onObjectMemory: nil
options: optionsDictionaryOrArray
initializer: [ :interpreter | interpreter basicInitialize ]
]

{ #category : #'instance creation' }
StackInterpreterSimulator class >> newWithOptions: optionsDictionaryOrArray [
^self onObjectMemory: nil options: optionsDictionaryOrArray
Expand All @@ -101,6 +110,15 @@ StackInterpreterSimulator class >> onObjectMemory: anObjectMemory [

{ #category : #'instance creation' }
StackInterpreterSimulator class >> onObjectMemory: anObjectMemory options: optionsDictionaryOrArray [

^ self
onObjectMemory: anObjectMemory
options: optionsDictionaryOrArray
initializer: [ :interpreter | interpreter initialize ]
]

{ #category : #'instance creation' }
StackInterpreterSimulator class >> onObjectMemory: anObjectMemory options: optionsDictionaryOrArray initializer: initializer [
| simulatorClass |
^self == StackInterpreterSimulator
ifTrue:
Expand All @@ -113,7 +131,7 @@ StackInterpreterSimulator class >> onObjectMemory: anObjectMemory options: optio
onObjectMemory: (anObjectMemory ifNil:
[self objectMemoryClass simulatorClass new])
options: optionsDictionaryOrArray]
ifFalse: [super basicNew objectMemory: anObjectMemory; initialize]
ifFalse: [initializer value: (super basicNew objectMemory: anObjectMemory)]
]

{ #category : #'debug support' }
Expand Down
2 changes: 1 addition & 1 deletion smalltalksrc/VMMakerTests/VMSessionIdTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ VMSessionIdTest >> testGlobalSessionID [

"The globalSessionID is the Unix time at startup + startMicroseconds.
The simulator allows startMicroseconds to be set, so we can force the value to have the top bit set in a 32 bit signed integer"
vm := StackInterpreterSimulator newWithOptions: {
vm := StackInterpreterSimulator newBasicWithOptions: {
#ObjectMemory -> #Spur64BitMemoryManager.
#startMicroseconds -> 16r80000000. } asDictionary.
vm initializeGlobalSessionID.
Expand Down

0 comments on commit 7a3ff14

Please sign in to comment.