1use nanvm_lib::vm::unstable::{f64_any, strict_eq, string_any, string_key};
4use nanvm_lib::vm::{Any, Array, IStaticFunction, Nullish, Object, 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| 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();
10 let _b2: Any<A> = [(string_key("x"), f64_any(0x3ff0000000000000)), (string_key("length"), f64_any(0x4008000000000000)), (string_key("u"), Nullish::Undefined.to_any())].to_object().to_any();
11 let _b41: Any<A> = A::static_function(|_self, _args| Any::has_entry(_args.argument(0), _args.argument(1)).map(|v| v.to_any()), 2, Array::default(), Some("($0,$1)=>{const $2=Object.getOwnPropertyDescriptor($0,$1);return $2?.enumerable===true;}")).to_any();
12 Ok([(string_key("default"), [(Any::call(_b0.clone(), [_b2.clone(), string_any("x")].to_array().to_any()))?, (Any::call(_b0.clone(), [_b2.clone(), string_any("length")].to_array().to_any()))?, (Any::call(_b0.clone(), [_b2.clone(), string_any("y")].to_array().to_any()))?, (Any::call(_b0.clone(), [_b2.clone(), string_any("u")].to_array().to_any()))?, (Any::call(_b0.clone(), [[f64_any(0x401c000000000000), f64_any(0x4020000000000000)].to_array().to_any(), f64_any(0x3ff0000000000000)].to_array().to_any()))?, (Any::call(_b0.clone(), [[f64_any(0x401c000000000000), f64_any(0x4020000000000000)].to_array().to_any(), string_any("1")].to_array().to_any()))?, (Any::call(_b0.clone(), [[f64_any(0x401c000000000000), f64_any(0x4020000000000000)].to_array().to_any(), string_any("01")].to_array().to_any()))?, (Any::call(_b0.clone(), [[f64_any(0x401c000000000000), f64_any(0x4020000000000000)].to_array().to_any(), string_any("length")].to_array().to_any()))?, (Any::call(_b0.clone(), [string_any("ab"), f64_any(0x0000000000000000)].to_array().to_any()))?, (Any::call(_b0.clone(), [string_any("ab"), string_any("length")].to_array().to_any()))?, (Any::call(_b0.clone(), [_b0.clone(), string_any("length")].to_array().to_any()))?, (Any::dot(_b0.clone(), string_any("length")).end())?, (Any::typeof_(_b0.clone()))?, (Any::call(_b0.clone(), [[(string_key("1"), f64_any(0x4022000000000000))].to_object().to_any(), f64_any(0x3ff0000000000000)].to_array().to_any()))?, (Any::call(_b0.clone(), [[(string_key("[object Object]"), f64_any(0x4014000000000000))].to_object().to_any(), Object::default().to_any()].to_array().to_any()))?, (Any::call(_b0.clone(), [f64_any(0x4014000000000000), string_any("x")].to_array().to_any()))?, (Any::dot([f64_any(0x4024000000000000), f64_any(0x4034000000000000)].to_array().to_any(), string_any("map")).end_call(&runtime, || Ok([_b0.clone()].to_array().to_any())))?, {
13 let _b28: Any<A> = (Any::call(_b0.clone(), [_b2.clone(), string_any("y")].to_array().to_any()))?;
14 if Any::<A>::to_boolean(if Any::<A>::to_boolean((strict_eq(_b28.clone(), Nullish::Null.to_any()))?) { true.to_any() } else { (strict_eq(_b28.clone(), Nullish::Undefined.to_any()))? }) { f64_any(0x0000000000000000) } else { _b28.clone() }
15 }, (Any::dot([string_any("x"), string_any("y"), string_any("length")].to_array().to_any(), string_any("map")).end_call(&runtime, || Ok([A::static_function(|_self, _args| { Any::call(A::frame(_self)[0].clone(), [A::frame(_self)[1].clone(), _args.argument(0)].to_array().to_any()) }, 1, [_b0.clone(), _b2.clone(), runtime.clone()].to_array(), Some("($2)=>$0($1,$2)")).to_any()].to_array().to_any())))?, (Any::call(_b41.clone(), [_b2.clone(), string_any("x")].to_array().to_any()))?, (Any::call(_b41.clone(), [_b2.clone(), string_any("u")].to_array().to_any()))?, (Any::call(_b41.clone(), [_b2.clone(), string_any("y")].to_array().to_any()))?, (Any::call(_b41.clone(), [[f64_any(0x401c000000000000), f64_any(0x4020000000000000)].to_array().to_any(), f64_any(0x3ff0000000000000)].to_array().to_any()))?, (Any::call(_b41.clone(), [[f64_any(0x401c000000000000), f64_any(0x4020000000000000)].to_array().to_any(), string_any("length")].to_array().to_any()))?, (Any::call(_b41.clone(), [string_any("ab"), string_any("1")].to_array().to_any()))?, (Any::call(_b41.clone(), [_b41.clone(), string_any("length")].to_array().to_any()))?, (Any::dot(_b41.clone(), string_any("length")).end())?, (Any::typeof_(_b41.clone()))?, (Any::call(_b41.clone(), [[(string_key("1"), f64_any(0x4022000000000000))].to_object().to_any(), f64_any(0x3ff0000000000000)].to_array().to_any()))?, (Any::call(_b41.clone(), [f64_any(0x4014000000000000), string_any("x")].to_array().to_any()))?, [if Any::<A>::to_boolean((Any::call(_b41.clone(), [_b2.clone(), string_any("z")].to_array().to_any()))?) { f64_any(0x3ff0000000000000) } else { f64_any(0x4000000000000000) }, (Any::call(_b0.clone(), [_b2.clone(), string_any("x")].to_array().to_any()))?].to_array().to_any()].to_array().to_any()), (string_key("entry"), _b0.clone()), (string_key("hasEntry"), _b41.clone())].to_object().to_any())
16}