Appearance
| 1 | namespace Syntax.Trees.Expressions is | |
| 2 | ||
| 3 | use Source; | |
| 4 | ||
| 5 | // `SPILL(E)` — synthesised by SPILL_AWAITS. Generate-IL emits | |
| 6 | // E's IL plus a stfld to a fresh frame field; the SPILL's | |
| 7 | // `value` becomes a ldfld from that field, which surrounding IR | |
| 8 | // consumes lazily. Type matches the wrapped operand. | |
| 9 | class SPILL: Expression is | |
| 10 | operand: Expression; | |
| 11 | ||
| 12 | init(location: LOCATION, operand: Expression) is | |
| 13 | super.init(location); | |
| 14 | ||
| 15 | self.operand = operand; | |
| 16 | si | |
| 17 | ||
| 18 | accept(visitor: Visitor) is | |
| 19 | visitor.visit(self); | |
| 20 | si | |
| 21 | ||
| 22 | walk(visitor: Visitor) is | |
| 23 | if !visitor.pre(self) then | |
| 24 | operand.walk(visitor); | |
| 25 | fi | |
| 26 | accept(visitor); | |
| 27 | si | |
| 28 | si | |
| 29 | si |