| 126 | } |
| 127 | |
| 128 | Expect<void> Executor::runTableFillOp(Runtime::StackManager &StackMgr, |
| 129 | Runtime::Instance::TableInstance &TabInst, |
| 130 | const AST::Instruction &Instr) { |
| 131 | // Pop the length, ref_value, and offset from the stack. |
| 132 | const auto AddrType = TabInst.getTableType().getLimit().getAddrType(); |
| 133 | uint64_t Len = extractAddr(StackMgr.pop(), AddrType); |
| 134 | RefVariant Val = StackMgr.pop().get<RefVariant>(); |
| 135 | uint64_t Off = extractAddr(StackMgr.pop(), AddrType); |
| 136 | |
| 137 | // Fill refs with ref_value. |
| 138 | return TabInst.fillRefs(Val, Off, Len).map_error([&Instr](auto E) { |
| 139 | spdlog::error( |
| 140 | ErrInfo::InfoInstruction(Instr.getOpCode(), Instr.getOffset())); |
| 141 | return E; |
| 142 | }); |
| 143 | } |
| 144 | |
| 145 | } // namespace Executor |
| 146 | } // namespace WasmEdge |
nothing calls this directly
no test coverage detected