Skip to content

Commit 8deb353

Browse files
committed
Add wabt::Const::set_funcref(uintptr_t) overload
This allows wabt::Const funcrefs to be created from bits read from other sources, e.g. a WASM engine under test.
1 parent 6d4abfd commit 8deb353

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/wabt/ir.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ struct Const {
154154
set_expected_nan(0, nan);
155155
}
156156
void set_funcref() { From<uintptr_t>(Type::FuncRef, 0); }
157+
void set_funcref(uintptr_t x) { From<uintptr_t>(Type::FuncRef, x); }
157158
void set_externref(uintptr_t x) { From(Type::ExternRef, x); }
158159
void set_null(Type type) { From<uintptr_t>(type, kRefNullBits); }
159160

third_party/testsuite

Submodule testsuite updated 195 files

0 commit comments

Comments
 (0)