Appearance
| 1 | namespace IR.WasmGC is | |
| 2 | use Semantic.Types.Type | |
| 3 | ||
| 4 | /// A value the lowering has already put in one of its own locals, | |
| 5 | /// for an IR value it builds to read it again. | |
| 6 | class WASMGC_LOCAL_VALUE: IR.Values.Value is | |
| 7 | /// The local holding the value. | |
| 8 | index: int | |
| 9 | ||
| 10 | _type: Type | |
| 11 | ||
| 12 | type: Type? pure => _type | |
| 13 | ||
| 14 | /// - index: the local holding the value | |
| 15 | /// - type: the type of the value it holds | |
| 16 | init(index: int, type: Type) is | |
| 17 | super.init() | |
| 18 | ||
| 19 | self.index = index | |
| 20 | _type = type | |
| 21 | si | |
| 22 | ||
| 23 | to_string() -> string => "wasmgc-local:[{_type}]({index})" | |
| 24 | si | |
| 25 | si |