Skip to main content

nanvm_harness/gen.fixtures/
lazy.rs

1// @generated by `fjs compile`. Do not edit: recompile the source module instead.
2
3use nanvm_lib::vm::unstable::{bigint_any, f64_any, strict_eq, string_any, string_key};
4use nanvm_lib::vm::{Any, Array, IStaticFunction, Nullish, 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 _b63: Any<A> = A::static_function(|_self, _args| {
10        let _b7344: Any<A> = _args.rest(0).to_any();
11        Any::dot(if Any::<A>::to_boolean((Any::dot(_b7344.clone(), string_any("length")).end())?) { _b7344.clone() } else { _b7344.clone() }, f64_any(0x0000000000000000)).end()
12    }, 0, Array::default(), Some("(...$0)=>($0.length?$0:$0)[0]")).to_any();
13    let _b71: Any<A> = A::static_function(|_self, _args| {
14        let _b8264: Any<A> = _args.rest(0).to_any();
15        Any::dot({
16            let _b66: Any<A> = (Any::dot(Array::default().to_any(), string_any("length")).end())?;
17            let _b68: Any<A> = if Any::<A>::to_boolean(_b66.clone()) { _b8264.clone() } else { _b66.clone() };
18            if Any::<A>::to_boolean(_b68.clone()) { _b68.clone() } else { _b8264.clone() }
19        }, string_any("length")).end()
20    }, 0, Array::default(), Some("(...$0)=>(()=>{const $1=[].length;const $2=$1?$0:$1;return $2?$2:$0;})().length")).to_any();
21    Ok([(string_key("default"), {
22        let _b1: Any<A> = (Any::dot(Array::default().to_any(), string_any("length")).end())?;
23        let _b3: Any<A> = if Any::<A>::to_boolean(_b1.clone()) { (bigint_any(1) / bigint_any(0))? } else { _b1.clone() };
24        let _b5: Any<A> = (Any::dot([f64_any(0x3ff0000000000000)].to_array().to_any(), string_any("length")).end())?;
25        let _b6: Any<A> = if Any::<A>::to_boolean(_b5.clone()) { f64_any(0x4000000000000000) } else { _b5.clone() };
26        let _b8: Any<A> = (Any::dot([Nullish::Null.to_any(), f64_any(0x3ff0000000000000)].to_array().to_any(), f64_any(0x0000000000000000)).end())?;
27        [_b3.clone(), _b6.clone(), if Any::<A>::to_boolean(_b8.clone()) { (bigint_any(1) / bigint_any(0))? } else { _b8.clone() }, if Any::<A>::to_boolean(_b5.clone()) { _b5.clone() } else { (bigint_any(1) / bigint_any(0))? }, if Any::<A>::to_boolean(_b1.clone()) { _b1.clone() } else { f64_any(0x4008000000000000) }, {
28            let _b15: Any<A> = (Any::dot([string_any(""), string_any("x")].to_array().to_any(), f64_any(0x0000000000000000)).end())?;
29            if Any::<A>::to_boolean(_b15.clone()) { _b15.clone() } else { string_any("x") }
30        }, {
31            let _b18: Any<A> = (Any::dot([f64_any(0x0000000000000000), Nullish::Null.to_any()].to_array().to_any(), f64_any(0x0000000000000000)).end())?;
32            if Any::<A>::to_boolean(if Any::<A>::to_boolean((strict_eq(_b18.clone(), Nullish::Null.to_any()))?) { true.to_any() } else { (strict_eq(_b18.clone(), Nullish::Undefined.to_any()))? }) { (bigint_any(1) / bigint_any(0))? } else { _b18.clone() }
33        }, if Any::<A>::to_boolean(if Any::<A>::to_boolean((strict_eq(_b8.clone(), Nullish::Null.to_any()))?) { true.to_any() } else { (strict_eq(_b8.clone(), Nullish::Undefined.to_any()))? }) { f64_any(0x4010000000000000) } else { _b8.clone() }, {
34            let _b32: Any<A> = (Any::dot([Nullish::Undefined.to_any(), f64_any(0x3ff0000000000000)].to_array().to_any(), f64_any(0x0000000000000000)).end())?;
35            if Any::<A>::to_boolean(if Any::<A>::to_boolean((strict_eq(_b32.clone(), Nullish::Null.to_any()))?) { true.to_any() } else { (strict_eq(_b32.clone(), Nullish::Undefined.to_any()))? }) { f64_any(0x4014000000000000) } else { _b32.clone() }
36        }, {
37            let _b39: Any<A> = (Any::dot([false.to_any(), Nullish::Null.to_any()].to_array().to_any(), f64_any(0x0000000000000000)).end())?;
38            if Any::<A>::to_boolean(if Any::<A>::to_boolean((strict_eq(_b39.clone(), Nullish::Null.to_any()))?) { true.to_any() } else { (strict_eq(_b39.clone(), Nullish::Undefined.to_any()))? }) { f64_any(0x4018000000000000) } else { _b39.clone() }
39        }, if Any::<A>::to_boolean(_b5.clone()) { f64_any(0x401c000000000000) } else { (bigint_any(1) / bigint_any(0))? }, if Any::<A>::to_boolean(_b1.clone()) { (bigint_any(1) / bigint_any(0))? } else { f64_any(0x4020000000000000) }, {
40            let _b49: Any<A> = if Any::<A>::to_boolean(_b5.clone()) { f64_any(0x4000000000000000) } else { _b5.clone() };
41            if Any::<A>::to_boolean(_b49.clone()) { _b49.clone() } else { f64_any(0x4008000000000000) }
42        }, if Any::<A>::to_boolean(if Any::<A>::to_boolean(if Any::<A>::to_boolean((strict_eq(_b8.clone(), Nullish::Null.to_any()))?) { true.to_any() } else { (strict_eq(_b8.clone(), Nullish::Undefined.to_any()))? }) { _b1.clone() } else { _b8.clone() }) { f64_any(0x4022000000000000) } else { f64_any(0x4024000000000000) }, if Any::<A>::to_boolean(_b1.clone()) { f64_any(0x3ff0000000000000) } else { if Any::<A>::to_boolean(_b5.clone()) { f64_any(0x4026000000000000) } else { f64_any(0x4028000000000000) } }, (Any::call(_b63.clone(), [f64_any(0x402a000000000000)].to_array().to_any()))?, (Any::call(_b71.clone(), [f64_any(0x402c000000000000), f64_any(0x402e000000000000)].to_array().to_any()))?, ((if Any::<A>::to_boolean(_b5.clone()) { f64_any(0x4030000000000000) } else { f64_any(0x4031000000000000) }) + f64_any(0x4032000000000000))?, ((if Any::<A>::to_boolean(_b1.clone()) { f64_any(0x4033000000000000) } else { f64_any(0x4034000000000000) }).to_string().map(|v| v.to_any()))?, (<Any<A> as core::ops::Neg>::neg(if Any::<A>::to_boolean(_b5.clone()) { f64_any(0x4035000000000000) } else { f64_any(0x4036000000000000) }))?, if Any::<A>::to_boolean(if Any::<A>::to_boolean(_b5.clone()) { false.to_any() } else { true.to_any() }) { f64_any(0x4037000000000000) } else { f64_any(0x4038000000000000) }].to_array().to_any()
43    })].to_object().to_any())
44}