summaryrefslogtreecommitdiff
path: root/src/binary-reader.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2019-07-25 22:03:40 +0100
committerBen Smith <binji@chromium.org>2019-07-25 14:03:40 -0700
commit34a77dcbe7c40aa2feb20d02b5bed9587f8ee2a8 (patch)
tree1a0bdfab240973656f2ff8bcb14ccc690cb5d91e /src/binary-reader.h
parent39970f8270fe869c1aec144d468811c71a5cc39c (diff)
downloadwabt-34a77dcbe7c40aa2feb20d02b5bed9587f8ee2a8.tar.gz
wabt-34a77dcbe7c40aa2feb20d02b5bed9587f8ee2a8.tar.bz2
wabt-34a77dcbe7c40aa2feb20d02b5bed9587f8ee2a8.zip
Add support for ref.null in global initializers (#1131)
As per the reference-types spec, ref.null is a constant expression. I did try to add support for ref.func at the same time, but I didn't really understand the strategy of wabt and reference types; there seems to be strong intertwingliness between func.ref and the element section, whereas it does seem possible for a func.ref to be global. Oh well, I didn't need it :)
Diffstat (limited to 'src/binary-reader.h')
-rw-r--r--src/binary-reader.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/binary-reader.h b/src/binary-reader.h
index 87548e82..e89f01b2 100644
--- a/src/binary-reader.h
+++ b/src/binary-reader.h
@@ -410,6 +410,7 @@ class BinaryReaderDelegate {
virtual Result OnInitExprGlobalGetExpr(Index index, Index global_index) = 0;
virtual Result OnInitExprI32ConstExpr(Index index, uint32_t value) = 0;
virtual Result OnInitExprI64ConstExpr(Index index, uint64_t value) = 0;
+ virtual Result OnInitExprRefNull(Index index) = 0;
const State* state = nullptr;
};