You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One possibility I've been thinking about to get the kind of customization we have been imagining we would hook up to RTTs without the downside of making casts less optimizable would be to have some RTT-like structure that the customization could be attached to but that does not participate in casting.
This structure could either be an externref somewhere in the object by specified convention, or it could be a new construct outside the observable shape of the type but specified at allocation time, similar to RTTs as they are envisioned now. The key point is that we should not tie customization to casting behavior.
The text was updated successfully, but these errors were encountered:
This is an interesting point, I can see the logic in separating out customization and cast behavior, as most/all cases for customization won't involve changing the casting behavior I think.
One of the motivation for potentially putting the customization on the RTT was that RTTs were designed to correspond to hidden classes in a JS engine, which could make it a natural place for the customization to occur. But if this isn't the case in actual implementations, or other conventions/constructs are easier for engines to use to do the customization, it could make sense to not use the RTT for this.
(When our implementation efforts for JSC are further along, we'll hopefully be able to provide some input on this too)
One possibility I've been thinking about to get the kind of customization we have been imagining we would hook up to RTTs without the downside of making casts less optimizable would be to have some RTT-like structure that the customization could be attached to but that does not participate in casting.
This structure could either be an externref somewhere in the object by specified convention, or it could be a new construct outside the observable shape of the type but specified at allocation time, similar to RTTs as they are envisioned now. The key point is that we should not tie customization to casting behavior.
The text was updated successfully, but these errors were encountered: