Explorer

core.wasm-runtime-string-eq

description
Runtime function 4 of the definy compiler: string_eq(a, b) -> i32: whether the bytes of the two strings are the same (does not compare the bytes of the same string). Local variable declarations and instructions, without the byte length (wasm.code-entry adds it)
type
List<Number>
expression
[
  2,
  2,
  @wasm.value-type-ref-null,
  @core.wasm-type-bytes,
  2,
  @wasm.value-type-i32,
  @wasm.local-get,
  0,
  @wasm.local-get,
  1,
  @wasm.ref-eq,
  @wasm.if,
  @wasm.block-type-empty,
  @wasm.i32-const,
  1,
  @wasm.return,
  @wasm.end,
  @wasm.local-get,
  0,
  @wasm.gc-prefix,
  @wasm.ref-cast,
  @core.wasm-type-string,
  @wasm.gc-prefix,
  @wasm.struct-get,
  @core.wasm-type-string,
  1,
  @wasm.local-set,
  2,
  @wasm.local-get,
  1,
  @wasm.gc-prefix,
  @wasm.ref-cast,
  @core.wasm-type-string,
  @wasm.gc-prefix,
  @wasm.struct-get,
  @core.wasm-type-string,
  1,
  @wasm.local-set,
  3,
  @wasm.local-get,
  2,
  @wasm.gc-prefix,
  @wasm.array-len,
  @wasm.local-tee,
  4,
  @wasm.local-get,
  3,
  @wasm.gc-prefix,
  @wasm.array-len,
  @wasm.i32-ne,
  @wasm.if,
  @wasm.block-type-empty,
  @wasm.i32-const,
  0,
  @wasm.return,
  @wasm.end,
  @wasm.i32-const,
  0,
  @wasm.local-set,
  5,
  @wasm.block,
  @wasm.block-type-empty,
  @wasm.loop,
  @wasm.block-type-empty,
  @wasm.local-get,
  5,
  @wasm.local-get,
  4,
  @wasm.i32-ge-u,
  @wasm.br-if,
  1,
  @wasm.local-get,
  2,
  @wasm.local-get,
  5,
  @wasm.gc-prefix,
  @wasm.array-get-u,
  @core.wasm-type-bytes,
  @wasm.local-get,
  3,
  @wasm.local-get,
  5,
  @wasm.gc-prefix,
  @wasm.array-get-u,
  @core.wasm-type-bytes,
  @wasm.i32-ne,
  @wasm.if,
  @wasm.block-type-empty,
  @wasm.i32-const,
  0,
  @wasm.return,
  @wasm.end,
  @wasm.local-get,
  5,
  @wasm.i32-const,
  1,
  @wasm.i32-add,
  @wasm.local-set,
  5,
  @wasm.br,
  0,
  @wasm.end,
  @wasm.end,
  @wasm.i32-const,
  1,
  @wasm.end
]
visibility
public
core.wasm-runtime-string-eq (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: rOmqr7-awFZdMcvbgfoCYrBbzvfpNQSwvF8n3QsmFkc
content hash: ZQN6XgPk7dNBZNdUUzHnZwMywdwzrXmfdkAfzd-YW24