Skip to main content

nanvm_demos/gen.samples/
names_and_identity.rs

1// @generated by `fjs compile`. Do not edit: recompile the source module instead.
2
3use nanvm_lib::vm::unstable::{f64_any, strict_eq, string_any, string_key};
4use nanvm_lib::vm::{Any, Array, IStaticFunction, ToAny, ToArray, ToObject};
5
6#[rustfmt::skip]
7#[allow(clippy::if_same_then_else)]
8pub fn module<A: IStaticFunction>(_runtime: Any<A>) -> Result<Any<A>, Any<A>> {
9    let _b0: Any<A> = A::static_function(|_self, _args| { Ok(f64_any(0x0000000000000000)) }, 0, Array::default(), Some("()=>0")).to_any();
10    Ok([(string_key("default"), {
11        let _b2: Any<A> = [(string_key("make"), A::static_function(|_self, _args| { Ok(f64_any(0x0000000000000000)) }, 0, Array::default(), Some("()=>0")).to_any())].to_object().to_any();
12        A::static_function(|_self, _args| {
13            let _b834: Any<A> = _args.rest(0).to_any();
14            Ok([(strict_eq(A::frame(_self)[0].clone(), A::frame(_self)[0].clone()))?, (strict_eq(A::frame(_self)[0].clone(), (Any::dot(A::frame(_self)[1].clone(), string_any("make")).end())?))?, (strict_eq((Any::dot([A::frame(_self)[0].clone(), (Any::dot(A::frame(_self)[1].clone(), string_any("make")).end())?].to_array().to_any(), (Any::number((Any::dot(_b834.clone(), f64_any(0x0000000000000000)).end())?))?).end())?, A::frame(_self)[0].clone()))?].to_array().to_any())
15        }, 0, [_b0.clone(), _b2.clone()].to_array(), Some("(...$2)=>[$0===$0,$0===$1.make,[$0,$1.make][Number($2[0])]===$0]")).to_any()
16    })].to_object().to_any())
17}