porffor 0.55.19 → 0.55.20

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.
@@ -76,12 +76,12 @@ export const __Porffor_bigint_fromString = (n: string|bytestring): bigint => {
76
76
  const len: i32 = n.length;
77
77
 
78
78
  let negative: boolean = false;
79
- let end: i32 = 0;
79
+ let offset: i32 = 0;
80
80
  if (n[0] === '-') {
81
81
  negative = true;
82
- end = 1;
82
+ offset = 1;
83
83
  } else if (n[0] === '+') {
84
- end = 1;
84
+ offset = 1;
85
85
  }
86
86
 
87
87
  // n -> digits (base 2^32) (most to least significant)
@@ -89,44 +89,46 @@ export const __Porffor_bigint_fromString = (n: string|bytestring): bigint => {
89
89
  // 4294967295 -> [ 4294967295 ]
90
90
  // 4294967296 -> [ 1, 0 ]
91
91
  // 4294967297 -> [ 1, 1 ]
92
- // 4294967298 -> [ 1, 2 ]
93
- // 9007199254740992 -> [ 2097152 ]
92
+ // 9007199254740992 -> [ 2097152, 0 ]
94
93
  // 9007199254740993 -> [ 2097152, 1 ]
95
94
  // 9007199254740994 -> [ 2097152, 2 ]
96
- // 9007199254740995 -> [ 2097152, 3 ]
97
95
 
98
- let acc: number = 0;
99
- let digits: i32[];
100
96
  const BASE: i32 = 0x100000000; // 2^32
97
+ const digits: i32[] = Porffor.allocate(); // todo: free later
98
+ digits.length = len - offset;
101
99
 
102
- for (let i: i32 = end; i < len; i++) {
103
- const char: i32 = n.charCodeAt(i);
100
+ let i: i32 = 0;
101
+ let acc: number = 0;
102
+ while (i < len) {
103
+ const char: i32 = n.charCodeAt(offset + i);
104
104
  const digit: i32 = char - 48;
105
- if (digit < 0 || digit > 9) throw new SyntaxError('Invalid character in BigInt string');
106
-
107
- if (acc == -1) {
108
- let carry: i32 = digit;
109
- for (let j: i32 = 0; j < digits.length; j++) {
110
- const value: i32 = digits[j] * BASE + carry;
111
- digits[j] = value % BASE;
112
- carry = Math.trunc(value / BASE);
113
- }
105
+ if (Porffor.fastOr(digit < 0, digit > 9)) throw new SyntaxError('Invalid character in BigInt string');
114
106
 
115
- if (carry > 0) digits.push(carry);
116
- } else {
117
- acc = acc * 10 + digit;
118
- if (acc >= BASE) {
119
- digits = Porffor.allocate();
120
- digits.length = 2;
121
- digits[0] = Math.floor(acc / BASE);
122
- digits[1] = acc % BASE;
123
- acc = -1;
124
- }
107
+ digits[i++] = digit;
108
+ acc = acc * 10 + digit;
109
+ }
110
+
111
+ if (acc < 0x8000000000000) {
112
+ // inline if small enough
113
+ return acc as bigint;
114
+ }
115
+
116
+ const result: i32[] = Porffor.allocate();
117
+ while (digits.length > 0) {
118
+ let carry: i32 = 0;
119
+ for (let j: i32 = 0; j < digits.length; j++) {
120
+ let value: i32 = carry * 10 + digits[j];
121
+ let quotient: i32 = Math.floor(value / BASE);
122
+ carry = value % BASE;
123
+
124
+ digits[j] = quotient;
125
125
  }
126
+
127
+ while (digits.length > 0 && digits[0] === 0) digits.shift();
128
+ if (carry !== 0 || digits.length > 0) result.unshift(carry);
126
129
  }
127
130
 
128
- if (acc == -1) return __Porffor_bigint_fromDigits(negative, digits);
129
- return (negative ? -acc : acc) as bigint;
131
+ return __Porffor_bigint_fromDigits(negative, result);
130
132
  };
131
133
 
132
134
  export const __Porffor_bigint_toString = (x: number, radix: any): string => {
@@ -726,9 +726,9 @@ params:[124,127],typedParams:1,returns:[124],returnType:1,
726
726
  locals:[124,124,124,124,124],localNames:["x","x#type","negative","len","out","i","d"],
727
727
  }
728
728
  this.__Porffor_bigint_fromString = {
729
- wasm:(_,{t,makeString,builtin,internalThrow})=>[[32,0],[252,3],[40,1,0],[184],[33,2],[68,0],[33,3],[68,0],[33,4],[68,0],[33,6],[32,0],[33,5],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[65,2],[108],[32,5],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,6],[252,3],[65,9],[108],[32,5],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([89],()=>[[32,8],[65,217,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([90],()=>[[32,8],[65,218,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([91],()=>[[32,8],[65,219,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([92],()=>[[32,8],[65,220,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([93],()=>[[32,8],[65,221,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([94],()=>[[32,8],[65,222,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([95],()=>[[32,8],[65,223,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([96],()=>[[32,8],[65,224,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[32,5],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,5],[252,2],[32,1],[32,6],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"-",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,3],[68,1],[33,4],[5],[68,0],[33,13],[32,0],[33,12],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[65,2],[108],[32,12],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,13],[252,3],[65,9],[108],[32,12],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([89],()=>[[32,8],[65,217,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([90],()=>[[32,8],[65,218,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([91],()=>[[32,8],[65,219,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([92],()=>[[32,8],[65,220,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([93],()=>[[32,8],[65,221,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([94],()=>[[32,8],[65,222,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([95],()=>[[32,8],[65,223,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([96],()=>[[32,8],[65,224,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[32,12],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,12],[252,2],[32,1],[32,13],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"+",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,4],[11],[11],[68,0],[33,14],[68,4294967296],[33,16],[32,4],[33,17],[3,64],[32,17],[32,2],[99],[4,64],[2,64],[32,0],[252,3],[40,1,0],[33,19],[32,1],[33,8],[2,124],...t([39],()=>[[32,8],[65,39],[70],[4,64],[32,17],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[32,17],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[32,17],[252,2],[32,0],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...internalThrow(_,'TypeError',`'charCodeAt' proto func tried to be called on a type without an impl`),[68,0],[11],[34,18],[68,48],[161],[34,22],[68,0],[99],[34,23],[69],[4,127],[32,22],[68,9],[100],[65,2],[33,7],[5],[32,23],[65,2],[33,7],[11],[4,64],...internalThrow(_,'SyntaxError',`Invalid character in BigInt string`),[26],[11],[32,14],[68,-1],[97],[4,64],[32,22],[33,24],[68,0],[33,25],[3,64],[32,25],[32,15],[252,3],[40,1,0],[184],[99],[4,64],[32,25],[33,28],[32,15],[33,27],[32,28],[252,3],[65,9],[108],[32,27],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[32,16],[162],[32,24],[160],[33,26],[32,15],[33,30],[32,25],[33,31],[32,30],[252,3],[32,31],[252,3],[65,9],[108],[106],[34,29],[32,26],[32,16],[16,builtin('f64_%')],[57,0,4],[32,29],[65,1],[58,0,12],[32,26],[32,16],[163],[16,builtin('__Math_trunc')],[33,24],[32,25],[68,1],[160],[33,25],[12,1],[11],[11],[32,24],[68,0],[100],[4,64],[32,15],[33,32],[65,208,0],[33,33],[32,32],[32,33],[65,128,128,4],[32,24],[57,0,4],[65,128,128,4],[65,1],[58,0,12],[65,128,128,4],[65,1],[54,1,0],[68,65536],[65,208,0],[16,builtin('__Array_prototype_push')],[33,7],[26],[11],[5],[32,14],[68,10],[162],[32,22],[160],[34,14],[32,16],[102],[4,64],[16,builtin('__Porffor_allocate')],[183],[34,15],[252,3],[65,2],[54,1,0],[32,15],[33,34],[68,0],[33,35],[32,34],[252,3],[32,35],[252,3],[65,9],[108],[106],[34,29],[32,14],[32,16],[163],[16,builtin('__Math_floor')],[57,0,4],[32,29],[65,1],[58,0,12],[32,15],[33,36],[68,1],[33,37],[32,36],[252,3],[32,37],[252,3],[65,9],[108],[106],[34,29],[32,14],[32,16],[16,builtin('f64_%')],[57,0,4],[32,29],[65,1],[58,0,12],[68,-1],[33,14],[11],[11],[11],[32,17],[68,1],[160],[33,17],[12,1],[11],[11],[32,14],[68,-1],[97],[4,64],[32,3],[65,2],[32,15],[65,208,0],[16,builtin('__Porffor_bigint_fromDigits')],[15],[26],[11],[32,3],[252,3],[4,124],[32,14],[154],[65,1],[33,7],[5],[32,14],[65,1],[33,7],[11],[15]],
729
+ wasm:(_,{t,makeString,builtin,internalThrow})=>[[32,0],[252,3],[40,1,0],[184],[33,2],[68,0],[33,3],[68,0],[33,4],[68,0],[33,6],[32,0],[33,5],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[65,2],[108],[32,5],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,6],[252,3],[65,9],[108],[32,5],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([89],()=>[[32,8],[65,217,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([90],()=>[[32,8],[65,218,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([91],()=>[[32,8],[65,219,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([92],()=>[[32,8],[65,220,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([93],()=>[[32,8],[65,221,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([94],()=>[[32,8],[65,222,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([95],()=>[[32,8],[65,223,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([96],()=>[[32,8],[65,224,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[32,5],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,5],[252,2],[32,1],[32,6],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"-",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,3],[68,1],[33,4],[5],[68,0],[33,13],[32,0],[33,12],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[65,2],[108],[32,12],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,13],[252,3],[65,9],[108],[32,12],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([89],()=>[[32,8],[65,217,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([90],()=>[[32,8],[65,218,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([91],()=>[[32,8],[65,219,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([92],()=>[[32,8],[65,220,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([93],()=>[[32,8],[65,221,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([94],()=>[[32,8],[65,222,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([95],()=>[[32,8],[65,223,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([96],()=>[[32,8],[65,224,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[32,12],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,12],[252,2],[32,1],[32,13],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"+",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,4],[11],[11],[68,4294967296],[33,14],[16,builtin('__Porffor_allocate')],[183],[34,15],[252,3],[32,2],[32,4],[161],[252,3],[54,1,0],[68,0],[33,16],[68,0],[33,17],[3,64],[32,16],[32,2],[99],[4,64],[32,0],[252,3],[40,1,0],[33,19],[32,1],[33,8],[2,124],...t([39],()=>[[32,8],[65,39],[70],[4,64],[32,4],[32,16],[160],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[32,4],[32,16],[160],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[32,4],[32,16],[160],[252,2],[32,0],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...internalThrow(_,'TypeError',`'charCodeAt' proto func tried to be called on a type without an impl`),[68,0],[11],[34,18],[68,48],[161],[34,22],[68,0],[99],[32,22],[68,9],[100],[114],[4,64],...internalThrow(_,'SyntaxError',`Invalid character in BigInt string`),[26],[11],[32,15],[33,24],[32,16],[32,16],[68,1],[160],[33,16],[33,25],[32,24],[252,3],[32,25],[252,3],[65,9],[108],[106],[34,23],[32,22],[57,0,4],[32,23],[65,1],[58,0,12],[32,17],[68,10],[162],[32,22],[160],[33,17],[12,1],[11],[11],[32,17],[68,2251799813685248],[99],[4,64],[32,17],[15],[26],[11],[16,builtin('__Porffor_allocate')],[183],[33,26],[3,64],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[4,64],[68,0],[33,27],[68,0],[33,28],[3,64],[32,28],[32,15],[252,3],[40,1,0],[184],[99],[4,64],[32,27],[68,10],[162],[32,28],[33,31],[32,15],[33,30],[32,31],[252,3],[65,9],[108],[32,30],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[160],[34,29],[32,14],[163],[16,builtin('__Math_floor')],[33,32],[32,29],[32,14],[16,builtin('f64_%')],[33,27],[32,15],[33,33],[32,28],[33,34],[32,33],[252,3],[32,34],[252,3],[65,9],[108],[106],[34,23],[32,32],[57,0,4],[32,23],[65,1],[58,0,12],[32,28],[68,1],[160],[33,28],[12,1],[11],[11],[3,64],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[34,37],[4,127],[68,0],[33,36],[32,15],[33,35],[32,36],[252,3],[65,9],[108],[32,35],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[68,0],[97],[32,7],[65,128,1],[114],[65,1],[65,128,1],[114],[70],[113],[65,2],[33,7],[5],[32,37],[65,2],[33,7],[11],[4,64],[32,15],[252,3],[34,20],[40,1,0],[33,19],[2,64],[32,19],[69],[4,64],[68,0],[12,1],[11],[32,20],[32,19],[65,1],[107],[34,19],[54,1,0],[32,20],[43,0,4],[32,20],[45,0,12],[65,4],[32,20],[106],[65,13],[32,20],[106],[32,19],[65,9],[108],[252,10,0,0],[33,7],[26],[11],[12,1],[11],[11],[32,27],[68,0],[98],[34,37],[69],[4,127],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[65,2],[33,7],[5],[32,37],[65,2],[33,7],[11],[4,64],[32,26],[33,38],[65,208,0],[33,39],[32,38],[32,39],[65,128,128,4],[32,27],[57,0,4],[65,128,128,4],[65,1],[58,0,12],[65,128,128,4],[65,1],[54,1,0],[68,65536],[65,208,0],[16,builtin('__Array_prototype_unshift')],[33,7],[26],[11],[12,1],[11],[11],[32,3],[65,2],[32,26],[65,208,0],[16,builtin('__Porffor_bigint_fromDigits')],[15]],
730
730
  params:[124,127],typedParams:1,returns:[124],returnType:4,
731
- locals:[124,124,124,124,124,127,127,127,127,127,124,124,124,124,124,124,124,127,127,127,124,127,124,124,124,124,124,127,124,124,124,127,124,124,124,124],localNames:["n","n#type","len","negative","end","#member_obj_84","#member_prop_84","#last_type","#typeswitch_tmp1","#member_allocd","#loadArray_offset","#swap","#member_obj_85","#member_prop_85","acc","digits","BASE","i","char","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","digit","logictmpi","carry","j","value","#member_obj_86","#member_prop_86","#member_setter_ptr_tmp","#member_obj_87","#member_prop_87","#proto_target","#proto_target#type","#member_obj_89","#member_prop_89","#member_obj_90","#member_prop_90"],
731
+ locals:[124,124,124,124,124,127,127,127,127,127,124,124,124,124,124,124,124,127,127,127,124,127,124,124,124,124,124,124,124,124,124,124,124,124,124,127,124,127],localNames:["n","n#type","len","negative","offset","#member_obj_84","#member_prop_84","#last_type","#typeswitch_tmp1","#member_allocd","#loadArray_offset","#swap","#member_obj_85","#member_prop_85","BASE","digits","i","acc","char","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","digit","#member_setter_ptr_tmp","#member_obj_86","#member_prop_86","result","carry","j","value","#member_obj_87","#member_prop_87","quotient","#member_obj_88","#member_prop_88","#member_obj_89","#member_prop_89","logictmpi","#proto_target","#proto_target#type"],
732
732
  usedTypes:[67,195,80],
733
733
  usesTag:1,
734
734
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "An ahead-of-time JavaScript compiler",
4
- "version": "0.55.19",
4
+ "version": "0.55.20",
5
5
  "author": "Oliver Medhurst <honk@goose.icu>",
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.55.19';
3
+ globalThis.version = '0.55.20';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {