porffor 0.17.0-cbb73d209 โ†’ 0.18.2

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.
package/compiler/2c.js CHANGED
@@ -705,5 +705,5 @@ _time_out = _time.tv_nsec / 1000000. + _time.tv_sec * 1000.;`);
705
705
  const makeIncludes = includes => [...includes.keys()].map(x => `#include <${x}>\n`).join('');
706
706
  out = platformSpecific(makeIncludes(winIncludes), makeIncludes(unixIncludes), false) + '\n' + makeIncludes(includes) + '\n' + alwaysPreface + [...prepend.values()].join('\n') + '\n\n' + out;
707
707
 
708
- return out.trim();
708
+ return `// generated by porffor ${globalThis.version ?? '0.17.0'}\n` + out.trim();
709
709
  };
@@ -305,6 +305,51 @@ export const __Array_prototype_reduceRight = (_this: any[], callbackFn: any, ini
305
305
  return acc;
306
306
  };
307
307
 
308
+ // @porf-typed-array
309
+ export const __Array_prototype_sort = (_this: any[], callbackFn: any) => {
310
+ // todo: default callbackFn
311
+
312
+ // insertion sort, i guess
313
+ const len: i32 = _this.length;
314
+ for (let i: i32 = 0; i < len; i++) {
315
+ const x: any = _this[i];
316
+ let j: i32 = i;
317
+ while (j > 0) {
318
+ const y: any = _this[j - 1];
319
+
320
+ // 23.1.3.30.2 CompareArrayElements (x, y, comparefn)
321
+ // https://tc39.es/ecma262/#sec-comparearrayelements
322
+ const xt: i32 = Porffor.rawType(x);
323
+ const yt: i32 = Porffor.rawType(y);
324
+ let v: number;
325
+
326
+ // 1. If x and y are both undefined, return +0๐”ฝ.
327
+ if (xt == Porffor.TYPES.undefined && yt == Porffor.TYPES.undefined) v = 0;
328
+ // 2. If x is undefined, return 1๐”ฝ.
329
+ else if (xt == Porffor.TYPES.undefined) v = 1;
330
+ // 3. If y is undefined, return -1๐”ฝ.
331
+ else if (yt == Porffor.TYPES.undefined) v = -1;
332
+ else {
333
+ // 4. If comparefn is not undefined, then
334
+ // a. Let v be ? ToNumber(? Call(comparefn, undefined, ยซ x, y ยป)).
335
+ v = callbackFn(x, y);
336
+
337
+ // b. If v is NaN, return +0๐”ฝ.
338
+ // if (Number.isNaN(v)) v = 0;
339
+
340
+ // c. Return v.
341
+ }
342
+
343
+ if (v >= 0) break;
344
+ _this[j--] = y;
345
+ }
346
+
347
+ _this[j] = x;
348
+ }
349
+
350
+ return _this;
351
+ };
352
+
308
353
  // @porf-typed-array
309
354
  export const __Array_prototype_toString = (_this: any[]) => {
310
355
  // todo: this is bytestring only!
@@ -150,7 +150,7 @@ export const BuiltinVars = function() {
150
150
  this.Math = number(1);
151
151
 
152
152
  // wintercg(tm)
153
- this.__navigator_userAgent = (scope, { makeString }) => makeString(scope, `Porffor/0.17.0`, false, '__navigator_userAgent');
153
+ this.__navigator_userAgent = (scope, { makeString }) => makeString(scope, `Porffor/${globalThis.version ?? '0.17.0'}`, false, '__navigator_userAgent');
154
154
  this.__navigator_userAgent.type = Prefs.bytestring ? TYPES.bytestring : TYPES.string;
155
155
 
156
156
  for (const x in TYPES) {
@@ -418,6 +418,16 @@ export const BuiltinFuncs = function() {
418
418
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
419
419
  table: true,
420
420
  };
421
+ this.__Array_prototype_sort = {
422
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,8],[43,0,4],[32,8],[45,0,12],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,8],[43,0,4],[32,8],[45,0,12],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,9],[108],[106],[34,27],[32,11],[34,26],[57,0,4],[32,27],[32,12],[58,0,12],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,9],[108],[106],[34,27],[32,6],[34,26],[57,0,4],[32,27],[32,7],[58,0,12],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,208,0],[15]],
423
+ params: [124,127,124,127],
424
+ typedParams: true,
425
+ returns: [124,127],
426
+ typedReturns: true,
427
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
428
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
429
+ table: true,
430
+ };
421
431
  this.__Array_prototype_toString = {
422
432
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,9],[43,0,4],[32,9],[45,0,12],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
423
433
  params: [124,127],
@@ -2335,6 +2345,16 @@ export const BuiltinFuncs = function() {
2335
2345
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
2336
2346
  table: true,
2337
2347
  };
2348
+ this.__Uint8Array_prototype_sort = {
2349
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[106],[45,0,4],[184],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[106],[45,0,4],[184],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[106],[32,11],[34,26],[252,3],[58,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[106],[32,6],[34,26],[252,3],[58,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,213,0],[15]],
2350
+ params: [124,127,124,127],
2351
+ typedParams: true,
2352
+ returns: [124,127],
2353
+ typedReturns: true,
2354
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
2355
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
2356
+ table: true,
2357
+ };
2338
2358
  this.__Uint8Array_prototype_toString = {
2339
2359
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Uint8Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[106],[45,0,4],[184],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
2340
2360
  params: [124,127],
@@ -2573,6 +2593,16 @@ export const BuiltinFuncs = function() {
2573
2593
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
2574
2594
  table: true,
2575
2595
  };
2596
+ this.__Int8Array_prototype_sort = {
2597
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[106],[44,0,4],[183],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[106],[44,0,4],[183],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[106],[32,11],[34,26],[252,2],[58,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[106],[32,6],[34,26],[252,2],[58,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,214,0],[15]],
2598
+ params: [124,127,124,127],
2599
+ typedParams: true,
2600
+ returns: [124,127],
2601
+ typedReturns: true,
2602
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
2603
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
2604
+ table: true,
2605
+ };
2576
2606
  this.__Int8Array_prototype_toString = {
2577
2607
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Int8Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[106],[44,0,4],[183],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
2578
2608
  params: [124,127],
@@ -2811,6 +2841,16 @@ export const BuiltinFuncs = function() {
2811
2841
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
2812
2842
  table: true,
2813
2843
  };
2844
+ this.__Uint8ClampedArray_prototype_sort = {
2845
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[106],[45,0,4],[184],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[106],[45,0,4],[184],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[106],[32,11],[34,26],[68,0,0,0,0,0,0,0,0],[165],[68,0,0,0,0,0,224,111,64],[164],[252,3],[58,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[106],[32,6],[34,26],[68,0,0,0,0,0,0,0,0],[165],[68,0,0,0,0,0,224,111,64],[164],[252,3],[58,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,215,0],[15]],
2846
+ params: [124,127,124,127],
2847
+ typedParams: true,
2848
+ returns: [124,127],
2849
+ typedReturns: true,
2850
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
2851
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
2852
+ table: true,
2853
+ };
2814
2854
  this.__Uint8ClampedArray_prototype_toString = {
2815
2855
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Uint8ClampedArray_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[106],[45,0,4],[184],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
2816
2856
  params: [124,127],
@@ -3049,6 +3089,16 @@ export const BuiltinFuncs = function() {
3049
3089
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
3050
3090
  table: true,
3051
3091
  };
3092
+ this.__Uint16Array_prototype_sort = {
3093
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,2],[108],[106],[32,11],[34,26],[252,3],[59,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,2],[108],[106],[32,6],[34,26],[252,3],[59,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,216,0],[15]],
3094
+ params: [124,127,124,127],
3095
+ typedParams: true,
3096
+ returns: [124,127],
3097
+ typedReturns: true,
3098
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
3099
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
3100
+ table: true,
3101
+ };
3052
3102
  this.__Uint16Array_prototype_toString = {
3053
3103
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Uint16Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
3054
3104
  params: [124,127],
@@ -3287,6 +3337,16 @@ export const BuiltinFuncs = function() {
3287
3337
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
3288
3338
  table: true,
3289
3339
  };
3340
+ this.__Int16Array_prototype_sort = {
3341
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,2],[108],[106],[32,11],[34,26],[252,2],[59,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,2],[108],[106],[32,6],[34,26],[252,2],[59,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,217,0],[15]],
3342
+ params: [124,127,124,127],
3343
+ typedParams: true,
3344
+ returns: [124,127],
3345
+ typedReturns: true,
3346
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
3347
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
3348
+ table: true,
3349
+ };
3290
3350
  this.__Int16Array_prototype_toString = {
3291
3351
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Int16Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
3292
3352
  params: [124,127],
@@ -3525,6 +3585,16 @@ export const BuiltinFuncs = function() {
3525
3585
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
3526
3586
  table: true,
3527
3587
  };
3588
+ this.__Uint32Array_prototype_sort = {
3589
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,4],[108],[106],[32,11],[34,26],[252,3],[54,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,4],[108],[106],[32,6],[34,26],[252,3],[54,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,218,0],[15]],
3590
+ params: [124,127,124,127],
3591
+ typedParams: true,
3592
+ returns: [124,127],
3593
+ typedReturns: true,
3594
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
3595
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
3596
+ table: true,
3597
+ };
3528
3598
  this.__Uint32Array_prototype_toString = {
3529
3599
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Uint32Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
3530
3600
  params: [124,127],
@@ -3763,6 +3833,16 @@ export const BuiltinFuncs = function() {
3763
3833
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
3764
3834
  table: true,
3765
3835
  };
3836
+ this.__Int32Array_prototype_sort = {
3837
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,4],[108],[106],[32,11],[34,26],[252,2],[54,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,4],[108],[106],[32,6],[34,26],[252,2],[54,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,219,0],[15]],
3838
+ params: [124,127,124,127],
3839
+ typedParams: true,
3840
+ returns: [124,127],
3841
+ typedReturns: true,
3842
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
3843
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
3844
+ table: true,
3845
+ };
3766
3846
  this.__Int32Array_prototype_toString = {
3767
3847
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Int32Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
3768
3848
  params: [124,127],
@@ -4001,6 +4081,16 @@ export const BuiltinFuncs = function() {
4001
4081
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
4002
4082
  table: true,
4003
4083
  };
4084
+ this.__Float32Array_prototype_sort = {
4085
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,4],[108],[106],[32,11],[34,26],[182],[56,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,4],[108],[106],[32,6],[34,26],[182],[56,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,220,0],[15]],
4086
+ params: [124,127,124,127],
4087
+ typedParams: true,
4088
+ returns: [124,127],
4089
+ typedReturns: true,
4090
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
4091
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
4092
+ table: true,
4093
+ };
4004
4094
  this.__Float32Array_prototype_toString = {
4005
4095
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Float32Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
4006
4096
  params: [124,127],
@@ -4239,6 +4329,16 @@ export const BuiltinFuncs = function() {
4239
4329
  localNames: ["_this","_this#type","callbackFn","callbackFn#type","initialValue","initialValue#type","len","acc","acc#type","#loadArray_offset","#last_type","logictmp","#logicinner_tmp","#typeswitch_tmp","i","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_arg3_type","#indirect_arg3_val","#indirect_func","#indirect_flags"],
4240
4330
  table: true,
4241
4331
  };
4332
+ this.__Float64Array_prototype_sort = {
4333
+ wasm: (scope, {builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[32,0],[252,3],[32,5],[252,3],[65,8],[108],[106],[43,0,4],[65,0],[33,9],[33,6],[32,9],[33,7],[32,5],[33,10],[3,64],[32,10],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,0],[252,3],[32,10],[68,0,0,0,0,0,0,240,63],[161],[252,3],[65,8],[108],[106],[43,0,4],[65,0],[33,9],[33,11],[32,9],[33,12],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[33,13],[32,11],[32,12],[16, builtin('__Porffor_rawType')],[33,14],[32,13],[68,0,0,0,0,0,0,8,64],[97],[34,16],[4,127],[32,14],[68,0,0,0,0,0,0,8,64],[97],[65,1],[33,9],[5],[32,16],[65,1],[33,9],[11],[4,64],[68,0,0,0,0,0,0,0,0],[33,15],[5],[32,13],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,15],[5],[32,14],[68,0,0,0,0,0,0,8,64],[97],[4,64],[68,0,0,0,0,0,0,240,191],[33,15],[5],[32,3],[33,25],[2,124],[32,25],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,17],[33,18],[32,11],[32,12],[33,19],[33,20],[68,0,0,0,0,0,0,0,0],[65,3],[33,21],[33,22],[32,2],[252,3],[34,23],[65,3],[108],[65,2],[106],[45,0,0,"read func lut"],[34,24],[65,2],[113],[69],[65,0],[113],[4,64],...internalThrow(scope, 'TypeError', `callbackFn is not a constructor`),[11],[2,124],[2,64],[2,64],[2,64],[2,64],[32,23],[65,3],[108],[47,0,0,"read func lut"],[14,4,0,1,2,3,0],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"no_type_return","constr"],[5],[32,23],[17,0,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,23],[17,0,0,"constr"],[33,9],[5],[32,23],[17,0,0],[33,9],[11],[11],[12,3],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,23],[17,1,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,23],[17,1,0,"constr"],[33,9],[5],[32,18],[32,17],[32,23],[17,1,0],[33,9],[11],[11],[12,2],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,23],[17,2,0],[33,9],[11],[11],[12,1],[11],[32,24],[65,1],[113],[4,124],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return","constr"],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"no_type_return"],[11],[5],[32,24],[65,2],[113],[4,124],[65,0],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0,"constr"],[33,9],[5],[32,18],[32,17],[32,20],[32,19],[32,22],[32,21],[32,23],[17,3,0],[33,9],[11],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[11],[11],[11],[32,15],[68,0,0,0,0,0,0,0,0],[102],[4,64],[12,1],[11],[32,0],[252,3],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[161],[33,10],[252,3],[65,8],[108],[106],[32,11],[34,26],[57,0,4],[65,0],[33,9],[12,1],[11],[11],[32,0],[252,3],[32,10],[252,3],[65,8],[108],[106],[32,6],[34,26],[57,0,4],[65,0],[33,9],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[65,221,0],[15]],
4334
+ params: [124,127,124,127],
4335
+ typedParams: true,
4336
+ returns: [124,127],
4337
+ typedReturns: true,
4338
+ locals: [124,124,124,127,127,127,124,124,127,124,124,124,127,127,124,127,124,127,124,127,127,127,124,127],
4339
+ localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","x","x#type","#loadArray_offset","#last_type","j","y","y#type","xt","yt","v","logictmpi","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#indirect_flags","#typeswitch_tmp","#member_setter_val_tmp","#member_setter_ptr_tmp"],
4340
+ table: true,
4341
+ };
4242
4342
  this.__Float64Array_prototype_toString = {
4243
4343
  wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Float64Array_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,2],[65,210,0],[68,0,0,0,0,0,0,70,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[33,6],[26],[11],[32,0],[252,3],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,3],[65,8],[108],[106],[43,0,4],[65,0],[33,6],[33,7],[32,6],[33,8],[32,7],[32,8],[16, builtin('__Porffor_rawType')],[33,10],[32,7],[68,0,0,0,0,0,0,0,0],[98],[34,11],[69],[4,127],[32,10],[68,0,0,0,0,0,0,8,64],[98],[32,10],[68,0,0,0,0,0,0,16,64],[98],[113],[65,1],[33,6],[5],[32,11],[65,1],[33,6],[11],[4,64],[32,2],[65,210,0],[32,7],[32,8],[16, builtin('__ecma262_ToString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[33,6],[26],[11],[12,1],[11],[11],[32,2],[65,210,0],[15]],
4244
4344
  params: [124,127],
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.17.0-cbb73d209",
4
+ "version": "0.18.2+2aa3f0589",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
+ globalThis.version = '0.18.2+2aa3f0589';
3
4
 
4
5
  // deno compat
5
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
@@ -22,7 +23,7 @@ if (process.argv.includes('--compile-hints')) {
22
23
 
23
24
  if (process.argv.includes('--help')) {
24
25
  // description + version
25
- console.log(`\x1B[1m\x1B[35mPorffor\x1B[0m is a JavaScript engine/runtime/compiler. \x1B[90m(${(await import('./version.js')).default})\x1B[0m`);
26
+ console.log(`\x1B[1m\x1B[35mPorffor\x1B[0m is a JavaScript engine/runtime/compiler. \x1B[90m(${globalThis.version})\x1B[0m`);
26
27
 
27
28
  // basic usage
28
29
  console.log(`Usage: \x1B[1mporf [command] path/to/script.js [...prefs] [...args]\x1B[0m`);
@@ -102,7 +103,7 @@ globalThis.file = file;
102
103
  if (!file) {
103
104
  if (process.argv.includes('-v') || process.argv.includes('--version')) {
104
105
  // just print version
105
- console.log((await import('./version.js')).default);
106
+ console.log(globalThis.version);
106
107
  process.exit(0);
107
108
  }
108
109
 
package/runner/repl.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { TYPE_NAMES } from '../compiler/types.js';
2
2
  import compile from '../compiler/wrap.js';
3
- import version from './version.js';
4
3
 
5
4
  import util from 'node:util';
6
5
 
@@ -32,7 +31,7 @@ if (host.startsWith('Node')) host = '\x1B[92m' + host;
32
31
  if (host.startsWith('Deno')) host = '\x1B[97m' + host;
33
32
  if (host.startsWith('Bun')) host = '\x1B[93m' + host;
34
33
 
35
- console.log(`Welcome to \x1B[1m\x1B[35mPorffor\x1B[0m \x1B[90m(${version})\x1B[0m running on \x1B[1m${host.replace('/', ' \x1B[0m\x1B[90m(')})\x1B[0m`);
34
+ console.log(`Welcome to \x1B[1m\x1B[35mPorffor\x1B[0m \x1B[90m(${globalThis.version})\x1B[0m running on \x1B[1m${host.replace('/', ' \x1B[0m\x1B[90m(')})\x1B[0m`);
36
35
  console.log(`\x1B[90musing opt ${process.argv.find(x => x.startsWith('-O')) ?? '-O1'}, parser ${parser}, valtype ${valtype}\x1B[0m`);
37
36
  console.log();
38
37
 
package/runner/version.js DELETED
@@ -1,12 +0,0 @@
1
- import { readFileSync } from 'node:fs';
2
-
3
- export let version = 'unknown';
4
- export let rev = 'unknown';
5
-
6
- const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
7
- version = packageJson.version.split('-')[0];
8
- rev = packageJson.version.split('-')[1];
9
-
10
- if (!rev) rev = readFileSync(new URL('../.git/refs/heads/main', import.meta.url), 'utf8').trim().slice(0, 9);
11
-
12
- export default `${version}-${rev}`;