Skip to content

[NFC] Remove SubTyper utility in wasm-type.cpp#8459

Merged
tlively merged 1 commit intomainfrom
no-subtyper
Mar 13, 2026
Merged

[NFC] Remove SubTyper utility in wasm-type.cpp#8459
tlively merged 1 commit intomainfrom
no-subtyper

Conversation

@tlively
Copy link
Member

@tlively tlively commented Mar 12, 2026

SubTyper was introduced back when we still had equirecursive types. Back then it implemented the coinductive subtype checking algorithm, but since then it has had dual roles: it has checked subtyping between pairs of types and heaptypes, and it also checks whether the definition of a subtype is valid. Since these are two very different roles, it does not make sense to bundle them in a single utility. Split up the code and move each part to its users.

SubTyper was introduced back when we still had equirecursive types. Back then it implemented the coinductive subtype checking algorithm, but since then it has had dual roles: it has checked subtyping between pairs of types and heaptypes, and it also checks whether the definition of a subtype is valid. Since these are two very different roles, it does not make sense to bundle them in a single utility. Split up the code and move each part to its users.
@tlively tlively requested a review from kripken March 12, 2026 21:37
@tlively tlively merged commit d966ed5 into main Mar 13, 2026
17 checks passed
@tlively tlively deleted the no-subtyper branch March 13, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants