Appearance
| 1 | namespace IR.Values is | |
| 2 | use TypeTyped = Semantic.Types.Typed | |
| 3 | use Semantic.Types.Type | |
| 4 | ||
| 5 | // A completed handle for a result-less task-like, produced by | |
| 6 | // driving the task-like's builder directly: create, set_result, | |
| 7 | // read `task`. Emitted where a machine-less body completes at | |
| 8 | // fall-through or from a bare `return;` - the state-machine | |
| 9 | // lowering never produces this value, since its own trailer | |
| 10 | // completes through the builder field. Task itself completes | |
| 11 | // through `Tasks.TASK.completed_task` at compile time, so this is | |
| 12 | // the other task-likes only. | |
| 13 | class COMPLETED_TASK_LIKE: Value, TypeTyped is | |
| 14 | type: Type | |
| 15 | ||
| 16 | builder_type: Type | |
| 17 | ||
| 18 | is_state_changing_call: bool => true | |
| 19 | ||
| 20 | init(type: Type, builder_type: Type) is | |
| 21 | super.init() | |
| 22 | ||
| 23 | self.type = type | |
| 24 | self.builder_type = builder_type | |
| 25 | si | |
| 26 | ||
| 27 | accept(visitor: Visitor) is | |
| 28 | visitor.visit(self) | |
| 29 | si | |
| 30 | ||
| 31 | to_string() -> string => "completed-task-like:[{type}]()" | |
| 32 | si | |
| 33 | si |