Appearance
| 1 | namespace IR.Values.Load is | |
| 2 | use TypeTyped = Semantic.Types.Typed; | |
| 3 | use SymbolBase = Semantic.Symbols.Symbol; | |
| 4 | ||
| 5 | class STATIC_FIELD: SYMBOL, TypeTyped is | |
| 6 | is_consumable: bool => true; | |
| 7 | is_lightweight_pure: bool => true; | |
| 8 | ||
| 9 | init(symbol: SymbolBase) is | |
| 10 | super.init(null, symbol); | |
| 11 | si | |
| 12 | ||
| 13 | gen(context: IR.CONTEXT) is | |
| 14 | context.write_line("ldsfld {symbol.get_il_reference()}"); | |
| 15 | si | |
| 16 | ||
| 17 | gen_address(context: IR.CONTEXT) is | |
| 18 | context.write_line("ldsflda {symbol.get_il_reference()}"); | |
| 19 | si | |
| 20 | ||
| 21 | to_string() -> string => | |
| 22 | "load:[{type}](\"{symbol.name}\")"; | |
| 23 | si | |
| 24 | si |