| 145 | } |
| 146 | |
| 147 | Expect<void> Executor::runReturnOp(Runtime::StackManager &StackMgr, |
| 148 | AST::InstrView::iterator &PC) noexcept { |
| 149 | // Check stop token |
| 150 | if (unlikely(StopToken.exchange(0, std::memory_order_relaxed))) { |
| 151 | spdlog::error(ErrCode::Value::Interrupted); |
| 152 | return Unexpect(ErrCode::Value::Interrupted); |
| 153 | } |
| 154 | PC = StackMgr.popFrame(); |
| 155 | return {}; |
| 156 | } |
| 157 | |
| 158 | Expect<void> Executor::runCallOp(Runtime::StackManager &StackMgr, |
| 159 | const AST::Instruction &Instr, |