Bug 1774840 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We have several new array instructions [1]. We should track the actual proposal here, and not V8's document as the proposal is more up to date here.
  1. array.new_fixed <typeidx> <N> - pops N values from the stack to form an array of N values
  2. array.new_data <typeidx> <dataidx> - create an array and initialize it from a data segment
  3. array.new_elem <typeidx> <elemidx> - create an array and initialize it from an elem segment

There is also a V8 only array.copy instruction [2] that we will also need to implement.
  1. array.copy <typeidx1> <typeidx2> - copies a range from srcArray to destArray

array.new_data/new_elem/copy should all be implemented via instance calls (at least for the baseline compiler). array.new_fixed can use an instance call to create the array, but will need to pop the values itself and store them in the array.

[1] https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md#arrays
[2] https://docs.google.com/document/d/1DklC3qVuOdLHSXB5UXghM_syCh-4cMinQ50ICiXnK3Q/edit#
We have several new array instructions [1]. We should track the actual proposal here, and not V8's document as the proposal is more up to date here. The one exception is that the proposal still lists these instructions as taking an (rtt) operand. This won't be the case after rtt values are removed.
  1. array.new_fixed <typeidx> <N> - pops N values from the stack to form an array of N values
  2. array.new_data <typeidx> <dataidx> - create an array and initialize it from a data segment
  3. array.new_elem <typeidx> <elemidx> - create an array and initialize it from an elem segment

There is also a V8 only array.copy instruction [2] that we will also need to implement.
  1. array.copy <typeidx1> <typeidx2> - copies a range from srcArray to destArray

array.new_data/new_elem/copy should all be implemented via instance calls (at least for the baseline compiler). array.new_fixed can use an instance call to create the array, but will need to pop the values itself and store them in the array.

[1] https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md#arrays
[2] https://docs.google.com/document/d/1DklC3qVuOdLHSXB5UXghM_syCh-4cMinQ50ICiXnK3Q/edit#

Back to Bug 1774840 Comment 1