-
Notifications
You must be signed in to change notification settings - Fork 40
Include table.fill and table.grow #14
Comments
Not sure what you're intending here. The bulk copy proposal has neither table.fill nor table.grow; the present proposal seems to introduce the former and assume the existence of the latter. (Not a big deal, just observing this while passing by.) |
@lars-t-hansen, yes, this is just a tracking issue to include them into this proposal properly. Neither of them is currently in the draft spec or interpreter, even though fill is mentioned in the overview. They cannot be added independent of this proposal because they need reference types. Assuming that we have bulk ops before reference types this would be the right place to fill them in. |
Note to readers: to be forward-looking to non-nullable reference types, table.grow should take a value to use for the new elements: (table.grow $table delta init-value) |
Since memory.grow returns -1 on failure to grow we should probably do the same for table.grow. |
If we leave funcref out of the reftypes proposal for now (as discussed + agreed at the CG meeting in Lyon) then the requirement for an initial value for Leaving funcref out is supposed to be a way to focus the proposal more tightly on features that can ship more quickly, but leaves some interesting holes. |
@lars-t-hansen could it perhaps be a validation error (temporarily, until subtyping is good to go) for any table instructions to operate on an |
@alexcrichton, Sure we can do that and it's come up as a solution several times. My main worry about that is essentially bureaucratic: Will an incomplete implementation count toward bringing the proposal to shippable + standardized state / stage 4? I'd like to actually ship something in Release and move it into the official spec so that people can start depending on it; it does nobody any good if it sits behind a flag or on sundry nightly channels. |
table.grow and table.fill are both in the overview, spec, and reference interpreter, and I think funcref is included in ref-types still (and we've implemented them), so i think this is done. |
Yes, I think so. Closing. (Thanks for going through the issues!) |
Using `memory.init` or `memory.drop` on an active segment is a validation error, not a trap.
No description provided.
The text was updated successfully, but these errors were encountered: