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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
use WasmValType;
/// Base register used to address the local slot.
///
/// Slots for stack arguments are addressed from the frame pointer.
/// Slots for function-defined locals and for registers are addressed
/// from the stack pointer.
/// A local slot.
///
/// Represents the type, location and addressing mode of a local
/// in the stack's local and argument area.
/// LocalSlots are well known slots in the machine stack, and are generally
/// reference by the stack pointer register (SP) or the base pointer register (FP).
/// * Local slots that are referenced by the stack pointer register are the
/// function defined locals and the param locals.
/// * Local slots that represent arguments in the stack, are referenced through the
/// base pointer register.
///
/// A [crate::masm::StackSlot] is a generalized form of a [LocalSlot]: they
/// represent dynamic chunks of memory that get created throughout the function
/// compilation lifetime when spilling values (register and locals) into the
/// machine stack. A [LocalSlot] on the other hand gets created at the beginning
/// of a function compilation and gets cleaned up at the end.
pub