wabt
95256095 - OnRefFuncExpr takes a func index. NFC (#1768)

Commit
4 years ago
OnRefFuncExpr takes a func index. NFC (#1768) The name of this argument was recently changed from func_index to type_index, but I think that might have been incorrect. The immediate that read in the binary reader is (IIRC) a function index: ``` case Opcode::RefFunc: { Index func; CHECK_RESULT(ReadIndex(&func, "func index")); CALLBACK(OnRefFuncExpr, func); CALLBACK(OnOpcodeUint32, func); break; } ``` and not a type index. Indeed the interpreter seems to treat it as a function index too: ``` Result BinaryReaderInterp::OnRefFuncExpr(Index func_index) { CHECK_RESULT(validator_.OnRefFunc(loc, Var(func_index))); istream_.Emit(Opcode::RefFunc, func_index); return Result::Ok; } ```
Author
Parents
Loading