diff options
author | Ben Smith <binji@chromium.org> | 2020-02-28 20:42:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 20:42:39 -0800 |
commit | 7914f5f0182b5282d9de8399ba3ff264b5b5dea5 (patch) | |
tree | 308294028978a3c438895017fa8f4770ba9b831f /test/typecheck | |
parent | 2d5bdb4a3a1bf8541dda300ffc2d35ffd9d4f84b (diff) | |
download | wabt-7914f5f0182b5282d9de8399ba3ff264b5b5dea5.tar.gz wabt-7914f5f0182b5282d9de8399ba3ff264b5b5dea5.tar.bz2 wabt-7914f5f0182b5282d9de8399ba3ff264b5b5dea5.zip |
Update testsuite (w/ reference-types changes) (#1351)
The new table-sub test, checks whether the subtyping is handled
properly w/ table.init and table.copy instructions.
The BeginElemSegment callback can't pass the element type anymore, since
it's not known yet. The callback also can't be deferred, since the
BeginElemSegmentInitExpr callback has to happen after the
BeginElemSegment callback, but the reference type is not always known
until after the initializer expression is read. To work around this, I
added a new OnElemSegmentElemType callback.
Other element segment changes:
* The element type must be tracked in the SharedValidator
* A subtle fix: when writing out the segment flags, we need to take into
account whether the element type of the segment is not funcref, even
if there are no element expressions. In that case, we have to use flag
bit 0x4 (SegUseElemExprs).
In addition, the TableCopy and TableInit instructions weren't handling
table indexes fully.
* TableCopy variables are read in the parser (both optional)
* TableCopy names are now resolved + applied
* TableCopy indexes are now validated
* TableInit table variables are read in the parser; this is subtle,
since the text format has order $table $segment, but the $table is
optional.
Diffstat (limited to 'test/typecheck')
-rw-r--r-- | test/typecheck/bad-bulk-memory-no-table.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/typecheck/bad-bulk-memory-no-table.txt b/test/typecheck/bad-bulk-memory-no-table.txt index 21e97f07..a3dd1a0d 100644 --- a/test/typecheck/bad-bulk-memory-no-table.txt +++ b/test/typecheck/bad-bulk-memory-no-table.txt @@ -9,16 +9,16 @@ ) ) (;; STDERR ;;; -out/test/typecheck/bad-bulk-memory-no-table.txt:7:41: error: table.init requires table 0 to be an imported or defined table. +out/test/typecheck/bad-bulk-memory-no-table.txt:7:41: error: table variable out of range: 0 (max 4294967295) i32.const 0 i32.const 0 i32.const 0 table.init 0 ^^^^^^^^^^ out/test/typecheck/bad-bulk-memory-no-table.txt:7:52: error: elem_segment variable out of range: 0 (max 4294967295) i32.const 0 i32.const 0 i32.const 0 table.init 0 ^ -out/test/typecheck/bad-bulk-memory-no-table.txt:8:41: error: table.copy requires table 0 to be an imported or defined table. +out/test/typecheck/bad-bulk-memory-no-table.txt:8:41: error: table variable out of range: 0 (max 4294967295) i32.const 0 i32.const 0 i32.const 0 table.copy ^^^^^^^^^^ -out/test/typecheck/bad-bulk-memory-no-table.txt:8:41: error: table.copy requires table 0 to be an imported or defined table. +out/test/typecheck/bad-bulk-memory-no-table.txt:8:41: error: table variable out of range: 0 (max 4294967295) i32.const 0 i32.const 0 i32.const 0 table.copy ^^^^^^^^^^ ;;; STDERR ;;) |