| 374 | return TabInsts[Idx]; |
| 375 | } |
| 376 | Expect<MemoryInstance *> getMemory(uint32_t Idx) const noexcept { |
| 377 | std::shared_lock Lock(Mutex); |
| 378 | if (Idx >= MemInsts.size()) { |
| 379 | // Error logging needs to be handled by the caller. |
| 380 | return Unexpect(ErrCode::Value::WrongInstanceIndex); |
| 381 | } |
| 382 | return unsafeGetMemory(Idx); |
| 383 | } |
| 384 | MemoryInstance *unsafeGetMemory(uint32_t Idx) const noexcept { |
| 385 | return MemInsts[Idx]; |
| 386 | } |
no test coverage detected