Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Unify externref and anyref #271

Merged
merged 1 commit into from
Feb 3, 2022
Merged

Unify externref and anyref #271

merged 1 commit into from
Feb 3, 2022

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Feb 3, 2022

This unifies externref and anyref by renaming the former to the latter and removing the new opcode. For backwards compatibility, the keywords extern and externref are still recognised in the text format as aliases.

Resolves #256.

Copy link
Contributor

@jakobkummerow jakobkummerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I think this PR is an improvement, so I think it's fine to go ahead with it. Orthogonal questions that came up before and that we can settle separately include:

  • do we want an opaqueref type (that doesn't support ref.is_data etc), or is anyref perfectly sufficient for the use cases we can think of?
  • do we want a wasmref type that's the supertype of all Wasm-defined types?
  • do we really want to re-introduce the funcref <: anyref relation right now, or do the reasons we had earlier for dropping/postponing that still hold?

If anyone has thoughts on these questions, those should probably be discussed in (new or existing) issues, not on this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we reverse the externref <: anyref relation?
2 participants