Getter for the value type in defined type form.
| 43 | |
| 44 | /// Getter for the value type in defined type form. |
| 45 | ValType getDefType() const noexcept { |
| 46 | if (ModInst) { |
| 47 | return ValType(TypeCode::Ref, TypeIdx); |
| 48 | } else { |
| 49 | // nullptr `ModInst` case is only for host function instance case. |
| 50 | return ValType(TypeCode::Ref, TypeCode::FuncRef); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | protected: |
| 55 | friend class ModuleInstance; |
no test coverage detected