Skip to content

Commit f0660c0

Browse files
authored
[GC] Properly mark Unsubtyping as closed-world (#8029)
This was marked in pass.cpp properly, but not elsewhere.
1 parent ea3e2ed commit f0660c0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

scripts/fuzz_opt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2486,7 +2486,8 @@ def write_commands(commands, filename):
24862486
("--cfp-reftest",),
24872487
("--gsi",),
24882488
("--type-ssa",),
2489-
("--type-merging",)}
2489+
("--type-merging",),
2490+
("--unsubtyping",)}
24902491

24912492

24922493
def get_random_opts():

src/passes/Unsubtyping.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,10 @@ struct Unsubtyping : Pass {
446446
return;
447447
}
448448

449+
if (!getPassOptions().closedWorld) {
450+
Fatal() << "Unsubtyping requires --closed-world";
451+
}
452+
449453
// Initialize the subtype relation based on what is immediately required to
450454
// keep the code and public types valid.
451455
analyzePublicTypes(*wasm);

test/lit/passes/issue-7087.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
;; module-level code in TypeSSA and fix the validator so it would have caught
1010
;; the stale type.
1111

12-
;; RUN: wasm-opt %s -all --type-ssa --unsubtyping -S -o - | filecheck %s
12+
;; RUN: wasm-opt %s -all --type-ssa --unsubtyping --closed-world -S -o - | filecheck %s
1313

1414
(module
1515
;; CHECK: (rec

0 commit comments

Comments
 (0)