porffor 0.55.35 → 0.55.36

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.
@@ -77,10 +77,10 @@ export const __Porffor_bigint_fromString = (n: string|bytestring): bigint => {
77
77
 
78
78
  let negative: boolean = false;
79
79
  let offset: i32 = 0;
80
- if (n[0] === '-') {
80
+ if (n[0] == '-') {
81
81
  negative = true;
82
82
  offset = 1;
83
- } else if (n[0] === '+') {
83
+ } else if (n[0] == '+') {
84
84
  offset = 1;
85
85
  }
86
86
 
@@ -120,8 +120,8 @@ export const __Porffor_bigint_fromString = (n: string|bytestring): bigint => {
120
120
  digits[j] = quotient;
121
121
  }
122
122
 
123
- while (digits.length > 0 && digits[0] === 0) digits.shift();
124
- if (carry !== 0 || digits.length > 0) result.unshift(carry);
123
+ while (digits.length > 0 && digits[0] == 0) digits.shift();
124
+ if (carry != 0 || digits.length > 0) result.unshift(carry);
125
125
  }
126
126
 
127
127
  return __Porffor_bigint_fromDigits(negative, result);
@@ -524,7 +524,7 @@ export const __Object_defineProperty = (target: any, prop: any, desc: any): any
524
524
  if (!Porffor.object.isObject(desc)) throw new TypeError('Descriptor is a non-object');
525
525
 
526
526
  if (Porffor.type(target) == Porffor.TYPES.array) {
527
- if (prop === 'length' && __Object_hasOwn(desc, 'value')) {
527
+ if (prop == 'length' && __Object_hasOwn(desc, 'value')) {
528
528
  const v: any = desc.value;
529
529
  const n: number = ecma262.ToNumber(v);
530
530
  if (Porffor.fastOr(
@@ -751,7 +751,7 @@ params:[124,127],typedParams:1,returns:[124],returnType:1,
751
751
  locals:[124,124,124,124,124],localNames:["x","x#type","negative","len","out","i","d"],
752
752
  }
753
753
  this.__Porffor_bigint_fromString = {
754
- wasm:(_,{t,makeString,builtin,internalThrow})=>[[32,0],[252,3],[40,1,0],[184],[33,2],[68,0],[33,3],[68,0],[33,4],[68,0],[33,6],[32,0],[33,5],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[65,2],[108],[32,5],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([72],()=>[[32,8],[65,200,0],[70],[4,64],[32,6],[252,3],[65,9],[108],[32,5],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([81],()=>[[32,8],[65,209,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([82],()=>[[32,8],[65,210,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([83],()=>[[32,8],[65,211,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([84],()=>[[32,8],[65,212,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([85],()=>[[32,8],[65,213,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([86],()=>[[32,8],[65,214,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([87],()=>[[32,8],[65,215,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[32,5],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,5],[252,2],[32,1],[32,6],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"-",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,3],[68,1],[33,4],[5],[68,0],[33,13],[32,0],[33,12],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[65,2],[108],[32,12],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([72],()=>[[32,8],[65,200,0],[70],[4,64],[32,13],[252,3],[65,9],[108],[32,12],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([81],()=>[[32,8],[65,209,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([82],()=>[[32,8],[65,210,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([83],()=>[[32,8],[65,211,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([84],()=>[[32,8],[65,212,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([85],()=>[[32,8],[65,213,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([86],()=>[[32,8],[65,214,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([87],()=>[[32,8],[65,215,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[32,12],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,12],[252,2],[32,1],[32,13],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"+",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,4],[11],[11],[68,4294967296],[33,14],[16,builtin('__Porffor_allocate')],[183],[34,15],[252,3],[32,2],[32,4],[161],[252,3],[54,1,0],[68,0],[33,16],[68,0],[33,17],[3,64],[32,16],[32,2],[99],[4,64],[32,0],[252,3],[40,1,0],[33,19],[32,1],[33,8],[2,124],...t([31],()=>[[32,8],[65,31],[70],[4,64],[65,1],[33,7],[32,4],[32,16],[160],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[12,1],[11]]),...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,1],[33,7],[32,4],[32,16],[160],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,1],[33,7],[32,4],[32,16],[160],[252,2],[32,0],[252,3],[106],[45,0,4],[184],[12,1],[11]]),...internalThrow(_,'TypeError',`'charCodeAt' proto func tried to be called on a type without an impl`),[68,0],[11],[34,18],[68,48],[161],[34,22],[68,0],[99],[32,22],[68,9],[100],[114],[4,64],...internalThrow(_,'SyntaxError',`Invalid character in BigInt string`),[26],[11],[32,15],[33,24],[32,16],[32,16],[68,1],[160],[33,16],[33,25],[32,24],[252,3],[32,25],[252,3],[65,9],[108],[106],[34,23],[32,22],[57,0,4],[32,23],[65,1],[58,0,12],[32,17],[68,10],[162],[32,22],[160],[33,17],[12,1],[11],[11],[32,17],[68,2251799813685248],[99],[4,64],[32,17],[15],[26],[11],[16,builtin('__Porffor_allocate')],[183],[33,26],[3,64],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[4,64],[68,0],[33,27],[68,0],[33,28],[3,64],[32,28],[32,15],[252,3],[40,1,0],[184],[99],[4,64],[32,27],[68,10],[162],[32,28],[33,31],[32,15],[33,30],[32,31],[252,3],[65,9],[108],[32,30],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[160],[34,29],[32,14],[163],[16,builtin('__Math_floor')],[33,32],[32,29],[32,14],[16,builtin('f64_%')],[33,27],[32,15],[33,33],[32,28],[33,34],[32,33],[252,3],[32,34],[252,3],[65,9],[108],[106],[34,23],[32,32],[57,0,4],[32,23],[65,1],[58,0,12],[32,28],[68,1],[160],[33,28],[12,1],[11],[11],[3,64],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[34,37],[4,127],[68,0],[33,36],[32,15],[33,35],[32,36],[252,3],[65,9],[108],[32,35],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[68,0],[97],[32,7],[65,128,1],[114],[65,1],[65,128,1],[114],[70],[113],[65,2],[33,7],[5],[32,37],[65,2],[33,7],[11],[4,64],[32,15],[252,3],[34,20],[40,1,0],[33,19],[2,64],[32,19],[69],[4,64],[68,0],[65,128,1],[33,7],[12,1],[11],[32,20],[32,19],[65,1],[107],[34,19],[54,1,0],[32,20],[43,0,4],[32,20],[45,0,12],[33,7],[65,4],[32,20],[106],[65,13],[32,20],[106],[32,19],[65,9],[108],[252,10,0,0],[26],[11],[12,1],[11],[11],[32,27],[68,0],[98],[34,37],[69],[4,127],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[65,2],[33,7],[5],[32,37],[65,2],[33,7],[11],[4,64],[32,26],[33,38],[65,200,0],[33,39],[32,38],[32,39],[65,128,128,1],[32,27],[57,0,4],[65,128,128,1],[65,1],[58,0,12],[65,128,128,1],[65,1],[54,1,0],[68,16384],[65,200,0],[16,builtin('__Array_prototype_unshift')],[33,7],[26],[11],[12,1],[11],[11],[32,3],[65,2],[32,26],[65,200,0],[16,builtin('__Porffor_bigint_fromDigits')],[15]],
754
+ wasm:(_,{t,makeString,builtin,internalThrow})=>[[32,0],[252,3],[40,1,0],[184],[33,2],[68,0],[33,3],[68,0],[33,4],[68,0],[33,6],[32,0],[33,5],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[65,2],[108],[32,5],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([72],()=>[[32,8],[65,200,0],[70],[4,64],[32,6],[252,3],[65,9],[108],[32,5],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([81],()=>[[32,8],[65,209,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([82],()=>[[32,8],[65,210,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([83],()=>[[32,8],[65,211,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([84],()=>[[32,8],[65,212,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([85],()=>[[32,8],[65,213,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([86],()=>[[32,8],[65,214,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([87],()=>[[32,8],[65,215,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,5],[252,3],[40,0,4],[32,6],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,6],[252,3],[32,5],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,5],[252,2],[32,1],[32,6],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"-",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,3],[68,1],[33,4],[5],[68,0],[33,13],[32,0],[33,12],[32,1],[33,8],[2,124],...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[65,2],[108],[32,12],[252,3],[106],[47,0,4],[59,0,4],[32,9],[184],[65,195,0],[33,7],[12,1],[11]]),...t([72],()=>[[32,8],[65,200,0],[70],[4,64],[32,13],[252,3],[65,9],[108],[32,12],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[12,1],[11]]),...t([80],()=>[[32,8],[65,208,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([81],()=>[[32,8],[65,209,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([82],()=>[[32,8],[65,210,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([83],()=>[[32,8],[65,211,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([84],()=>[[32,8],[65,212,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([85],()=>[[32,8],[65,213,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11]]),...t([86],()=>[[32,8],[65,214,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11]]),...t([87],()=>[[32,8],[65,215,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11]]),...t([88],()=>[[32,8],[65,216,0],[70],[4,64],[32,12],[252,3],[40,0,4],[32,13],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11]]),...t([128],()=>[[32,8],[65,128,1],[70],[4,64],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,8],[16,builtin('__Porffor_allocateBytes')],[34,9],[65,1],[54,0,0],[32,9],[32,13],[252,3],[32,12],[252,3],[106],[45,0,4],[58,0,4],[32,9],[184],[65,195,1],[33,7],[12,1],[11]]),[32,12],[252,2],[32,1],[32,13],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,11],[252,2],[32,11],[16,builtin('__Porffor_object_get')],[33,7],[11],[32,7],...makeString(_,"+",1),[65,195,1],[16,builtin('__Porffor_compareStrings')],[252,3],[4,64],[68,1],[33,4],[11],[11],[68,4294967296],[33,14],[16,builtin('__Porffor_allocate')],[183],[34,15],[252,3],[32,2],[32,4],[161],[252,3],[54,1,0],[68,0],[33,16],[68,0],[33,17],[3,64],[32,16],[32,2],[99],[4,64],[32,0],[252,3],[40,1,0],[33,19],[32,1],[33,8],[2,124],...t([31],()=>[[32,8],[65,31],[70],[4,64],[65,1],[33,7],[32,4],[32,16],[160],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[12,1],[11]]),...t([67],()=>[[32,8],[65,195,0],[70],[4,64],[65,1],[33,7],[32,4],[32,16],[160],[252,2],[65,2],[108],[32,0],[252,3],[106],[47,0,4],[184],[12,1],[11]]),...t([195],()=>[[32,8],[65,195,1],[70],[4,64],[65,1],[33,7],[32,4],[32,16],[160],[252,2],[32,0],[252,3],[106],[45,0,4],[184],[12,1],[11]]),...internalThrow(_,'TypeError',`'charCodeAt' proto func tried to be called on a type without an impl`),[68,0],[11],[34,18],[68,48],[161],[34,22],[68,0],[99],[32,22],[68,9],[100],[114],[4,64],...internalThrow(_,'SyntaxError',`Invalid character in BigInt string`),[26],[11],[32,15],[33,24],[32,16],[32,16],[68,1],[160],[33,16],[33,25],[32,24],[252,3],[32,25],[252,3],[65,9],[108],[106],[34,23],[32,22],[57,0,4],[32,23],[65,1],[58,0,12],[32,17],[68,10],[162],[32,22],[160],[33,17],[12,1],[11],[11],[32,17],[68,2251799813685248],[99],[4,64],[32,17],[15],[26],[11],[16,builtin('__Porffor_allocate')],[183],[33,26],[3,64],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[4,64],[68,0],[33,27],[68,0],[33,28],[3,64],[32,28],[32,15],[252,3],[40,1,0],[184],[99],[4,64],[32,27],[68,10],[162],[32,28],[33,31],[32,15],[33,30],[32,31],[252,3],[65,9],[108],[32,30],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[160],[34,29],[32,14],[163],[16,builtin('__Math_floor')],[33,32],[32,29],[32,14],[16,builtin('f64_%')],[33,27],[32,15],[33,33],[32,28],[33,34],[32,33],[252,3],[32,34],[252,3],[65,9],[108],[106],[34,23],[32,32],[57,0,4],[32,23],[65,1],[58,0,12],[32,28],[68,1],[160],[33,28],[12,1],[11],[11],[3,64],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[34,37],[4,127],[68,0],[33,36],[32,15],[33,35],[32,36],[252,3],[65,9],[108],[32,35],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,7],[68,0],[97],[65,2],[33,7],[5],[32,37],[65,2],[33,7],[11],[4,64],[32,15],[252,3],[34,20],[40,1,0],[33,19],[2,64],[32,19],[69],[4,64],[68,0],[65,128,1],[33,7],[12,1],[11],[32,20],[32,19],[65,1],[107],[34,19],[54,1,0],[32,20],[43,0,4],[32,20],[45,0,12],[33,7],[65,4],[32,20],[106],[65,13],[32,20],[106],[32,19],[65,9],[108],[252,10,0,0],[26],[11],[12,1],[11],[11],[32,27],[68,0],[98],[34,37],[69],[4,127],[32,15],[252,3],[40,1,0],[184],[68,0],[100],[65,2],[33,7],[5],[32,37],[65,2],[33,7],[11],[4,64],[32,26],[33,38],[65,200,0],[33,39],[32,38],[32,39],[65,128,128,1],[32,27],[57,0,4],[65,128,128,1],[65,1],[58,0,12],[65,128,128,1],[65,1],[54,1,0],[68,16384],[65,200,0],[16,builtin('__Array_prototype_unshift')],[33,7],[26],[11],[12,1],[11],[11],[32,3],[65,2],[32,26],[65,200,0],[16,builtin('__Porffor_bigint_fromDigits')],[15]],
755
755
  params:[124,127],typedParams:1,returns:[124],returnType:4,
756
756
  locals:[124,124,124,124,124,127,127,127,127,127,124,124,124,124,124,124,124,127,127,127,124,127,124,124,124,124,124,124,124,124,124,124,124,124,124,127,124,127],localNames:["n","n#type","len","negative","offset","#member_obj_84","#member_prop_84","#last_type","#typeswitch_tmp1","#member_allocd","#loadArray_offset","#swap","#member_obj_85","#member_prop_85","BASE","digits","i","acc","char","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","digit","#member_setter_ptr_tmp","#member_obj_86","#member_prop_86","result","carry","j","value","#member_obj_87","#member_prop_87","quotient","#member_obj_88","#member_prop_88","#member_obj_89","#member_prop_89","logictmpi","#proto_target","#proto_target#type"],
757
757
  usedTypes:[4,67,195,72],
@@ -995,22 +995,29 @@ const performOp = (scope, op, left, right, leftType, rightType) => {
995
995
  const finalize = out => startOut.concat(out, endOut);
996
996
 
997
997
  // if strict (in)equal check types match, skip if known
998
- if (strictOp && !(knownLeft && knownLeft === knownRight)) {
999
- endOut.push(
1000
- ...leftType,
1001
- number(TYPE_FLAGS.parity, Valtype.i32),
1002
- [ Opcodes.i32_or ],
1003
- ...rightType,
1004
- number(TYPE_FLAGS.parity, Valtype.i32),
1005
- [ Opcodes.i32_or ],
1006
- ...(op === '===' ? [
1007
- [ Opcodes.i32_eq ],
1008
- [ Opcodes.i32_and ]
1009
- ] : [
1010
- [ Opcodes.i32_ne ],
1011
- [ Opcodes.i32_or ]
1012
- ])
1013
- );
998
+ if (strictOp) {
999
+ if (knownLeft != null && knownRight != null) {
1000
+ if ((knownLeft | TYPE_FLAGS.parity) !== (knownRight | TYPE_FLAGS.parity)) endOut.push(
1001
+ number(op === '===' ? 0 : 1, Valtype.i32),
1002
+ [ op === '===' ? Opcodes.i32_and : Opcodes.i32_or ]
1003
+ );
1004
+ } else {
1005
+ endOut.push(
1006
+ ...leftType,
1007
+ number(TYPE_FLAGS.parity, Valtype.i32),
1008
+ [ Opcodes.i32_or ],
1009
+ ...rightType,
1010
+ number(TYPE_FLAGS.parity, Valtype.i32),
1011
+ [ Opcodes.i32_or ],
1012
+ ...(op === '===' ? [
1013
+ [ Opcodes.i32_eq ],
1014
+ [ Opcodes.i32_and ]
1015
+ ] : [
1016
+ [ Opcodes.i32_ne ],
1017
+ [ Opcodes.i32_or ]
1018
+ ])
1019
+ );
1020
+ }
1014
1021
  }
1015
1022
 
1016
1023
  if (!eqOp && (knownLeft === TYPES.bigint || knownRight === TYPES.bigint) && !(knownLeft === TYPES.bigint && knownRight === TYPES.bigint)) {
@@ -1041,10 +1048,10 @@ const performOp = (scope, op, left, right, leftType, rightType) => {
1041
1048
 
1042
1049
  // string comparison
1043
1050
  if (op === '===' || op === '==' || op === '!==' || op === '!=') {
1044
- return [
1051
+ return finalize([
1045
1052
  ...compareStrings(scope, left, right, leftType, rightType, knownLeftStr && knownRightStr),
1046
1053
  ...(op === '!==' || op === '!=' ? [ [ Opcodes.i32_eqz ] ] : [])
1047
- ];
1054
+ ]);
1048
1055
  }
1049
1056
 
1050
1057
  // todo: proper >|>=|<|<=
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "An ahead-of-time JavaScript compiler",
4
- "version": "0.55.35",
4
+ "version": "0.55.36",
5
5
  "author": "Oliver Medhurst <honk@goose.icu>",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.55.35';
3
+ globalThis.version = '0.55.36';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {