Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed opportunity to merge private types into public supertypes #7120

Open
tlively opened this issue Nov 26, 2024 · 0 comments
Open

Missed opportunity to merge private types into public supertypes #7120

tlively opened this issue Nov 26, 2024 · 0 comments

Comments

@tlively
Copy link
Member

tlively commented Nov 26, 2024

MergeTypes currently treats all public types as terminal DFA states, meaning they have no successors. This can prevent private subtypes of public types from being merged into the public supertypes because their states have different behavior.

The types in this test case are currently not merged, but they should be:

(module
 (type $public (sub (struct (field (ref null $public)))))
 (type $sub (sub $public (struct (field (ref null $public)))))

 (global $g (export "g") (ref null $public) (ref.null none))

 (func $test
  (local (ref $public))
  (local (ref $sub))
 )
)
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

No branches or pull requests

1 participant