-
Notifications
You must be signed in to change notification settings - Fork 64
/
VMSimulationTest.class.st
50 lines (42 loc) · 1.24 KB
/
VMSimulationTest.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Class {
#name : #VMSimulationTest,
#superclass : #TestCase,
#category : #'VMMakerTests-Simulation'
}
{ #category : #tests }
VMSimulationTest >> testSetUpJITSimulationReadsImage [
| options c |
"Smoke test, check that the VM can open the image file"
self timeLimit: 60 seconds.
VMStackPages initialize.
options := {
#ObjectMemory -> #Spur64BitCoMemoryManager.
#ISA -> #aarch64.
#BytesPerWord -> 8.
#bytecodeTableInitializer -> #initializeBytecodeTableForSistaV1.
#ImageWriter -> #SpurImageWriter.
#ImageReader -> #SpurImageReader.
} asDictionary.
c := CogVMSimulator newWithOptions: options.
c
openOn: Smalltalk imagePath
extraMemory: 100000.
]
{ #category : #tests }
VMSimulationTest >> testSetUpNonJITSimulationReadsImage [
| options c |
"Smoke test, check that the VM can open the image file"
self timeLimit: 60 seconds.
VMStackPages initialize.
options := {
#ObjectMemory -> #Spur64BitMemoryManager.
#BytesPerWord -> 8.
#bytecodeTableInitializer -> #initializeBytecodeTableForSistaV1.
#ImageWriter -> #SpurImageWriter.
#ImageReader -> #SpurImageReader.
} asDictionary.
c := StackInterpreterSimulator newWithOptions: options.
c
openOn: Smalltalk imagePath
extraMemory: 100000.
]