nanvm_harness/gen.fixtures/
string_from_char_code.rs1use nanvm_lib::vm::unstable::{
4 f64_any, spread_array, spread_item, static_read, strict_eq, string_any, string_key,
5};
6use nanvm_lib::vm::{Any, Array, IStaticFunction, Nullish, Object, ToAny, ToArray, ToObject};
7
8#[rustfmt::skip]
9#[allow(clippy::if_same_then_else)]
10pub fn module<A: IStaticFunction>(runtime: Any<A>) -> Result<Any<A>, Any<A>> {
11 let _b2: Any<A> = A::static_function(|_self, _args| {
12 let _b0: Any<A> = (static_read(&A::frame(_self)[0], "String.fromCharCode"))?;
13 Any::call(_b0.clone(), [f64_any(0x4014000000000000), f64_any(0x4018000000000000)].to_array().to_any())
14 }, 0, [runtime.clone()].to_array(), Some("()=>{const $0=String.fromCharCode;return $0(5,6);}")).to_any();
15 let _b4: Any<A> = (static_read(&runtime, "String.fromCharCode"))?;
16 let _b39: Any<A> = A::static_function(|_self, _args| { static_read(&A::frame(_self)[0], "String.fromCharCode") }, 0, [runtime.clone()].to_array(), Some("()=>String.fromCharCode")).to_any();
17 Ok([(string_key("default"), {
18 let _b8: Any<A> = [f64_any(0x0000000000000000), f64_any(0x40efffe000000000), f64_any(0x40f0041000000000), f64_any(0xbff0000000000000), f64_any(0xbff8000000000000), f64_any(0x405079999999999a), f64_any(0x7ff8000000000000), f64_any(0x7ff0000000000000), f64_any(0xfff0000000000000), f64_any(0x8000000000000000), f64_any(0x54b249ad2594c37d)].to_array().to_any();
19 [(Any::call(_b2.clone(), Array::default().to_any()))?, (Any::call(_b4.clone(), Array::default().to_any()))?, (Any::call(_b4.clone(), [f64_any(0x4014000000000000)].to_array().to_any()))?, (Any::call(_b4.clone(), [f64_any(0x4014000000000000), f64_any(0x4018000000000000), f64_any(0x401c000000000000)].to_array().to_any()))?, (Any::call(_b4.clone(), (spread_array([spread_item(_b8.clone())?]))?))?, (Any::dot(_b8.clone(), string_any("map")).end_call(&runtime, || Ok([A::static_function(|_self, _args| { Any::call(A::frame(_self)[0].clone(), [_args.argument(0)].to_array().to_any()) }, 1, [_b4.clone(), runtime.clone()].to_array(), Some("($1)=>$0($1)")).to_any()].to_array().to_any())))?, (Any::dot([Nullish::Undefined.to_any(), Nullish::Null.to_any(), true.to_any(), false.to_any(), string_any("65"), string_any(""), Array::default().to_any(), [f64_any(0x4050800000000000)].to_array().to_any(), Object::default().to_any(), A::static_function(|_self, _args| { Ok(f64_any(0x3ff0000000000000)) }, 0, [runtime.clone()].to_array(), Some("()=>1")).to_any(), [(string_key("valueOf"), A::static_function(|_self, _args| { Ok(f64_any(0x4050c00000000000)) }, 0, [runtime.clone()].to_array(), Some("()=>67")).to_any())].to_object().to_any(), [(string_key("valueOf"), A::static_function(|_self, _args| { Ok(Object::default().to_any()) }, 0, [runtime.clone()].to_array(), Some("()=>{return {};}")).to_any()), (string_key("toString"), A::static_function(|_self, _args| { Ok(string_any("68")) }, 0, [runtime.clone()].to_array(), Some("()=>\"68\"")).to_any())].to_object().to_any()].to_array().to_any(), string_any("map")).end_call(&runtime, || Ok([A::static_function(|_self, _args| { Any::call(A::frame(_self)[0].clone(), [_args.argument(0)].to_array().to_any()) }, 1, [_b4.clone(), runtime.clone()].to_array(), Some("($1)=>$0($1)")).to_any()].to_array().to_any())))?, (Any::call(_b4.clone(), [f64_any(0x40eb000000000000)].to_array().to_any()))?, (Any::call(_b4.clone(), [f64_any(0x40eb800000000000)].to_array().to_any()))?, (Any::call(_b4.clone(), [f64_any(0x40eb07a000000000), f64_any(0x40ebc00000000000)].to_array().to_any()))?, [(Any::dot(_b4.clone(), string_any("length")).end())?, (Any::dot((static_read(&runtime, "String.fromCharCode"))?, string_any("length")).end())?, (strict_eq(_b4.clone(), (Any::call(_b39.clone(), Array::default().to_any()))?))?, (strict_eq((Any::call(_b39.clone(), Array::default().to_any()))?, (Any::call(_b39.clone(), Array::default().to_any()))?))?, (Any::typeof_(_b4.clone()))?, (_b4.clone().to_string().map(|v| v.to_any()))?].to_array().to_any()].to_array().to_any()
20 })].to_object().to_any())
21}