Skip to content

Commit 262931c

Browse files
Fix subtyping for tables
1 parent ddb7026 commit 262931c

File tree

3 files changed

+2
-394
lines changed

3 files changed

+2
-394
lines changed

scripts/test/shared.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ def get_tests(test_dir, extensions=[], recursive=False):
387387
# Requires us to write our own floating point parser
388388
'const.wast',
389389

390-
# Unlinkable module accepted
391-
'linking.wast',
392-
393390
# Invalid module accepted
394391
'unreached-invalid.wast',
395392

@@ -423,7 +420,6 @@ def get_tests(test_dir, extensions=[], recursive=False):
423420
'if.wast', # Requires more precise unreachable validation
424421
'imports.wast', # Requires fixing handling of mutation to imported globals
425422
'proposals/threads/imports.wast', # Missing memory type validation on instantiation
426-
'linking.wast', # Incorrectly allows covariant subtyping for table imports
427423
'proposals/threads/memory.wast', # Missing memory type validation on instantiation
428424
'annotations.wast', # String annotations IDs should be allowed
429425
'instance.wast', # Requires support for table default elements

src/ir/runtime-table.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class RuntimeTable {
4747
// be imported with the definition of `other`
4848
virtual bool isSubType(const Table& other) {
4949
return tableDefinition.addressType == other.addressType &&
50-
Type::isSubType(tableDefinition.type, other.type) &&
51-
size() >= other.initial && tableDefinition.max <= other.max;
50+
tableDefinition.type == other.type && size() >= other.initial &&
51+
tableDefinition.max <= other.max;
5252
}
5353

5454
const Table* getDefinition() const { return &tableDefinition; }

0 commit comments

Comments
 (0)