porffor 0.24.5 → 0.24.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,12 @@
1
1
  import type {} from './porffor.d.ts';
2
2
 
3
+ export const Number = function (argument: any): any {
4
+ // todo: actually do prim objects
5
+ new.target; // trick compiler into allowing as constructor
6
+
7
+ return ecma262.ToNumeric(argument);
8
+ };
9
+
3
10
  // radix: number|any for rawType check
4
11
  export const __Number_prototype_toString = (_this: number, radix: number|any) => {
5
12
  let out: bytestring = Porffor.allocate();
@@ -526,7 +533,7 @@ export const parseInt = (input: any, radix: any): f64 => {
526
533
  // todo/perf: optimize this instead of doing a naive algo (https://kholdstare.github.io/technical/2020/05/26/faster-integer-parsing.html)
527
534
  // todo/perf: use i32s here once that becomes not annoying
528
535
 
529
- input = ecma262.ToString(input);
536
+ input = ecma262.ToString(input).trim();
530
537
 
531
538
  let defaultRadix: boolean = false;
532
539
  radix = ecma262.ToIntegerOrInfinity(radix);
@@ -536,22 +543,22 @@ export const parseInt = (input: any, radix: any): f64 => {
536
543
  }
537
544
  if (radix < 2 || radix > 36) return NaN;
538
545
 
539
- let nMax: f64 = 58;
546
+ let nMax: i32 = 58;
540
547
  if (radix < 10) nMax = 48 + radix;
541
548
 
542
549
  let n: f64 = NaN;
543
550
 
544
- const inputPtr: f64 = Porffor.wasm`local.get ${input}`;
545
- const len: f64 = Porffor.wasm.i32.load(inputPtr, 0, 0);
546
- let i: f64 = inputPtr;
551
+ const inputPtr: i32 = Porffor.wasm`local.get ${input}`;
552
+ const len: i32 = Porffor.wasm.i32.load(inputPtr, 0, 0);
553
+ let i: i32 = inputPtr;
547
554
 
548
555
  let negative: boolean = false;
549
556
 
550
557
  if (Porffor.rawType(input) == Porffor.TYPES.bytestring) {
551
- const endPtr: f64 = i + len;
558
+ const endPtr: i32 = i + len;
552
559
 
553
560
  // check start of string
554
- const startChr: f64 = Porffor.wasm.i32.load8_u(i, 0, 4);
561
+ const startChr: i32 = Porffor.wasm.i32.load8_u(i, 0, 4);
555
562
 
556
563
  // +, ignore
557
564
  if (startChr == 43) i++;
@@ -564,7 +571,7 @@ export const parseInt = (input: any, radix: any): f64 => {
564
571
 
565
572
  // 0, potential start of hex
566
573
  if ((defaultRadix || radix == 16) && startChr == 48) {
567
- const second: f64 = Porffor.wasm.i32.load8_u(i + 1, 0, 4);
574
+ const second: i32 = Porffor.wasm.i32.load8_u(i + 1, 0, 4);
568
575
  // 0x or 0X
569
576
  if (second == 120 || second == 88) {
570
577
  // set radix to 16 and skip leading 2 chars
@@ -574,24 +581,18 @@ export const parseInt = (input: any, radix: any): f64 => {
574
581
  }
575
582
 
576
583
  while (i < endPtr) {
577
- const chr: f64 = Porffor.wasm.i32.load8_u(i++, 0, 4);
584
+ const chr: i32 = Porffor.wasm.i32.load8_u(i++, 0, 4);
578
585
 
579
586
  if (chr >= 48 && chr < nMax) {
580
587
  if (Number.isNaN(n)) n = 0;
581
-
582
- n *= radix;
583
- n += chr - 48;
588
+ n = (n * radix) + chr - 48;
584
589
  } else if (radix > 10) {
585
590
  if (chr >= 97 && chr < (87 + radix)) {
586
591
  if (Number.isNaN(n)) n = 0;
587
-
588
- n *= radix;
589
- n += chr - 87;
592
+ n = (n * radix) + chr - 87;
590
593
  } else if (chr >= 65 && chr < (55 + radix)) {
591
594
  if (Number.isNaN(n)) n = 0;
592
-
593
- n *= radix;
594
- n += chr - 55;
595
+ n = (n * radix) + chr - 55;
595
596
  } else {
596
597
  break;
597
598
  }
@@ -604,10 +605,10 @@ export const parseInt = (input: any, radix: any): f64 => {
604
605
  return n;
605
606
  }
606
607
 
607
- const endPtr: f64 = i + len * 2;
608
+ const endPtr: i32 = i + len * 2;
608
609
 
609
610
  // check start of string
610
- const startChr: f64 = Porffor.wasm.i32.load16_u(i, 0, 4);
611
+ const startChr: i32 = Porffor.wasm.i32.load16_u(i, 0, 4);
611
612
 
612
613
  // +, ignore
613
614
  if (startChr == 43) i += 2;
@@ -620,7 +621,7 @@ export const parseInt = (input: any, radix: any): f64 => {
620
621
 
621
622
  // 0, potential start of hex
622
623
  if ((defaultRadix || radix == 16) && startChr == 48) {
623
- const second: f64 = Porffor.wasm.i32.load16_u(i + 2, 0, 4);
624
+ const second: i32 = Porffor.wasm.i32.load16_u(i + 2, 0, 4);
624
625
  // 0x or 0X
625
626
  if (second == 120 || second == 88) {
626
627
  // set radix to 16 and skip leading 2 chars
@@ -630,25 +631,19 @@ export const parseInt = (input: any, radix: any): f64 => {
630
631
  }
631
632
 
632
633
  while (i < endPtr) {
633
- const chr: f64 = Porffor.wasm.i32.load16_u(i, 0, 4);
634
+ const chr: i32 = Porffor.wasm.i32.load16_u(i, 0, 4);
634
635
  i += 2;
635
636
 
636
637
  if (chr >= 48 && chr < nMax) {
637
638
  if (Number.isNaN(n)) n = 0;
638
-
639
- n *= radix;
640
- n += chr - 48;
639
+ n = (n * radix) + chr - 48;
641
640
  } else if (radix > 10) {
642
641
  if (chr >= 97 && chr < (87 + radix)) {
643
642
  if (Number.isNaN(n)) n = 0;
644
-
645
- n *= radix;
646
- n += chr - 87;
643
+ n = (n * radix) + chr - 87;
647
644
  } else if (chr >= 65 && chr < (55 + radix)) {
648
645
  if (Number.isNaN(n)) n = 0;
649
-
650
- n *= radix;
651
- n += chr - 55;
646
+ n = (n * radix) + chr - 55;
652
647
  } else {
653
648
  break;
654
649
  }
@@ -663,30 +658,48 @@ export const parseInt = (input: any, radix: any): f64 => {
663
658
 
664
659
  export const __Number_parseInt = (input: any, radix: any): f64 => parseInt(input, radix);
665
660
 
666
- // export const parseFloat = (input: any): f64 => {
667
- // input = ecma262.ToString(input);
661
+ export const parseFloat = (input: any): f64 => {
662
+ // todo: handle exponents
663
+ input = ecma262.ToString(input).trim();
664
+
665
+ let n: f64 = NaN;
666
+ let dec: i32 = 0;
667
+ let negative: boolean = false;
668
668
 
669
- // let int: f64 = NaN, dec: f64 = 0;
670
- // let negative: boolean = false;
669
+ let i = 0;
670
+ const start: i32 = input.charCodeAt(0);
671
671
 
672
- // let i = 0;
673
- // const start: i32 = input.charCodeAt(0);
672
+ // +, ignore
673
+ if (start == 43) {
674
+ i++;
675
+ }
674
676
 
675
- // // +, ignore
676
- // if (start == 43) {
677
- // i++;
678
- // }
677
+ // -, negative
678
+ if (start == 45) {
679
+ i++;
680
+ negative = true;
681
+ }
679
682
 
680
- // // -, negative
681
- // if (start == 45) {
682
- // i++;
683
- // negative = true;
684
- // }
683
+ const len: i32 = input.length;
684
+ while (i < len) {
685
+ const chr: i32 = input.charCodeAt(i++);
685
686
 
686
- // const len: i32 = input.length;
687
- // while (i < len) {
687
+ if (chr >= 48 && chr <= 57) { // 0-9
688
+ if (Number.isNaN(n)) n = 0;
689
+ if (dec) {
690
+ dec *= 10;
691
+ n += (chr - 48) / dec;
692
+ } else n = (n * 10) + chr - 48;
693
+ } else if (chr == 46) { // .
694
+ if (dec) break;
695
+ dec = 1;
696
+ } else {
697
+ break;
698
+ }
699
+ }
688
700
 
689
- // }
701
+ if (negative) return -n;
702
+ return n;
703
+ };
690
704
 
691
- // if (!dec) return int;
692
- // };
705
+ export const __Number_parseFloat = (input: any): f64 => parseFloat(input);
@@ -82,6 +82,7 @@ declare global {
82
82
  ToIntegerOrInfinity(argument: unknown): number;
83
83
  ToString(argument: unknown): bytestring;
84
84
  ToNumber(argument: unknown): number;
85
+ ToNumeric(argument: unknown): number;
85
86
  ToPropertyKey(argument: unknown): any;
86
87
  }
87
88
 
@@ -0,0 +1,121 @@
1
+ export const __Porffor_stn_int = (str: unknown, radix: i32, i: i32): f64 => {
2
+ let nMax: i32 = 58;
3
+ if (radix < 10) nMax = 48 + radix;
4
+
5
+ let n: f64 = 0;
6
+
7
+ const len: i32 = str.length;
8
+ if (len - i == 0) return NaN;
9
+
10
+ while (i < len) {
11
+ const chr: i32 = str.charCodeAt(i++);
12
+
13
+ if (chr >= 48 && chr < nMax) {
14
+ n = (n * radix) + chr - 48;
15
+ } else if (radix > 10) {
16
+ if (chr >= 97 && chr < (87 + radix)) {
17
+ n = (n * radix) + chr - 87;
18
+ } else if (chr >= 65 && chr < (55 + radix)) {
19
+ n = (n * radix) + chr - 55;
20
+ } else {
21
+ return NaN;
22
+ }
23
+ } else {
24
+ return NaN;
25
+ }
26
+ }
27
+
28
+ return n;
29
+ };
30
+
31
+ export const __Porffor_stn_float = (str: unknown, i: i32): f64 => {
32
+ let n: f64 = 0;
33
+ let dec: i32 = 0;
34
+
35
+ const len: i32 = str.length;
36
+ if (len - i == 0) return NaN;
37
+
38
+ while (i < len) {
39
+ const chr: i32 = str.charCodeAt(i++);
40
+
41
+ if (chr >= 48 && chr <= 57) { // 0-9
42
+ if (dec) {
43
+ dec *= 10;
44
+ n += (chr - 48) / dec;
45
+ } else n = (n * 10) + chr - 48;
46
+ } else if (chr == 46) { // .
47
+ if (dec) return NaN;
48
+ dec = 1;
49
+ } else {
50
+ return NaN;
51
+ }
52
+ }
53
+
54
+ return n;
55
+ };
56
+
57
+ // 7.1.4.1.1 StringToNumber (str)
58
+ // https://tc39.es/ecma262/#sec-stringtonumber
59
+ export const __ecma262_StringToNumber = (str: unknown): number => {
60
+ // trim whitespace
61
+ str = str.trim();
62
+
63
+ // check 0x, 0o, 0b prefixes
64
+ const first: i32 = str.charCodeAt(0);
65
+ const second: i32 = str.charCodeAt(1);
66
+
67
+ if (first == 48) {
68
+ // starts with 0, check for prefixes
69
+
70
+ if (second == 120 || second == 88) { // 0x (hex)
71
+ return __Porffor_stn_int(str, 16, 2);
72
+ }
73
+
74
+ if (second == 111 || second == 79) { // 0o (octal)
75
+ return __Porffor_stn_int(str, 8, 2);
76
+ }
77
+
78
+ if (second == 98 || second == 66) { // 0b (binary)
79
+ return __Porffor_stn_int(str, 2, 2);
80
+ }
81
+ }
82
+
83
+ let i: i32 = 0;
84
+ let negative: boolean = false;
85
+
86
+ // +, skip char
87
+ if (first == 43) {
88
+ i = 1;
89
+ }
90
+
91
+ // -, set negative and skip char
92
+ if (first == 45) {
93
+ negative = true;
94
+ i = 1;
95
+ }
96
+
97
+ if (str.charCodeAt(i) == 73) {
98
+ // next char is 'I', likely 'Infinity' so check each char lol
99
+ if (
100
+ str.charCodeAt(i + 1) == 110 && // n
101
+ str.charCodeAt(i + 2) == 102 && // f
102
+ str.charCodeAt(i + 3) == 105 && // i
103
+ str.charCodeAt(i + 4) == 110 && // n
104
+ str.charCodeAt(i + 5) == 105 && // i
105
+ str.charCodeAt(i + 6) == 116 && // t
106
+ str.charCodeAt(i + 7) == 121 // y
107
+ ) {
108
+ // no way, it matched
109
+ let n: f64 = Infinity;
110
+ return negative ? -n : n;
111
+ }
112
+
113
+ return NaN;
114
+ }
115
+
116
+ // todo: handle exponents
117
+ const n: f64 = __Porffor_stn_float(str, i);
118
+
119
+ if (negative) return -n;
120
+ return n;
121
+ };
@@ -1,19 +1,12 @@
1
1
  // general widely used ecma262/spec functions
2
2
  import type {} from './porffor.d.ts';
3
3
 
4
- // 7.1.4.1.1 StringToNumber (str)
5
- // https://tc39.es/ecma262/#sec-stringtonumber
6
- export const __ecma262_StringToNumber = (str: unknown): number => {
7
- // nah.
8
- return NaN;
9
- };
10
-
11
4
  // 7.1.4 ToNumber (argument)
12
5
  // https://tc39.es/ecma262/#sec-tonumber
13
6
  export const __ecma262_ToNumber = (argument: unknown): number => {
14
7
  const t: i32 = Porffor.rawType(argument);
15
8
 
16
- // If argument is a Number, return argument.
9
+ // 1. If argument is a Number, return argument.
17
10
  if (t == Porffor.TYPES.number) return argument;
18
11
 
19
12
  // 2. If argument is either a Symbol or a BigInt, throw a TypeError exception.
@@ -51,6 +44,20 @@ export const __ecma262_ToNumber = (argument: unknown): number => {
51
44
  return NaN;
52
45
  };
53
46
 
47
+
48
+ // 7.1.3 ToNumeric (value)
49
+ // https://tc39.es/ecma262/#sec-tonumeric
50
+ export const __ecma262_ToNumeric = (value: unknown): number => {
51
+ // 1. Let primValue be ? ToPrimitive(value, number).
52
+ // we do not have ToPrimitive
53
+
54
+ // 2. If primValue is a BigInt, return primValue.
55
+ // todo: do this when we have bigints
56
+
57
+ // 3. Return ? ToNumber(primValue).
58
+ return __ecma262_ToNumber(value);
59
+ };
60
+
54
61
  // 7.1.5 ToIntegerOrInfinity (argument)
55
62
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
56
63
  export const __ecma262_ToIntegerOrInfinity = (argument: unknown): number => {
@@ -215,19 +215,6 @@ export const BuiltinFuncs = function() {
215
215
  };
216
216
  }
217
217
 
218
-
219
- // just echo given for now, for type constructors
220
- this.Number = {
221
- params: [ valtypeBinary ],
222
- locals: [],
223
- returns: [ valtypeBinary ],
224
- returnType: TYPES.number,
225
- wasm: [
226
- [ Opcodes.local_get, 0 ]
227
- ],
228
- constr: true
229
- };
230
-
231
218
  this.isNaN = {
232
219
  floatOnly: true,
233
220
  params: [ valtypeBinary ],
@@ -1647,6 +1647,13 @@ export const BuiltinFuncs = function() {
1647
1647
  returns: [124,127], typedReturns: 1,
1648
1648
  locals: [124,127,127], localNames: ["y","y#type","x","x#type","ratio","ratio#type","#last_type"],
1649
1649
  };
1650
+ this.Number = {
1651
+ wasm: (scope, {builtin}) => [[32,-1],[184],[65,2],[33,2],[26],[32,0],[32,1],[16, ...builtin('__ecma262_ToNumeric')],[34,2],[15]],
1652
+ params: [124,127], typedParams: 1,
1653
+ returns: [124,127], typedReturns: 1,
1654
+ locals: [127], localNames: ["argument","argument#type","#last_type"],
1655
+ constr: 1,
1656
+ };
1650
1657
  this.__Number_prototype_toString = {
1651
1658
  wasm: (scope, {allocPage,builtin,internalThrow}) => [[16, ...builtin('__Porffor_allocate')],[183],[34,4],[33,5],[32,0],[16, ...builtin('__Number_isFinite')],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,0],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],...number(allocPage(scope, 'bytestring: __Number_prototype_toString/out', 'i8') * pageSize, 124),[34,4],[65,195,1],[15],[11],[32,0],[68,0,0,0,0,0,0,240,127],[97],[4,64],[32,4],[252,3],[34,6],[65,8],[54,1,0],[32,6],[65,201,0],[58,0,4],[32,6],[65,238,0],[58,0,5],[32,6],[65,230,0],[58,0,6],[32,6],[65,233,0],[58,0,7],[32,6],[65,238,0],[58,0,8],[32,6],[65,233,0],[58,0,9],[32,6],[65,244,0],[58,0,10],[32,6],[65,249,0],[58,0,11],[32,6],[184],[34,4],[65,195,1],[15],[11],[32,4],[252,3],[34,6],[65,9],[54,1,0],[32,6],[65,45],[58,0,4],[32,6],[65,201,0],[58,0,5],[32,6],[65,238,0],[58,0,6],[32,6],[65,230,0],[58,0,7],[32,6],[65,233,0],[58,0,8],[32,6],[65,238,0],[58,0,9],[32,6],[65,233,0],[58,0,10],[32,6],[65,244,0],[58,0,11],[32,6],[65,249,0],[58,0,12],[32,6],[184],[34,4],[65,195,1],[15],[11],[32,2],[32,3],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,240,63],[98],[4,64],[68,0,0,0,0,0,0,36,64],[34,2],[65,1],[33,3],[26],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, ...builtin('f64_|')],[34,2],[65,1],[33,3],[26],[32,2],[68,0,0,0,0,0,0,0,64],[99],[34,7],[69],[4,127],[32,2],[68,0,0,0,0,0,0,66,64],[100],[65,2],[33,8],[5],[32,7],[65,2],[33,8],[11],[4,64],...internalThrow(scope, 'RangeError', `toString() radix argument must be between 2 and 36`),[11],[32,0],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,4],[252,3],[34,6],[65,1],[54,1,0],[32,6],[65,48],[58,0,4],[32,6],[184],[34,4],[65,195,1],[15],[11],[32,0],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,0],[154],[33,0],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,45],[58,0,4],[11],[32,0],[16, ...builtin('__Math_trunc')],[33,9],...number(allocPage(scope, 'bytestring: __Number_prototype_toString/digits', 'i8') * pageSize, 124),[33,10],[68,0,0,0,0,0,0,0,0],[33,11],[32,2],[68,0,0,0,0,0,0,36,64],[97],[4,64],[32,9],[68,80,239,226,214,228,26,75,68],[102],[4,64],[68,0,0,0,0,0,0,240,63],[33,12],[68,0,0,0,0,0,0,240,191],[33,13],[3,64],[32,9],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,9],[32,2],[16, ...builtin('f64_%')],[33,14],[32,9],[32,2],[163],[16, ...builtin('__Math_trunc')],[33,9],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[32,12],[252,3],[4,64],[32,14],[68,0,0,0,0,0,0,0,0],[97],[4,64],[12,3],[11],[68,0,0,0,0,0,0,0,0],[33,12],[11],[32,10],[32,11],[160],[252,2],[32,14],[252,2],[58,0,4],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[12,1],[11],[11],[32,10],[32,11],[160],[33,15],[32,5],[32,11],[160],[33,16],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,17],[3,64],[32,5],[32,16],[99],[4,64],[32,5],[32,17],[97],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,46],[58,0,4],[32,16],[68,0,0,0,0,0,0,240,63],[160],[33,16],[11],[32,15],[68,0,0,0,0,0,0,240,63],[161],[34,15],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,14],[68,0,0,0,0,0,0,72,64],[160],[33,14],[5],[32,14],[68,0,0,0,0,0,192,85,64],[160],[33,14],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,14],[252,2],[58,0,4],[12,1],[11],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,229,0],[58,0,4],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,43],[58,0,4],[68,0,0,0,0,0,0,0,0],[33,11],[3,64],[32,13],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,10],[32,11],[160],[252,2],[32,13],[32,2],[16, ...builtin('f64_%')],[252,2],[58,0,4],[32,13],[32,2],[163],[16, ...builtin('__Math_trunc')],[33,13],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[12,1],[11],[11],[32,10],[32,11],[160],[33,15],[32,5],[32,11],[160],[33,16],[3,64],[32,5],[32,16],[99],[4,64],[32,15],[68,0,0,0,0,0,0,240,63],[161],[34,15],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,14],[68,0,0,0,0,0,0,72,64],[160],[33,14],[5],[32,14],[68,0,0,0,0,0,192,85,64],[160],[33,14],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,14],[252,2],[58,0,4],[12,1],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,18],[252,3],[54,1,0],[32,4],[65,195,1],[15],[11],[32,0],[68,141,237,181,160,247,198,176,62],[99],[4,64],[32,0],[33,19],[68,0,0,0,0,0,0,240,63],[33,13],[3,64],[65,1],[4,64],[32,19],[32,2],[162],[34,19],[16, ...builtin('__Math_trunc')],[34,20],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,19],[32,20],[161],[68,187,189,215,217,223,124,219,61],[99],[4,64],[12,2],[11],[5],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[11],[12,1],[11],[11],[3,64],[32,19],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,19],[32,2],[16, ...builtin('f64_%')],[33,14],[32,19],[32,2],[163],[16, ...builtin('__Math_trunc')],[33,19],[32,10],[32,11],[160],[252,2],[32,14],[252,2],[58,0,4],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[12,1],[11],[11],[32,10],[32,11],[160],[33,15],[32,5],[32,11],[160],[33,16],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,17],[3,64],[32,5],[32,16],[99],[4,64],[32,15],[68,0,0,0,0,0,0,240,63],[161],[34,15],[252,2],[45,0,4],[183],[33,14],[32,5],[32,17],[97],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,46],[58,0,4],[32,16],[68,0,0,0,0,0,0,240,63],[160],[33,16],[11],[32,14],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,14],[68,0,0,0,0,0,0,72,64],[160],[33,14],[5],[32,14],[68,0,0,0,0,0,192,85,64],[160],[33,14],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,14],[252,2],[58,0,4],[12,1],[11],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,229,0],[58,0,4],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,45],[58,0,4],[68,0,0,0,0,0,0,0,0],[33,11],[3,64],[32,13],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,10],[32,11],[160],[252,2],[32,13],[32,2],[16, ...builtin('f64_%')],[252,2],[58,0,4],[32,13],[32,2],[163],[16, ...builtin('__Math_trunc')],[33,13],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[12,1],[11],[11],[32,10],[32,11],[160],[33,15],[32,5],[32,11],[160],[33,16],[3,64],[32,5],[32,16],[99],[4,64],[32,15],[68,0,0,0,0,0,0,240,63],[161],[34,15],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,14],[68,0,0,0,0,0,0,72,64],[160],[33,14],[5],[32,14],[68,0,0,0,0,0,192,85,64],[160],[33,14],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,14],[252,2],[58,0,4],[12,1],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,18],[252,3],[54,1,0],[32,4],[65,195,1],[15],[11],[11],[32,9],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,10],[252,2],[65,0],[58,0,4],[68,0,0,0,0,0,0,240,63],[33,11],[5],[3,64],[32,9],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,10],[32,11],[160],[252,2],[32,9],[32,2],[16, ...builtin('f64_%')],[252,2],[58,0,4],[32,9],[32,2],[163],[16, ...builtin('__Math_trunc')],[33,9],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[12,1],[11],[11],[11],[32,10],[32,11],[160],[33,15],[32,5],[32,11],[160],[33,16],[3,64],[32,5],[32,16],[99],[4,64],[32,15],[68,0,0,0,0,0,0,240,63],[161],[34,15],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,14],[68,0,0,0,0,0,0,72,64],[160],[33,14],[5],[32,14],[68,0,0,0,0,0,192,85,64],[160],[33,14],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,14],[252,2],[58,0,4],[12,1],[11],[11],[32,0],[32,0],[16, ...builtin('__Math_trunc')],[161],[34,19],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,46],[58,0,4],[32,19],[68,0,0,0,0,0,0,240,63],[160],[33,19],[68,0,0,0,0,0,0,48,64],[32,11],[161],[33,21],[68,0,0,0,0,0,0,0,0],[33,22],[3,64],[32,22],[32,21],[99],[4,64],[32,19],[32,2],[162],[33,19],[32,22],[68,0,0,0,0,0,0,240,63],[160],[33,22],[12,1],[11],[11],[32,19],[16, ...builtin('__Math_round')],[33,19],[68,0,0,0,0,0,0,0,0],[33,11],[68,0,0,0,0,0,0,240,63],[33,12],[3,64],[32,19],[68,0,0,0,0,0,0,240,63],[100],[4,64],[32,19],[32,2],[16, ...builtin('f64_%')],[33,14],[32,19],[32,2],[163],[16, ...builtin('__Math_trunc')],[33,19],[32,12],[252,3],[4,64],[32,14],[68,0,0,0,0,0,0,0,0],[97],[4,64],[12,3],[11],[68,0,0,0,0,0,0,0,0],[33,12],[11],[32,10],[32,11],[160],[252,2],[32,14],[252,2],[58,0,4],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[12,1],[11],[11],[32,10],[32,11],[160],[33,15],[32,5],[32,11],[160],[33,16],[3,64],[32,5],[32,16],[99],[4,64],[32,15],[68,0,0,0,0,0,0,240,63],[161],[34,15],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,14],[68,0,0,0,0,0,0,72,64],[160],[33,14],[5],[32,14],[68,0,0,0,0,0,192,85,64],[160],[33,14],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,14],[252,2],[58,0,4],[12,1],[11],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,18],[252,3],[54,1,0],[32,4],[65,195,1],[15]],
1652
1659
  params: [124,127,124,127], typedParams: 1,
@@ -1681,10 +1688,10 @@ export const BuiltinFuncs = function() {
1681
1688
  locals: [], localNames: ["_this","_this#type"],
1682
1689
  };
1683
1690
  this.parseInt = {
1684
- wasm: (scope, {builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_ToString')],[33,1],[33,0],[68,0,0,0,0,0,0,0,0],[33,5],[32,2],[32,3],[16, ...builtin('__ecma262_ToIntegerOrInfinity')],[33,3],[34,2],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,5],[68,0,0,0,0,0,0,36,64],[34,2],[65,1],[33,3],[26],[11],[32,2],[68,0,0,0,0,0,0,0,64],[99],[34,6],[69],[4,127],[32,2],[68,0,0,0,0,0,0,66,64],[100],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[68,0,0,0,0,0,0,77,64],[33,7],[32,2],[68,0,0,0,0,0,0,36,64],[99],[4,64],[68,0,0,0,0,0,0,72,64],[32,2],[160],[33,7],[11],[68,0,0,0,0,0,0,248,127],[33,8],[32,0],[34,9],[252,2],[40,0,0],[183],[33,10],[32,9],[33,11],[68,0,0,0,0,0,0,0,0],[33,12],[32,0],[32,1],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,96,104,64],[97],[4,64],[32,11],[32,10],[160],[33,13],[32,11],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[11],[32,14],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,12],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[11],[32,5],[34,15],[68,0,0,0,0,0,0,0,0],[97],[4,124],[32,2],[68,0,0,0,0,0,0,48,64],[97],[184],[65,2],[33,4],[5],[32,15],[65,2],[33,4],[11],[34,15],[33,16],[32,4],[33,17],[2,127],[32,17],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,17],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,16],[252,3],[11,"TYPESWITCH_end"],[4,124],[32,14],[68,0,0,0,0,0,0,72,64],[97],[184],[65,2],[33,4],[5],[32,15],[32,4],[33,4],[11],[33,16],[32,4],[33,17],[2,127],[32,17],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,17],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,16],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,11],[68,0,0,0,0,0,0,240,63],[160],[252,2],[45,0,4],[183],[34,18],[68,0,0,0,0,0,0,94,64],[97],[34,6],[69],[4,127],[32,18],[68,0,0,0,0,0,0,86,64],[97],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,11],[68,0,0,0,0,0,0,0,64],[160],[33,11],[68,0,0,0,0,0,0,48,64],[34,2],[65,1],[33,3],[26],[11],[11],[3,64],[32,11],[32,13],[99],[4,64],[32,11],[32,11],[68,0,0,0,0,0,0,240,63],[160],[33,11],[252,2],[45,0,4],[183],[34,19],[68,0,0,0,0,0,0,72,64],[102],[34,6],[4,127],[32,19],[32,7],[99],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,8],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,8],[11],[32,8],[32,2],[162],[34,8],[32,19],[68,0,0,0,0,0,0,72,64],[161],[160],[33,8],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,19],[68,0,0,0,0,0,64,88,64],[102],[34,6],[4,127],[32,19],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,8],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,8],[11],[32,8],[32,2],[162],[34,8],[32,19],[68,0,0,0,0,0,192,85,64],[161],[160],[33,8],[5],[32,19],[68,0,0,0,0,0,64,80,64],[102],[34,6],[4,127],[32,19],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,8],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,8],[11],[32,8],[32,2],[162],[34,8],[32,19],[68,0,0,0,0,0,128,75,64],[161],[160],[33,8],[5],[12,4],[11],[11],[5],[12,2],[11],[11],[12,1],[11],[11],[32,12],[252,3],[4,64],[32,8],[154],[65,1],[15],[11],[32,8],[65,1],[15],[11],[32,11],[32,10],[68,0,0,0,0,0,0,0,64],[162],[160],[33,13],[32,11],[252,2],[47,0,4],[183],[34,14],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,11],[68,0,0,0,0,0,0,0,64],[160],[33,11],[11],[32,14],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,12],[32,11],[68,0,0,0,0,0,0,0,64],[160],[33,11],[11],[32,5],[34,15],[68,0,0,0,0,0,0,0,0],[97],[4,124],[32,2],[68,0,0,0,0,0,0,48,64],[97],[184],[65,2],[33,4],[5],[32,15],[65,2],[33,4],[11],[34,15],[33,16],[32,4],[33,17],[2,127],[32,17],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,17],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,16],[252,3],[11,"TYPESWITCH_end"],[4,124],[32,14],[68,0,0,0,0,0,0,72,64],[97],[184],[65,2],[33,4],[5],[32,15],[32,4],[33,4],[11],[33,16],[32,4],[33,17],[2,127],[32,17],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,17],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,16],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,11],[68,0,0,0,0,0,0,0,64],[160],[252,2],[47,0,4],[183],[34,18],[68,0,0,0,0,0,0,94,64],[97],[34,6],[69],[4,127],[32,18],[68,0,0,0,0,0,0,86,64],[97],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,11],[68,0,0,0,0,0,0,16,64],[160],[33,11],[68,0,0,0,0,0,0,48,64],[34,2],[65,1],[33,3],[26],[11],[11],[3,64],[32,11],[32,13],[99],[4,64],[32,11],[252,2],[47,0,4],[183],[33,19],[32,11],[68,0,0,0,0,0,0,0,64],[160],[33,11],[32,19],[68,0,0,0,0,0,0,72,64],[102],[34,6],[4,127],[32,19],[32,7],[99],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,8],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,8],[11],[32,8],[32,2],[162],[34,8],[32,19],[68,0,0,0,0,0,0,72,64],[161],[160],[33,8],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,19],[68,0,0,0,0,0,64,88,64],[102],[34,6],[4,127],[32,19],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,8],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,8],[11],[32,8],[32,2],[162],[34,8],[32,19],[68,0,0,0,0,0,192,85,64],[161],[160],[33,8],[5],[32,19],[68,0,0,0,0,0,64,80,64],[102],[34,6],[4,127],[32,19],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,6],[65,2],[33,4],[11],[4,64],[32,8],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,8],[11],[32,8],[32,2],[162],[34,8],[32,19],[68,0,0,0,0,0,128,75,64],[161],[160],[33,8],[5],[12,4],[11],[11],[5],[12,2],[11],[11],[12,1],[11],[11],[32,12],[252,3],[4,64],[32,8],[154],[65,1],[15],[11],[32,8],[65,1],[15]],
1691
+ wasm: (scope, {builtin,internalThrow}) => [[32,0],[32,1],[16, ...builtin('__ecma262_ToString')],[33,4],[33,5],[32,4],[34,6],[33,7],[2,124],[32,7],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,2],[32,6],[16, ...builtin('__String_prototype_trim')],[33,4],[183],[12,1],[11],[32,7],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,2],[32,6],[16, ...builtin('__ByteString_prototype_trim')],[33,4],[183],[12,1],[11],...internalThrow(scope, 'TypeError', `'trim' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,0],[32,4],[33,1],[26],[68,0,0,0,0,0,0,0,0],[33,8],[32,2],[32,3],[16, ...builtin('__ecma262_ToIntegerOrInfinity')],[33,3],[34,2],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,8],[68,0,0,0,0,0,0,36,64],[34,2],[65,1],[33,3],[26],[11],[32,2],[68,0,0,0,0,0,0,0,64],[99],[34,9],[69],[4,127],[32,2],[68,0,0,0,0,0,0,66,64],[100],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[68,0,0,0,0,0,0,77,64],[33,10],[32,2],[68,0,0,0,0,0,0,36,64],[99],[4,64],[68,0,0,0,0,0,0,72,64],[32,2],[160],[33,10],[11],[68,0,0,0,0,0,0,248,127],[33,11],[32,0],[34,12],[252,2],[40,0,0],[183],[33,13],[32,12],[33,14],[68,0,0,0,0,0,0,0,0],[33,15],[32,0],[32,1],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,96,104,64],[97],[4,64],[32,14],[32,13],[160],[33,16],[32,14],[252,2],[45,0,4],[183],[34,17],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[11],[32,17],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[11],[32,8],[34,18],[68,0,0,0,0,0,0,0,0],[97],[4,124],[32,2],[68,0,0,0,0,0,0,48,64],[97],[184],[65,2],[33,4],[5],[32,18],[65,2],[33,4],[11],[34,18],[33,19],[32,4],[33,7],[2,127],[32,7],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,7],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,19],[252,3],[11,"TYPESWITCH_end"],[4,124],[32,17],[68,0,0,0,0,0,0,72,64],[97],[184],[65,2],[33,4],[5],[32,18],[32,4],[33,4],[11],[33,19],[32,4],[33,7],[2,127],[32,7],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,7],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,19],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,14],[68,0,0,0,0,0,0,240,63],[160],[252,2],[45,0,4],[183],[34,20],[68,0,0,0,0,0,0,94,64],[97],[34,9],[69],[4,127],[32,20],[68,0,0,0,0,0,0,86,64],[97],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,14],[68,0,0,0,0,0,0,0,64],[160],[33,14],[68,0,0,0,0,0,0,48,64],[34,2],[65,1],[33,3],[26],[11],[11],[3,64],[32,14],[32,16],[99],[4,64],[32,14],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[252,2],[45,0,4],[183],[34,21],[68,0,0,0,0,0,0,72,64],[102],[34,9],[4,127],[32,21],[32,10],[99],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,11],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,11],[11],[32,11],[32,2],[162],[32,21],[160],[68,0,0,0,0,0,0,72,64],[161],[33,11],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,21],[68,0,0,0,0,0,64,88,64],[102],[34,9],[4,127],[32,21],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,11],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,11],[11],[32,11],[32,2],[162],[32,21],[160],[68,0,0,0,0,0,192,85,64],[161],[33,11],[5],[32,21],[68,0,0,0,0,0,64,80,64],[102],[34,9],[4,127],[32,21],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,11],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,11],[11],[32,11],[32,2],[162],[32,21],[160],[68,0,0,0,0,0,128,75,64],[161],[33,11],[5],[12,4],[11],[11],[5],[12,2],[11],[11],[12,1],[11],[11],[32,15],[252,3],[4,64],[32,11],[154],[65,1],[15],[11],[32,11],[65,1],[15],[11],[32,14],[32,13],[68,0,0,0,0,0,0,0,64],[162],[160],[33,16],[32,14],[252,2],[47,0,4],[183],[34,17],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,14],[68,0,0,0,0,0,0,0,64],[160],[33,14],[11],[32,17],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[32,14],[68,0,0,0,0,0,0,0,64],[160],[33,14],[11],[32,8],[34,18],[68,0,0,0,0,0,0,0,0],[97],[4,124],[32,2],[68,0,0,0,0,0,0,48,64],[97],[184],[65,2],[33,4],[5],[32,18],[65,2],[33,4],[11],[34,18],[33,19],[32,4],[33,7],[2,127],[32,7],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,7],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,19],[252,3],[11,"TYPESWITCH_end"],[4,124],[32,17],[68,0,0,0,0,0,0,72,64],[97],[184],[65,2],[33,4],[5],[32,18],[32,4],[33,4],[11],[33,19],[32,4],[33,7],[2,127],[32,7],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,7],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,19],[252,3],[40,1,0],[12,1],[11],[32,19],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,14],[68,0,0,0,0,0,0,0,64],[160],[252,2],[47,0,4],[183],[34,20],[68,0,0,0,0,0,0,94,64],[97],[34,9],[69],[4,127],[32,20],[68,0,0,0,0,0,0,86,64],[97],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,14],[68,0,0,0,0,0,0,16,64],[160],[33,14],[68,0,0,0,0,0,0,48,64],[34,2],[65,1],[33,3],[26],[11],[11],[3,64],[32,14],[32,16],[99],[4,64],[32,14],[252,2],[47,0,4],[183],[33,21],[32,14],[68,0,0,0,0,0,0,0,64],[160],[33,14],[32,21],[68,0,0,0,0,0,0,72,64],[102],[34,9],[4,127],[32,21],[32,10],[99],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,11],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,11],[11],[32,11],[32,2],[162],[32,21],[160],[68,0,0,0,0,0,0,72,64],[161],[33,11],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,21],[68,0,0,0,0,0,64,88,64],[102],[34,9],[4,127],[32,21],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,11],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,11],[11],[32,11],[32,2],[162],[32,21],[160],[68,0,0,0,0,0,192,85,64],[161],[33,11],[5],[32,21],[68,0,0,0,0,0,64,80,64],[102],[34,9],[4,127],[32,21],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,2],[33,4],[5],[32,9],[65,2],[33,4],[11],[4,64],[32,11],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,11],[11],[32,11],[32,2],[162],[32,21],[160],[68,0,0,0,0,0,128,75,64],[161],[33,11],[5],[12,4],[11],[11],[5],[12,2],[11],[11],[12,1],[11],[11],[32,15],[252,3],[4,64],[32,11],[154],[65,1],[15],[11],[32,11],[65,1],[15]],
1685
1692
  params: [124,127,124,127], typedParams: 1,
1686
1693
  returns: [124,127], typedReturns: 1,
1687
- locals: [127,124,127,124,124,124,124,124,124,124,124,124,124,127,124,124], localNames: ["input","input#type","radix","radix#type","#last_type","defaultRadix","logictmpi","nMax","n","inputPtr","len","i","negative","endPtr","startChr","logictmp","#logicinner_tmp","#typeswitch_tmp","second","chr"],
1694
+ locals: [127,124,127,127,124,127,124,124,124,124,124,124,124,124,124,124,124,124], localNames: ["input","input#type","radix","radix#type","#last_type","#proto_target","#proto_target#type","#typeswitch_tmp","defaultRadix","logictmpi","nMax","n","inputPtr","len","i","negative","endPtr","startChr","logictmp","#logicinner_tmp","second","chr"],
1688
1695
  };
1689
1696
  this.__Number_parseInt = {
1690
1697
  wasm: (scope, {builtin}) => [[32,0],[32,1],[32,2],[32,3],[16, ...builtin('parseInt')],[34,4],[15]],
@@ -1692,6 +1699,18 @@ export const BuiltinFuncs = function() {
1692
1699
  returns: [124,127], typedReturns: 1,
1693
1700
  locals: [127], localNames: ["input","input#type","radix","radix#type","#last_type"],
1694
1701
  };
1702
+ this.parseFloat = {
1703
+ wasm: (scope, {builtin,internalThrow}) => [[32,0],[32,1],[16, ...builtin('__ecma262_ToString')],[33,2],[33,3],[32,2],[34,4],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,3],[252,2],[32,4],[16, ...builtin('__String_prototype_trim')],[33,2],[183],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,3],[252,2],[32,4],[16, ...builtin('__ByteString_prototype_trim')],[33,2],[183],[12,1],[11],...internalThrow(scope, 'TypeError', `'trim' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,0],[32,2],[33,1],[26],[68,0,0,0,0,0,0,248,127],[33,6],[68,0,0,0,0,0,0,0,0],[33,7],[68,0,0,0,0,0,0,0,0],[33,8],[68,0,0,0,0,0,0,0,0],[33,9],[65,1],[33,10],[32,0],[252,3],[34,13],[40,1,0],[33,12],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[65,0],[34,14],[32,12],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,14],[65,2],[108],[32,13],[106],[47,0,4],[184],[65,1],[33,2],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[65,0],[34,14],[32,12],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,14],[32,13],[106],[45,0,4],[184],[65,1],[33,2],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,11],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,9],[68,0,0,0,0,0,0,240,63],[160],[33,9],[11],[32,11],[68,0,0,0,0,0,128,70,64],[97],[4,64],[32,9],[68,0,0,0,0,0,0,240,63],[160],[33,9],[68,0,0,0,0,0,0,240,63],[33,8],[11],[32,0],[252,3],[40,1,0],[184],[33,15],[3,64],[32,9],[32,15],[99],[4,64],[32,0],[252,3],[34,13],[40,1,0],[33,12],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,9],[32,9],[68,0,0,0,0,0,0,240,63],[160],[33,9],[252,2],[34,14],[32,12],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,14],[65,2],[108],[32,13],[106],[47,0,4],[184],[65,1],[33,2],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,9],[32,9],[68,0,0,0,0,0,0,240,63],[160],[33,9],[252,2],[34,14],[32,12],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,14],[32,13],[106],[45,0,4],[184],[65,1],[33,2],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,16],[68,0,0,0,0,0,0,72,64],[102],[34,17],[4,127],[32,16],[68,0,0,0,0,0,128,76,64],[101],[65,2],[33,2],[5],[32,17],[65,2],[33,2],[11],[4,64],[32,6],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,6],[11],[32,7],[252,3],[4,64],[32,7],[68,0,0,0,0,0,0,36,64],[162],[33,7],[32,6],[32,16],[68,0,0,0,0,0,0,72,64],[161],[32,7],[163],[160],[33,6],[5],[32,6],[68,0,0,0,0,0,0,36,64],[162],[32,16],[160],[68,0,0,0,0,0,0,72,64],[161],[33,6],[11],[5],[32,16],[68,0,0,0,0,0,0,71,64],[97],[4,64],[32,7],[252,3],[4,64],[12,3],[11],[68,0,0,0,0,0,0,240,63],[33,7],[5],[12,2],[11],[11],[12,1],[11],[11],[32,8],[252,3],[4,64],[32,6],[154],[65,1],[15],[11],[32,6],[65,1],[15]],
1704
+ params: [124,127], typedParams: 1,
1705
+ returns: [124,127], typedReturns: 1,
1706
+ locals: [127,124,127,127,124,124,124,124,127,124,127,127,127,124,124,127], localNames: ["input","input#type","#last_type","#proto_target","#proto_target#type","#typeswitch_tmp","n","dec","negative","i","i#type","start","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","len","chr","logictmpi"],
1707
+ };
1708
+ this.__Number_parseFloat = {
1709
+ wasm: (scope, {builtin}) => [[32,0],[32,1],[16, ...builtin('parseFloat')],[34,2],[15]],
1710
+ params: [124,127], typedParams: 1,
1711
+ returns: [124,127], typedReturns: 1,
1712
+ locals: [127], localNames: ["input","input#type","#last_type"],
1713
+ };
1695
1714
  this.Object = {
1696
1715
  wasm: (scope, {builtin}) => [[32,-1],[184],[26],[32,0],[33,3],[32,1],[33,4],[2,127],[32,4],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,3],[68,0,0,0,0,0,0,0,0],[97],[12,1],[11],[32,4],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],[16, ...builtin('__Porffor_allocate')],[183],[34,5],[65,7],[15],[11],[32,0],[32,1],[15]],
1697
1716
  params: [124,127], typedParams: 1,
@@ -2369,6 +2388,24 @@ export const BuiltinFuncs = function() {
2369
2388
  locals: [124,124,124,124,124,124,124,124,127,127,127,127,124], localNames: ["codes","codes#type","out","len","__length_setter_tmp","bytestringable","i","v","#member_obj","#member_prop","#loadArray_offset","#last_type","#member_allocd","#swap","out2"],
2370
2389
  hasRestArgument: 1,
2371
2390
  };
2391
+ this.__Porffor_stn_int = {
2392
+ wasm: (scope, {internalThrow}) => [[68,0,0,0,0,0,0,77,64],[33,6],[32,2],[68,0,0,0,0,0,0,36,64],[99],[4,64],[68,0,0,0,0,0,0,72,64],[32,2],[160],[33,6],[11],[68,0,0,0,0,0,0,0,0],[33,7],[32,0],[252,3],[40,1,0],[184],[34,8],[32,4],[161],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[3,64],[32,4],[32,8],[99],[4,64],[32,0],[252,3],[34,11],[40,1,0],[33,10],[32,1],[33,14],[2,124],[32,14],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,2],[34,12],[32,10],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,12],[65,2],[108],[32,11],[106],[47,0,4],[184],[65,1],[33,13],[11],[12,1],[11],[32,14],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,2],[34,12],[32,10],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,12],[32,11],[106],[45,0,4],[184],[65,1],[33,13],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,9],[68,0,0,0,0,0,0,72,64],[102],[34,15],[4,127],[32,9],[32,6],[99],[65,2],[33,13],[5],[32,15],[65,2],[33,13],[11],[4,64],[32,7],[32,2],[162],[32,9],[160],[68,0,0,0,0,0,0,72,64],[161],[33,7],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,9],[68,0,0,0,0,0,64,88,64],[102],[34,15],[4,127],[32,9],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,2],[33,13],[5],[32,15],[65,2],[33,13],[11],[4,64],[32,7],[32,2],[162],[32,9],[160],[68,0,0,0,0,0,192,85,64],[161],[33,7],[5],[32,9],[68,0,0,0,0,0,64,80,64],[102],[34,15],[4,127],[32,9],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,2],[33,13],[5],[32,15],[65,2],[33,13],[11],[4,64],[32,7],[32,2],[162],[32,9],[160],[68,0,0,0,0,0,128,75,64],[161],[33,7],[5],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[11],[5],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[11],[12,1],[11],[11],[32,7],[65,1],[15]],
2393
+ params: [124,127,124,127,124,127], typedParams: 1,
2394
+ returns: [124,127], typedReturns: 1,
2395
+ locals: [124,124,124,124,127,127,127,127,127,127], localNames: ["str","str#type","radix","radix#type","i","i#type","nMax","n","len","chr","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","#last_type","#typeswitch_tmp","logictmpi"],
2396
+ };
2397
+ this.__Porffor_stn_float = {
2398
+ wasm: (scope, {internalThrow}) => [[68,0,0,0,0,0,0,0,0],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[32,0],[252,3],[40,1,0],[184],[34,6],[32,2],[161],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[3,64],[32,2],[32,6],[99],[4,64],[32,0],[252,3],[34,9],[40,1,0],[33,8],[32,1],[33,12],[2,124],[32,12],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,2],[34,10],[32,8],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,10],[65,2],[108],[32,9],[106],[47,0,4],[184],[65,1],[33,11],[11],[12,1],[11],[32,12],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,2],[34,10],[32,8],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,10],[32,9],[106],[45,0,4],[184],[65,1],[33,11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,7],[68,0,0,0,0,0,0,72,64],[102],[34,13],[4,127],[32,7],[68,0,0,0,0,0,128,76,64],[101],[65,2],[33,11],[5],[32,13],[65,2],[33,11],[11],[4,64],[32,5],[252,3],[4,64],[32,5],[68,0,0,0,0,0,0,36,64],[162],[33,5],[32,4],[32,7],[68,0,0,0,0,0,0,72,64],[161],[32,5],[163],[160],[33,4],[5],[32,4],[68,0,0,0,0,0,0,36,64],[162],[32,7],[160],[68,0,0,0,0,0,0,72,64],[161],[33,4],[11],[5],[32,7],[68,0,0,0,0,0,0,71,64],[97],[4,64],[32,5],[252,3],[4,64],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[68,0,0,0,0,0,0,240,63],[33,5],[5],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[11],[12,1],[11],[11],[32,4],[65,1],[15]],
2399
+ params: [124,127,124,127], typedParams: 1,
2400
+ returns: [124,127], typedReturns: 1,
2401
+ locals: [124,124,124,124,127,127,127,127,127,127], localNames: ["str","str#type","i","i#type","n","dec","len","chr","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","#last_type","#typeswitch_tmp","logictmpi"],
2402
+ };
2403
+ this.__ecma262_StringToNumber = {
2404
+ wasm: (scope, {builtin,internalThrow}) => [[32,0],[33,2],[32,1],[34,3],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,2],[252,2],[32,3],[16, ...builtin('__String_prototype_trim')],[33,4],[183],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,2],[252,2],[32,3],[16, ...builtin('__ByteString_prototype_trim')],[33,4],[183],[12,1],[11],...internalThrow(scope, 'TypeError', `'trim' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[34,0],[32,4],[33,1],[26],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[65,0],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[65,0],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[33,6],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[65,1],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[65,1],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[33,10],[32,6],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,94,64],[97],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,86,64],[97],[65,2],[33,4],[5],[32,11],[65,2],[33,4],[11],[4,64],[32,0],[32,1],[68,0,0,0,0,0,0,48,64],[65,1],[68,0,0,0,0,0,0,0,64],[65,1],[16, ...builtin('__Porffor_stn_int')],[34,4],[15],[11],[32,10],[68,0,0,0,0,0,192,91,64],[97],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,192,83,64],[97],[65,2],[33,4],[5],[32,11],[65,2],[33,4],[11],[4,64],[32,0],[32,1],[68,0,0,0,0,0,0,32,64],[65,1],[68,0,0,0,0,0,0,0,64],[65,1],[16, ...builtin('__Porffor_stn_int')],[34,4],[15],[11],[32,10],[68,0,0,0,0,0,128,88,64],[97],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,128,80,64],[97],[65,2],[33,4],[5],[32,11],[65,2],[33,4],[11],[4,64],[32,0],[32,1],[68,0,0,0,0,0,0,0,64],[65,1],[68,0,0,0,0,0,0,0,64],[65,1],[16, ...builtin('__Porffor_stn_int')],[34,4],[15],[11],[11],[68,0,0,0,0,0,0,0,0],[33,12],[68,0,0,0,0,0,0,0,0],[33,13],[32,6],[68,0,0,0,0,0,128,69,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,12],[11],[32,6],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,13],[68,0,0,0,0,0,0,240,63],[33,12],[11],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,64,82,64],[97],[4,64],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,240,63],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,240,63],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,128,91,64],[97],[34,11],[4,127],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,0,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,0,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,128,89,64],[97],[65,2],[33,4],[5],[32,11],[65,2],[33,4],[11],[34,11],[33,14],[32,4],[33,5],[2,127],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,14],[40,1,0],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,14],[40,1,0],[12,1],[11],[32,14],[11,"TYPESWITCH_end"],[4,127],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,8,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,8,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,64,90,64],[97],[65,2],[33,4],[5],[32,11],[32,4],[33,4],[11],[34,11],[33,14],[32,4],[33,5],[2,127],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,14],[40,1,0],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,14],[40,1,0],[12,1],[11],[32,14],[11,"TYPESWITCH_end"],[4,127],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,16,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,16,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,128,91,64],[97],[65,2],[33,4],[5],[32,11],[32,4],[33,4],[11],[34,11],[33,14],[32,4],[33,5],[2,127],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,14],[40,1,0],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,14],[40,1,0],[12,1],[11],[32,14],[11,"TYPESWITCH_end"],[4,127],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,20,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,20,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,64,90,64],[97],[65,2],[33,4],[5],[32,11],[32,4],[33,4],[11],[34,11],[33,14],[32,4],[33,5],[2,127],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,14],[40,1,0],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,14],[40,1,0],[12,1],[11],[32,14],[11,"TYPESWITCH_end"],[4,127],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,24,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,24,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,0,93,64],[97],[65,2],[33,4],[5],[32,11],[32,4],[33,4],[11],[34,11],[33,14],[32,4],[33,5],[2,127],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,14],[40,1,0],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,14],[40,1,0],[12,1],[11],[32,14],[11,"TYPESWITCH_end"],[4,127],[32,0],[252,3],[34,8],[40,1,0],[33,7],[32,1],[33,5],[2,124],[32,5],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[2,124],[32,12],[68,0,0,0,0,0,0,28,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[65,2],[108],[32,8],[106],[47,0,4],[184],[65,1],[33,4],[11],[12,1],[11],[32,5],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,124],[32,12],[68,0,0,0,0,0,0,28,64],[160],[252,2],[34,9],[32,7],[78],[4,64],[68,0,0,0,0,0,0,248,127],[12,1],[11],[32,9],[32,8],[106],[45,0,4],[184],[65,1],[33,4],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[68,0,0,0,0,0,64,94,64],[97],[65,2],[33,4],[5],[32,11],[32,4],[33,4],[11],[4,64],[68,0,0,0,0,0,0,240,127],[33,15],[32,13],[252,3],[4,124],[32,15],[154],[65,1],[33,4],[5],[32,15],[65,1],[33,4],[11],[32,4],[15],[11],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[32,0],[32,1],[32,12],[65,1],[16, ...builtin('__Porffor_stn_float')],[26],[33,15],[32,13],[252,3],[4,64],[32,15],[154],[65,1],[15],[11],[32,15],[65,1],[15]],
2405
+ params: [124,127], typedParams: 1,
2406
+ returns: [124,127], typedReturns: 1,
2407
+ locals: [124,127,127,127,124,127,127,127,124,127,124,124,127,124], localNames: ["str","str#type","#proto_target","#proto_target#type","#last_type","#typeswitch_tmp","first","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","second","logictmpi","i","negative","#logicinner_tmp_int","n"],
2408
+ };
2372
2409
  this.Symbol = {
2373
2410
  wasm: (scope, {glbl,builtin}) => [[68,0,0,0,0,0,0,0,0],[33,2],[65,128,1],[33,3],[32,0],[32,1],[16, ...builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,96,64],[98],[4,64],[32,0],[32,1],[16, ...builtin('__ecma262_ToString')],[33,3],[33,2],[11],...glbl(35, 'descStore', 124),[65,208,0],[32,2],[32,3],[16, ...builtin('__Porffor_fastPush')],[26],[34,5],[65,5],[15]],
2374
2411
  params: [124,127], typedParams: 1,
@@ -4430,18 +4467,18 @@ export const BuiltinFuncs = function() {
4430
4467
  returns: [124,127], typedReturns: 1,
4431
4468
  locals: [127], localNames: ["_this","_this#type","#last_type"],
4432
4469
  };
4433
- this.__ecma262_StringToNumber = {
4434
- wasm: (scope, {}) => [[68,0,0,0,0,0,0,248,127],[65,1],[15]],
4435
- params: [124,127], typedParams: 1,
4436
- returns: [124,127], typedReturns: 1,
4437
- locals: [], localNames: ["str","str#type"],
4438
- };
4439
4470
  this.__ecma262_ToNumber = {
4440
4471
  wasm: (scope, {builtin,internalThrow}) => [[32,0],[32,1],[16, ...builtin('__Porffor_rawType')],[34,2],[68,0,0,0,0,0,0,240,63],[97],[4,64],[32,0],[32,1],[15],[11],[32,2],[68,0,0,0,0,0,0,20,64],[97],[32,2],[68,0,0,0,0,0,0,16,64],[97],[114],[4,64],...internalThrow(scope, 'TypeError', `Cannot convert Symbol or BigInt to a number`),[11],[32,2],[68,0,0,0,0,0,0,96,64],[97],[32,2],[68,0,0,0,0,0,0,0,0],[97],[114],[4,64],[68,0,0,0,0,0,0,248,127],[65,1],[15],[11],[32,0],[68,0,0,0,0,0,0,0,0],[97],[32,1],[65,128,1],[114],[65,7],[65,128,1],[114],[70],[113],[32,0],[68,0,0,0,0,0,0,0,0],[97],[32,1],[65,128,1],[114],[65,2],[65,128,1],[114],[70],[113],[114],[4,64],[68,0,0,0,0,0,0,0,0],[65,1],[15],[11],[32,0],[68,0,0,0,0,0,0,240,63],[97],[32,1],[65,128,1],[114],[65,2],[65,128,1],[114],[70],[113],[4,64],[68,0,0,0,0,0,0,240,63],[65,1],[15],[11],[32,2],[68,0,0,0,0,0,192,80,64],[97],[32,2],[68,0,0,0,0,0,96,104,64],[97],[114],[4,64],[32,0],[32,1],[16, ...builtin('__ecma262_StringToNumber')],[34,3],[15],[11],[68,0,0,0,0,0,0,248,127],[65,1],[15]],
4441
4472
  params: [124,127], typedParams: 1,
4442
4473
  returns: [124,127], typedReturns: 1,
4443
4474
  locals: [124,127], localNames: ["argument","argument#type","t","#last_type"],
4444
4475
  };
4476
+ this.__ecma262_ToNumeric = {
4477
+ wasm: (scope, {builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_ToNumber')],[34,2],[15]],
4478
+ params: [124,127], typedParams: 1,
4479
+ returns: [124,127], typedReturns: 1,
4480
+ locals: [127], localNames: ["value","value#type","#last_type"],
4481
+ };
4445
4482
  this.__ecma262_ToIntegerOrInfinity = {
4446
4483
  wasm: (scope, {builtin}) => [[32,0],[32,1],[16, ...builtin('__ecma262_ToNumber')],[26],[34,2],[16, ...builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[65,1],[15],[11],[32,2],[16, ...builtin('__Number_isFinite')],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,2],[65,1],[15],[11],[32,2],[16, ...builtin('__Math_trunc')],[34,2],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,0,0],[65,1],[15],[11],[32,2],[65,1],[15]],
4447
4484
  params: [124,127], typedParams: 1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.24.5+a0b7c83a7",
4
+ "version": "0.24.7+23de87c30",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.24.5+a0b7c83a7';
3
+ globalThis.version = '0.24.7+23de87c30';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {