-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathgc-object-models.txt
49 lines (41 loc) · 1.57 KB
/
gc-object-models.txt
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
V3 Object model:
====================================================================================================
Value <-------+
|
HeapTypeDecl<---------------+ +-------> Array<Value>: { typeid , length , e0 o , e1 , ... }
| |
HeapObject: { typeid , decl x , vals x }
SPC support:
Level -1:
no SPC support, interpreter only
Level 0:
Runtime call for all STRUCT/ARRAY operations
Level 1:
Runtime call for allocations
STRUCT/ARRAY.get/set loads obj->vals and calls
- Runtime.get_val_i(Array<Value>, index) -> i32
get_val_l -> i64
get_val_f -> i64
get_val_d -> i64
get_val_r -> Object
get_val_s -> (i64, i64)
- Runtime.set_val_i(Array<Value>, index, val: i32)
set_val_l(Array<Value>, index, val: i64)
Level 1l:
Inline array.len
Level 1r:
Inline i31 ref operations
Level 1c:
Inline all ref.cast operations
Level 2:
STRUCT/ARRAY.get directly loads field from (boxed) Value.I32/I64/F32/Ref cases
Level 3:
Values are unboxed but still tagged for I32, I64, F32, F64, Ref,
STRUCT/ARRAY.get/set directly updates value array
(what about write barriers?)
Level 3b:
Values are unboxed and use same layout as Value stack array
Level 4:
Object model uses Virgil runtime extensions
Level 5:
Inline allocation via bump pointer of TLAB