Explorer

core.wasm-runtime-list-hash-index

description
Runtime function 34 of the definy compiler: list_hash_index(list, field) -> value: a list of buckets (lists). The number of buckets is the smallest power of two not less than the length (at least 1), and each record goes, in order, to the bucket string_hash(its field) AND (count - 1). Local variable declarations and instructions, without the byte length (wasm.code-entry adds it)
type
List<Number>
expression
[
  4,
  3,
  @wasm.value-type-i32,
  2,
  @wasm.value-type-ref-null,
  @core.wasm-type-values,
  1,
  @wasm.value-type-ref-null,
  @core.wasm-type-value,
  1,
  @wasm.value-type-i32,
  @wasm.local-get,
  0,
  @wasm.call,
  19,
  @wasm.local-tee,
  5,
  @wasm.ref-is-null,
  @wasm.if,
  @wasm.block-type-empty,
  @wasm.i32-const,
  0,
  @wasm.local-set,
  2,
  @wasm.else,
  @wasm.local-get,
  5,
  @wasm.gc-prefix,
  @wasm.array-len,
  @wasm.local-set,
  2,
  @wasm.end,
  @wasm.i32-const,
  1,
  @wasm.local-set,
  3,
  @wasm.block,
  @wasm.block-type-empty,
  @wasm.loop,
  @wasm.block-type-empty,
  @wasm.local-get,
  3,
  @wasm.local-get,
  2,
  @wasm.i32-ge-u,
  @wasm.br-if,
  1,
  @wasm.local-get,
  3,
  @wasm.i32-const,
  1,
  @wasm.i32-shl,
  @wasm.local-set,
  3,
  @wasm.br,
  0,
  @wasm.end,
  @wasm.end,
  @wasm.local-get,
  3,
  @wasm.gc-prefix,
  @wasm.array-new-default,
  @core.wasm-type-values,
  @wasm.local-set,
  6,
  @wasm.i32-const,
  0,
  @wasm.local-set,
  4,
  @wasm.block,
  @wasm.block-type-empty,
  @wasm.loop,
  @wasm.block-type-empty,
  @wasm.local-get,
  4,
  @wasm.local-get,
  3,
  @wasm.i32-ge-u,
  @wasm.br-if,
  1,
  @wasm.local-get,
  6,
  @wasm.local-get,
  4,
  @wasm.i32-const,
  3,
  @wasm.i32-const,
  0,
  @wasm.gc-prefix,
  @wasm.array-new-default,
  @core.wasm-type-values,
  @wasm.gc-prefix,
  @wasm.struct-new,
  @core.wasm-type-list,
  @wasm.gc-prefix,
  @wasm.array-set,
  @core.wasm-type-values,
  @wasm.local-get,
  4,
  @wasm.i32-const,
  1,
  @wasm.i32-add,
  @wasm.local-set,
  4,
  @wasm.br,
  0,
  @wasm.end,
  @wasm.end,
  @wasm.i32-const,
  0,
  @wasm.local-set,
  4,
  @wasm.block,
  @wasm.block-type-empty,
  @wasm.loop,
  @wasm.block-type-empty,
  @wasm.local-get,
  4,
  @wasm.local-get,
  2,
  @wasm.i32-ge-u,
  @wasm.br-if,
  1,
  @wasm.local-get,
  5,
  @wasm.local-get,
  4,
  @wasm.gc-prefix,
  @wasm.array-get,
  @core.wasm-type-values,
  @wasm.local-set,
  7,
  @wasm.local-get,
  7,
  @wasm.local-get,
  1,
  @wasm.call,
  6,
  @wasm.call,
  33,
  @wasm.local-get,
  3,
  @wasm.i32-const,
  1,
  @wasm.i32-sub,
  @wasm.i32-and,
  @wasm.local-set,
  8,
  @wasm.local-get,
  6,
  @wasm.local-get,
  8,
  @wasm.local-get,
  6,
  @wasm.local-get,
  8,
  @wasm.gc-prefix,
  @wasm.array-get,
  @core.wasm-type-values,
  @wasm.local-get,
  7,
  @wasm.call,
  8,
  @wasm.gc-prefix,
  @wasm.array-set,
  @core.wasm-type-values,
  @wasm.local-get,
  4,
  @wasm.i32-const,
  1,
  @wasm.i32-add,
  @wasm.local-set,
  4,
  @wasm.br,
  0,
  @wasm.end,
  @wasm.end,
  @wasm.i32-const,
  3,
  @wasm.local-get,
  6,
  @wasm.gc-prefix,
  @wasm.struct-new,
  @core.wasm-type-list,
  @wasm.end
]
visibility
public
core.wasm-runtime-list-hash-index (project definy, branch quote-encoded-parts, snapshot LbKb9vIRs5vdtsu6TiOqZ_NMUZJ6k1s6WlbZOc6x3-I)
id: L1u1jan6j1Lxcm7GXlFtXe4aizw-Qker8O_PjKbS7jg
content hash: GsYRiAsYUan9bPxS101wWJVQEcXikW6BzmLVf1BRmQc