(name, segment)
| 30 | struct_type); |
| 31 | |
| 32 | function generator(name, segment) { |
| 33 | builder.addFunction(name, makeSig([kWasmI32, kWasmI32, kWasmI32], [kWasmI32])) |
| 34 | .addBody([ |
| 35 | kExprLocalGet, 0, // offset |
| 36 | kExprLocalGet, 1, // length |
| 37 | kGCPrefix, kExprArrayNewElem, array_type_index, segment, |
| 38 | kExprLocalGet, 2, // index in the array |
| 39 | kGCPrefix, kExprArrayGet, array_type_index, |
| 40 | kGCPrefix, kExprStructGet, struct_type_index, 0]) |
| 41 | .exportFunc() |
| 42 | } |
| 43 | |
| 44 | // Respective segment elements should be pointer-identical. |
| 45 | builder.addFunction("identical", makeSig([kWasmI32, kWasmI32], [kWasmI32])) |
no test coverage detected