Skip to main content

nanvm_harness/gen.fixtures/
closure_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 _b4: Any<A> = A::static_function(|_self, _args| {
10        let _b289: Any<A> = _args.rest(0).to_any();
11        Ok(A::static_function(|_self, _args| { Any::dot(A::frame(_self)[0].clone(), f64_any(0x0000000000000000)).end() }, 0, [_b289.clone()].to_array(), Some("()=>$0[0]")).to_any())
12    }, 0, Array::default(), Some("(...$0)=>()=>$0[0]")).to_any();
13    let _b5: Any<A> = (Any::call(_b4.clone(), [f64_any(0x3ff0000000000000)].to_array().to_any()))?;
14    let _b6: Any<A> = (Any::call(_b4.clone(), [f64_any(0x3ff0000000000000)].to_array().to_any()))?;
15    let _b11: Any<A> = A::static_function(|_self, _args| {
16        let _b716: Any<A> = _args.rest(0).to_any();
17        Ok(A::static_function(|_self, _args| { Any::dot(A::frame(_self)[0].clone(), f64_any(0x0000000000000000)).end() }, 0, [_b716.clone()].to_array(), Some("()=>$0[0]")).to_any())
18    }, 0, Array::default(), Some("(...$0)=>()=>$0[0]")).to_any();
19    let _b13: Any<A> = [(string_key("x"), [f64_any(0x3ff0000000000000)].to_array().to_any())].to_object().to_any();
20    let _b15: Any<A> = (Any::call(_b11.clone(), [(Any::dot(_b13.clone(), string_any("x")).end())?].to_array().to_any()))?;
21    Ok([(string_key("default"), [(Any::call(_b5.clone(), Array::default().to_any()))?, (Any::call(_b6.clone(), Array::default().to_any()))?, (strict_eq(_b5.clone(), _b6.clone()))?, (strict_eq(_b5.clone(), _b5.clone()))?, (strict_eq((Any::call(_b15.clone(), Array::default().to_any()))?, (Any::dot(_b13.clone(), string_any("x")).end())?))?, (strict_eq((Any::call(_b15.clone(), Array::default().to_any()))?, (Any::call(_b15.clone(), Array::default().to_any()))?))?].to_array().to_any())].to_object().to_any())
22}