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.
Output type of local.tee? #201
Closed
Description
With the introduction of static subtyping, the input to a local.tee
can be a subtype of the type of the local. This gives two obvious, sound choices for the output type:
- The type of the local. This is what follows from the typing rules for
local.tee
(same input, output and local type) combined with implicit upcasting of inputs. - The actual type of the input. This is more useful, since it is more precise. On the other hand, it means that
local.tee
is not equivalent tolocal.set
followed bylocal.get
, and doing the substitution can break validation.
Currently, as far as I can tell, Binaryen implements (1) and V8 implements (2).
What is the intended behavior?
Metadata
Metadata
Assignees
Labels
No labels