Skip to content
← Back

src/ir/values/store/instance_field.ghul

1
namespace IR.Values.Store is
2
use SymbolBase = Semantic.Symbols.Symbol;
3
4
class INSTANCE_FIELD: SYMBOL is
5
is_consumable: bool => value.is_consumable;
6
7
init(from: IR.Values.Value, symbol: SymbolBase, value: IR.Values.Value) is
8
super.init(from, symbol, value);
9
10
si
11
12
gen(context: IR.CONTEXT) is
13
gen(from, context);
14
gen(value, context);
15
16
context.write_line("stfld {symbol.get_il_reference()}");
17
si
18
19
to_string() -> string =>
20
"store:[{type}]({from},\"{symbol.name}\",{value})";
21
si
22
si