porffor 0.16.0-594397507 → 0.16.0-688a50c13

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.
@@ -709,7 +709,7 @@ export const BuiltinFuncs = function() {
709
709
  localNames: ["string","string#type","chr"],
710
710
  };
711
711
  this.__Porffor_date_allocate = {
712
- wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __Porffor_date_allocate/hack', 'i8') * pageSize, 124),[34,0],[252,3],[40,1,0],[184],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,0],[252,3],[65,1],[64,0],[26],[63,0],[65,1],[107],[65,128,128,4],[108],[184],[34,1],[252,3],[54,1,0],[11],[32,0],[252,3],[40,1,0],[184],[33,2],[32,0],[252,3],[32,2],[68,0,0,0,0,0,0,32,64],[160],[34,1],[252,3],[54,1,0],[32,2],[15]],
712
+ wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __Porffor_date_allocate/hack', 'i8') * pageSize, 124),[34,0],[252,3],[40,1,0],[184],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,0],[252,3],[63,0],[65,1],[64,0],[26],[65,128,128,4],[108],[184],[34,1],[252,3],[54,1,0],[11],[32,0],[252,3],[40,1,0],[184],[33,2],[32,0],[252,3],[32,2],[68,0,0,0,0,0,0,32,64],[160],[34,1],[252,3],[54,1,0],[32,2],[15]],
713
713
  params: [],
714
714
  typedParams: true,
715
715
  returns: [124],
@@ -1358,7 +1358,7 @@ export const BuiltinFuncs = function() {
1358
1358
  localNames: ["message","message#type","#last_type"],
1359
1359
  };
1360
1360
  this.escape = {
1361
- wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: escape/lut', 'i8') * pageSize, 127),[33,2],[32,0],[40,1,0],[34,3],[33,4],[32,0],[33,5],[32,1],[65,18],[70],[4,64],[32,5],[32,3],[106],[33,6],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[32,5],[65,1],[106],[33,5],[45,0,4],[34,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[12,3],[11],[11],[32,4],[65,2],[106],[33,4],[12,1],[11],[11],[32,4],[32,3],[70],[4,64],[32,0],[15],[11],...number(allocPage(scope, 'bytestring: escape/output', 'i8') * pageSize, 127),[34,8],[32,4],[34,9],[54,1,0],[32,0],[33,5],[32,8],[33,10],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[32,5],[65,1],[106],[33,5],[45,0,4],[34,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[32,7],[58,0,4],[12,3],[11],[11],[32,10],[32,10],[65,1],[106],[33,10],[65,37],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,11],[65,57],[74],[4,64],[32,11],[65,7],[106],[33,11],[11],[32,7],[65,4],[117],[65,48],[106],[34,12],[65,57],[74],[4,64],[32,12],[65,7],[106],[33,12],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,12],[58,0,4],[32,10],[32,10],[65,1],[106],[33,10],[32,11],[58,0,4],[12,1],[11],[11],[32,8],[15],[11],[32,5],[32,3],[65,2],[108],[106],[33,6],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[47,0,4],[33,7],[32,5],[65,2],[106],[33,5],[32,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[12,3],[11],[11],[32,7],[65,128,2],[72],[4,64],[32,4],[65,2],[106],[33,4],[5],[32,4],[65,5],[106],[33,4],[11],[12,1],[11],[11],[32,4],[32,3],[70],[4,64],[32,0],[15],[11],[65,128,128,4],[34,8],[34,13],[65,0],[54,1,0],[32,8],[32,4],[34,9],[54,1,0],[32,0],[33,5],[32,8],[33,10],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[47,0,4],[33,7],[32,5],[65,2],[106],[33,5],[32,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[32,7],[58,0,4],[12,3],[11],[11],[32,7],[65,128,2],[72],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[65,37],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,11],[65,57],[74],[4,64],[32,11],[65,7],[106],[33,11],[11],[32,7],[65,4],[117],[65,48],[106],[34,12],[65,57],[74],[4,64],[32,12],[65,7],[106],[33,12],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,12],[58,0,4],[32,10],[32,10],[65,1],[106],[33,10],[32,11],[58,0,4],[5],[32,10],[65,165,234,1],[59,0,4],[32,10],[65,2],[106],[33,10],[32,7],[65,12],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,8],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,4],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[11],[12,1],[11],[11],[32,8],[15]],
1361
+ wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: escape/lut', 'i8') * pageSize, 127),[33,2],[32,0],[40,1,0],[34,3],[33,4],[32,0],[33,5],[32,1],[65,18],[70],[4,64],[32,5],[32,3],[106],[33,6],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[32,5],[65,1],[106],[33,5],[45,0,4],[34,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[12,3],[11],[11],[32,4],[65,2],[106],[33,4],[12,1],[11],[11],[32,4],[32,3],[70],[4,64],[32,0],[15],[11],...number(allocPage(scope, 'bytestring: escape/output', 'i8') * pageSize, 127),[34,8],[32,4],[34,9],[54,1,0],[32,0],[33,5],[32,8],[33,10],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[32,5],[65,1],[106],[33,5],[45,0,4],[34,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[32,7],[58,0,4],[12,3],[11],[11],[32,10],[32,10],[65,1],[106],[33,10],[65,37],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,11],[65,57],[74],[4,64],[32,11],[65,7],[106],[33,11],[11],[32,7],[65,4],[117],[65,48],[106],[34,12],[65,57],[74],[4,64],[32,12],[65,7],[106],[33,12],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,12],[58,0,4],[32,10],[32,10],[65,1],[106],[33,10],[32,11],[58,0,4],[12,1],[11],[11],[32,8],[15],[11],[32,5],[32,3],[65,2],[108],[106],[33,6],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[47,0,4],[33,7],[32,5],[65,2],[106],[33,5],[32,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[12,3],[11],[11],[32,7],[65,128,2],[72],[4,64],[32,4],[65,2],[106],[33,4],[5],[32,4],[65,5],[106],[33,4],[11],[12,1],[11],[11],[32,4],[32,3],[70],[4,64],[32,0],[15],[11],[32,8],[34,13],[65,0],[54,1,0],[32,13],[34,8],[32,4],[34,9],[54,1,0],[32,0],[33,5],[32,8],[33,10],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[47,0,4],[33,7],[32,5],[65,2],[106],[33,5],[32,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[32,7],[58,0,4],[12,3],[11],[11],[32,7],[65,128,2],[72],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[65,37],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,11],[65,57],[74],[4,64],[32,11],[65,7],[106],[33,11],[11],[32,7],[65,4],[117],[65,48],[106],[34,12],[65,57],[74],[4,64],[32,12],[65,7],[106],[33,12],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,12],[58,0,4],[32,10],[32,10],[65,1],[106],[33,10],[32,11],[58,0,4],[5],[32,10],[65,165,234,1],[59,0,4],[32,10],[65,2],[106],[33,10],[32,7],[65,12],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,8],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,4],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[11],[12,1],[11],[11],[32,8],[15]],
1362
1362
  params: [127,127],
1363
1363
  typedParams: true,
1364
1364
  returns: [127],
@@ -1378,13 +1378,13 @@ export const BuiltinFuncs = function() {
1378
1378
  data: [{"offset":0,"bytes":[14,0,0,0,102,117,110,99,116,105,111,110,32,40,41,32,123,125]}],
1379
1379
  };
1380
1380
  this.parseInt = {
1381
- wasm: (scope, {builtin,}) => [[32,2],[65,0],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,36,64],[33,2],[11],[32,2],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,36,64],[33,2],[11],[32,2],[68,0,0,0,0,0,0,0,64],[99],[34,4],[69],[4,127],[32,2],[68,0,0,0,0,0,0,66,64],[100],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[68,0,0,0,0,0,0,248,127],[15],[11],[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,248,127],[33,7],[32,0],[34,8],[252,2],[40,0,0],[183],[33,9],[32,8],[33,10],[68,0,0,0,0,0,0,0,0],[33,11],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,50,64],[97],[4,64],[32,10],[32,9],[160],[33,12],[32,10],[252,2],[45,0,4],[183],[34,13],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,240,63],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,11],[32,10],[68,0,0,0,0,0,0,240,63],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,240,63],[160],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,14],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,10],[32,12],[99],[4,64],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[160],[33,10],[252,2],[45,0,4],[183],[34,15],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,15],[32,6],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,0,72,64],[161],[160],[33,7],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,15],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,192,85,64],[161],[160],[33,7],[5],[32,15],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,128,75,64],[161],[160],[33,7],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[12,1],[11],[11],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[32,10],[32,9],[68,0,0,0,0,0,0,0,64],[162],[160],[33,12],[32,10],[252,2],[47,0,4],[183],[34,13],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,11],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,0,64],[160],[252,2],[47,0,4],[183],[34,14],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,14],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,10],[68,0,0,0,0,0,0,16,64],[160],[33,10],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,10],[32,12],[99],[4,64],[32,10],[252,2],[47,0,4],[183],[33,15],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[32,15],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,15],[32,6],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,0,72,64],[161],[160],[33,7],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,15],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,192,85,64],[161],[160],[33,7],[5],[32,15],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,128,75,64],[161],[160],[33,7],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[12,1],[11],[11],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15]],
1381
+ wasm: (scope, {builtin,}) => [[32,2],[65,0],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,36,64],[33,2],[11],[32,2],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,36,64],[33,2],[11],[32,2],[68,0,0,0,0,0,0,0,64],[99],[34,4],[69],[4,127],[32,2],[68,0,0,0,0,0,0,66,64],[100],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,0,0,0,0,0,0,248,127],[15],[11],[68,0,0,0,0,0,0,77,64],[33,8],[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,8],[11],[68,0,0,0,0,0,0,248,127],[33,9],[32,0],[34,10],[252,2],[40,0,0],[183],[33,11],[32,10],[33,12],[68,0,0,0,0,0,0,0,0],[33,13],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,50,64],[97],[4,64],[32,12],[32,11],[160],[33,14],[32,12],[252,2],[45,0,4],[183],[34,15],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,13],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[160],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,16],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,12],[32,14],[99],[4,64],[32,12],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[252,2],[45,0,4],[183],[34,17],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,17],[32,8],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,0,72,64],[161],[160],[33,9],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,17],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,17],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,192,85,64],[161],[160],[33,9],[5],[32,17],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,17],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,128,75,64],[161],[160],[33,9],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[12,1],[11],[11],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[32,12],[32,11],[68,0,0,0,0,0,0,0,64],[162],[160],[33,14],[32,12],[252,2],[47,0,4],[183],[34,15],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,13],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,0,64],[160],[252,2],[47,0,4],[183],[34,16],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,16],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,12],[68,0,0,0,0,0,0,16,64],[160],[33,12],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,12],[32,14],[99],[4,64],[32,12],[252,2],[47,0,4],[183],[33,17],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[32,17],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,17],[32,8],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,0,72,64],[161],[160],[33,9],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,17],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,17],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,192,85,64],[161],[160],[33,9],[5],[32,17],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,17],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,128,75,64],[161],[160],[33,9],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[12,1],[11],[11],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15]],
1382
1382
  params: [124,127,124,127],
1383
1383
  typedParams: true,
1384
1384
  returns: [124],
1385
1385
  returnType: 0,
1386
- locals: [127,127,124,124,124,124,124,124,124,124,124,124],
1387
- localNames: ["input","input#type","radix","radix#type","logictmpi","#last_type","nMax","n","inputPtr","len","i","negative","endPtr","startChr","second","chr"],
1386
+ locals: [127,127,124,127,124,124,124,124,124,124,124,124,124,124],
1387
+ localNames: ["input","input#type","radix","radix#type","logictmpi","#last_type","#logicinner_tmp","#typeswitch_tmp","nMax","n","inputPtr","len","i","negative","endPtr","startChr","second","chr"],
1388
1388
  };
1389
1389
  this.__Math_exp = {
1390
1390
  wasm: (scope, {builtin,}) => [[32,0],[16, builtin('__Number_isFinite')],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,0],[68,0,0,0,0,0,0,240,127],[154],[97],[4,64],[68,0,0,0,0,0,0,0,0],[15],[11],[32,0],[15],[11],[32,0],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,240,63],[32,0],[154],[65,0],[16, builtin('__Math_exp')],[163],[15],[11],[32,0],[68,239,57,250,254,66,46,230,63],[163],[16, builtin('__Math_floor')],[33,2],[32,0],[32,2],[68,239,57,250,254,66,46,230,63],[162],[161],[34,3],[33,4],[68,0,0,0,0,0,0,240,63],[32,3],[160],[33,5],[68,0,0,0,0,0,0,0,64],[33,6],[3,64],[32,4],[16, builtin('__Math_abs')],[68,22,86,231,158,175,3,210,60],[100],[4,64],[32,4],[32,3],[32,6],[163],[162],[33,4],[32,5],[32,4],[160],[33,5],[32,6],[68,0,0,0,0,0,0,240,63],[160],[33,6],[12,1],[11],[11],[32,5],[68,0,0,0,0,0,0,240,63],[32,2],[16, builtin('f64_<<')],[162],[15]],
@@ -1594,31 +1594,31 @@ export const BuiltinFuncs = function() {
1594
1594
  localNames: ["y","y#type","x","x#type","ratio","ratio#type"],
1595
1595
  };
1596
1596
  this.__Number_prototype_toString = {
1597
- wasm: (scope, {allocPage,builtin,internalThrow,}) => [...number(allocPage(scope, 'bytestring: __Number_prototype_toString/out', 'i8') * pageSize, 124),[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],[32,4],[252,3],[34,6],[65,3],[54,1,0],[32,6],[65,206,0],[58,0,4],[32,6],[65,225,0],[58,0,5],[32,6],[65,206,0],[58,0,6],[32,6],[184],[33,4],[5],[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],[33,4],[5],[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],[33,4],[11],[11],[32,4],[65,18],[15],[11],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,36,64],[34,2],[65,0],[33,3],[26],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[34,2],[65,0],[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,1],[33,8],[5],[32,7],[65,1],[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,18],[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,18],[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,18],[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,18],[15]],
1597
+ wasm: (scope, {allocPage,builtin,internalThrow,}) => [...number(allocPage(scope, 'bytestring: __Number_prototype_toString/out', 'i8') * pageSize, 124),[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],[32,4],[252,3],[34,6],[65,3],[54,1,0],[32,6],[65,206,0],[58,0,4],[32,6],[65,225,0],[58,0,5],[32,6],[65,206,0],[58,0,6],[32,6],[184],[33,4],[5],[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],[33,4],[5],[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],[33,4],[11],[11],[32,4],[65,18],[15],[11],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,36,64],[34,2],[65,0],[33,3],[26],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[34,2],[65,0],[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,1],[33,8],[5],[32,7],[65,1],[33,8],[11],[183],[33,9],[32,8],[33,10],[2,127],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,9],[252,3],[40,1,0],[12,1],[11],[32,10],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,9],[252,3],[40,1,0],[12,1],[11],[32,9],[252,3],[11,"TYPESWITCH_end"],[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,18],[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,11],...number(allocPage(scope, 'bytestring: __Number_prototype_toString/digits', 'i8') * pageSize, 124),[33,12],[68,0,0,0,0,0,0,0,0],[33,13],[32,2],[68,0,0,0,0,0,0,36,64],[97],[4,64],[32,11],[68,80,239,226,214,228,26,75,68],[102],[4,64],[68,0,0,0,0,0,0,240,63],[33,14],[68,0,0,0,0,0,0,240,191],[33,15],[3,64],[32,11],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,11],[32,2],[16, builtin('f64_%')],[33,16],[32,11],[32,2],[163],[16, builtin('__Math_trunc')],[33,11],[32,15],[68,0,0,0,0,0,0,240,63],[160],[33,15],[32,14],[252,3],[4,64],[32,16],[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,14],[11],[32,12],[32,13],[160],[252,2],[32,16],[252,2],[58,0,4],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,17],[32,5],[32,13],[160],[33,18],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,19],[3,64],[32,5],[32,18],[99],[4,64],[32,5],[32,19],[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,18],[68,0,0,0,0,0,0,240,63],[160],[33,18],[11],[32,17],[68,0,0,0,0,0,0,240,63],[161],[34,17],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[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,13],[3,64],[32,15],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,12],[32,13],[160],[252,2],[32,15],[32,2],[16, builtin('f64_%')],[252,2],[58,0,4],[32,15],[32,2],[163],[16, builtin('__Math_trunc')],[33,15],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,17],[32,5],[32,13],[160],[33,18],[3,64],[32,5],[32,18],[99],[4,64],[32,17],[68,0,0,0,0,0,0,240,63],[161],[34,17],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[252,2],[58,0,4],[12,1],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,20],[252,3],[54,1,0],[32,4],[65,18],[15],[11],[32,0],[68,141,237,181,160,247,198,176,62],[99],[4,64],[32,0],[33,21],[68,0,0,0,0,0,0,240,63],[33,15],[3,64],[65,1],[4,64],[32,21],[32,2],[162],[34,21],[16, builtin('__Math_trunc')],[34,22],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,21],[32,22],[161],[68,187,189,215,217,223,124,219,61],[99],[4,64],[12,2],[11],[5],[32,15],[68,0,0,0,0,0,0,240,63],[160],[33,15],[11],[12,1],[11],[11],[3,64],[32,21],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,21],[32,2],[16, builtin('f64_%')],[33,16],[32,21],[32,2],[163],[16, builtin('__Math_trunc')],[33,21],[32,12],[32,13],[160],[252,2],[32,16],[252,2],[58,0,4],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,17],[32,5],[32,13],[160],[33,18],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,19],[3,64],[32,5],[32,18],[99],[4,64],[32,17],[68,0,0,0,0,0,0,240,63],[161],[34,17],[252,2],[45,0,4],[183],[33,16],[32,5],[32,19],[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,18],[68,0,0,0,0,0,0,240,63],[160],[33,18],[11],[32,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[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,13],[3,64],[32,15],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,12],[32,13],[160],[252,2],[32,15],[32,2],[16, builtin('f64_%')],[252,2],[58,0,4],[32,15],[32,2],[163],[16, builtin('__Math_trunc')],[33,15],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,17],[32,5],[32,13],[160],[33,18],[3,64],[32,5],[32,18],[99],[4,64],[32,17],[68,0,0,0,0,0,0,240,63],[161],[34,17],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[252,2],[58,0,4],[12,1],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,20],[252,3],[54,1,0],[32,4],[65,18],[15],[11],[11],[32,11],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,12],[252,2],[65,0],[58,0,4],[68,0,0,0,0,0,0,240,63],[33,13],[5],[3,64],[32,11],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,12],[32,13],[160],[252,2],[32,11],[32,2],[16, builtin('f64_%')],[252,2],[58,0,4],[32,11],[32,2],[163],[16, builtin('__Math_trunc')],[33,11],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[11],[32,12],[32,13],[160],[33,17],[32,5],[32,13],[160],[33,18],[3,64],[32,5],[32,18],[99],[4,64],[32,17],[68,0,0,0,0,0,0,240,63],[161],[34,17],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[252,2],[58,0,4],[12,1],[11],[11],[32,0],[32,0],[16, builtin('__Math_trunc')],[161],[34,21],[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,21],[68,0,0,0,0,0,0,240,63],[160],[33,21],[68,0,0,0,0,0,0,48,64],[32,13],[161],[33,23],[68,0,0,0,0,0,0,0,0],[33,24],[3,64],[32,24],[32,23],[99],[4,64],[32,21],[32,2],[162],[33,21],[32,24],[68,0,0,0,0,0,0,240,63],[160],[33,24],[12,1],[11],[11],[32,21],[16, builtin('__Math_round')],[33,21],[68,0,0,0,0,0,0,0,0],[33,13],[68,0,0,0,0,0,0,240,63],[33,14],[3,64],[32,21],[68,0,0,0,0,0,0,240,63],[100],[4,64],[32,21],[32,2],[16, builtin('f64_%')],[33,16],[32,21],[32,2],[163],[16, builtin('__Math_trunc')],[33,21],[32,14],[252,3],[4,64],[32,16],[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,14],[11],[32,12],[32,13],[160],[252,2],[32,16],[252,2],[58,0,4],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,17],[32,5],[32,13],[160],[33,18],[3,64],[32,5],[32,18],[99],[4,64],[32,17],[68,0,0,0,0,0,0,240,63],[161],[34,17],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[252,2],[58,0,4],[12,1],[11],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,20],[252,3],[54,1,0],[32,4],[65,18],[15]],
1598
1598
  params: [124,127,124,127],
1599
1599
  typedParams: true,
1600
1600
  returns: [124,127],
1601
1601
  typedReturns: true,
1602
- locals: [124,124,127,127,127,124,124,124,124,124,124,124,124,124,124,124,124,124,124],
1603
- localNames: ["_this","_this#type","radix","radix#type","out","outPtr","#makearray_pointer_tmp","logictmpi","#last_type","i","digits","l","trailing","e","digit","digitsPtr","endPtr","dotPlace","__length_setter_tmp","decimal","intPart","decimalDigits","j"],
1602
+ locals: [124,124,127,127,127,124,127,124,124,124,124,124,124,124,124,124,124,124,124,124,124],
1603
+ localNames: ["_this","_this#type","radix","radix#type","out","outPtr","#makearray_pointer_tmp","logictmpi","#last_type","#logicinner_tmp","#typeswitch_tmp","i","digits","l","trailing","e","digit","digitsPtr","endPtr","dotPlace","__length_setter_tmp","decimal","intPart","decimalDigits","j"],
1604
1604
  };
1605
1605
  this.__Number_prototype_toFixed = {
1606
- wasm: (scope, {allocPage,builtin,internalThrow,}) => [...number(allocPage(scope, 'bytestring: __Number_prototype_toFixed/out', 'i8') * pageSize, 124),[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],[32,4],[252,3],[34,6],[65,3],[54,1,0],[32,6],[65,206,0],[58,0,4],[32,6],[65,225,0],[58,0,5],[32,6],[65,206,0],[58,0,6],[32,6],[184],[33,4],[5],[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],[33,4],[5],[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],[33,4],[11],[11],[32,4],[65,18],[15],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[34,2],[68,0,0,0,0,0,0,0,0],[99],[34,7],[69],[4,127],[32,2],[68,0,0,0,0,0,0,89,64],[100],[65,1],[33,8],[5],[32,7],[65,1],[33,8],[11],[4,64],...internalThrow(scope, 'RangeError', `toFixed() fractionDigits argument must be between 0 and 100`),[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_toFixed/digits', 'i8') * pageSize, 124),[33,10],[68,0,0,0,0,0,0,0,0],[33,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],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[252,2],[58,0,4],[32,9],[68,0,0,0,0,0,0,36,64],[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,12],[32,5],[32,11],[160],[33,13],[3,64],[32,5],[32,13],[99],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[161],[34,12],[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],[33,15],[32,2],[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,15],[68,0,0,0,0,0,0,240,63],[160],[33,15],[68,0,0,0,0,0,0,0,0],[33,16],[3,64],[32,16],[32,2],[99],[4,64],[32,15],[68,0,0,0,0,0,0,36,64],[162],[33,15],[32,16],[68,0,0,0,0,0,0,240,63],[160],[33,16],[12,1],[11],[11],[32,15],[16, builtin('__Math_round')],[33,15],[68,0,0,0,0,0,0,0,0],[33,11],[3,64],[32,15],[68,0,0,0,0,0,0,240,63],[100],[4,64],[32,15],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[33,14],[32,15],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,15],[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,12],[32,5],[32,11],[160],[33,13],[3,64],[32,5],[32,13],[99],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[161],[34,12],[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,17],[252,3],[54,1,0],[32,4],[65,18],[15]],
1606
+ wasm: (scope, {allocPage,builtin,internalThrow,}) => [...number(allocPage(scope, 'bytestring: __Number_prototype_toFixed/out', 'i8') * pageSize, 124),[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],[32,4],[252,3],[34,6],[65,3],[54,1,0],[32,6],[65,206,0],[58,0,4],[32,6],[65,225,0],[58,0,5],[32,6],[65,206,0],[58,0,6],[32,6],[184],[33,4],[5],[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],[33,4],[5],[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],[33,4],[11],[11],[32,4],[65,18],[15],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[34,2],[68,0,0,0,0,0,0,0,0],[99],[34,7],[69],[4,127],[32,2],[68,0,0,0,0,0,0,89,64],[100],[65,1],[33,8],[5],[32,7],[65,1],[33,8],[11],[183],[33,9],[32,8],[33,10],[2,127],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,9],[252,3],[40,1,0],[12,1],[11],[32,10],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,9],[252,3],[40,1,0],[12,1],[11],[32,9],[252,3],[11,"TYPESWITCH_end"],[4,64],...internalThrow(scope, 'RangeError', `toFixed() fractionDigits argument must be between 0 and 100`),[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,11],...number(allocPage(scope, 'bytestring: __Number_prototype_toFixed/digits', 'i8') * pageSize, 124),[33,12],[68,0,0,0,0,0,0,0,0],[33,13],[32,11],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,12],[252,2],[65,0],[58,0,4],[68,0,0,0,0,0,0,240,63],[33,13],[5],[3,64],[32,11],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,12],[32,13],[160],[252,2],[32,11],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[252,2],[58,0,4],[32,11],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,11],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[11],[32,12],[32,13],[160],[33,14],[32,5],[32,13],[160],[33,15],[3,64],[32,5],[32,15],[99],[4,64],[32,14],[68,0,0,0,0,0,0,240,63],[161],[34,14],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[252,2],[58,0,4],[12,1],[11],[11],[32,0],[32,0],[16, builtin('__Math_trunc')],[161],[33,17],[32,2],[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,17],[68,0,0,0,0,0,0,240,63],[160],[33,17],[68,0,0,0,0,0,0,0,0],[33,18],[3,64],[32,18],[32,2],[99],[4,64],[32,17],[68,0,0,0,0,0,0,36,64],[162],[33,17],[32,18],[68,0,0,0,0,0,0,240,63],[160],[33,18],[12,1],[11],[11],[32,17],[16, builtin('__Math_round')],[33,17],[68,0,0,0,0,0,0,0,0],[33,13],[3,64],[32,17],[68,0,0,0,0,0,0,240,63],[100],[4,64],[32,17],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[33,16],[32,17],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,17],[32,12],[32,13],[160],[252,2],[32,16],[252,2],[58,0,4],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,14],[32,5],[32,13],[160],[33,15],[3,64],[32,5],[32,15],[99],[4,64],[32,14],[68,0,0,0,0,0,0,240,63],[161],[34,14],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,16],[68,0,0,0,0,0,0,72,64],[160],[33,16],[5],[32,16],[68,0,0,0,0,0,192,85,64],[160],[33,16],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,16],[252,2],[58,0,4],[12,1],[11],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,19],[252,3],[54,1,0],[32,4],[65,18],[15]],
1607
1607
  params: [124,127,124,127],
1608
1608
  typedParams: true,
1609
1609
  returns: [124,127],
1610
1610
  typedReturns: true,
1611
- locals: [124,124,127,127,127,124,124,124,124,124,124,124,124,124],
1612
- localNames: ["_this","_this#type","fractionDigits","fractionDigits#type","out","outPtr","#makearray_pointer_tmp","logictmpi","#last_type","i","digits","l","digitsPtr","endPtr","digit","decimal","j","__length_setter_tmp"],
1611
+ locals: [124,124,127,127,127,124,127,124,124,124,124,124,124,124,124,124],
1612
+ localNames: ["_this","_this#type","fractionDigits","fractionDigits#type","out","outPtr","#makearray_pointer_tmp","logictmpi","#last_type","#logicinner_tmp","#typeswitch_tmp","i","digits","l","digitsPtr","endPtr","digit","decimal","j","__length_setter_tmp"],
1613
1613
  };
1614
1614
  this.__Number_prototype_toExponential = {
1615
- wasm: (scope, {allocPage,builtin,internalThrow,}) => [...number(allocPage(scope, 'bytestring: __Number_prototype_toExponential/out', 'i8') * pageSize, 124),[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],[32,4],[252,3],[34,6],[65,3],[54,1,0],[32,6],[65,206,0],[58,0,4],[32,6],[65,225,0],[58,0,5],[32,6],[65,206,0],[58,0,6],[32,6],[184],[33,4],[5],[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],[33,4],[5],[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],[33,4],[11],[11],[32,4],[65,18],[15],[11],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,0,0],[34,2],[65,3],[33,3],[26],[5],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[34,2],[65,0],[33,3],[26],[32,2],[68,0,0,0,0,0,0,0,0],[99],[34,7],[69],[4,127],[32,2],[68,0,0,0,0,0,0,89,64],[100],[65,1],[33,8],[5],[32,7],[65,1],[33,8],[11],[4,64],...internalThrow(scope, 'RangeError', `toExponential() fractionDigits argument must be between 0 and 100`),[11],[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],[33,9],...number(allocPage(scope, 'bytestring: __Number_prototype_toExponential/digits', 'i8') * pageSize, 124),[33,10],[68,0,0,0,0,0,0,0,0],[33,11],[68,0,0,0,0,0,0,0,0],[33,12],[32,0],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,48],[58,0,4],[32,2],[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],[68,0,0,0,0,0,0,0,0],[33,15],[3,64],[32,15],[32,2],[99],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,48],[58,0,4],[32,15],[68,0,0,0,0,0,0,240,63],[160],[33,15],[12,1],[11],[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],[5],[32,0],[68,0,0,0,0,0,0,240,63],[99],[4,64],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,240,63],[33,12],[3,64],[65,1],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[162],[34,9],[16, builtin('__Math_trunc')],[34,16],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,9],[32,16],[161],[68,187,189,215,217,223,124,219,61],[99],[4,64],[12,2],[11],[5],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[11],[12,1],[11],[11],[5],[68,0,0,0,0,0,0,240,63],[33,12],[68,0,0,0,0,0,0,0,0],[33,15],[3,64],[32,15],[32,2],[101],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[162],[34,9],[16, builtin('__Math_trunc')],[34,16],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[5],[32,15],[68,0,0,0,0,0,0,240,63],[160],[33,15],[11],[12,1],[11],[11],[11],[3,64],[32,9],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[33,17],[32,9],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,9],[32,10],[32,11],[160],[252,2],[32,17],[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,13],[32,5],[32,11],[160],[33,14],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,18],[3,64],[32,5],[32,14],[99],[4,64],[32,13],[68,0,0,0,0,0,0,240,63],[161],[34,13],[252,2],[45,0,4],[183],[33,17],[32,5],[32,18],[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,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[11],[32,17],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,17],[68,0,0,0,0,0,0,72,64],[160],[33,17],[5],[32,17],[68,0,0,0,0,0,192,85,64],[160],[33,17],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,17],[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],[5],[68,0,0,0,0,0,0,240,191],[33,12],[3,64],[32,9],[68,0,0,0,0,0,0,240,63],[102],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[163],[33,9],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[12,1],[11],[11],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[3,64],[65,1],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[162],[34,9],[16, builtin('__Math_trunc')],[34,16],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,9],[32,16],[161],[68,187,189,215,217,223,124,219,61],[99],[4,64],[12,2],[11],[5],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[11],[12,1],[11],[11],[5],[68,0,0,0,0,0,0,0,0],[33,15],[3,64],[32,15],[32,2],[101],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[162],[33,9],[32,15],[68,0,0,0,0,0,0,240,63],[160],[33,15],[12,1],[11],[11],[11],[32,9],[16, builtin('__Math_round')],[33,9],[3,64],[32,9],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,9],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[33,17],[32,9],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,9],[32,10],[32,11],[160],[252,2],[32,17],[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,13],[32,5],[32,11],[160],[33,14],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,18],[3,64],[32,5],[32,14],[99],[4,64],[32,5],[32,18],[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,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[11],[32,13],[68,0,0,0,0,0,0,240,63],[161],[34,13],[252,2],[45,0,4],[183],[34,17],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,17],[68,0,0,0,0,0,0,72,64],[160],[33,17],[5],[32,17],[68,0,0,0,0,0,192,85,64],[160],[33,17],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,17],[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],[11],[11],[32,12],[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],[68,0,0,0,0,0,0,0,0],[33,11],[3,64],[32,12],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,10],[32,11],[160],[252,2],[32,12],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[252,2],[58,0,4],[32,12],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,12],[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,13],[32,5],[32,11],[160],[33,14],[3,64],[32,5],[32,14],[99],[4,64],[32,13],[68,0,0,0,0,0,0,240,63],[161],[34,13],[252,2],[45,0,4],[183],[34,17],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,17],[68,0,0,0,0,0,0,72,64],[160],[33,17],[5],[32,17],[68,0,0,0,0,0,192,85,64],[160],[33,17],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,17],[252,2],[58,0,4],[12,1],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,19],[252,3],[54,1,0],[32,4],[65,18],[15]],
1615
+ wasm: (scope, {allocPage,builtin,internalThrow,}) => [...number(allocPage(scope, 'bytestring: __Number_prototype_toExponential/out', 'i8') * pageSize, 124),[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],[32,4],[252,3],[34,6],[65,3],[54,1,0],[32,6],[65,206,0],[58,0,4],[32,6],[65,225,0],[58,0,5],[32,6],[65,206,0],[58,0,6],[32,6],[184],[33,4],[5],[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],[33,4],[5],[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],[33,4],[11],[11],[32,4],[65,18],[15],[11],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,0,0],[34,2],[65,3],[33,3],[26],[5],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[34,2],[65,0],[33,3],[26],[32,2],[68,0,0,0,0,0,0,0,0],[99],[34,7],[69],[4,127],[32,2],[68,0,0,0,0,0,0,89,64],[100],[65,1],[33,8],[5],[32,7],[65,1],[33,8],[11],[183],[33,9],[32,8],[33,10],[2,127],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,9],[252,3],[40,1,0],[12,1],[11],[32,10],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,9],[252,3],[40,1,0],[12,1],[11],[32,9],[252,3],[11,"TYPESWITCH_end"],[4,64],...internalThrow(scope, 'RangeError', `toExponential() fractionDigits argument must be between 0 and 100`),[11],[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],[33,11],...number(allocPage(scope, 'bytestring: __Number_prototype_toExponential/digits', 'i8') * pageSize, 124),[33,12],[68,0,0,0,0,0,0,0,0],[33,13],[68,0,0,0,0,0,0,0,0],[33,14],[32,0],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,48],[58,0,4],[32,2],[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],[68,0,0,0,0,0,0,0,0],[33,17],[3,64],[32,17],[32,2],[99],[4,64],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[65,48],[58,0,4],[32,17],[68,0,0,0,0,0,0,240,63],[160],[33,17],[12,1],[11],[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],[5],[32,0],[68,0,0,0,0,0,0,240,63],[99],[4,64],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,240,63],[33,14],[3,64],[65,1],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[162],[34,11],[16, builtin('__Math_trunc')],[34,18],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,11],[32,18],[161],[68,187,189,215,217,223,124,219,61],[99],[4,64],[12,2],[11],[5],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[11],[12,1],[11],[11],[5],[68,0,0,0,0,0,0,240,63],[33,14],[68,0,0,0,0,0,0,0,0],[33,17],[3,64],[32,17],[32,2],[101],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[162],[34,11],[16, builtin('__Math_trunc')],[34,18],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[5],[32,17],[68,0,0,0,0,0,0,240,63],[160],[33,17],[11],[12,1],[11],[11],[11],[3,64],[32,11],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[33,19],[32,11],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,11],[32,12],[32,13],[160],[252,2],[32,19],[252,2],[58,0,4],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,15],[32,5],[32,13],[160],[33,16],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,20],[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,19],[32,5],[32,20],[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,19],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,19],[68,0,0,0,0,0,0,72,64],[160],[33,19],[5],[32,19],[68,0,0,0,0,0,192,85,64],[160],[33,19],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,19],[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],[5],[68,0,0,0,0,0,0,240,191],[33,14],[3,64],[32,11],[68,0,0,0,0,0,0,240,63],[102],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[163],[33,11],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[12,1],[11],[11],[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[3,64],[65,1],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[162],[34,11],[16, builtin('__Math_trunc')],[34,18],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,11],[32,18],[161],[68,187,189,215,217,223,124,219,61],[99],[4,64],[12,2],[11],[5],[32,14],[68,0,0,0,0,0,0,240,63],[160],[33,14],[11],[12,1],[11],[11],[5],[68,0,0,0,0,0,0,0,0],[33,17],[3,64],[32,17],[32,2],[101],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[162],[33,11],[32,17],[68,0,0,0,0,0,0,240,63],[160],[33,17],[12,1],[11],[11],[11],[32,11],[16, builtin('__Math_round')],[33,11],[3,64],[32,11],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,11],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[33,19],[32,11],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,11],[32,12],[32,13],[160],[252,2],[32,19],[252,2],[58,0,4],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[32,12],[32,13],[160],[33,15],[32,5],[32,13],[160],[33,16],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,20],[3,64],[32,5],[32,16],[99],[4,64],[32,5],[32,20],[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,19],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,19],[68,0,0,0,0,0,0,72,64],[160],[33,19],[5],[32,19],[68,0,0,0,0,0,192,85,64],[160],[33,19],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,19],[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],[11],[11],[32,14],[68,0,0,0,0,0,0,0,0],[97],[4,64],[32,12],[252,2],[65,0],[58,0,4],[68,0,0,0,0,0,0,240,63],[33,13],[5],[68,0,0,0,0,0,0,0,0],[33,13],[3,64],[32,14],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,12],[32,13],[160],[252,2],[32,14],[68,0,0,0,0,0,0,36,64],[16, builtin('f64_%')],[252,2],[58,0,4],[32,14],[68,0,0,0,0,0,0,36,64],[163],[16, builtin('__Math_trunc')],[33,14],[32,13],[68,0,0,0,0,0,0,240,63],[160],[33,13],[12,1],[11],[11],[11],[32,12],[32,13],[160],[33,15],[32,5],[32,13],[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,19],[68,0,0,0,0,0,0,36,64],[99],[4,64],[32,19],[68,0,0,0,0,0,0,72,64],[160],[33,19],[5],[32,19],[68,0,0,0,0,0,192,85,64],[160],[33,19],[11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[252,2],[32,19],[252,2],[58,0,4],[12,1],[11],[11],[32,4],[252,3],[32,5],[32,4],[161],[34,21],[252,3],[54,1,0],[32,4],[65,18],[15]],
1616
1616
  params: [124,127,124,127],
1617
1617
  typedParams: true,
1618
1618
  returns: [124,127],
1619
1619
  typedReturns: true,
1620
- locals: [124,124,127,127,127,124,124,124,124,124,124,124,124,124,124,124],
1621
- localNames: ["_this","_this#type","fractionDigits","fractionDigits#type","out","outPtr","#makearray_pointer_tmp","logictmpi","#last_type","i","digits","l","e","digitsPtr","endPtr","j","intPart","digit","dotPlace","__length_setter_tmp"],
1620
+ locals: [124,124,127,127,127,124,127,124,124,124,124,124,124,124,124,124,124,124],
1621
+ localNames: ["_this","_this#type","fractionDigits","fractionDigits#type","out","outPtr","#makearray_pointer_tmp","logictmpi","#last_type","#logicinner_tmp","#typeswitch_tmp","i","digits","l","e","digitsPtr","endPtr","j","intPart","digit","dotPlace","__length_setter_tmp"],
1622
1622
  };
1623
1623
  this.__Number_prototype_valueOf = {
1624
1624
  wasm: (scope, {}) => [[32,0],[65,0],[15]],
@@ -1640,7 +1640,7 @@ export const BuiltinFuncs = function() {
1640
1640
  data: [{"offset":0,"bytes":[15,0,0,0,91,111,98,106,101,99,116,32,79,98,106,101,99,116,93]}],
1641
1641
  };
1642
1642
  this.__Porffor_allocate = {
1643
- wasm: (scope, {}) => [[65,1],[64,0],[26],[63,0],[65,1],[107],[65,128,128,4],[108],[184],[15]],
1643
+ wasm: (scope, {}) => [[63,0],[65,1],[64,0],[26],[65,128,128,4],[108],[184],[15]],
1644
1644
  params: [],
1645
1645
  typedParams: true,
1646
1646
  returns: [124],
@@ -1739,7 +1739,7 @@ export const BuiltinFuncs = function() {
1739
1739
  localNames: [],
1740
1740
  };
1741
1741
  this.Set$constructor = {
1742
- wasm: (scope, {builtin,internalThrow,}) => [[16, builtin('__Porffor_allocate')],[33,2],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[34,3],[68,0,0,0,0,0,0,48,64],[97],[32,3],[68,0,0,0,0,0,0,0,64],[97],[114],[32,3],[68,0,0,0,0,0,0,50,64],[97],[114],[32,3],[68,0,0,0,0,0,0,52,64],[97],[114],[4,64],[32,0],[252,3],[33,4],[65,0],[33,6],[32,4],[40,1,0],[33,5],[32,1],[33,10],[2,64],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[65,2],[33,8],[3,64],[65,0],[32,4],[47,0,4],[59,0,3],[68,0,0,0,0,0,0,240,191],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,2],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,16],[70],[4,64,"TYPESWITCH|Array"],[3,64],[32,4],[43,0,4],[32,4],[45,0,12],[33,8],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,9],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[65,18],[33,8],[3,64],[65,0],[32,4],[32,6],[106],[45,0,4],[58,0,3],[68,0,0,0,0,0,0,240,191],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,20],[70],[4,64,"TYPESWITCH|Set"],[3,64],[32,4],[43,0,4],[32,4],[45,0,12],[33,8],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,9],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `Tried for..of on non-iterable type`),[11,"TYPESWITCH_end"],[11],[32,2],[15]],
1742
+ wasm: (scope, {builtin,internalThrow,}) => [[16, builtin('__Porffor_allocate')],[33,2],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[34,3],[68,0,0,0,0,0,0,48,64],[97],[32,3],[68,0,0,0,0,0,0,0,64],[97],[114],[32,3],[68,0,0,0,0,0,0,50,64],[97],[114],[32,3],[68,0,0,0,0,0,0,52,64],[97],[114],[4,64],[32,0],[252,3],[33,4],[65,0],[33,6],[32,4],[40,1,0],[33,5],[32,1],[33,10],[2,64],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[65,2],[33,8],[65,0],[65,1],[54,0,0],[3,64],[65,0],[32,4],[47,0,4],[59,0,4],[68,0,0,0,0,0,0,0,0],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,2],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,16],[70],[4,64,"TYPESWITCH|Array"],[3,64],[32,4],[43,0,4],[32,4],[45,0,12],[33,8],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,9],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[65,18],[33,8],[65,0],[65,1],[54,0,0],[3,64],[65,0],[32,4],[32,6],[106],[45,0,4],[58,0,4],[68,0,0,0,0,0,0,0,0],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,20],[70],[4,64,"TYPESWITCH|Set"],[3,64],[32,4],[43,0,4],[32,4],[45,0,12],[33,8],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,9],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `Tried for..of on non-iterable type`),[11,"TYPESWITCH_end"],[11],[32,2],[15]],
1743
1743
  params: [124,127],
1744
1744
  typedParams: true,
1745
1745
  returns: [124],
@@ -1748,7 +1748,7 @@ export const BuiltinFuncs = function() {
1748
1748
  localNames: ["iterable","iterable#type","out","type","forof_base_pointer","forof_length","forof_counter","x","x#type","#last_type","#typeswitch_tmp"],
1749
1749
  };
1750
1750
  this.__Set_prototype_union = {
1751
- wasm: (scope, {builtin,internalThrow,}) => [[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,52,64],[98],[4,64],...internalThrow(scope, 'TypeError', `Set.union requires 'Set'`),[11],[32,0],[65,20],[16, builtin('Set$constructor')],[33,4],[32,2],[252,3],[33,5],[65,0],[33,7],[32,5],[40,1,0],[33,6],[32,3],[33,11],[2,64],[32,11],[65,2],[70],[4,64,"TYPESWITCH|String"],[65,2],[33,9],[3,64],[65,0],[32,5],[47,0,4],[59,0,3],[68,0,0,0,0,0,0,240,191],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,5],[65,2],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],[32,11],[65,16],[70],[4,64,"TYPESWITCH|Array"],[3,64],[32,5],[43,0,4],[32,5],[45,0,12],[33,9],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,5],[65,9],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],[32,11],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[65,18],[33,9],[3,64],[65,0],[32,5],[32,7],[106],[45,0,4],[58,0,3],[68,0,0,0,0,0,0,240,191],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],[32,11],[65,20],[70],[4,64,"TYPESWITCH|Set"],[3,64],[32,5],[43,0,4],[32,5],[45,0,12],[33,9],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,5],[65,9],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `Tried for..of on non-iterable type`),[11,"TYPESWITCH_end"],[32,4],[65,20],[15]],
1751
+ wasm: (scope, {builtin,internalThrow,}) => [[32,2],[32,3],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,52,64],[98],[4,64],...internalThrow(scope, 'TypeError', `Set.prototype.union's 'other' argument must be a Set`),[11],[32,0],[65,20],[16, builtin('Set$constructor')],[33,4],[32,2],[252,3],[33,5],[65,0],[33,7],[32,5],[40,1,0],[33,6],[32,3],[33,11],[2,64],[32,11],[65,2],[70],[4,64,"TYPESWITCH|String"],[65,2],[33,9],[65,0],[65,1],[54,0,0],[3,64],[65,0],[32,5],[47,0,4],[59,0,4],[68,0,0,0,0,0,0,0,0],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,5],[65,2],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],[32,11],[65,16],[70],[4,64,"TYPESWITCH|Array"],[3,64],[32,5],[43,0,4],[32,5],[45,0,12],[33,9],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,5],[65,9],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],[32,11],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[65,18],[33,9],[65,0],[65,1],[54,0,0],[3,64],[65,0],[32,5],[32,7],[106],[45,0,4],[58,0,4],[68,0,0,0,0,0,0,0,0],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],[32,11],[65,20],[70],[4,64,"TYPESWITCH|Set"],[3,64],[32,5],[43,0,4],[32,5],[45,0,12],[33,9],[33,8],[2,64],[32,4],[65,20],[32,8],[32,9],[16, builtin('__Set_prototype_add')],[26],[26],[32,5],[65,9],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `Tried for..of on non-iterable type`),[11,"TYPESWITCH_end"],[32,4],[65,20],[15]],
1752
1752
  params: [124,127,124,127],
1753
1753
  typedParams: true,
1754
1754
  returns: [124,127],
@@ -1757,7 +1757,7 @@ export const BuiltinFuncs = function() {
1757
1757
  localNames: ["_this","_this#type","other","other#type","out","forof_base_pointer","forof_length","forof_counter","x","x#type","#last_type","#typeswitch_tmp"],
1758
1758
  };
1759
1759
  this.__String_fromCharCode = {
1760
- wasm: (scope, {allocPage,}) => [[32,0],[65,128,2],[72],[4,64],...number(allocPage(scope, 'bytestring: __String_fromCharCode/out', 'i8') * pageSize, 127),[34,2],[32,0],[58,0,4],[32,2],[65,18],[15],[11],[65,1],[34,2],[34,3],[65,1],[54,1,0],[32,3],[65,46],[59,0,4],[32,2],[32,0],[59,0,4],[32,2],[65,2],[15]],
1760
+ wasm: (scope, {allocPage,}) => [[32,0],[65,128,2],[72],[4,64],...number(allocPage(scope, 'bytestring: __String_fromCharCode/out', 'i8') * pageSize, 127),[34,2],[32,0],[58,0,4],[32,2],[65,18],[15],[11],[32,2],[34,3],[65,1],[54,1,0],[32,3],[65,46],[59,0,4],[32,3],[34,2],[32,0],[59,0,4],[32,2],[65,2],[15]],
1761
1761
  params: [127,127],
1762
1762
  typedParams: true,
1763
1763
  returns: [127,127],
@@ -0,0 +1,93 @@
1
+ // havoc: wasm rewrite library (it wreaks havoc upon wasm bytecode hence "havoc")
2
+ import { Opcodes, Valtype } from './wasmSpec.js';
3
+
4
+ export const localsToConsts = (func, targets, consts, { localKeys }) => {
5
+ const { wasm, locals } = func;
6
+
7
+ // update locals object
8
+ localKeys ??= Object.keys(locals).sort((a, b) => a.idx - b.idx);
9
+ for (const x of targets) {
10
+ delete locals[localKeys[x]];
11
+ }
12
+
13
+ const idxLut = {};
14
+ for (const x in locals) {
15
+ let i = locals[x].idx;
16
+ const o = i;
17
+ for (let j = 0; j < targets.length; j++) {
18
+ if (o > targets[j]) i--;
19
+ }
20
+
21
+ locals[x].idx = i;
22
+ idxLut[o] = i;
23
+ }
24
+
25
+ // update wasm
26
+ for (let i = 0; i < wasm.length; i++) {
27
+ const op = wasm[i];
28
+ const opcode = op[0];
29
+ const idx = op[1];
30
+
31
+ if (opcode >= 0x20 && opcode <= 0x22) { // local.* op
32
+ if (targets.includes(idx)) {
33
+ if (opcode === Opcodes.local_get || opcode === Opcodes.local_tee) {
34
+ // get/tee -> const
35
+ const c = consts[targets.indexOf(idx)];
36
+ wasm.splice(i, 1, c);
37
+ continue;
38
+ }
39
+
40
+ // set -> drop
41
+ wasm.splice(i, 1, [ Opcodes.drop ]);
42
+ continue;
43
+ }
44
+
45
+ // adjust index to compensate for removed
46
+ wasm[i] = [ opcode, idxLut[idx] ];
47
+ }
48
+ }
49
+ };
50
+
51
+ export const f64ToI32s = (func, targets) => {
52
+ const { wasm, locals } = func;
53
+
54
+ // update locals object
55
+ for (const x in locals) {
56
+ let i = locals[x].idx;
57
+ if (targets.includes(i)) {
58
+ locals[x].type = Valtype.i32;
59
+ }
60
+ }
61
+
62
+ // update wasm
63
+ for (let i = 0; i < wasm.length; i++) {
64
+ const op = wasm[i];
65
+ const opcode = op[0];
66
+ const idx = op[1];
67
+
68
+ if (opcode >= 0x20 && opcode <= 0x22 && targets.includes(idx)) { // local.* op
69
+ if (opcode === Opcodes.local_get) {
70
+ // add i32 -> f64 after
71
+ wasm.splice(i + 1, 0, Opcodes.i32_from);
72
+ continue;
73
+ }
74
+
75
+ if (opcode === Opcodes.local_set) {
76
+ // add f64 -> i32 before
77
+ wasm.splice(i, 0, Opcodes.i32_to);
78
+ i++;
79
+ continue;
80
+ }
81
+
82
+ if (opcode === Opcodes.local_tee) {
83
+ // add f64 -> i32 before
84
+ wasm.splice(i, 0, Opcodes.i32_to);
85
+ i++;
86
+
87
+ // add i32 -> f64 after
88
+ wasm.splice(i + 1, 0, Opcodes.i32_from);
89
+ continue;
90
+ }
91
+ }
92
+ }
93
+ };
package/compiler/index.js CHANGED
@@ -1,10 +1,13 @@
1
1
  import { underline, bold, log } from './log.js';
2
+ import { Valtype, PageSize } from './wasmSpec.js';
2
3
  import parse from './parse.js';
3
4
  import codegen from './codegen.js';
4
5
  import opt from './opt.js';
5
6
  import assemble from './assemble.js';
6
7
  import decompile from './decompile.js';
7
8
  import toc from './2c.js';
9
+ import * as pgo from './pgo.js';
10
+ import cyclone from './cyclone.js';
8
11
  import Prefs from './prefs.js';
9
12
 
10
13
  globalThis.decompile = decompile;
@@ -13,6 +16,7 @@ const logFuncs = (funcs, globals, exceptions) => {
13
16
  console.log('\n' + underline(bold('funcs')));
14
17
 
15
18
  for (const f of funcs) {
19
+ if (f.internal) continue;
16
20
  console.log(decompile(f.wasm, f.name, f.index, f.locals, f.params, f.returns, funcs, globals, exceptions));
17
21
  }
18
22
 
@@ -23,6 +27,24 @@ const fs = (typeof process?.version !== 'undefined' ? (await import('node:fs'))
23
27
  const execSync = (typeof process?.version !== 'undefined' ? (await import('node:child_process')).execSync : undefined);
24
28
 
25
29
  export default (code, flags) => {
30
+ let target = Prefs.target ?? 'wasm';
31
+ if (Prefs.native) target = 'native';
32
+
33
+ let outFile = Prefs.o;
34
+
35
+ globalThis.valtype = 'f64';
36
+ const valtypeOpt = process.argv.find(x => x.startsWith('--valtype='));
37
+ if (valtypeOpt) valtype = valtypeOpt.split('=')[1];
38
+ globalThis.valtypeBinary = Valtype[valtype];
39
+
40
+ globalThis.pageSize = PageSize;
41
+ const pageSizeOpt = process.argv.find(x => x.startsWith('--page-size='));
42
+ if (pageSizeOpt) pageSize = parseInt(pageSizeOpt.split('=')[1]) * 1024;
43
+
44
+ // enable pgo by default for c/native
45
+ if (target !== 'wasm') Prefs.pgo = Prefs.pgo === false ? false : true;
46
+ if (Prefs.pgo) pgo.setup();
47
+
26
48
  const t0 = performance.now();
27
49
  const program = parse(code, flags);
28
50
  if (Prefs.profileCompiler) console.log(`1. parsed in ${(performance.now() - t0).toFixed(2)}ms`);
@@ -35,9 +57,49 @@ export default (code, flags) => {
35
57
 
36
58
  const t2 = performance.now();
37
59
  opt(funcs, globals, pages, tags, exceptions);
38
- if (Prefs.profileCompiler) console.log(`3. optimized in ${(performance.now() - t2).toFixed(2)}ms`);
39
60
 
40
- // if (Prefs.optFuncs) logFuncs(funcs, globals, exceptions);
61
+ if (Prefs.pgo) {
62
+ if (Prefs.pgoLog) {
63
+ const oldSize = assemble(funcs, globals, tags, pages, data, flags, true).byteLength;
64
+ const t = performance.now();
65
+
66
+ pgo.run({ funcs, globals, tags, exceptions, pages, data });
67
+ opt(funcs, globals, pages, tags, exceptions);
68
+
69
+ console.log(`PGO total time: ${(performance.now() - t).toFixed(2)}ms`);
70
+
71
+ const newSize = assemble(funcs, globals, tags, pages, data, flags, true).byteLength;
72
+ console.log(`PGO size diff: ${oldSize - newSize} bytes (${oldSize} -> ${newSize})\n`);
73
+ } else {
74
+ pgo.run({ funcs, globals, tags, exceptions, pages, data });
75
+ opt(funcs, globals, pages, tags, exceptions);
76
+ }
77
+ }
78
+
79
+ if (Prefs.cyclone) {
80
+ if (Prefs.cycloneLog) {
81
+ const oldSize = assemble(funcs, globals, tags, pages, data, flags, true).byteLength;
82
+ const t = performance.now();
83
+
84
+ for (const x of funcs) {
85
+ const preOps = x.wasm.length;
86
+ cyclone(x.wasm);
87
+
88
+ console.log(`${x.name}: ${preOps} -> ${x.wasm.length} ops`);
89
+ }
90
+
91
+ console.log(`cyclone total time: ${(performance.now() - t).toFixed(2)}ms`);
92
+
93
+ const newSize = assemble(funcs, globals, tags, pages, data, flags, true).byteLength;
94
+ console.log(`cyclone size diff: ${oldSize - newSize} bytes (${oldSize} -> ${newSize})\n`);
95
+ } else {
96
+ for (const x of funcs) {
97
+ cyclone(x.wasm);
98
+ }
99
+ }
100
+ }
101
+
102
+ if (Prefs.profileCompiler) console.log(`3. optimized in ${(performance.now() - t2).toFixed(2)}ms`);
41
103
 
42
104
  const t3 = performance.now();
43
105
  const wasm = assemble(funcs, globals, tags, pages, data, flags);
@@ -54,9 +116,6 @@ export default (code, flags) => {
54
116
 
55
117
  const out = { wasm, funcs, globals, tags, exceptions, pages, data };
56
118
 
57
- const target = Prefs.target ?? 'wasm';
58
- const outFile = Prefs.o;
59
-
60
119
  if (target === 'wasm' && outFile) {
61
120
  fs.writeFileSync(outFile, Buffer.from(wasm));
62
121
 
@@ -77,6 +136,8 @@ export default (code, flags) => {
77
136
  }
78
137
 
79
138
  if (target === 'native') {
139
+ outFile ??= Prefs.native ? './porffor_tmp' : file.split('/').at(-1).split('.').at(0, -1).join('.');
140
+
80
141
  let compiler = Prefs.compiler ?? 'clang';
81
142
  const cO = Prefs._cO ?? 'Ofast';
82
143
 
@@ -95,7 +156,29 @@ export default (code, flags) => {
95
156
 
96
157
  fs.unlinkSync(tmpfile);
97
158
 
98
- if (process.version) process.exit();
159
+ if (process.version) {
160
+ if (Prefs.native) {
161
+ const cleanup = () => {
162
+ try {
163
+ fs.unlinkSync(outFile);
164
+ } catch {}
165
+ };
166
+
167
+ process.on('exit', cleanup);
168
+ process.on('beforeExit', cleanup);
169
+ process.on('SIGINT', () => {
170
+ cleanup();
171
+ process.exit();
172
+ });
173
+
174
+ const runArgs = process.argv.slice(2).filter(x => !x.startsWith('-'));
175
+ try {
176
+ execSync([ outFile, ...runArgs.slice(1) ].join(' '), { stdio: 'inherit' });
177
+ } catch {}
178
+ }
179
+
180
+ process.exit();
181
+ }
99
182
  }
100
183
 
101
184
  return out;
package/compiler/opt.js CHANGED
@@ -108,7 +108,7 @@ export default (funcs, globals, pages, tags, exceptions) => {
108
108
  for (const f of funcs) {
109
109
  const wasm = f.wasm;
110
110
 
111
- const lastType = f.locals['#last_type'];
111
+ const lastType = f.locals['#last_type']?.idx;
112
112
 
113
113
  let runs = (+Prefs.optWasmRuns) || 2; // todo: how many by default?
114
114
  while (runs > 0) {
@@ -125,6 +125,8 @@ export default (funcs, globals, pages, tags, exceptions) => {
125
125
  // main pass
126
126
  for (let i = 0; i < wasm.length; i++) {
127
127
  let inst = wasm[i];
128
+ inst = [ ...inst ];
129
+ wasm[i] = inst;
128
130
 
129
131
  if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block) depth.push(inst[0]);
130
132
  if (inst[0] === Opcodes.end) depth.pop();
@@ -172,14 +174,14 @@ export default (funcs, globals, pages, tags, exceptions) => {
172
174
  }
173
175
  }
174
176
 
175
- if (inst[inst.length - 1] === 'string_only' && !pages.hasAnyString && !Prefs.noRmUnusedTypes) {
177
+ if (inst[inst.length - 1] === 'string_only' && !pages.hasAnyString && Prefs.rmUnusedTypes) {
176
178
  // remove this inst
177
179
  wasm.splice(i, 1);
178
180
  if (i > 0) i--;
179
181
  inst = wasm[i];
180
182
  }
181
183
 
182
- if (inst[inst.length - 1] === 'string_only|start' && !pages.hasAnyString&& !Prefs.noRmUnusedTypes) {
184
+ if (inst[inst.length - 1] === 'string_only|start' && !pages.hasAnyString && Prefs.rmUnusedTypes) {
183
185
  let j = i;
184
186
  for (; j < wasm.length; j++) {
185
187
  const op = wasm[j];
@@ -193,7 +195,7 @@ export default (funcs, globals, pages, tags, exceptions) => {
193
195
  inst = wasm[i];
194
196
  }
195
197
 
196
- if (inst[0] === Opcodes.if && typeof inst[2] === 'string' && !Prefs.noRmUnusedTypes) {
198
+ if (inst[0] === Opcodes.if && typeof inst[2] === 'string' && Prefs.rmUnusedTypes) {
197
199
  // remove unneeded typeswitch checks
198
200
 
199
201
  const type = inst[2].split('|')[1];
@@ -221,7 +223,7 @@ export default (funcs, globals, pages, tags, exceptions) => {
221
223
  }
222
224
  }
223
225
 
224
- if (inst[0] === Opcodes.end && inst[1] === 'TYPESWITCH_end') {
226
+ if (inst[0] === Opcodes.end && inst[1] === 'TYPESWITCH_end' && Prefs.rmUnusedTypes) {
225
227
  // remove unneeded entire typeswitch
226
228
 
227
229
  let j = i - 1, depth = -1, checks = 0;
@@ -248,7 +250,7 @@ export default (funcs, globals, pages, tags, exceptions) => {
248
250
  }
249
251
 
250
252
  // remove setting last type if it is never gotten
251
- if (!f.gotLastType && inst[0] === Opcodes.local_set && inst[1] === lastType?.idx) {
253
+ if (!f.gotLastType && inst[0] === Opcodes.local_set && inst[1] === lastType) {
252
254
  // replace this inst with drop
253
255
  wasm.splice(i, 1, [ Opcodes.drop ]); // remove this and last inst
254
256
  if (i > 0) i--;
@@ -354,7 +356,7 @@ export default (funcs, globals, pages, tags, exceptions) => {
354
356
  continue;
355
357
  }
356
358
 
357
- if (lastInst[0] === Opcodes.const && (inst === Opcodes.i32_to || inst === Opcodes.i32_to_u)) {
359
+ if (lastInst[0] === Opcodes.const && inst[0] === Opcodes.i32_to[0] && (inst[1] === Opcodes.i32_to[1] || inst[1] === Opcodes.i32_to_u[1])) {
358
360
  // change const and immediate i32 convert to i32 const
359
361
  // f64.const 0
360
362
  // i32.trunc_sat_f64_s || i32.trunc_sat_f64_u
@@ -369,7 +371,7 @@ export default (funcs, globals, pages, tags, exceptions) => {
369
371
  continue;
370
372
  }
371
373
 
372
- if (lastInst[0] === Opcodes.i32_const && (inst === Opcodes.i32_from || inst === Opcodes.i32_from_u)) {
374
+ if (lastInst[0] === Opcodes.i32_const && (inst[0] === Opcodes.i32_from[0] || inst[0] === Opcodes.i32_from_u[0])) {
373
375
  // change i32 const and immediate convert to const (opposite way of previous)
374
376
  // i32.const 0
375
377
  // f64.convert_i32_s || f64.convert_i32_u
@@ -504,42 +506,6 @@ export default (funcs, globals, pages, tags, exceptions) => {
504
506
  const useCount = {};
505
507
  for (const x in f.locals) useCount[f.locals[x].idx] = 0;
506
508
 
507
- // final pass
508
- depth = [];
509
- for (let i = 0; i < wasm.length; i++) {
510
- let inst = wasm[i];
511
- if (inst[0] === Opcodes.local_get || inst[0] === Opcodes.local_set || inst[0] === Opcodes.local_tee) useCount[inst[1]]++;
512
-
513
- if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block) depth.push(inst[0]);
514
- if (inst[0] === Opcodes.end) depth.pop();
515
-
516
- if (i < 2) continue;
517
- const lastInst = wasm[i - 1];
518
- const lastLastInst = wasm[i - 2];
519
-
520
- // todo: add more math ops
521
- if (optLevel >= 3 && (inst[0] === Opcodes.add || inst[0] === Opcodes.sub || inst[0] === Opcodes.mul) && lastLastInst[0] === Opcodes.const && lastInst[0] === Opcodes.const) {
522
- // inline const math ops
523
- // i32.const a
524
- // i32.const b
525
- // i32.add
526
- // -->
527
- // i32.const a + b
528
-
529
- // does not work with leb encoded
530
- if (lastInst.length > 2 || lastLastInst.length > 2) continue;
531
-
532
- let a = lastLastInst[1];
533
- let b = lastInst[1];
534
-
535
- const val = performWasmOp(inst[0], a, b);
536
- if (Prefs.optLog) log('opt', `inlined math op (${a} ${inst[0].toString(16)} ${b} -> ${val})`);
537
-
538
- wasm.splice(i - 2, 3, ...number(val)); // remove consts, math op and add new const
539
- i -= 2;
540
- }
541
- }
542
-
543
509
  const localIdxs = Object.values(f.locals).map(x => x.idx);
544
510
  // remove unused locals (cleanup)
545
511
  for (const x in useCount) {