| 247 | } |
| 248 | |
| 249 | Expect<void> |
| 250 | Executor::branchToLabel(Runtime::StackManager &StackMgr, |
| 251 | const AST::Instruction::JumpDescriptor &JumpDesc, |
| 252 | AST::InstrView::iterator &PC) noexcept { |
| 253 | // Check the stop token. |
| 254 | if (unlikely(StopToken.exchange(0, std::memory_order_relaxed))) { |
| 255 | spdlog::error(ErrCode::Value::Interrupted); |
| 256 | return Unexpect(ErrCode::Value::Interrupted); |
| 257 | } |
| 258 | |
| 259 | StackMgr.eraseValueStack(JumpDesc.StackEraseBegin, JumpDesc.StackEraseEnd); |
| 260 | // PC needs -1 here because the PC will increase in the next iteration. |
| 261 | PC += (JumpDesc.PCOffset - 1); |
| 262 | return {}; |
| 263 | } |
| 264 | |
| 265 | Expect<void> Executor::throwException( |
| 266 | Runtime::StackManager &StackMgr, Runtime::Instance::TagInstance &TagInst, |
nothing calls this directly
no test coverage detected