- description
- Runtime function 1 of the definy compiler (exported as string_from_memory): string_from_memory(length: i32) -> value: a new string of the bytes 0..length of the memory. The memory is only a buffer for the host to pass strings (the values live in the GC heap). Local variable declarations and instructions, without the byte length (wasm.code-entry adds it)
- type
List<Number>
- expression
[
2,
1,
@wasm.value-type-ref-null,
@core.wasm-type-bytes,
1,
@wasm.value-type-i32,
@wasm.local-get,
0,
@wasm.gc-prefix,
@wasm.array-new-default,
@core.wasm-type-bytes,
@wasm.local-set,
1,
@wasm.i32-const,
0,
@wasm.local-set,
2,
@wasm.block,
@wasm.block-type-empty,
@wasm.loop,
@wasm.block-type-empty,
@wasm.local-get,
2,
@wasm.local-get,
0,
@wasm.i32-ge-u,
@wasm.br-if,
1,
@wasm.local-get,
1,
@wasm.local-get,
2,
@wasm.local-get,
2,
@wasm.i32-load8-u,
0,
0,
@wasm.gc-prefix,
@wasm.array-set,
@core.wasm-type-bytes,
@wasm.local-get,
2,
@wasm.i32-const,
1,
@wasm.i32-add,
@wasm.local-set,
2,
@wasm.br,
0,
@wasm.end,
@wasm.end,
@wasm.i32-const,
2,
@wasm.local-get,
1,
@wasm.gc-prefix,
@wasm.struct-new,
@core.wasm-type-string,
@wasm.end
]
- visibility
- public