diff options
author | Ben Smith <binjimin@gmail.com> | 2018-10-15 13:57:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-15 13:57:26 -0700 |
commit | b234c76e30b49f75ddcd095c5f1e7d9d27d82160 (patch) | |
tree | 63b72e00f03d8637657de0fa51af0557a748f1f6 /src/binary-reader.cc | |
parent | 8292bd817c873a77d2a0a14dbbd9892b4e9c7860 (diff) | |
download | wabt-b234c76e30b49f75ddcd095c5f1e7d9d27d82160.tar.gz wabt-b234c76e30b49f75ddcd095c5f1e7d9d27d82160.tar.bz2 wabt-b234c76e30b49f75ddcd095c5f1e7d9d27d82160.zip |
Add more bulk memory tests; use vars for segments (#930)
* Allow for names in data/elem segments:
```
(data $foo (i32.const 0) "abcdef")
```
* These names can be referenced by the memory/table instructions that
operate on segments:
```
memory.drop $foo
```
* Fix running wasm-objdump with bulk-memory instructions
* Check for valid data/elem segments in validation
* Check that bulk-memory is enabled when parsing text
Partial fix for #928; still needs interpreter checks too.
Diffstat (limited to 'src/binary-reader.cc')
-rw-r--r-- | src/binary-reader.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index bed61f77..0d9a51e5 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -1356,6 +1356,7 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) { Index segment; CHECK_RESULT(ReadIndex(&segment, "elem segment index")); CALLBACK(OnTableInitExpr, segment); + CALLBACK(OnOpcodeUint32Uint32, segment, reserved); break; } @@ -1367,6 +1368,7 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) { Index segment; CHECK_RESULT(ReadIndex(&segment, "elem segment index")); CALLBACK(OnMemoryInitExpr, segment); + CALLBACK(OnOpcodeUint32Uint32, segment, reserved); break; } @@ -1380,6 +1382,7 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) { } else { CALLBACK(OnTableDropExpr, segment); } + CALLBACK(OnOpcodeUint32, segment); break; } @@ -1394,6 +1397,7 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) { } else { CALLBACK(OnMemoryFillExpr); } + CALLBACK(OnOpcodeUint32, reserved); break; } @@ -1403,6 +1407,7 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) { CHECK_RESULT(ReadU8(&reserved, "reserved table index")); ERROR_UNLESS(reserved == 0, "reserved value must be 0"); CALLBACK(OnTableCopyExpr); + CALLBACK(OnOpcodeUint32, reserved); break; } |