Liking cljdoc? Tell your friends :D

helins.wasm.count

Given WASM items described in Clojure data structures, computes their size in bytes.

This namespace is used before compilation for pre-computing how much memory to allocate while recomputing indices so they fit in dense lists.

Everything is computed in a map that is being assoc'ed in the ctx at :wasm/write.

See README for namespace organization and naming scheme.

Given WASM items described in Clojure data structures, computes their size in bytes.

This namespace is used before compilation for pre-computing how much memory to allocate
while recomputing indices so they fit in dense lists.

Everything is computed in a map that is being assoc'ed in the `ctx` at `:wasm/write`.

See README for namespace organization and naming scheme.
raw docstring

block'clj/s

(block' flatidx opvec)
source

blocktype'clj/s

(blocktype' blocktype)
source

br'clj/s

(br' _flatidx opvec)
source

br_if'clj/s

(br_if' _flatidx opvec)
source

br_table'clj/s

(br_table' _flatidx opvec)
source

byte'clj/s

source

call'clj/s

(call' flatidx opvec)
source

call_indirect'clj/s

(call_indirect' flatidx opvec)
source

code'clj/s

(code' ctx-write code)
source

codesec'clj/s

(codesec' {:as ctx :wasm/keys [codesec]})
source

data-drop'clj/s

(data-drop' flatidx opvec)
source

datacountsec'clj/s

(datacountsec' ctx)
source

dataidx'clj/s

source

datasec'clj/s

(datasec' {:as ctx {:as ctx-write flatidx-mem :wasm.flatidx/mem} :wasm/write})
source

elem-drop'clj/s

(elem-drop' flatidx opvec)
source

elemidx'clj/s

source

elemsec'clj/s

(elemsec' {:as ctx {:as ctx-write flatidx-func :wasm.flatidx/func} :wasm/write})
source

elemtype'clj/s

source

else'clj/s

(else' flatidx instr+)
source

export'clj/s

(export' ctx-write space k-flatidx count-idx)
source

exportsec'clj/s

(exportsec' {:as ctx :wasm/keys [exportsec]})
source

expr'clj/s

(expr' flatidx opvec+)

For a vector of instr'.

For a vector of [[instr']].
sourceraw docstring

f32'clj/s

(f32' _f32)
source

f64'clj/s

(f64' _f64)
source

funcclj/s

(func flatidx-type {:wasm/keys [typeidx]})

For functions found in the funcsec and in imports.

WASM specification does not have a special name for it since binary-wise it is simply a type index.

For functions found in the funcsec and in imports.

WASM specification does not have a special name for it since binary-wise
it is simply a type index.
sourceraw docstring

func'clj/s

(func' flatidx {:wasm/keys [expr locals]})
source

funcidx'clj/s

source

funcsec'clj/s

(funcsec' ctx)
source

functype'clj/s

(functype' [param+ result+])
source

global'clj/s

(global' flatidx global)
source

globalidx'clj/s

source

globalsec'clj/s

(globalsec' ctx)
source

globaltype'clj/s

(globaltype' _global)
source

i32'clj/s

(i32' i32)
source

i64'clj/s

(i64' i64)
source

idxclj/s

(idx idx)

For the time being at least, all WASM indices are represented as u32' and hence, are read by this function.

For the time being at least, all WASM indices are represented as [[u32']] and hence,
are read by this function.
sourceraw docstring

if'clj/s

(if' flatidx opvec)
source

importdesc'clj/s

(importdesc' ctx-write space k-flatidx f-item)
source

importsec'clj/s

(importsec' {:as ctx :wasm/keys [importsec]})
source

instr'clj/s

(instr' flatidx opvec)
source

instr'+clj/s

(instr'+ flatidx opvec+)

Behaves same as expr'.

Behaves same as [[expr']].
sourceraw docstring

labelidx'clj/s

source

limits'clj/s

(limits' {min- :wasm.limit/min max- :wasm.limit/max})
source

localidx'clj/s

source

locals'clj/s

(locals' local+)
source

loop'clj/s

(loop' flatidx opvec)
source

magic'clj/s

source

memarg'clj/s

(memarg' [align offset])
source

memidx'clj/s

source

memory-copy'clj/s

(memory-copy' _flatidx _opvec)
source

memory-fill'clj/s

(memory-fill' _flatidx _opvec)
source

memory-init'clj/s

(memory-init' flatidx opvec)
source

memsec'clj/s

(memsec' ctx)
source

memtype'clj/s

(memtype' mem)
source

module'clj/s

(module' ctx)
source

name'clj/s

(name' buffer)
source

op-constvalclj/s

(op-constval f-value)
(op-constval f-value _flatidx opvec)

Used for numerical operations declaring a constant value.

Used for numerical operations declaring a constant value.
sourceraw docstring

op-main->fclj/s

Map of opcode -> reading function for opcodes which:

  • Have any kind of immediate(s)
  • Is not 0xFC (the "misc" opcode that leads to a second-level opcode
Map of **opcode** -> **reading function** for opcodes which:

- Have any kind of immediate(s)
- Is not 0xFC (the "misc" opcode that leads to a second-level opcode
sourceraw docstring

op-memargclj/s

(op-memarg _flatidx opvec)

Used for memory instructions that have a memarg'.

Used for memory instructions that have a [[memarg']].
sourceraw docstring

op-memoryclj/s

(op-memory flatidx opvec)

Used for memory instructions that have a memidx' as only immediate.

Used for memory instructions that have a [[memidx']] as only immediate.
sourceraw docstring

op-misc->fclj/s

Map of immediate to "misc" opcode (0xFC) -> reading function.

Map of **immediate to "misc" opcode (0xFC)** -> **reading function**.
sourceraw docstring

op-tableclj/s

(op-table flatidx opvec)

Table instruction involving a table index immediate.

Table instruction involving a table index immediate.
sourceraw docstring

op-table-miscclj/s

(op-table-misc flatidx opvec)
source

op-var-globalclj/s

(op-var-global flatidx opvec)

Used for global variable instructions.

Used for global variable instructions.
sourceraw docstring

op-var-localclj/s

(op-var-local _flatidx opvec)

Used for local variable instructions.

Used for local variable instructions.
sourceraw docstring

opcode'clj/s

source

ref-func'clj/s

(ref-func' flatidx opvec)
source

ref-null'clj/s

(ref-null' _flatidx _opvec)
source

reftype'clj/s

source

resulttype'clj/s

(resulttype' valtype+)
source

s33'clj/s

(s33' s33)
source

section'clj/s

(section' n-byte)
sourceraw docstring

section'+clj/s

(section'+ {{:wasm.count/keys [codesec datasec datacountsec elemsec exportsec
                               funcsec globalsec importsec memsec startsec
                               tablesec typesec]}
              :wasm/write})

Sums all precomputed sections.

Used by module'.

Sums all precomputed sections.

Used by [[module']].
sourceraw docstring

section-id'clj/s

source

section-spaceclj/s

(section-space ctx k-section k-flatidx k-count count-item)

Used by most WASM sections.

Takes care of counting everything and maintaining a flattened index.

Used by most WASM sections.

Takes care of counting everything and maintaining a flattened index.
sourceraw docstring

select-t'clj/s

(select-t' _flatidx opvec)
source

startsec'clj/s

(startsec' {:as ctx :wasm/keys [startsec]})
source

table-copy'clj/s

(table-copy' flatidx opvec)
source

table-init'clj/s

(table-init' flatidx opvec)
source

tableidx'clj/s

source

tablesec'clj/s

(tablesec' ctx)
source

tabletype'clj/s

(tabletype' table)
source

typeidx'clj/s

source

typesec'clj/s

(typesec' {:as ctx :wasm/keys [typesec]})
source

u32'clj/s

(u32' u32)
source

valtype'clj/s

source

vec'clj/s

(vec' count-item coll)
source

version'clj/s

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close