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

ref.i31 is both an administrative instruction and an instruction #470

@redianthus

Description

@redianthus

Since the renaming of i31.new to ref.i31, ref.i31 appears twice in the set of instructions (when including administrative instructions) with each having a different syntax (one made of an integer in the case of the administrative one).

Then, the reduction rule for ref.i31 is quite confusing:

(i32.const n) ref.i31 -> ref.i31 (n mod 2^31)

On the left side you have the ref.i31 syntax and on the other side the ref.i31 int syntax.

Is there any plan to change one of them again to try to clarifies things ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions