Skip to content
← Back

src/ir/values/store/indirect.ghul

1
namespace IR.Values.Store is
2
use Semantic.Types.Type
3
4
// Store a value through a managed pointer: the address-providing
5
// LHS evaluates to a `T ref` whose stored value IS the address of
6
// the pointee.
7
class INDIRECT: Value is
8
type: Type
9
address: Value
10
value: Value
11
12
init(
13
address: Value,
14
value: Value,
15
type: Type
16
) is
17
super.init()
18
19
self.address = address
20
self.value = value
21
self.type = type
22
si
23
24
accept(visitor: Visitor) is
25
visitor.visit(self)
26
si
27
28
to_string() -> string =>
29
"store_indirect:[{type}]({address},{value})"
30
si
31
si