diff options
author | Andy Wingo <wingo@igalia.com> | 2019-07-25 22:03:40 +0100 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2019-07-25 14:03:40 -0700 |
commit | 34a77dcbe7c40aa2feb20d02b5bed9587f8ee2a8 (patch) | |
tree | 1a0bdfab240973656f2ff8bcb14ccc690cb5d91e /src/binary-reader.cc | |
parent | 39970f8270fe869c1aec144d468811c71a5cc39c (diff) | |
download | wabt-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.cc')
-rw-r--r-- | src/binary-reader.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index 363edf67..b50c449b 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -480,6 +480,10 @@ Result BinaryReader::ReadInitExpr(Index index, bool require_i32) { break; } + case Opcode::RefNull: + CALLBACK(OnInitExprRefNull, index); + break; + case Opcode::End: return Result::Ok; |