Reading an Entry at Run Time

Status: implemented

const entry = (a, b) => {
    const x = Object.getOwnPropertyDescriptor(a, b);
    return x?.enumerable ? x.value : undefined;
};
const hasEntry = (a, b) => {
    const x = Object.getOwnPropertyDescriptor(a, b);
    return x?.enumerable === true;
};
const escapes = { n: "\n", t: "\t" };
export default (...c) => hasEntry(escapes, c[0]) ? entry(escapes, c[0]) : c[0];

A key computed at run time is read by the entry helper and tested by the hasEntry helper: the two functions above, written in a module under any three names each, or imported from fjs/types/object/entry, which spells them once. entry(a, b) is the value of the enumerable own property b names of a — a member of an object, an element of an array or of a string — and undefined where there is none: a length, which an array, a string and a function own without enumerating it; a function's name, which the language keeps unobservable (functions); anything of a number, a boolean or a bigint; and a name a prototype would give the value in JavaScript, since the descriptor is the value's own. hasEntry(a, b) is the presence, true where there is one, an entry holding undefined included, so that { x: undefined } and {} come apart, and false where there is none. The key is converted as Object.getOwnPropertyDescriptor converts it, so entry(a, 0) and entry(a, "0") read one element and an object key converts through its own toString; a null or undefined a is an error, as reading a property of one is, and so is a key whose conversion fails.

The pair composes as reads do: entry(a, b) ?? d is the value or a default, as a[k] ?? d is, the default taken for an entry holding undefined too; where that entry must keep its undefined, hasEntry(a, b) ? entry(a, b) : d reads twice and keeps it; and keys.filter(k => hasEntry(a, k)) is the keys present, in key order. Presence with a constant key is the operator "k" in a (in), the same question for a key written in the source, as a.k is the read; hasEntry is its computed-key spelling, with one difference the pair keeps on purpose: a.length and "length" in a read the length an array and a function own without enumerating it, where the helpers list what Object.entries lists, the enumerable entries, and answer undefined and false for it. Object.hasOwn and a.hasOwnProperty(b) are not in the language, each asking a different question — a non-enumerable own property, or the prototype chain.

The helpers are exactly what they spell. The compiler recognizes each function whole — its two parameters, the const the descriptor binds and the return, under any three distinct names a module may bind, so no keyword and no reserved global, the keys in either spelling, the semicolons where JavaScript inserts them — where Object is the reserved global no scope binds (built-in static functions); a function that departs from either by a step is an ordinary function, in which Object is refused at the word as everywhere but Object.is. The body that returned the option, x?.enumerable ? [x.value] : [], is such a departure now. Each is a function like any other once recognized: a value, of length 2, capturing nothing, a fresh identity wherever it is written as every arrow is, passed as a value — [a, b].map(entry) — and converting to its text as any function does (function source). Its EDAG is the node ['entry'] or ['hasEntry'], the helper as a value, and a read of a computed key is a call of it, ['()', ['entry'], [a, b]] (fjs/edag); the graph outputs write the node back as the helper, the FunctionalScript one under names of its own, the Rust one as a function the VM answers natively. Value outputs can evaluate calls to the helpers; selecting a helper itself is refused as a function value.

The node is the language's one read of a property by a name it computes: Object is no value a module can name, and its namespace admits is and entries alone, the second listing every entry rather than reading one (built-in static functions), and a[i] stays unread (property access). Where a program knows its index to be a number, the spelling is a[Number(i)] (property access); a[+i], where no bigint can reach it, is property-accessor's still, and entry is the read for a key of any type.

Why two helpers

The language first answered both questions with one helper, the option [value] or [], chosen for one scan per question: value, presence, or a default that respects an entry holding undefined, each one call, where the pair spends two scans on the third. That argument held until the runtime's dispatcher, dot, was written in the language (runtime-members, DESIGN.md §13), and the language designer decided for the pair:

  • The common read has no tail. entry(a, b) is the value, as a[k] is, where the option made every read entry(a, b)[0].
  • Nothing is built on a member call. dot reads the receiver and then the member table, and with the option each read built a one-element array to carry one bit, on the path of every compiled a.map(f); with the pair, hasEntry(self, key) ? entry(self, key) then the body, it allocates nothing.
  • The shape is in the source, not in a rule. A backend could print the option's presence test without the array, but that is a substitution keyed on a body's text, which §13 says is a sign the source should expose the shape instead. hasEntry is the shape.
  • The floor is simpler. The core of the runtime may not use what it defines, and with the option it read [0] of entry's answer, a property read, to get at the value. With the pair presence is a boolean and the value is the value.

The price: two scans where presence and value are both wanted on a receiver that owns the key, each one lookup, against the option's one lookup and one allocation — which of the two is dearer is not measured, and the decision does not rest on it; an own undefined invisible to entry alone, which hasEntry tells apart, as JavaScript's in and Object.hasOwn callers do; and two recognized bodies, two nodes and two native answers on each executor where the option had one of each. The option stays available as an ordinary function over the two, hasEntry(a, b) ? [entry(a, b)] : [], for a caller that wants it. The decision was recorded in spec/todo/2345-has-entry.md, its three tasks done by #3037, #3038 and #3031.

Examples

The compiler demo offers the programs entries in module.f.js, each with its real output.

The demo on this page runs sample.f.js, this page's example as a function of one number — reading an entry at run time: one that exists, and one that does not — with every output fjs compile makes of it: the expression graph (EDAG), the Rust and the WebAssembly that Rust builds to. Its Run button calls the default export with 0 and 1, as JavaScript and as WebAssembly, and shows what each call returned or threw.

const entry = (a, b) => {
    const x = Object.getOwnPropertyDescriptor(a, b);
    return x?.enumerable ? x.value : undefined;
};
const escapes = { n: "newline", t: "tab" };
export default (...c) => entry(escapes, ["n", "x"][Number(c[0])]);

Reference

Demo

In FunctionalScript

fjs compile accepts this module, and it runs as JavaScript and as WebAssembly alike.

A FunctionalScript module and what fjs compile makes of it: the expression graph it lowers to, the Rust it compiles to on the NaNVM runtime, and the WebAssembly that Rust builds to. Run calls its default export with 0, then 1, first as the JavaScript it already is and then as WebAssembly, and shows what each call returned or threw and how long one call takes, timed over 1000 calls.

FunctionalScript source:

/**
 * The example of [`README.md`](./README.md) (Reading an Entry at Run Time)
 * as a function of one number, for the page's WASM demo: reading an entry at
 * run time: one that exists, and one that does not.
 *
 * @module
 */

/** @type {(a: object, b: string) => unknown} */
const entry = (a, b) => {
    const x = Object.getOwnPropertyDescriptor(a, b);
    return x?.enumerable ? x.value : undefined;
};
const escapes = { n: "newline", t: "tab" };
/** @type {(...a: readonly number[]) => unknown} */
export default (...c) => entry(escapes, ["n", "x"][Number(c[0])]);

Expression graph (EDAG) that fjs compile lowers it to:

=>lengthframe 0frame 1body0entry{}(){}nt"newline""tab"()callee...frame 0[][]01frame 1..objidx[]01"n""x"Numberoperand.objidxrest0

The same graph, as fjs compile writes it to a .edag.data.js file:

export default ["{}",[[":","default",["=>",0,[["entry"],["{}",[[":","n","newline"],[":","t","tab"]]]],["()",["frame",0],[["frame",1],[".",["[]",["n","x"]],["Number",[".",["rest"],0]]]]]]]]];

Rust that fjs compile writes from it, on the NaNVM runtime:

// @generated by `fjs compile`. Do not edit: recompile the source module instead.

use nanvm_lib::vm::unstable::{f64_any, string_any, string_key};
use nanvm_lib::vm::{Any, Array, IStaticFunction, ToAny, ToArray, ToObject};

#[rustfmt::skip]
#[allow(clippy::if_same_then_else)]
pub fn module<A: IStaticFunction>(_runtime: Any<A>) -> Result<Any<A>, Any<A>> {
    let _b0: Any<A> = A::static_function(|_self, _args| Any::entry(_args.argument(0), _args.argument(1)), 2, Array::default(), Some("($0,$1)=>{const $2=Object.getOwnPropertyDescriptor($0,$1);return $2?.enumerable?$2.value:undefined;}")).to_any();
    let _b1: Any<A> = [(string_key("n"), string_any("newline")), (string_key("t"), string_any("tab"))].to_object().to_any();
    Ok([(string_key("default"), A::static_function(|_self, _args| {
        let _b468: Any<A> = _args.rest(0).to_any();
        Any::call(A::frame(_self)[0].clone(), [A::frame(_self)[1].clone(), (Any::dot([string_any("n"), string_any("x")].to_array().to_any(), (Any::number((Any::dot(_b468.clone(), f64_any(0x0000000000000000)).end())?))?).end())?].to_array().to_any())
    }, 0, [_b0.clone(), _b1.clone()].to_array(), Some("(...$2)=>$0($1,[\"n\",\"x\"][Number($2[0])])")).to_any())].to_object().to_any())
}

WebAssembly text (WAT) of the functions compiled from this source, without the NaNVM runtime:

  (func $nanvm_demos::samples::entries::module::<nanvm_lib::naive::Naive> (;269;) (type 1) (param i32 i32)
    (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i64)
    global.get $__stack_pointer
    i32.const 176
    i32.sub
    local.tee 2
    global.set $__stack_pointer
    local.get 2
    i32.const 0
    i32.store8 offset=152
    local.get 2
    i32.const 32
    i32.add
    local.get 2
    i32.const 152
    i32.add
    call $"<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<core::iter::sources::empty::Empty<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, core::result::Result<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, ()>::Ok>, core::result::Result<core::convert::Infallible, ()>> as alloc::rc::ToRcSlice<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>::to_rc_slice"
    local.get 2
    local.get 2
    i32.load offset=36
    local.tee 3
    i32.store offset=76
    local.get 2
    local.get 2
    i32.load offset=32
    local.tee 4
    i32.store offset=72
    block ;; label = @1
      block ;; label = @2
        local.get 2
        i32.load8_u offset=152
        i32.const 1
        i32.ne
        br_if 0 (;@2;)
        local.get 4
        local.get 4
        i32.load
        i32.const -1
        i32.add
        local.tee 0
        i32.store
        local.get 0
        br_if 1 (;@1;)
        local.get 2
        i32.const 72
        i32.add
        call $"<alloc::rc::Rc<[nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>]>>::drop_slow"
        br 1 (;@1;)
      end
      local.get 4
      i32.eqz
      br_if 0 (;@1;)
      local.get 2
      i32.const 51
      i32.const 2
      local.get 4
      local.get 3
      i32.const 1057967
      i32.const 100
      call $<nanvm_lib::naive::function::Function>::new
      local.tee 3
      i32.store offset=44
      local.get 2
      i32.const 7
      i32.store8 offset=40
      local.get 2
      i32.const 0
      i32.store16 offset=64
      local.get 2
      i32.const 1058068
      i32.store offset=60
      local.get 2
      i32.const 1058067
      i32.store offset=56
      local.get 2
      i32.const 72
      i32.add
      local.get 2
      i32.const 56
      i32.add
      call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
      block ;; label = @2
        block ;; label = @3
          block ;; label = @4
            block ;; label = @5
              block ;; label = @6
                block ;; label = @7
                  block ;; label = @8
                    block ;; label = @9
                      block ;; label = @10
                        local.get 2
                        i32.load8_u offset=72
                        local.tee 4
                        i32.const 255
                        i32.ne
                        br_if 0 (;@10;)
                        local.get 2
                        i32.load offset=80
                        local.set 4
                        local.get 2
                        i32.load offset=76
                        local.set 5
                        local.get 2
                        i32.const 0
                        i32.store16 offset=64
                        local.get 2
                        i32.const 1058075
                        i32.store offset=60
                        local.get 2
                        i32.const 1058068
                        i32.store offset=56
                        local.get 2
                        i32.const 72
                        i32.add
                        local.get 2
                        i32.const 56
                        i32.add
                        call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
                        local.get 2
                        i32.load8_u offset=72
                        local.tee 6
                        i32.const 255
                        i32.ne
                        br_if 1 (;@9;)
                        local.get 2
                        i32.load offset=80
                        local.set 6
                        local.get 2
                        i32.load offset=76
                        local.set 7
                        local.get 2
                        i32.const 0
                        i32.store16 offset=64
                        local.get 2
                        i32.const 1058076
                        i32.store offset=60
                        local.get 2
                        i32.const 1058075
                        i32.store offset=56
                        local.get 2
                        i32.const 72
                        i32.add
                        local.get 2
                        i32.const 56
                        i32.add
                        call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
                        local.get 2
                        i32.load8_u offset=72
                        local.tee 8
                        i32.const 255
                        i32.ne
                        br_if 2 (;@8;)
                        local.get 2
                        i32.load offset=80
                        local.set 8
                        local.get 2
                        i32.load offset=76
                        local.set 9
                        local.get 2
                        i32.const 0
                        i32.store16 offset=64
                        local.get 2
                        i32.const 1058079
                        i32.store offset=60
                        local.get 2
                        i32.const 1058076
                        i32.store offset=56
                        local.get 2
                        i32.const 72
                        i32.add
                        local.get 2
                        i32.const 56
                        i32.add
                        call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
                        local.get 2
                        i32.load8_u offset=72
                        local.tee 10
                        i32.const 255
                        i32.ne
                        br_if 3 (;@7;)
                        local.get 2
                        i64.load offset=76 align=4
                        local.set 11
                        local.get 2
                        i32.const 0
                        i32.store8 offset=56
                        local.get 2
                        local.get 11
                        i64.store offset=116 align=4
                        local.get 2
                        i32.const 3
                        i32.store8 offset=112
                        local.get 2
                        local.get 8
                        i32.store offset=108
                        local.get 2
                        local.get 9
                        i32.store offset=104
                        local.get 2
                        local.get 6
                        i32.store offset=96
                        local.get 2
                        local.get 7
                        i32.store offset=92
                        local.get 2
                        i32.const 3
                        i32.store8 offset=88
                        local.get 2
                        local.get 4
                        i32.store offset=84
                        local.get 2
                        local.get 5
                        i32.store offset=80
                        local.get 2
                        i64.const 8589934592
                        i64.store offset=72
                        local.get 2
                        local.get 2
                        i32.const 56
                        i32.add
                        i32.store offset=128
                        local.get 2
                        i32.const 24
                        i32.add
                        local.get 2
                        i32.const 72
                        i32.add
                        call $"<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<core::array::iter::IntoIter<(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>), 2>, core::result::Result<(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>), ()>::Ok>, core::result::Result<core::convert::Infallible, ()>> as alloc::rc::ToRcSlice<(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>)>>::to_rc_slice"
                        local.get 2
                        local.get 2
                        i32.load offset=28
                        local.tee 5
                        i32.store offset=156
                        local.get 2
                        local.get 2
                        i32.load offset=24
                        local.tee 4
                        i32.store offset=152
                        block ;; label = @11
                          local.get 2
                          i32.load8_u offset=56
                          i32.const 1
                          i32.ne
                          br_if 0 (;@11;)
                          local.get 4
                          local.get 4
                          i32.load
                          i32.const -1
                          i32.add
                          local.tee 0
                          i32.store
                          local.get 0
                          br_if 9 (;@2;)
                          local.get 2
                          i32.const 152
                          i32.add
                          call $"<alloc::rc::Rc<[(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>)]>>::drop_slow"
                          br 9 (;@2;)
                        end
                        local.get 4
                        i32.eqz
                        br_if 8 (;@2;)
                        local.get 2
                        local.get 5
                        i32.store offset=64
                        local.get 2
                        local.get 4
                        i32.store offset=60
                        local.get 2
                        i32.const 5
                        i32.store8 offset=56
                        local.get 2
                        i32.const 0
                        i32.store16 offset=148
                        local.get 2
                        i32.const 1057715
                        i32.store offset=144
                        local.get 2
                        i32.const 1057708
                        i32.store offset=140
                        local.get 2
                        i32.const 72
                        i32.add
                        local.get 2
                        i32.const 140
                        i32.add
                        call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
                        local.get 2
                        i32.load8_u offset=72
                        local.tee 6
                        i32.const 255
                        i32.ne
                        br_if 4 (;@6;)
                        local.get 2
                        i32.load offset=80
                        local.set 7
                        local.get 2
                        i32.load offset=76
                        local.set 8
                        local.get 3
                        local.get 3
                        i32.load
                        i32.const 1
                        i32.add
                        local.tee 6
                        i32.store
                        local.get 6
                        i32.eqz
                        br_if 5 (;@5;)
                        local.get 4
                        local.get 4
                        i32.load
                        i32.const 1
                        i32.add
                        local.tee 6
                        i32.store
                        local.get 6
                        i32.eqz
                        br_if 5 (;@5;)
                        local.get 2
                        i32.const 0
                        i32.store8 offset=140
                        local.get 2
                        local.get 5
                        i64.extend_i32_u
                        i64.store offset=104
                        local.get 2
                        local.get 4
                        i32.store offset=100
                        local.get 2
                        i32.const 5
                        i32.store8 offset=96
                        local.get 2
                        i64.const 0
                        i64.store offset=88
                        local.get 2
                        local.get 3
                        i32.store offset=84
                        local.get 2
                        i32.const 7
                        i32.store8 offset=80
                        local.get 2
                        i64.const 8589934592
                        i64.store offset=72
                        local.get 2
                        local.get 2
                        i32.const 140
                        i32.add
                        i32.store offset=112
                        local.get 2
                        i32.const 16
                        i32.add
                        local.get 2
                        i32.const 72
                        i32.add
                        call $"<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<core::array::iter::IntoIter<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, 2>, core::result::Result<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, ()>::Ok>, core::result::Result<core::convert::Infallible, ()>> as alloc::rc::ToRcSlice<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>::to_rc_slice"
                        local.get 2
                        local.get 2
                        i32.load offset=20
                        local.tee 3
                        i32.store offset=156
                        local.get 2
                        local.get 2
                        i32.load offset=16
                        local.tee 4
                        i32.store offset=152
                        block ;; label = @11
                          local.get 2
                          i32.load8_u offset=140
                          i32.const 1
                          i32.ne
                          br_if 0 (;@11;)
                          local.get 4
                          local.get 4
                          i32.load
                          i32.const -1
                          i32.add
                          local.tee 0
                          i32.store
                          local.get 0
                          br_if 8 (;@3;)
                          local.get 2
                          i32.const 152
                          i32.add
                          call $"<alloc::rc::Rc<[nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>]>>::drop_slow"
                          br 8 (;@3;)
                        end
                        local.get 4
                        i32.eqz
                        br_if 7 (;@3;)
                        i32.const 52
                        i32.const 0
                        local.get 4
                        local.get 3
                        i32.const 1058079
                        i32.const 40
                        call $<nanvm_lib::naive::function::Function>::new
                        local.set 4
                        local.get 2
                        i32.const 0
                        i32.store8 offset=140
                        local.get 2
                        local.get 4
                        i32.store offset=92
                        local.get 2
                        i32.const 7
                        i32.store8 offset=88
                        local.get 2
                        local.get 7
                        i32.store offset=84
                        local.get 2
                        local.get 8
                        i32.store offset=80
                        local.get 2
                        i64.const 4294967296
                        i64.store offset=72
                        local.get 2
                        local.get 2
                        i32.const 140
                        i32.add
                        i32.store offset=104
                        local.get 2
                        i32.const 8
                        i32.add
                        local.get 2
                        i32.const 72
                        i32.add
                        call $"<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<core::array::iter::IntoIter<(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>), 1>, core::result::Result<(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>), ()>::Ok>, core::result::Result<core::convert::Infallible, ()>> as alloc::rc::ToRcSlice<(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>)>>::to_rc_slice"
                        local.get 2
                        local.get 2
                        i32.load offset=12
                        local.tee 3
                        i32.store offset=156
                        local.get 2
                        local.get 2
                        i32.load offset=8
                        local.tee 4
                        i32.store offset=152
                        block ;; label = @11
                          local.get 2
                          i32.load8_u offset=140
                          i32.const 1
                          i32.ne
                          br_if 0 (;@11;)
                          local.get 4
                          local.get 4
                          i32.load
                          i32.const -1
                          i32.add
                          local.tee 0
                          i32.store
                          local.get 0
                          br_if 7 (;@4;)
                          local.get 2
                          i32.const 152
                          i32.add
                          call $"<alloc::rc::Rc<[(nanvm_lib::vm::string::String<nanvm_lib::naive::Naive>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>)]>>::drop_slow"
                          br 7 (;@4;)
                        end
                        local.get 4
                        i32.eqz
                        br_if 6 (;@4;)
                        local.get 0
                        local.get 3
                        i32.store offset=16
                        local.get 0
                        local.get 4
                        i32.store offset=12
                        local.get 0
                        i32.const 5
                        i32.store8 offset=8
                        local.get 0
                        i64.const 0
                        i64.store
                        local.get 2
                        i32.const 56
                        i32.add
                        call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                        local.get 2
                        i32.const 40
                        i32.add
                        call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                        local.get 1
                        call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                        local.get 2
                        i32.const 176
                        i32.add
                        global.set $__stack_pointer
                        return
                      end
                      local.get 2
                      local.get 2
                      i32.load8_u offset=75
                      i32.store8 offset=155
                      local.get 2
                      local.get 2
                      i32.load16_u offset=73 align=1
                      i32.store16 offset=153 align=1
                      local.get 2
                      local.get 2
                      i32.load offset=84
                      i32.store offset=164
                      local.get 2
                      local.get 2
                      i64.load offset=76 align=4
                      i64.store offset=156 align=4
                      local.get 2
                      local.get 4
                      i32.store8 offset=152
                      i32.const 1065572
                      i32.const 43
                      local.get 2
                      i32.const 152
                      i32.add
                      i32.const 1065556
                      i32.const 1065616
                      call $core::result::unwrap_failed
                      unreachable
                    end
                    local.get 2
                    local.get 2
                    i32.load8_u offset=75
                    i32.store8 offset=155
                    local.get 2
                    local.get 2
                    i32.load16_u offset=73 align=1
                    i32.store16 offset=153 align=1
                    local.get 2
                    local.get 2
                    i32.load offset=84
                    i32.store offset=164
                    local.get 2
                    local.get 2
                    i64.load offset=76 align=4
                    i64.store offset=156 align=4
                    local.get 2
                    local.get 6
                    i32.store8 offset=152
                    i32.const 1065572
                    i32.const 43
                    local.get 2
                    i32.const 152
                    i32.add
                    i32.const 1065556
                    i32.const 1065616
                    call $core::result::unwrap_failed
                    unreachable
                  end
                  local.get 2
                  local.get 2
                  i32.load8_u offset=75
                  i32.store8 offset=155
                  local.get 2
                  local.get 2
                  i32.load16_u offset=73 align=1
                  i32.store16 offset=153 align=1
                  local.get 2
                  local.get 2
                  i32.load offset=84
                  i32.store offset=164
                  local.get 2
                  local.get 2
                  i64.load offset=76 align=4
                  i64.store offset=156 align=4
                  local.get 2
                  local.get 8
                  i32.store8 offset=152
                  i32.const 1065572
                  i32.const 43
                  local.get 2
                  i32.const 152
                  i32.add
                  i32.const 1065556
                  i32.const 1065616
                  call $core::result::unwrap_failed
                  unreachable
                end
                local.get 2
                local.get 2
                i32.load8_u offset=75
                i32.store8 offset=155
                local.get 2
                local.get 2
                i32.load16_u offset=73 align=1
                i32.store16 offset=153 align=1
                local.get 2
                local.get 2
                i32.load offset=84
                i32.store offset=164
                local.get 2
                local.get 2
                i64.load offset=76 align=4
                i64.store offset=156 align=4
                local.get 2
                local.get 10
                i32.store8 offset=152
                i32.const 1065572
                i32.const 43
                local.get 2
                i32.const 152
                i32.add
                i32.const 1065556
                i32.const 1065616
                call $core::result::unwrap_failed
                unreachable
              end
              local.get 2
              local.get 2
              i32.load8_u offset=75
              i32.store8 offset=155
              local.get 2
              local.get 2
              i32.load16_u offset=73 align=1
              i32.store16 offset=153 align=1
              local.get 2
              local.get 2
              i32.load offset=84
              i32.store offset=164
              local.get 2
              local.get 2
              i64.load offset=76 align=4
              i64.store offset=156 align=4
              local.get 2
              local.get 6
              i32.store8 offset=152
              i32.const 1065572
              i32.const 43
              local.get 2
              i32.const 152
              i32.add
              i32.const 1065556
              i32.const 1065616
              call $core::result::unwrap_failed
            end
            unreachable
          end
          i32.const 1057428
          i32.const 43
          local.get 2
          i32.const 175
          i32.add
          i32.const 1057412
          i32.const 1057472
          call $core::result::unwrap_failed
          unreachable
        end
        i32.const 1057428
        i32.const 43
        local.get 2
        i32.const 175
        i32.add
        i32.const 1057412
        i32.const 1057472
        call $core::result::unwrap_failed
        unreachable
      end
      i32.const 1057428
      i32.const 43
      local.get 2
      i32.const 175
      i32.add
      i32.const 1057412
      i32.const 1057472
      call $core::result::unwrap_failed
      unreachable
    end
    i32.const 1057428
    i32.const 43
    local.get 2
    i32.const 175
    i32.add
    i32.const 1057412
    i32.const 1057472
    call $core::result::unwrap_failed
    unreachable
  )
  (func $"<nanvm_demos::samples::entries::module<nanvm_lib::naive::Naive>::{closure#0} as core::ops::function::FnOnce<(&nanvm_lib::naive::function::Function, nanvm_lib::vm::array::Array<nanvm_lib::naive::Naive>)>>::call_once" (;270;) (type 4) (param i32 i32 i32 i32)
    (local i32 i32 i32 i64 i32)
    global.get $__stack_pointer
    i32.const 80
    i32.sub
    local.tee 4
    global.set $__stack_pointer
    local.get 4
    local.get 3
    i32.store offset=4
    local.get 4
    local.get 2
    i32.store
    i32.const 0
    local.set 5
    local.get 4
    i32.const 8
    i32.add
    local.get 4
    i32.const 0
    call $<nanvm_lib::vm::array::Array<nanvm_lib::naive::Naive>>::argument
    i32.const 1
    local.set 6
    local.get 4
    i32.const 24
    i32.add
    local.get 4
    i32.const 1
    call $<nanvm_lib::vm::array::Array<nanvm_lib::naive::Naive>>::argument
    local.get 4
    i32.const 40
    i32.add
    local.get 4
    i32.const 8
    i32.add
    local.get 4
    i32.const 24
    i32.add
    call $<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::own_entry
    i64.const 1
    local.set 7
    local.get 4
    i32.const 50
    i32.add
    local.set 3
    local.get 4
    i32.load8_u offset=49
    local.set 8
    local.get 4
    i32.load8_u offset=48
    local.set 2
    block ;; label = @1
      block ;; label = @2
        local.get 4
        i64.load offset=40
        i64.const 1
        i64.ne
        br_if 0 (;@2;)
        local.get 0
        local.get 8
        i32.store8 offset=9
        local.get 0
        local.get 2
        i32.store8 offset=8
        local.get 0
        local.get 3
        i64.load align=2
        i64.store offset=10 align=2
        local.get 0
        local.get 3
        i64.load offset=6 align=2
        i64.store offset=16 align=2
        br 1 (;@1;)
      end
      block ;; label = @2
        local.get 2
        i32.const 255
        i32.and
        i32.const 255
        i32.eq
        br_if 0 (;@2;)
        local.get 4
        local.get 3
        i64.load offset=6 align=2
        i64.store offset=70 align=2
        local.get 4
        local.get 3
        i64.load align=2
        i64.store offset=64
        local.get 8
        local.set 6
        local.get 2
        local.set 5
      end
      local.get 0
      local.get 6
      i32.store8 offset=9
      local.get 0
      local.get 5
      i32.store8 offset=8
      local.get 0
      local.get 4
      i64.load offset=64
      i64.store offset=10 align=2
      local.get 0
      local.get 4
      i64.load offset=70 align=2
      i64.store offset=16 align=2
      i64.const 0
      local.set 7
    end
    local.get 0
    local.get 7
    i64.store
    local.get 4
    i32.load
    local.tee 0
    local.get 0
    i32.load
    i32.const -1
    i32.add
    local.tee 0
    i32.store
    block ;; label = @1
      local.get 0
      br_if 0 (;@1;)
      local.get 4
      call $"<alloc::rc::Rc<[nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>]>>::drop_slow"
    end
    local.get 4
    i32.const 80
    i32.add
    global.set $__stack_pointer
  )
  (func $"<nanvm_demos::samples::entries::module<nanvm_lib::naive::Naive>::{closure#1} as core::ops::function::FnOnce<(&nanvm_lib::naive::function::Function, nanvm_lib::vm::array::Array<nanvm_lib::naive::Naive>)>>::call_once" (;271;) (type 4) (param i32 i32 i32 i32)
    (local i32 i32 i32 i32 i64 i32 f64)
    global.get $__stack_pointer
    i32.const 272
    i32.sub
    local.tee 4
    global.set $__stack_pointer
    local.get 1
    i32.load
    local.set 1
    local.get 4
    local.get 3
    i32.store offset=20
    local.get 4
    local.get 2
    i32.store offset=16
    local.get 2
    local.get 2
    i32.load
    i32.const 1
    i32.add
    local.tee 5
    i32.store
    block ;; label = @1
      local.get 5
      i32.eqz
      br_if 0 (;@1;)
      local.get 4
      local.get 3
      i32.store offset=32
      local.get 4
      local.get 2
      i32.store offset=28
      local.get 4
      i32.const 6
      i32.store8 offset=24
      block ;; label = @2
        block ;; label = @3
          block ;; label = @4
            local.get 1
            i32.load offset=16
            i32.eqz
            br_if 0 (;@4;)
            block ;; label = @5
              block ;; label = @6
                block ;; label = @7
                  block ;; label = @8
                    block ;; label = @9
                      block ;; label = @10
                        block ;; label = @11
                          block ;; label = @12
                            local.get 1
                            i32.load offset=12
                            local.tee 6
                            i32.load8_u offset=8
                            local.tee 7
                            br_table 6 (;@6;) 6 (;@6;) 0 (;@12;) 1 (;@11;) 2 (;@10;) 3 (;@9;) 4 (;@8;) 5 (;@7;) 6 (;@6;)
                          end
                          local.get 6
                          i64.load offset=16
                          local.set 8
                          br 9 (;@2;)
                        end
                        local.get 6
                        i32.load offset=12
                        local.tee 5
                        local.get 5
                        i32.load
                        i32.const 1
                        i32.add
                        local.tee 9
                        i32.store
                        local.get 9
                        i32.eqz
                        br_if 9 (;@1;)
                        br 7 (;@3;)
                      end
                      local.get 6
                      i32.load offset=12
                      local.tee 5
                      local.get 5
                      i32.load
                      i32.const 1
                      i32.add
                      local.tee 9
                      i32.store
                      local.get 9
                      i32.eqz
                      br_if 8 (;@1;)
                      local.get 6
                      i64.load8_u offset=20
                      i64.const 32
                      i64.shl
                      local.get 6
                      i64.load32_u offset=16
                      i64.or
                      local.set 8
                      br 7 (;@2;)
                    end
                    local.get 6
                    i32.load offset=12
                    local.tee 5
                    local.get 5
                    i32.load
                    i32.const 1
                    i32.add
                    local.tee 9
                    i32.store
                    local.get 9
                    br_if 5 (;@3;)
                    br 7 (;@1;)
                  end
                  local.get 6
                  i32.load offset=12
                  local.tee 5
                  local.get 5
                  i32.load
                  i32.const 1
                  i32.add
                  local.tee 9
                  i32.store
                  local.get 9
                  br_if 4 (;@3;)
                  br 6 (;@1;)
                end
                local.get 6
                i32.load offset=12
                local.tee 5
                local.get 5
                i32.load
                i32.const 1
                i32.add
                local.tee 6
                i32.store
                local.get 6
                i32.eqz
                br_if 5 (;@1;)
                br 1 (;@5;)
              end
              local.get 6
              i32.load8_u offset=9
              local.set 6
            end
            br 2 (;@2;)
          end
          i32.const 0
          i32.const 0
          i32.const 1063408
          call $core::panicking::panic_bounds_check
          unreachable
        end
        local.get 6
        i64.load32_u offset=16
        local.set 8
      end
      local.get 4
      local.get 8
      i64.store offset=48
      local.get 4
      local.get 5
      i32.store offset=44
      local.get 4
      local.get 6
      i32.store8 offset=41
      local.get 4
      local.get 7
      i32.store8 offset=40
      block ;; label = @2
        block ;; label = @3
          block ;; label = @4
            local.get 1
            i32.load offset=16
            local.tee 5
            i32.const 1
            i32.le_u
            br_if 0 (;@4;)
            block ;; label = @5
              block ;; label = @6
                block ;; label = @7
                  block ;; label = @8
                    block ;; label = @9
                      block ;; label = @10
                        block ;; label = @11
                          block ;; label = @12
                            local.get 1
                            i32.load offset=12
                            local.tee 1
                            i32.load8_u offset=24
                            local.tee 6
                            br_table 6 (;@6;) 6 (;@6;) 0 (;@12;) 1 (;@11;) 2 (;@10;) 3 (;@9;) 4 (;@8;) 5 (;@7;) 6 (;@6;)
                          end
                          local.get 1
                          i64.load offset=32
                          local.set 8
                          br 9 (;@2;)
                        end
                        local.get 1
                        i32.load offset=28
                        local.tee 5
                        local.get 5
                        i32.load
                        i32.const 1
                        i32.add
                        local.tee 7
                        i32.store
                        local.get 7
                        i32.eqz
                        br_if 9 (;@1;)
                        br 7 (;@3;)
                      end
                      local.get 1
                      i32.load offset=28
                      local.tee 5
                      local.get 5
                      i32.load
                      i32.const 1
                      i32.add
                      local.tee 7
                      i32.store
                      local.get 7
                      i32.eqz
                      br_if 8 (;@1;)
                      local.get 1
                      i64.load8_u offset=36
                      i64.const 32
                      i64.shl
                      local.get 1
                      i64.load32_u offset=32
                      i64.or
                      local.set 8
                      br 7 (;@2;)
                    end
                    local.get 1
                    i32.load offset=28
                    local.tee 5
                    local.get 5
                    i32.load
                    i32.const 1
                    i32.add
                    local.tee 7
                    i32.store
                    local.get 7
                    i32.eqz
                    br_if 7 (;@1;)
                    br 5 (;@3;)
                  end
                  local.get 1
                  i32.load offset=28
                  local.tee 5
                  local.get 5
                  i32.load
                  i32.const 1
                  i32.add
                  local.tee 7
                  i32.store
                  local.get 7
                  i32.eqz
                  br_if 6 (;@1;)
                  br 4 (;@3;)
                end
                local.get 1
                i32.load offset=28
                local.tee 5
                local.get 5
                i32.load
                i32.const 1
                i32.add
                local.tee 1
                i32.store
                local.get 1
                i32.eqz
                br_if 5 (;@1;)
                br 1 (;@5;)
              end
              local.get 1
              i32.load8_u offset=25
              local.set 1
            end
            br 2 (;@2;)
          end
          i32.const 1
          local.get 5
          i32.const 1063408
          call $core::panicking::panic_bounds_check
          unreachable
        end
        local.get 1
        i64.load32_u offset=32
        local.set 8
      end
      local.get 4
      local.get 8
      i64.store offset=96
      local.get 4
      local.get 5
      i32.store offset=92
      local.get 4
      local.get 1
      i32.store8 offset=89
      local.get 4
      local.get 6
      i32.store8 offset=88
      local.get 4
      i32.const 0
      i32.store16 offset=144
      local.get 4
      i32.const 1058068
      i32.store offset=140
      local.get 4
      i32.const 1058067
      i32.store offset=136
      local.get 4
      i32.const 216
      i32.add
      local.get 4
      i32.const 136
      i32.add
      call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
      block ;; label = @2
        block ;; label = @3
          block ;; label = @4
            block ;; label = @5
              block ;; label = @6
                block ;; label = @7
                  local.get 4
                  i32.load8_u offset=216
                  local.tee 1
                  i32.const 255
                  i32.ne
                  br_if 0 (;@7;)
                  local.get 4
                  i32.load offset=224
                  local.set 1
                  local.get 4
                  i32.load offset=220
                  local.set 5
                  local.get 4
                  i32.const 0
                  i32.store16 offset=144
                  local.get 4
                  i32.const 1060005
                  i32.store offset=140
                  local.get 4
                  i32.const 1060004
                  i32.store offset=136
                  local.get 4
                  i32.const 216
                  i32.add
                  local.get 4
                  i32.const 136
                  i32.add
                  call $"core::iter::adapters::try_process::<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>, u16, core::result::Result<core::convert::Infallible, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>, <core::result::Result<alloc::rc::Rc<[u16]>, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>> as core::iter::traits::collect::FromIterator<core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>>::from_iter<core::iter::adapters::map::Map<core::str::iter::EncodeUtf16, core::result::Result<u16, nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::Ok>>::{closure#0}, alloc::rc::Rc<[u16]>>"
                  local.get 4
                  i32.load8_u offset=216
                  local.tee 6
                  i32.const 255
                  i32.ne
                  br_if 1 (;@6;)
                  local.get 4
                  i64.load offset=220 align=4
                  local.set 8
                  local.get 4
                  i32.const 0
                  i32.store8 offset=136
                  local.get 4
                  local.get 8
                  i64.store offset=244 align=4
                  local.get 4
                  i32.const 3
                  i32.store8 offset=240
                  local.get 4
                  local.get 1
                  i32.store offset=232
                  local.get 4
                  local.get 5
                  i32.store offset=228
                  local.get 4
                  i32.const 3
                  i32.store8 offset=224
                  local.get 4
                  i64.const 8589934592
                  i64.store offset=216
                  local.get 4
                  local.get 4
                  i32.const 136
                  i32.add
                  i32.store offset=256
                  local.get 4
                  i32.const 8
                  i32.add
                  local.get 4
                  i32.const 216
                  i32.add
                  call $"<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<core::array::iter::IntoIter<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, 2>, core::result::Result<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, ()>::Ok>, core::result::Result<core::convert::Infallible, ()>> as alloc::rc::ToRcSlice<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>::to_rc_slice"
                  local.get 4
                  local.get 4
                  i32.load offset=12
                  local.tee 5
                  i32.store offset=172
                  local.get 4
                  local.get 4
                  i32.load offset=8
                  local.tee 1
                  i32.store offset=168
                  block ;; label = @8
                    local.get 4
                    i32.load8_u offset=136
                    i32.const 1
                    i32.ne
                    br_if 0 (;@8;)
                    local.get 1
                    local.get 1
                    i32.load
                    i32.const -1
                    i32.add
                    local.tee 2
                    i32.store
                    local.get 2
                    br_if 6 (;@2;)
                    local.get 4
                    i32.const 168
                    i32.add
                    call $"<alloc::rc::Rc<[nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>]>>::drop_slow"
                    br 6 (;@2;)
                  end
                  local.get 1
                  i32.eqz
                  br_if 5 (;@2;)
                  local.get 4
                  local.get 5
                  i32.store offset=208
                  local.get 4
                  local.get 1
                  i32.store offset=204
                  local.get 4
                  i32.const 6
                  i32.store8 offset=200
                  local.get 2
                  local.get 2
                  i32.load
                  i32.const 1
                  i32.add
                  local.tee 1
                  i32.store
                  local.get 1
                  i32.eqz
                  br_if 6 (;@1;)
                  local.get 4
                  local.get 2
                  i32.store offset=172
                  local.get 4
                  i32.const 6
                  i32.store8 offset=168
                  local.get 4
                  local.get 3
                  i64.extend_i32_u
                  i64.store offset=176
                  local.get 4
                  i64.const 0
                  i64.store offset=224
                  local.get 4
                  i32.const 2
                  i32.store8 offset=216
                  local.get 4
                  i32.const 136
                  i32.add
                  local.get 4
                  i32.const 168
                  i32.add
                  local.get 4
                  i32.const 216
                  i32.add
                  call $<nanvm_lib::vm::lambda::member::Member<nanvm_lib::naive::Naive>>::new
                  block ;; label = @8
                    block ;; label = @9
                      local.get 4
                      i32.load8_u offset=136
                      i32.const 255
                      i32.ne
                      br_if 0 (;@9;)
                      local.get 0
                      local.get 4
                      i64.load offset=152
                      i64.store offset=16
                      local.get 0
                      local.get 4
                      i64.load offset=144
                      i64.store offset=8
                      local.get 0
                      i64.const 1
                      i64.store
                      local.get 4
                      i32.const 200
                      i32.add
                      call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                      br 1 (;@8;)
                    end
                    local.get 4
                    local.get 4
                    i64.load offset=160
                    i64.store offset=240
                    local.get 4
                    local.get 4
                    i64.load offset=152
                    i64.store offset=232
                    local.get 4
                    local.get 4
                    i64.load offset=144
                    i64.store offset=224
                    local.get 4
                    local.get 4
                    i64.load offset=136
                    i64.store offset=216
                    local.get 4
                    i32.const 168
                    i32.add
                    local.get 4
                    i32.const 216
                    i32.add
                    call $<nanvm_lib::vm::lambda::member::Member<nanvm_lib::naive::Naive>>::own
                    block ;; label = @9
                      block ;; label = @10
                        local.get 4
                        i32.load8_u offset=168
                        i32.const 255
                        i32.eq
                        br_if 0 (;@10;)
                        local.get 4
                        local.get 4
                        i64.load offset=176
                        i64.store offset=112
                        local.get 4
                        local.get 4
                        i64.load offset=168
                        i64.store offset=104
                        br 1 (;@9;)
                      end
                      local.get 4
                      i32.const 256
                      i32.store16 offset=104
                    end
                    local.get 4
                    i32.const 216
                    i32.add
                    call $"#func562 core::ptr::drop_glue::<nanvm_lib::vm::unpacked::Unpacked<nanvm_lib::naive::Naive>>"
                    local.get 4
                    i32.const 232
                    i32.add
                    call $"#func562 core::ptr::drop_glue::<nanvm_lib::vm::unpacked::Unpacked<nanvm_lib::naive::Naive>>"
                    local.get 4
                    i32.const 216
                    i32.add
                    local.get 4
                    i32.const 104
                    i32.add
                    call $<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::to_numeric
                    local.get 4
                    f64.load offset=232
                    local.set 10
                    local.get 4
                    i32.load offset=228
                    local.set 1
                    local.get 4
                    i32.load offset=224
                    local.set 3
                    block ;; label = @9
                      local.get 4
                      i32.load offset=216
                      br_if 0 (;@9;)
                      block ;; label = @10
                        local.get 3
                        i32.const 1
                        i32.ne
                        br_if 0 (;@10;)
                        local.get 4
                        local.get 10
                        f64.store offset=220 align=4
                        local.get 4
                        local.get 1
                        i32.store offset=216
                        local.get 4
                        i32.const 216
                        i32.add
                        call $<nanvm_lib::vm::bigint::BigInt<nanvm_lib::naive::Naive>>::to_number
                        local.set 10
                        local.get 1
                        local.get 1
                        i32.load
                        i32.const -1
                        i32.add
                        local.tee 3
                        i32.store
                        local.get 3
                        br_if 0 (;@10;)
                        local.get 4
                        i32.const 216
                        i32.add
                        call $"<alloc::rc::Rc<[u64]>>::drop_slow"
                      end
                      local.get 4
                      local.get 10
                      f64.store offset=128
                      local.get 4
                      i32.const 2
                      i32.store offset=120
                      local.get 4
                      i32.const 168
                      i32.add
                      local.get 4
                      i32.const 200
                      i32.add
                      local.get 4
                      i32.const 120
                      i32.add
                      call $<nanvm_lib::vm::lambda::member::Member<nanvm_lib::naive::Naive>>::new
                      block ;; label = @10
                        local.get 4
                        i32.load8_u offset=168
                        i32.const 255
                        i32.ne
                        br_if 0 (;@10;)
                        local.get 0
                        local.get 4
                        i64.load offset=184
                        i64.store offset=16
                        local.get 0
                        local.get 4
                        i64.load offset=176
                        i64.store offset=8
                        local.get 0
                        i64.const 1
                        i64.store
                        br 2 (;@8;)
                      end
                      local.get 4
                      local.get 4
                      i64.load offset=192
                      i64.store offset=240
                      local.get 4
                      local.get 4
                      i64.load offset=184
                      i64.store offset=232
                      local.get 4
                      local.get 4
                      i64.load offset=176
                      i64.store offset=224
                      local.get 4
                      local.get 4
                      i64.load offset=168
                      i64.store offset=216
                      local.get 4
                      i32.const 200
                      i32.add
                      local.get 4
                      i32.const 216
                      i32.add
                      call $<nanvm_lib::vm::lambda::member::Member<nanvm_lib::naive::Naive>>::own
                      i32.const 1
                      local.set 1
                      i32.const 0
                      local.set 3
                      block ;; label = @10
                        local.get 4
                        i32.load8_u offset=200
                        local.tee 5
                        i32.const 255
                        i32.eq
                        br_if 0 (;@10;)
                        local.get 4
                        local.get 4
                        i64.load offset=202 align=2
                        i64.store offset=72
                        local.get 4
                        local.get 4
                        i64.load offset=208 align=2
                        i64.store offset=78 align=2
                        local.get 4
                        i32.load8_u offset=201
                        local.set 1
                        local.get 5
                        local.set 3
                      end
                      local.get 4
                      i32.const 216
                      i32.add
                      call $"#func562 core::ptr::drop_glue::<nanvm_lib::vm::unpacked::Unpacked<nanvm_lib::naive::Naive>>"
                      local.get 4
                      i32.const 232
                      i32.add
                      call $"#func562 core::ptr::drop_glue::<nanvm_lib::vm::unpacked::Unpacked<nanvm_lib::naive::Naive>>"
                      local.get 4
                      local.get 4
                      i64.load offset=96
                      i64.store offset=232
                      local.get 4
                      local.get 4
                      i64.load offset=88
                      i64.store offset=224
                      local.get 4
                      i32.const 0
                      i32.store8 offset=88
                      local.get 4
                      local.get 1
                      i32.store8 offset=241
                      local.get 4
                      local.get 3
                      i32.store8 offset=240
                      local.get 4
                      i64.const 8589934592
                      i64.store offset=216
                      local.get 4
                      local.get 4
                      i64.load offset=72
                      i64.store offset=242 align=2
                      local.get 4
                      local.get 4
                      i64.load offset=78 align=2
                      i64.store offset=248 align=2
                      local.get 4
                      local.get 4
                      i32.const 88
                      i32.add
                      i32.store offset=256
                      local.get 4
                      local.get 4
                      i32.const 216
                      i32.add
                      call $"<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<core::array::iter::IntoIter<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, 2>, core::result::Result<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>, ()>::Ok>, core::result::Result<core::convert::Infallible, ()>> as alloc::rc::ToRcSlice<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>>::to_rc_slice"
                      local.get 4
                      local.get 4
                      i32.load offset=4
                      local.tee 3
                      i32.store offset=204
                      local.get 4
                      local.get 4
                      i32.load
                      local.tee 1
                      i32.store offset=200
                      block ;; label = @10
                        local.get 4
                        i32.load8_u offset=88
                        i32.const 1
                        i32.ne
                        br_if 0 (;@10;)
                        local.get 1
                        local.get 1
                        i32.load
                        i32.const -1
                        i32.add
                        local.tee 2
                        i32.store
                        local.get 2
                        br_if 7 (;@3;)
                        local.get 4
                        i32.const 200
                        i32.add
                        call $"<alloc::rc::Rc<[nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>]>>::drop_slow"
                        br 7 (;@3;)
                      end
                      local.get 1
                      i32.eqz
                      br_if 6 (;@3;)
                      local.get 4
                      local.get 3
                      i32.store offset=64
                      local.get 4
                      local.get 1
                      i32.store offset=60
                      local.get 4
                      i32.const 6
                      i32.store8 offset=56
                      local.get 0
                      local.get 4
                      i32.const 40
                      i32.add
                      local.get 4
                      i32.const 56
                      i32.add
                      call $<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>::call
                      local.get 4
                      i32.const 24
                      i32.add
                      call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                      local.get 2
                      local.get 2
                      i32.load
                      i32.const -1
                      i32.add
                      local.tee 1
                      i32.store
                      local.get 1
                      br_if 5 (;@4;)
                      br 4 (;@5;)
                    end
                    local.get 0
                    local.get 10
                    f64.store offset=16
                    local.get 0
                    local.get 1
                    i32.store offset=12
                    local.get 0
                    local.get 3
                    i32.store offset=8
                    local.get 0
                    i64.const 1
                    i64.store
                    local.get 4
                    i32.const 200
                    i32.add
                    call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                  end
                  local.get 4
                  i32.const 88
                  i32.add
                  call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                  local.get 4
                  i32.const 40
                  i32.add
                  call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                  local.get 4
                  i32.const 24
                  i32.add
                  call $"#func262 core::ptr::drop_glue::<nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>>"
                  local.get 2
                  local.get 2
                  i32.load
                  i32.const -1
                  i32.add
                  local.tee 1
                  i32.store
                  local.get 1
                  i32.eqz
                  br_if 2 (;@5;)
                  br 3 (;@4;)
                end
                local.get 4
                local.get 4
                i32.load8_u offset=219
                i32.store8 offset=171
                local.get 4
                local.get 4
                i32.load16_u offset=217 align=1
                i32.store16 offset=169 align=1
                local.get 4
                local.get 4
                i32.load offset=228
                i32.store offset=180
                local.get 4
                local.get 4
                i64.load offset=220 align=4
                i64.store offset=172 align=4
                local.get 4
                local.get 1
                i32.store8 offset=168
                i32.const 1065572
                i32.const 43
                local.get 4
                i32.const 168
                i32.add
                i32.const 1065556
                i32.const 1065616
                call $core::result::unwrap_failed
                unreachable
              end
              local.get 4
              local.get 4
              i32.load8_u offset=219
              i32.store8 offset=171
              local.get 4
              local.get 4
              i32.load16_u offset=217 align=1
              i32.store16 offset=169 align=1
              local.get 4
              local.get 4
              i32.load offset=228
              i32.store offset=180
              local.get 4
              local.get 4
              i64.load offset=220 align=4
              i64.store offset=172 align=4
              local.get 4
              local.get 6
              i32.store8 offset=168
              i32.const 1065572
              i32.const 43
              local.get 4
              i32.const 168
              i32.add
              i32.const 1065556
              i32.const 1065616
              call $core::result::unwrap_failed
              unreachable
            end
            local.get 4
            i32.const 16
            i32.add
            call $"<alloc::rc::Rc<[nanvm_lib::vm::any::Any<nanvm_lib::naive::Naive>]>>::drop_slow"
          end
          local.get 4
          i32.const 272
          i32.add
          global.set $__stack_pointer
          return
        end
        i32.const 1057428
        i32.const 43
        local.get 4
        i32.const 271
        i32.add
        i32.const 1057412
        i32.const 1057472
        call $core::result::unwrap_failed
        unreachable
      end
      i32.const 1057428
      i32.const 43
      local.get 4
      i32.const 271
      i32.add
      i32.const 1057412
      i32.const 1057472
      call $core::result::unwrap_failed
      unreachable
    end
    unreachable
  )

Emergent Testing

Idle. Press Run to start the suite.

  • ./proof.f.mjs