storeMany method
void
storeMany(
- Memory memory,
- int pointer,
- List<
Object?> values, { - WASIComponentCanonicalRealloc? realloc,
- WASIComponentCanonicalStringEncoding stringEncoding = WASIComponentCanonicalStringEncoding.utf8,
Stores contiguous values into memory.
Implementation
void storeMany(
wasm.Memory memory,
int pointer,
List<Object?> values, {
WASIComponentCanonicalRealloc? realloc,
WASIComponentCanonicalStringEncoding stringEncoding =
WASIComponentCanonicalStringEncoding.utf8,
}) {
final bytes = Uint8List.view(memory.buffer);
_checkMemoryRange(
bytes,
pointer,
values.length * _layout.byteLength,
_layout.alignment,
);
final data = ByteData.view(memory.buffer);
for (var i = 0; i < values.length; i++) {
_layout.store(
memory,
data,
pointer + i * _layout.byteLength,
values[i],
realloc,
stringEncoding,
);
}
}