| 238 | } |
| 239 | |
| 240 | Expect<void> |
| 241 | Executor::runArrayLenOp(ValVariant &Val, |
| 242 | const AST::Instruction &Instr) const noexcept { |
| 243 | const auto *Inst = |
| 244 | Val.get<RefVariant>().getPtr<Runtime::Instance::ArrayInstance>(); |
| 245 | if (Inst == nullptr) { |
| 246 | return Unexpect(logError(ErrCode::Value::AccessNullArray, Instr)); |
| 247 | } |
| 248 | Val.emplace<uint32_t>(Inst->getLength()); |
| 249 | return {}; |
| 250 | } |
| 251 | |
| 252 | Expect<void> |
| 253 | Executor::runArrayFillOp(Runtime::StackManager &StackMgr, const uint32_t Cnt, |