porffor 0.36.6 → 0.36.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -806,4 +806,137 @@ export const __Porffor_object_expr_set = (obj: any, key: any, set: any): void =>
806
806
  Porffor.wasm.i32.store16(entryPtr,
807
807
  0b1111 + (Porffor.TYPES.number << 8),
808
808
  0, 12);
809
+ };
810
+
811
+
812
+ // used for { foo: 5 }
813
+ export const __Porffor_object_class_value = (obj: any, key: any, value: any): void => {
814
+ if (Porffor.wasm`local.get ${obj+1}` != Porffor.TYPES.object) obj = __Porffor_object_makeObject(obj);
815
+ let entryPtr: i32 = __Porffor_object_lookup(obj, key);
816
+ if (entryPtr == -1) {
817
+ // add new entry
818
+ // check if object is inextensible
819
+ if (__Porffor_object_isInextensible(obj)) {
820
+ throw new TypeError('Cannot define property, object is inextensible');
821
+ }
822
+
823
+ // bump size +1
824
+ const size: i32 = Porffor.wasm.i32.load(obj, 0, 0);
825
+ Porffor.wasm.i32.store(obj, size + 1, 0, 0);
826
+
827
+ // entryPtr = current end of object
828
+ entryPtr = Porffor.wasm`local.get ${obj}` + 5 + size * 14;
829
+
830
+ __Porffor_object_writeKey(entryPtr, key);
831
+ }
832
+
833
+ // write new value value (lol)
834
+ Porffor.wasm.f64.store(entryPtr, value, 0, 4);
835
+
836
+ // write new tail (value type + flags)
837
+ // flags = writable, enumerable, configurable, not accessor
838
+ Porffor.wasm.i32.store16(entryPtr,
839
+ 0b1110 + (Porffor.wasm`local.get ${value+1}` << 8),
840
+ 0, 12);
841
+ };
842
+
843
+ // used for { foo() {} }
844
+ export const __Porffor_object_class_method = (obj: any, key: any, value: any): void => {
845
+ if (Porffor.wasm`local.get ${obj+1}` != Porffor.TYPES.object) obj = __Porffor_object_makeObject(obj);
846
+ let entryPtr: i32 = __Porffor_object_lookup(obj, key);
847
+ if (entryPtr == -1) {
848
+ // add new entry
849
+ // check if object is inextensible
850
+ if (__Porffor_object_isInextensible(obj)) {
851
+ throw new TypeError('Cannot define property, object is inextensible');
852
+ }
853
+
854
+ // bump size +1
855
+ const size: i32 = Porffor.wasm.i32.load(obj, 0, 0);
856
+ Porffor.wasm.i32.store(obj, size + 1, 0, 0);
857
+
858
+ // entryPtr = current end of object
859
+ entryPtr = Porffor.wasm`local.get ${obj}` + 5 + size * 14;
860
+
861
+ __Porffor_object_writeKey(entryPtr, key);
862
+ }
863
+
864
+ // write new value value (lol)
865
+ Porffor.wasm.f64.store(entryPtr, value, 0, 4);
866
+
867
+ // write new tail (value type + flags)
868
+ // flags = writable, enumerable, configurable, not accessor
869
+ Porffor.wasm.i32.store16(entryPtr,
870
+ 0b1010 + (Porffor.wasm`local.get ${value+1}` << 8),
871
+ 0, 12);
872
+ };
873
+
874
+ // used for { get foo() {} }
875
+ export const __Porffor_object_class_get = (obj: any, key: any, get: any): void => {
876
+ if (Porffor.wasm`local.get ${obj+1}` != Porffor.TYPES.object) obj = __Porffor_object_makeObject(obj);
877
+ let entryPtr: i32 = __Porffor_object_lookup(obj, key);
878
+ let set: any = undefined;
879
+ if (entryPtr == -1) {
880
+ // add new entry
881
+ // check if object is inextensible
882
+ if (__Porffor_object_isInextensible(obj)) {
883
+ throw new TypeError('Cannot define property, object is inextensible');
884
+ }
885
+
886
+ // bump size +1
887
+ const size: i32 = Porffor.wasm.i32.load(obj, 0, 0);
888
+ Porffor.wasm.i32.store(obj, size + 1, 0, 0);
889
+
890
+ // entryPtr = current end of object
891
+ entryPtr = Porffor.wasm`local.get ${obj}` + 5 + size * 14;
892
+
893
+ __Porffor_object_writeKey(entryPtr, key);
894
+ } else {
895
+ // existing entry, keep set (if exists)
896
+ set = __Porffor_object_accessorSet(entryPtr);
897
+ }
898
+
899
+ // write new value value (lol)
900
+ Porffor.wasm.f64.store(entryPtr, __Porffor_object_packAccessor(get, set), 0, 4);
901
+
902
+ // write new tail (value type + flags)
903
+ // flags = writable, enumerable, configurable, accessor
904
+ Porffor.wasm.i32.store16(entryPtr,
905
+ 0b1011 + (Porffor.TYPES.number << 8),
906
+ 0, 12);
907
+ };
908
+
909
+ // used for { set foo(v) {} }
910
+ export const __Porffor_object_class_set = (obj: any, key: any, set: any): void => {
911
+ if (Porffor.wasm`local.get ${obj+1}` != Porffor.TYPES.object) obj = __Porffor_object_makeObject(obj);
912
+ let entryPtr: i32 = __Porffor_object_lookup(obj, key);
913
+ let get: any = undefined;
914
+ if (entryPtr == -1) {
915
+ // add new entry
916
+ // check if object is inextensible
917
+ if (__Porffor_object_isInextensible(obj)) {
918
+ throw new TypeError('Cannot define property, object is inextensible');
919
+ }
920
+
921
+ // bump size +1
922
+ const size: i32 = Porffor.wasm.i32.load(obj, 0, 0);
923
+ Porffor.wasm.i32.store(obj, size + 1, 0, 0);
924
+
925
+ // entryPtr = current end of object
926
+ entryPtr = Porffor.wasm`local.get ${obj}` + 5 + size * 14;
927
+
928
+ __Porffor_object_writeKey(entryPtr, key);
929
+ } else {
930
+ // existing entry, keep set (if exists)
931
+ get = __Porffor_object_accessorGet(entryPtr);
932
+ }
933
+
934
+ // write new value value (lol)
935
+ Porffor.wasm.f64.store(entryPtr, __Porffor_object_packAccessor(get, set), 0, 4);
936
+
937
+ // write new tail (value type + flags)
938
+ // flags = writable, enumerable, configurable, accessor
939
+ Porffor.wasm.i32.store16(entryPtr,
940
+ 0b1011 + (Porffor.TYPES.number << 8),
941
+ 0, 12);
809
942
  };
@@ -148,9 +148,13 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
148
148
 
149
149
  case Porffor.TYPES.object:
150
150
  if (arg) {
151
- Porffor.printStatic('{\n');
152
-
153
151
  const keys: any[] = Object.keys(arg);
152
+ if (keys.length == 0) {
153
+ Porffor.printStatic('{}');
154
+ return;
155
+ }
156
+
157
+ Porffor.printStatic('{ ');
154
158
  const len: i32 = keys.length - 1;
155
159
  for (let i: i32 = 0; i <= len; i++) {
156
160
  const x: any = keys[i];
@@ -164,7 +168,7 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
164
168
  if (i != len) Porffor.printStatic(',\n');
165
169
  }
166
170
 
167
- Porffor.printStatic('\n}');
171
+ Porffor.printStatic(' }');
168
172
  } else {
169
173
  if (colors) Porffor.printStatic('\x1b[1m'); // bold
170
174
  Porffor.printStatic('null');
@@ -142,6 +142,26 @@ wasm:(_,{builtin})=>[[32,1],[65,7],[71],[4,64],[32,0],[184],[32,1],[16,builtin('
142
142
  params:[127,127,127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
143
143
  locals:[127,127,127,127,127],localNames:["obj","obj#type","key","key#type","set","set#type","#last_type","entryPtr","get","get#type","size"],
144
144
  };
145
+ this.__Porffor_object_class_value = {
146
+ wasm:(_,{builtin,internalThrow})=>[[32,1],[65,7],[71],[4,64],[32,0],[184],[32,1],[16,builtin('__Porffor_object_makeObject')],[33,6],[252,2],[34,0],[32,6],[33,1],[26],[11],[32,0],[32,1],[32,2],[32,3],[16,builtin('__Porffor_object_lookup')],[33,6],[34,7],[65,127],[70],[4,64],[32,0],[32,1],[16,builtin('__Porffor_object_isInextensible')],[33,6],[33,8],[32,6],[33,9],[2,127],[32,9],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,8],[40,1,0],[12,1],[11],[32,9],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,8],[40,1,0],[12,1],[11],[32,8],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Cannot define property, object is inextensible`),[11],[32,0],[40,0,0],[33,10],[32,0],[32,10],[65,1],[106],[54,0,0],[32,0],[65,5],[106],[32,10],[65,14],[108],[106],[34,7],[65,1],[32,2],[32,3],[16,builtin('__Porffor_object_writeKey')],[33,6],[26],[11],[32,7],[32,4],[57,0,4],[32,7],[65,14],[32,5],[65,8],[116],[106],[59,0,12],[65,0],[65,128,1],[15]],
147
+ params:[127,127,127,127,124,127],typedParams:1,returns:[127,127],typedReturns:1,
148
+ locals:[127,127,127,127,127],localNames:["obj","obj#type","key","key#type","value","value#type","#last_type","entryPtr","#logicinner_tmp","#typeswitch_tmp1","size"],
149
+ };
150
+ this.__Porffor_object_class_method = {
151
+ wasm:(_,{builtin,internalThrow})=>[[32,1],[65,7],[71],[4,64],[32,0],[184],[32,1],[16,builtin('__Porffor_object_makeObject')],[33,6],[252,2],[34,0],[32,6],[33,1],[26],[11],[32,0],[32,1],[32,2],[32,3],[16,builtin('__Porffor_object_lookup')],[33,6],[34,7],[65,127],[70],[4,64],[32,0],[32,1],[16,builtin('__Porffor_object_isInextensible')],[33,6],[33,8],[32,6],[33,9],[2,127],[32,9],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,8],[40,1,0],[12,1],[11],[32,9],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,8],[40,1,0],[12,1],[11],[32,8],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Cannot define property, object is inextensible`),[11],[32,0],[40,0,0],[33,10],[32,0],[32,10],[65,1],[106],[54,0,0],[32,0],[65,5],[106],[32,10],[65,14],[108],[106],[34,7],[65,1],[32,2],[32,3],[16,builtin('__Porffor_object_writeKey')],[33,6],[26],[11],[32,7],[32,4],[57,0,4],[32,7],[65,10],[32,5],[65,8],[116],[106],[59,0,12],[65,0],[65,128,1],[15]],
152
+ params:[127,127,127,127,124,127],typedParams:1,returns:[127,127],typedReturns:1,
153
+ locals:[127,127,127,127,127],localNames:["obj","obj#type","key","key#type","value","value#type","#last_type","entryPtr","#logicinner_tmp","#typeswitch_tmp1","size"],
154
+ };
155
+ this.__Porffor_object_class_get = {
156
+ wasm:(_,{builtin,internalThrow})=>[[32,1],[65,7],[71],[4,64],[32,0],[184],[32,1],[16,builtin('__Porffor_object_makeObject')],[33,6],[252,2],[34,0],[32,6],[33,1],[26],[11],[32,0],[32,1],[32,2],[32,3],[16,builtin('__Porffor_object_lookup')],[33,6],[33,7],[65,0],[33,8],[65,128,1],[33,9],[32,7],[65,127],[70],[4,64],[32,0],[32,1],[16,builtin('__Porffor_object_isInextensible')],[33,6],[33,10],[32,6],[33,11],[2,127],[32,11],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,10],[40,1,0],[12,1],[11],[32,11],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,10],[40,1,0],[12,1],[11],[32,10],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Cannot define property, object is inextensible`),[11],[32,0],[40,0,0],[33,12],[32,0],[32,12],[65,1],[106],[54,0,0],[32,0],[65,5],[106],[32,12],[65,14],[108],[106],[34,7],[65,1],[32,2],[32,3],[16,builtin('__Porffor_object_writeKey')],[33,6],[26],[5],[32,7],[65,1],[16,builtin('__Porffor_object_accessorSet')],[34,6],[33,9],[33,8],[11],[32,7],[32,4],[32,5],[32,8],[32,9],[16,builtin('__Porffor_object_packAccessor')],[33,6],[57,0,4],[32,7],[65,11],[65,1],[65,8],[116],[106],[59,0,12],[65,0],[65,128,1],[15]],
157
+ params:[127,127,127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
158
+ locals:[127,127,127,127,127,127,127],localNames:["obj","obj#type","key","key#type","get","get#type","#last_type","entryPtr","set","set#type","#logicinner_tmp","#typeswitch_tmp1","size"],
159
+ };
160
+ this.__Porffor_object_class_set = {
161
+ wasm:(_,{builtin,internalThrow})=>[[32,1],[65,7],[71],[4,64],[32,0],[184],[32,1],[16,builtin('__Porffor_object_makeObject')],[33,6],[252,2],[34,0],[32,6],[33,1],[26],[11],[32,0],[32,1],[32,2],[32,3],[16,builtin('__Porffor_object_lookup')],[33,6],[33,7],[65,0],[33,8],[65,128,1],[33,9],[32,7],[65,127],[70],[4,64],[32,0],[32,1],[16,builtin('__Porffor_object_isInextensible')],[33,6],[33,10],[32,6],[33,11],[2,127],[32,11],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,10],[40,1,0],[12,1],[11],[32,11],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,10],[40,1,0],[12,1],[11],[32,10],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Cannot define property, object is inextensible`),[11],[32,0],[40,0,0],[33,12],[32,0],[32,12],[65,1],[106],[54,0,0],[32,0],[65,5],[106],[32,12],[65,14],[108],[106],[34,7],[65,1],[32,2],[32,3],[16,builtin('__Porffor_object_writeKey')],[33,6],[26],[5],[32,7],[65,1],[16,builtin('__Porffor_object_accessorGet')],[34,6],[33,9],[33,8],[11],[32,7],[32,8],[32,9],[32,4],[32,5],[16,builtin('__Porffor_object_packAccessor')],[33,6],[57,0,4],[32,7],[65,11],[65,1],[65,8],[116],[106],[59,0,12],[65,0],[65,128,1],[15]],
162
+ params:[127,127,127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
163
+ locals:[127,127,127,127,127,127,127],localNames:["obj","obj#type","key","key#type","set","set#type","#last_type","entryPtr","get","get#type","#logicinner_tmp","#typeswitch_tmp1","size"],
164
+ };
145
165
  this.__Porffor_compareStrings = {
146
166
  wasm:(_,{builtin})=>[[32,1],[184],[33,4],[32,3],[184],[33,5],[32,4],[68,128],[16,builtin('f64_|')],[68,195],[98],[4,64],[32,0],[33,6],[32,1],[33,7],[2,127],[32,7],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,7],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,6],[68,0],[97],[12,1],[11],[32,7],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[32,4],[68,5],[97],[114],[32,4],[68,2],[97],[114],[4,64],[68,0],[65,2],[15],[11],[32,0],[32,1],[16,builtin('__ecma262_ToString')],[34,8],[33,1],[33,0],[32,1],[184],[33,4],[11],[32,5],[68,128],[16,builtin('f64_|')],[68,195],[98],[4,64],[32,2],[33,6],[32,3],[33,7],[2,127],[32,7],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,7],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,6],[68,0],[97],[12,1],[11],[32,7],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[32,5],[68,5],[97],[114],[32,5],[68,2],[97],[114],[4,64],[68,0],[65,2],[15],[11],[32,2],[32,3],[16,builtin('__ecma262_ToString')],[34,8],[33,3],[33,2],[32,3],[184],[33,5],[11],[32,0],[252,2],[32,1],[32,2],[252,2],[32,3],[16,builtin('__Porffor_strcmp')],[33,8],[183],[32,8],[15]],
147
167
  params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
@@ -632,7 +652,7 @@ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
632
652
  locals:[124,124,127,127,124,124,124,124,127,127,127,127],localNames:["arg","arg#type","#switch_disc","#logicinner_tmp","#typeswitch_tmp2","#last_type","arrLen","i","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","#typeswitch_tmp1"],
633
653
  };
634
654
  this.__Porffor_print = {
635
- wasm:(_,{allocPage,builtin,internalThrow})=>[[32,3],[65,128,1],[70],[4,64],[68,1],[33,2],[65,2],[33,3],[11],[32,1],[33,32],[2,64],[32,32],[65,1],[70],[4,64,"TYPESWITCH|Number"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,51],[16,1],[68,109],[16,1],[11],[32,0],[16,0],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,2],[70],[4,64,"TYPESWITCH|Boolean"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,51],[16,1],[68,109],[16,1],[11],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,116],[16,1],[68,114],[16,1],[68,117],[16,1],[68,101],[16,1],[5],[68,102],[16,1],[68,97],[16,1],[68,108],[16,1],[68,115],[16,1],[68,101],[16,1],[11],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,195,1],[70],[32,32],[65,195,0],[70],[114],[4,64,"TYPESWITCH|ByteString,String"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,50],[16,1],[68,109],[16,1],[11],[68,39],[16,1],[32,0],[32,1],[16,builtin('__Porffor_printString')],[33,7],[26],[68,39],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,0],[70],[32,32],[65,128,1],[70],[114],[4,64,"TYPESWITCH|empty,undefined"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,50],[16,1],[68,109],[16,1],[11],[68,117],[16,1],[68,110],[16,1],[68,100],[16,1],[68,101],[16,1],[68,102],[16,1],[68,105],[16,1],[68,110],[16,1],[68,101],[16,1],[68,100],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,123],[16,1],[68,10],[16,1],[32,0],[32,1],[16,builtin('__Object_keys')],[33,7],[34,8],[252,3],[40,1,0],[184],[68,1],[161],[33,9],[68,0],[33,10],[3,64],[32,10],[32,9],[101],[4,64],[32,8],[33,13],[32,10],[34,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[34,7],[33,12],[33,11],[68,32],[16,1],[68,32],[16,1],[32,11],[32,12],[16,builtin('__Porffor_printString')],[33,7],[26],[68,58],[16,1],[68,32],[16,1],[32,0],[252,2],[32,1],[32,11],[32,12],[16,builtin('__ecma262_ToPropertyKey')],[33,7],[252,2],[32,7],[16,builtin('__Porffor_object_get')],[34,7],[68,0],[65,128,1],[16,builtin('__Porffor_print')],[33,7],[26],[32,10],[32,9],[98],[4,64],[68,44],[16,1],[68,10],[16,1],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,10],[16,1],[68,125],[16,1],[5],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,49],[16,1],[68,109],[16,1],[11],[68,110],[16,1],[68,117],[16,1],[68,108],[16,1],[68,108],[16,1],[11],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,6],[70],[4,64,"TYPESWITCH|Function"],[68,91],[16,1],[68,70],[16,1],[68,117],[16,1],[68,110],[16,1],[68,99],[16,1],[68,116],[16,1],[68,105],[16,1],[68,111],[16,1],[68,110],[16,1],[68,32],[16,1],[32,0],[252,2],[16,builtin('__Porffor_funcLut_name')],[183],[65,195,1],[16,builtin('__Porffor_printString')],[33,7],[26],[68,93],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,18],[70],[4,64,"TYPESWITCH|Date"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,53],[16,1],[68,109],[16,1],[11],[32,0],[32,1],[16,builtin('__Date_prototype_toISOString')],[34,7],[16,builtin('__Porffor_printString')],[33,7],[26],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,5],[70],[4,64,"TYPESWITCH|Symbol"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,50],[16,1],[68,109],[16,1],[11],[32,0],[32,1],[16,builtin('__Symbol_prototype_toString')],[34,7],[16,builtin('__Porffor_printString')],[33,7],[26],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,0],[32,1],[32,2],[32,3],[68,0],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[68,73],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,67],[16,1],[68,108],[16,1],[68,97],[16,1],[68,109],[16,1],[68,112],[16,1],[68,101],[16,1],[68,100],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,49],[16,1],[68,54],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[68,73],[16,1],[68,110],[16,1],[68,116],[16,1],[68,49],[16,1],[68,54],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,51],[16,1],[68,50],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[68,73],[16,1],[68,110],[16,1],[68,116],[16,1],[68,51],[16,1],[68,50],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[68,70],[16,1],[68,108],[16,1],[68,111],[16,1],[68,97],[16,1],[68,116],[16,1],[68,51],[16,1],[68,50],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[68,70],[16,1],[68,108],[16,1],[68,111],[16,1],[68,97],[16,1],[68,116],[16,1],[68,54],[16,1],[68,52],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,22],[70],[32,32],[65,21],[70],[114],[4,64,"TYPESWITCH|SharedArrayBuffer,ArrayBuffer"],[32,1],[184],[68,22],[97],[4,64],[68,83],[16,1],[68,104],[16,1],[68,97],[16,1],[68,114],[16,1],[68,101],[16,1],[68,100],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[68,66],[16,1],[68,117],[16,1],[68,102],[16,1],[68,102],[16,1],[68,101],[16,1],[68,114],[16,1],[5],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[68,66],[16,1],[68,117],[16,1],[68,102],[16,1],[68,102],[16,1],[68,101],[16,1],[68,114],[16,1],[11],[68,32],[16,1],[68,123],[16,1],[68,10],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,52],[16,1],[68,109],[16,1],[11],[68,32],[16,1],[68,32],[16,1],[68,91],[16,1],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,67],[16,1],[68,111],[16,1],[68,110],[16,1],[68,116],[16,1],[68,101],[16,1],[68,110],[16,1],[68,116],[16,1],[68,115],[16,1],[68,93],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,41],[16,1],[68,58],[16,1],[68,32],[16,1],[68,60],[16,1],[68,14],[65,6],[16,builtin('__Porffor_allocate')],[184],[65,7],[32,0],[32,1],[68,0],[65,128,1],[68,0],[65,128,1],[16,builtin('Uint8Array')],[34,7],[33,19],[34,18],[252,3],[40,1,0],[184],[68,1],[161],[33,20],[65,1],[33,21],[68,0],[33,10],[3,64],[32,10],[32,20],[101],[4,64],[2,64],[32,18],[33,13],[32,10],[33,14],[32,19],[33,6],[2,124],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[65,2],[108],[32,13],[252,3],[106],[47,0,4],[59,0,4],[32,16],[184],[65,195,0],[33,7],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[33,7],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[32,13],[252,3],[106],[45,0,4],[58,0,4],[32,16],[184],[65,195,1],[33,7],[12,1],[11],[32,13],[252,3],[32,19],[32,14],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,17],[252,3],[32,17],[16,builtin('__Porffor_object_get')],[33,7],[11,"TYPESWITCH_end"],[33,22],[32,7],[33,23],[32,22],[68,240],[16,builtin('f64_&')],[68,16],[163],[65,1],[16,builtin('__Porffor_printHexDigit')],[33,7],[26],[32,22],[68,15],[16,builtin('f64_&')],[65,1],[16,builtin('__Porffor_printHexDigit')],[33,7],[26],[32,10],[32,20],[98],[4,64],[68,32],[16,1],[11],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,62],[16,1],[68,44],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,121],[16,1],[68,116],[16,1],[68,101],[16,1],[68,76],[16,1],[68,101],[16,1],[68,110],[16,1],[68,103],[16,1],[68,116],[16,1],[68,104],[16,1],[68,58],[16,1],[68,32],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,51],[16,1],[68,109],[16,1],[11],[32,0],[33,13],[32,1],[33,24],...number(allocPage(_,'bytestring: __Porffor_print/#member_prop','i8'),124),[34,14],[252,3],[34,25],[65,10],[54,1,0],[32,25],[65,226,0],[58,0,4],[32,25],[65,249,0],[58,0,5],[32,25],[65,244,0],[58,0,6],[32,25],[65,229,0],[58,0,7],[32,25],[65,204,0],[58,0,8],[32,25],[65,229,0],[58,0,9],[32,25],[65,238,0],[58,0,10],[32,25],[65,231,0],[58,0,11],[32,25],[65,244,0],[58,0,12],[32,25],[65,232,0],[58,0,13],[32,25],[184],[33,14],[32,1],[33,6],[2,124],[32,6],[65,21],[70],[4,64,"TYPESWITCH|ArrayBuffer"],[32,13],[32,24],[16,builtin('__ArrayBuffer_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,22],[70],[4,64,"TYPESWITCH|SharedArrayBuffer"],[32,13],[32,24],[16,builtin('__SharedArrayBuffer_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,23],[70],[4,64,"TYPESWITCH|DataView"],[32,13],[32,24],[16,builtin('__DataView_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[65,2],[108],[32,13],[252,3],[106],[47,0,4],[59,0,4],[32,16],[184],[65,195,0],[33,7],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[33,7],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,13],[32,24],[16,builtin('__Uint8Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,13],[32,24],[16,builtin('__Int8Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,13],[32,24],[16,builtin('__Uint8ClampedArray_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,13],[32,24],[16,builtin('__Uint16Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,13],[32,24],[16,builtin('__Int16Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,13],[32,24],[16,builtin('__Uint32Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,13],[32,24],[16,builtin('__Int32Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,13],[32,24],[16,builtin('__Float32Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,13],[32,24],[16,builtin('__Float64Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[32,13],[252,3],[106],[45,0,4],[58,0,4],[32,16],[184],[65,195,1],[33,7],[12,1],[11],[32,13],[252,3],[32,1],[32,14],[252,3],[65,195,1],[16,builtin('__Porffor_object_get')],[33,7],[11,"TYPESWITCH_end"],[16,0],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,10],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,23],[70],[4,64,"TYPESWITCH|DataView"],[68,68],[16,1],[68,97],[16,1],[68,116],[16,1],[68,97],[16,1],[68,86],[16,1],[68,105],[16,1],[68,101],[16,1],[68,119],[16,1],[68,32],[16,1],[68,123],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,121],[16,1],[68,116],[16,1],[68,101],[16,1],[68,76],[16,1],[68,101],[16,1],[68,110],[16,1],[68,103],[16,1],[68,116],[16,1],[68,104],[16,1],[68,58],[16,1],[68,32],[16,1],[32,0],[32,1],[16,builtin('__DataView_prototype_byteLength$get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[68,44],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,121],[16,1],[68,116],[16,1],[68,101],[16,1],[68,79],[16,1],[68,102],[16,1],[68,102],[16,1],[68,115],[16,1],[68,101],[16,1],[68,116],[16,1],[68,58],[16,1],[68,32],[16,1],[32,0],[32,1],[16,builtin('__DataView_prototype_byteOffset$get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[68,44],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,117],[16,1],[68,102],[16,1],[68,102],[16,1],[68,101],[16,1],[68,114],[16,1],[68,58],[16,1],[68,32],[16,1],[32,0],[32,1],[16,builtin('__DataView_prototype_buffer$get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[68,10],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,35],[70],[32,32],[65,20],[70],[114],[4,64,"TYPESWITCH|WeakMap,Map"],[32,1],[184],[68,35],[97],[4,64],[68,87],[16,1],[68,101],[16,1],[68,97],[16,1],[68,107],[16,1],[68,77],[16,1],[68,97],[16,1],[68,112],[16,1],[5],[68,77],[16,1],[68,97],[16,1],[68,112],[16,1],[11],[68,40],[16,1],[32,0],[32,1],[16,builtin('__Map_prototype_keys')],[33,7],[34,26],[252,3],[40,1,0],[184],[68,1],[161],[34,27],[68,1],[160],[16,0],[68,41],[16,1],[68,32],[16,1],[68,123],[16,1],[68,32],[16,1],[68,0],[33,10],[3,64],[32,10],[32,27],[99],[4,64],[32,26],[33,13],[65,208,0],[33,24],[32,10],[34,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[34,7],[33,29],[34,28],[32,29],[68,0],[65,128,1],[16,builtin('__Porffor_print')],[33,7],[26],[68,32],[16,1],[68,61],[16,1],[68,62],[16,1],[68,32],[16,1],[32,0],[32,1],[32,28],[32,29],[16,builtin('__Map_prototype_get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[32,10],[32,27],[98],[4,64],[68,44],[16,1],[68,32],[16,1],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,32],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,34],[70],[32,32],[65,19],[70],[114],[4,64,"TYPESWITCH|WeakSet,Set"],[32,1],[184],[68,34],[97],[4,64],[68,87],[16,1],[68,101],[16,1],[68,97],[16,1],[68,107],[16,1],[68,83],[16,1],[68,101],[16,1],[68,116],[16,1],[5],[68,83],[16,1],[68,101],[16,1],[68,116],[16,1],[11],[68,40],[16,1],[32,0],[32,1],[16,builtin('__Set_prototype_values')],[33,7],[34,30],[252,3],[40,1,0],[184],[68,1],[161],[34,31],[68,1],[160],[16,0],[68,41],[16,1],[68,32],[16,1],[68,123],[16,1],[68,32],[16,1],[68,0],[33,10],[3,64],[32,10],[32,31],[101],[4,64],[32,30],[33,13],[65,208,0],[33,24],[32,10],[34,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[32,10],[32,31],[98],[4,64],[68,44],[16,1],[68,32],[16,1],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,32],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,33],[70],[4,64,"TYPESWITCH|WeakRef"],[68,87],[16,1],[68,101],[16,1],[68,97],[16,1],[68,107],[16,1],[68,82],[16,1],[68,101],[16,1],[68,102],[16,1],[68,32],[16,1],[68,123],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[11,"TYPESWITCH_end"],[68,0],[65,128,1],[15]],
655
+ wasm:(_,{allocPage,builtin,internalThrow})=>[[32,3],[65,128,1],[70],[4,64],[68,1],[33,2],[65,2],[33,3],[11],[32,1],[33,32],[2,64],[32,32],[65,1],[70],[4,64,"TYPESWITCH|Number"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,51],[16,1],[68,109],[16,1],[11],[32,0],[16,0],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,2],[70],[4,64,"TYPESWITCH|Boolean"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,51],[16,1],[68,109],[16,1],[11],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,116],[16,1],[68,114],[16,1],[68,117],[16,1],[68,101],[16,1],[5],[68,102],[16,1],[68,97],[16,1],[68,108],[16,1],[68,115],[16,1],[68,101],[16,1],[11],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,195,1],[70],[32,32],[65,195,0],[70],[114],[4,64,"TYPESWITCH|ByteString,String"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,50],[16,1],[68,109],[16,1],[11],[68,39],[16,1],[32,0],[32,1],[16,builtin('__Porffor_printString')],[33,7],[26],[68,39],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,0],[70],[32,32],[65,128,1],[70],[114],[4,64,"TYPESWITCH|empty,undefined"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,50],[16,1],[68,109],[16,1],[11],[68,117],[16,1],[68,110],[16,1],[68,100],[16,1],[68,101],[16,1],[68,102],[16,1],[68,105],[16,1],[68,110],[16,1],[68,101],[16,1],[68,100],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,0],[32,1],[16,builtin('__Object_keys')],[33,7],[34,8],[252,3],[40,1,0],[184],[68,0],[97],[4,64],[68,123],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[68,123],[16,1],[68,32],[16,1],[32,8],[252,3],[40,1,0],[184],[68,1],[161],[33,9],[68,0],[33,10],[3,64],[32,10],[32,9],[101],[4,64],[32,8],[33,13],[32,10],[34,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[34,7],[33,12],[33,11],[68,32],[16,1],[68,32],[16,1],[32,11],[32,12],[16,builtin('__Porffor_printString')],[33,7],[26],[68,58],[16,1],[68,32],[16,1],[32,0],[252,2],[32,1],[32,11],[32,12],[16,builtin('__ecma262_ToPropertyKey')],[33,7],[252,2],[32,7],[16,builtin('__Porffor_object_get')],[34,7],[68,0],[65,128,1],[16,builtin('__Porffor_print')],[33,7],[26],[32,10],[32,9],[98],[4,64],[68,44],[16,1],[68,10],[16,1],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,32],[16,1],[68,125],[16,1],[5],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,49],[16,1],[68,109],[16,1],[11],[68,110],[16,1],[68,117],[16,1],[68,108],[16,1],[68,108],[16,1],[11],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,6],[70],[4,64,"TYPESWITCH|Function"],[68,91],[16,1],[68,70],[16,1],[68,117],[16,1],[68,110],[16,1],[68,99],[16,1],[68,116],[16,1],[68,105],[16,1],[68,111],[16,1],[68,110],[16,1],[68,32],[16,1],[32,0],[252,2],[16,builtin('__Porffor_funcLut_name')],[183],[65,195,1],[16,builtin('__Porffor_printString')],[33,7],[26],[68,93],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,18],[70],[4,64,"TYPESWITCH|Date"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,53],[16,1],[68,109],[16,1],[11],[32,0],[32,1],[16,builtin('__Date_prototype_toISOString')],[34,7],[16,builtin('__Porffor_printString')],[33,7],[26],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,5],[70],[4,64,"TYPESWITCH|Symbol"],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,50],[16,1],[68,109],[16,1],[11],[32,0],[32,1],[16,builtin('__Symbol_prototype_toString')],[34,7],[16,builtin('__Porffor_printString')],[33,7],[26],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,0],[65,128,1],[15],[11],[32,32],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,0],[32,1],[32,2],[32,3],[68,0],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[68,73],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,67],[16,1],[68,108],[16,1],[68,97],[16,1],[68,109],[16,1],[68,112],[16,1],[68,101],[16,1],[68,100],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,49],[16,1],[68,54],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[68,73],[16,1],[68,110],[16,1],[68,116],[16,1],[68,49],[16,1],[68,54],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,51],[16,1],[68,50],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[68,73],[16,1],[68,110],[16,1],[68,116],[16,1],[68,51],[16,1],[68,50],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[68,70],[16,1],[68,108],[16,1],[68,111],[16,1],[68,97],[16,1],[68,116],[16,1],[68,51],[16,1],[68,50],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[68,70],[16,1],[68,108],[16,1],[68,111],[16,1],[68,97],[16,1],[68,116],[16,1],[68,54],[16,1],[68,52],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[32,0],[32,1],[32,2],[32,3],[68,1],[65,2],[16,builtin('__Porffor_printArray')],[33,7],[26],[68,0],[65,128,1],[15],[11],[32,32],[65,22],[70],[32,32],[65,21],[70],[114],[4,64,"TYPESWITCH|SharedArrayBuffer,ArrayBuffer"],[32,1],[184],[68,22],[97],[4,64],[68,83],[16,1],[68,104],[16,1],[68,97],[16,1],[68,114],[16,1],[68,101],[16,1],[68,100],[16,1],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[68,66],[16,1],[68,117],[16,1],[68,102],[16,1],[68,102],[16,1],[68,101],[16,1],[68,114],[16,1],[5],[68,65],[16,1],[68,114],[16,1],[68,114],[16,1],[68,97],[16,1],[68,121],[16,1],[68,66],[16,1],[68,117],[16,1],[68,102],[16,1],[68,102],[16,1],[68,101],[16,1],[68,114],[16,1],[11],[68,32],[16,1],[68,123],[16,1],[68,10],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,52],[16,1],[68,109],[16,1],[11],[68,32],[16,1],[68,32],[16,1],[68,91],[16,1],[68,85],[16,1],[68,105],[16,1],[68,110],[16,1],[68,116],[16,1],[68,56],[16,1],[68,67],[16,1],[68,111],[16,1],[68,110],[16,1],[68,116],[16,1],[68,101],[16,1],[68,110],[16,1],[68,116],[16,1],[68,115],[16,1],[68,93],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,41],[16,1],[68,58],[16,1],[68,32],[16,1],[68,60],[16,1],[68,14],[65,6],[16,builtin('__Porffor_allocate')],[184],[65,7],[32,0],[32,1],[68,0],[65,128,1],[68,0],[65,128,1],[16,builtin('Uint8Array')],[34,7],[33,19],[34,18],[252,3],[40,1,0],[184],[68,1],[161],[33,20],[65,1],[33,21],[68,0],[33,10],[3,64],[32,10],[32,20],[101],[4,64],[2,64],[32,18],[33,13],[32,10],[33,14],[32,19],[33,6],[2,124],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[65,2],[108],[32,13],[252,3],[106],[47,0,4],[59,0,4],[32,16],[184],[65,195,0],[33,7],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[33,7],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[106],[44,0,4],[183],[65,1],[33,7],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[106],[45,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,7],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,7],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,7],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,7],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,13],[252,3],[40,0,4],[32,14],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,7],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[32,13],[252,3],[106],[45,0,4],[58,0,4],[32,16],[184],[65,195,1],[33,7],[12,1],[11],[32,13],[252,3],[32,19],[32,14],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,17],[252,3],[32,17],[16,builtin('__Porffor_object_get')],[33,7],[11,"TYPESWITCH_end"],[33,22],[32,7],[33,23],[32,22],[68,240],[16,builtin('f64_&')],[68,16],[163],[65,1],[16,builtin('__Porffor_printHexDigit')],[33,7],[26],[32,22],[68,15],[16,builtin('f64_&')],[65,1],[16,builtin('__Porffor_printHexDigit')],[33,7],[26],[32,10],[32,20],[98],[4,64],[68,32],[16,1],[11],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,62],[16,1],[68,44],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,121],[16,1],[68,116],[16,1],[68,101],[16,1],[68,76],[16,1],[68,101],[16,1],[68,110],[16,1],[68,103],[16,1],[68,116],[16,1],[68,104],[16,1],[68,58],[16,1],[68,32],[16,1],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,51],[16,1],[68,51],[16,1],[68,109],[16,1],[11],[32,0],[33,13],[32,1],[33,24],...number(allocPage(_,'bytestring: __Porffor_print/#member_prop','i8'),124),[34,14],[252,3],[34,25],[65,10],[54,1,0],[32,25],[65,226,0],[58,0,4],[32,25],[65,249,0],[58,0,5],[32,25],[65,244,0],[58,0,6],[32,25],[65,229,0],[58,0,7],[32,25],[65,204,0],[58,0,8],[32,25],[65,229,0],[58,0,9],[32,25],[65,238,0],[58,0,10],[32,25],[65,231,0],[58,0,11],[32,25],[65,244,0],[58,0,12],[32,25],[65,232,0],[58,0,13],[32,25],[184],[33,14],[32,1],[33,6],[2,124],[32,6],[65,21],[70],[4,64,"TYPESWITCH|ArrayBuffer"],[32,13],[32,24],[16,builtin('__ArrayBuffer_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,22],[70],[4,64,"TYPESWITCH|SharedArrayBuffer"],[32,13],[32,24],[16,builtin('__SharedArrayBuffer_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,23],[70],[4,64,"TYPESWITCH|DataView"],[32,13],[32,24],[16,builtin('__DataView_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[65,2],[108],[32,13],[252,3],[106],[47,0,4],[59,0,4],[32,16],[184],[65,195,0],[33,7],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[33,7],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,13],[32,24],[16,builtin('__Uint8Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,13],[32,24],[16,builtin('__Int8Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,13],[32,24],[16,builtin('__Uint8ClampedArray_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,13],[32,24],[16,builtin('__Uint16Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,13],[32,24],[16,builtin('__Int16Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,13],[32,24],[16,builtin('__Uint32Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,13],[32,24],[16,builtin('__Int32Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,13],[32,24],[16,builtin('__Float32Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,13],[32,24],[16,builtin('__Float64Array_prototype_byteLength$get')],[33,7],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16,builtin('__Porffor_allocate')],[34,16],[65,1],[54,0,0],[32,16],[32,14],[252,3],[32,13],[252,3],[106],[45,0,4],[58,0,4],[32,16],[184],[65,195,1],[33,7],[12,1],[11],[32,13],[252,3],[32,1],[32,14],[252,3],[65,195,1],[16,builtin('__Porffor_object_get')],[33,7],[11,"TYPESWITCH_end"],[16,0],[32,2],[33,5],[32,3],[33,6],[2,127],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,6],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,5],[252,3],[40,1,0],[12,1],[11],[32,5],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,27],[16,1],[68,91],[16,1],[68,48],[16,1],[68,109],[16,1],[11],[68,10],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,23],[70],[4,64,"TYPESWITCH|DataView"],[68,68],[16,1],[68,97],[16,1],[68,116],[16,1],[68,97],[16,1],[68,86],[16,1],[68,105],[16,1],[68,101],[16,1],[68,119],[16,1],[68,32],[16,1],[68,123],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,121],[16,1],[68,116],[16,1],[68,101],[16,1],[68,76],[16,1],[68,101],[16,1],[68,110],[16,1],[68,103],[16,1],[68,116],[16,1],[68,104],[16,1],[68,58],[16,1],[68,32],[16,1],[32,0],[32,1],[16,builtin('__DataView_prototype_byteLength$get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[68,44],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,121],[16,1],[68,116],[16,1],[68,101],[16,1],[68,79],[16,1],[68,102],[16,1],[68,102],[16,1],[68,115],[16,1],[68,101],[16,1],[68,116],[16,1],[68,58],[16,1],[68,32],[16,1],[32,0],[32,1],[16,builtin('__DataView_prototype_byteOffset$get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[68,44],[16,1],[68,10],[16,1],[68,32],[16,1],[68,32],[16,1],[68,98],[16,1],[68,117],[16,1],[68,102],[16,1],[68,102],[16,1],[68,101],[16,1],[68,114],[16,1],[68,58],[16,1],[68,32],[16,1],[32,0],[32,1],[16,builtin('__DataView_prototype_buffer$get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[68,10],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,35],[70],[32,32],[65,20],[70],[114],[4,64,"TYPESWITCH|WeakMap,Map"],[32,1],[184],[68,35],[97],[4,64],[68,87],[16,1],[68,101],[16,1],[68,97],[16,1],[68,107],[16,1],[68,77],[16,1],[68,97],[16,1],[68,112],[16,1],[5],[68,77],[16,1],[68,97],[16,1],[68,112],[16,1],[11],[68,40],[16,1],[32,0],[32,1],[16,builtin('__Map_prototype_keys')],[33,7],[34,26],[252,3],[40,1,0],[184],[68,1],[161],[34,27],[68,1],[160],[16,0],[68,41],[16,1],[68,32],[16,1],[68,123],[16,1],[68,32],[16,1],[68,0],[33,10],[3,64],[32,10],[32,27],[99],[4,64],[32,26],[33,13],[65,208,0],[33,24],[32,10],[34,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[34,7],[33,29],[34,28],[32,29],[68,0],[65,128,1],[16,builtin('__Porffor_print')],[33,7],[26],[68,32],[16,1],[68,61],[16,1],[68,62],[16,1],[68,32],[16,1],[32,0],[32,1],[32,28],[32,29],[16,builtin('__Map_prototype_get')],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[32,10],[32,27],[98],[4,64],[68,44],[16,1],[68,32],[16,1],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,32],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,34],[70],[32,32],[65,19],[70],[114],[4,64,"TYPESWITCH|WeakSet,Set"],[32,1],[184],[68,34],[97],[4,64],[68,87],[16,1],[68,101],[16,1],[68,97],[16,1],[68,107],[16,1],[68,83],[16,1],[68,101],[16,1],[68,116],[16,1],[5],[68,83],[16,1],[68,101],[16,1],[68,116],[16,1],[11],[68,40],[16,1],[32,0],[32,1],[16,builtin('__Set_prototype_values')],[33,7],[34,30],[252,3],[40,1,0],[184],[68,1],[161],[34,31],[68,1],[160],[16,0],[68,41],[16,1],[68,32],[16,1],[68,123],[16,1],[68,32],[16,1],[68,0],[33,10],[3,64],[32,10],[32,31],[101],[4,64],[32,30],[33,13],[65,208,0],[33,24],[32,10],[34,14],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,15],[43,0,4],[32,15],[45,0,12],[34,7],[32,2],[32,3],[16,builtin('__Porffor_print')],[33,7],[26],[32,10],[32,31],[98],[4,64],[68,44],[16,1],[68,32],[16,1],[11],[32,10],[68,1],[160],[33,10],[12,1],[11],[11],[68,32],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[32,32],[65,33],[70],[4,64,"TYPESWITCH|WeakRef"],[68,87],[16,1],[68,101],[16,1],[68,97],[16,1],[68,107],[16,1],[68,82],[16,1],[68,101],[16,1],[68,102],[16,1],[68,32],[16,1],[68,123],[16,1],[68,125],[16,1],[68,0],[65,128,1],[15],[11],[11,"TYPESWITCH_end"],[68,0],[65,128,1],[15]],
636
656
  params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
637
657
  locals:[124,124,127,127,124,124,124,124,127,124,124,127,127,127,124,127,124,127,124,127,127,127,124,124,124,127,124,124,127],localNames:["arg","arg#type","colors","colors#type","#switch_disc","#logicinner_tmp","#typeswitch_tmp2","#last_type","keys","len","i","x","x#type","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","buffer","buffer#type","bufferLen","bufferLen#type","ele","ele#type","#member_obj#type","#makearray_pointer_tmp","map","mapLen","key","key#type","set","setLen","#typeswitch_tmp1"],
638
658
  };
@@ -104,6 +104,9 @@ const generate = (scope, decl, global = false, name = undefined, valueUnused = f
104
104
  case 'ThisExpression':
105
105
  return cacheAst(decl, generateThis(scope, decl));
106
106
 
107
+ case 'Super':
108
+ return cacheAst(decl, generateSuper(scope, decl));
109
+
107
110
  case 'Literal':
108
111
  return cacheAst(decl, generateLiteral(scope, decl, global, name));
109
112
 
@@ -311,7 +314,8 @@ const lookupName = (scope, _name) => {
311
314
  };
312
315
 
313
316
  const internalThrow = (scope, constructor, message, expectsValue = Prefs.alwaysValueInternalThrows) => [
314
- ...generateThrow(scope, {
317
+ ...generate(scope, {
318
+ type: 'ThrowStatement',
315
319
  argument: {
316
320
  type: 'NewExpression',
317
321
  callee: {
@@ -1601,8 +1605,8 @@ const RTArrayUtil = {
1601
1605
  ]
1602
1606
  };
1603
1607
 
1604
- const createNewTarget = (scope, decl, idx = 0) => {
1605
- if (decl._new) {
1608
+ const createNewTarget = (scope, decl, idx = 0, force = false) => {
1609
+ if (decl._new || force) {
1606
1610
  return [
1607
1611
  ...(typeof idx === 'number' ? number(idx) : idx),
1608
1612
  ...number(TYPES.function, Valtype.i32)
@@ -1632,7 +1636,7 @@ const makeObject = (scope, obj) => {
1632
1636
  });
1633
1637
  }
1634
1638
 
1635
- return generateObject(scope, {
1639
+ return generate(scope, {
1636
1640
  type: 'ObjectExpression',
1637
1641
  properties
1638
1642
  });
@@ -1692,13 +1696,48 @@ const createThisArg = (scope, decl, knownThis = undefined) => {
1692
1696
  return knownThis;
1693
1697
  }
1694
1698
 
1699
+ const name = mapName(decl.callee?.name);
1695
1700
  if (decl._new) {
1701
+ // if precompiling or builtin func, just make empty object
1702
+ if (globalThis.precompile || Object.hasOwn(builtinFuncs, name)) return [
1703
+ ...makeObject(scope, {}),
1704
+ ...number(TYPES.object, Valtype.i32)
1705
+ ];
1706
+
1707
+ // create new object with __proto__ set to callee prototype
1708
+ const tmp = localTmp(scope, '#this_create_tmp');
1709
+ const proto = getObjProp(decl.callee, 'prototype');
1710
+ localTmp(scope, '#member_prop_assign');
1711
+
1696
1712
  return [
1697
1713
  ...makeObject(scope, {}),
1714
+ [ Opcodes.local_tee, tmp ],
1715
+ Opcodes.i32_to_u,
1716
+
1717
+ ...number(TYPES.object, Valtype.i32),
1718
+
1719
+ ...generate(scope, {
1720
+ type: 'Literal',
1721
+ value: '__proto__'
1722
+ }, false, '#member_prop_assign'),
1723
+ Opcodes.i32_to_u,
1724
+ ...number(TYPES.bytestring, Valtype.i32),
1725
+
1726
+ ...generate(scope, proto),
1727
+ ...getNodeType(scope, proto),
1728
+
1729
+ // flags: writable
1730
+ ...number(0b1000, Valtype.i32),
1731
+ ...number(TYPES.number, Valtype.i32),
1732
+
1733
+ [ Opcodes.call, includeBuiltin(scope, '__Porffor_object_expr_initWithFlags').index ],
1734
+ [ Opcodes.drop ],
1735
+ [ Opcodes.drop ],
1736
+
1737
+ [ Opcodes.local_get, tmp ],
1698
1738
  ...number(TYPES.object, Valtype.i32)
1699
1739
  ];
1700
1740
  } else {
1701
- const name = mapName(decl.callee?.name);
1702
1741
  if (name && name.startsWith('__') && name.includes('_prototype_')) {
1703
1742
  // todo: this should just be same as decl._new
1704
1743
  // but we do not support prototype, constructor, etc yet
@@ -1714,7 +1753,7 @@ const createThisArg = (scope, decl, knownThis = undefined) => {
1714
1753
  };
1715
1754
 
1716
1755
  return [
1717
- ...generateCall(scope, node),
1756
+ ...generate(scope, node),
1718
1757
  ...getNodeType(scope, node)
1719
1758
  ];
1720
1759
  }
@@ -1733,7 +1772,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
1733
1772
 
1734
1773
  // opt: virtualize iifes
1735
1774
  if (isFuncType(decl.callee.type)) {
1736
- const [ func ] = generateFunc(scope, decl.callee, true);
1775
+ const [ func ] = generateFunc(scope, decl.callee);
1737
1776
  name = func.name;
1738
1777
  }
1739
1778
 
@@ -1836,7 +1875,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
1836
1875
  const valTmp = localTmp(scope, '#call_val');
1837
1876
  const typeTmp = localTmp(scope, '#call_type', Valtype.i32);
1838
1877
 
1839
- return generateCall(scope, {
1878
+ return generate(scope, {
1840
1879
  type: 'CallExpression',
1841
1880
  callee: target,
1842
1881
  arguments: decl.arguments.slice(1),
@@ -1939,7 +1978,8 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
1939
1978
  const type = TYPES[x.split('_prototype_')[0].slice(2).toLowerCase()];
1940
1979
  if (type == null) continue;
1941
1980
 
1942
- protoBC[type] = generateCall(scope, {
1981
+ protoBC[type] = generate(scope, {
1982
+ type: 'CallExpression',
1943
1983
  callee: {
1944
1984
  type: 'Identifier',
1945
1985
  name: x
@@ -2233,11 +2273,22 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
2233
2273
  ];
2234
2274
  }
2235
2275
 
2276
+ let callee = decl.callee, callAsNew = decl._new, overrideThisWasm = decl._thisWasm;
2277
+ if (callee.type === 'Super') {
2278
+ // call super constructor with direct super() call
2279
+ callee = getObjProp(callee, 'constructor');
2280
+ callAsNew = true;
2281
+ overrideThisWasm = [
2282
+ ...generate(scope, { type: 'ThisExpression' }),
2283
+ ...getNodeType(scope, { type: 'ThisExpression' })
2284
+ ];
2285
+ }
2286
+
2236
2287
  const newTargetWasm = decl._newTargetWasm ?? createNewTarget(scope, decl, [
2237
2288
  [ Opcodes.local_get, funcLocal ],
2238
2289
  Opcodes.i32_from_u
2239
- ]);
2240
- const thisWasm = decl._thisWasm ?? createThisArg(scope, decl, knownThis);
2290
+ ], callAsNew);
2291
+ const thisWasm = overrideThisWasm ?? createThisArg(scope, decl, knownThis);
2241
2292
 
2242
2293
  const gen = argc => {
2243
2294
  const argsOut = [];
@@ -2305,11 +2356,11 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
2305
2356
  return [
2306
2357
  ...(getCalleeObj ? [
2307
2358
  ...initCalleeObj,
2308
- ...generateMember(scope, decl.callee, false, undefined, getCalleeObj)
2309
- ]: generate(scope, decl.callee)),
2359
+ ...generate(scope, callee, false, undefined, getCalleeObj)
2360
+ ]: generate(scope, callee)),
2310
2361
  [ Opcodes.local_set, localTmp(scope, '#indirect_callee') ],
2311
2362
 
2312
- ...typeSwitch(scope, getNodeType(scope, decl.callee), {
2363
+ ...typeSwitch(scope, getNodeType(scope, callee), {
2313
2364
  [TYPES.function]: [
2314
2365
  ...out,
2315
2366
 
@@ -2327,7 +2378,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
2327
2378
  [ Opcodes.local_set, flags ],
2328
2379
 
2329
2380
  // check if non-constructor was called with new, if so throw
2330
- ...(decl._new ? [
2381
+ ...(callAsNew ? [
2331
2382
  [ Opcodes.local_get, flags ],
2332
2383
  ...number(0b10, Valtype.i32),
2333
2384
  [ Opcodes.i32_and ],
@@ -2535,6 +2586,9 @@ const generateThis = (scope, decl) => {
2535
2586
  ];
2536
2587
  };
2537
2588
 
2589
+ const generateSuper = (scope, decl) => generate(scope,
2590
+ getObjProp(getObjProp({ type: 'ThisExpression', _noGlobalThis: true }, '__proto__'), '__proto__'));
2591
+
2538
2592
  // bad hack for undefined and null working without additional logic
2539
2593
  const DEFAULT_VALUE = () => ({
2540
2594
  type: 'Identifier',
@@ -2892,7 +2946,7 @@ const generateVarDstr = (scope, kind, pattern, init, defaultValue, global) => {
2892
2946
  // hack for let a = function () { ... }
2893
2947
  if (!init.id) {
2894
2948
  init.id = { name };
2895
- generateFunc(scope, init, true);
2949
+ generateFunc(scope, init);
2896
2950
  return out;
2897
2951
  }
2898
2952
  }
@@ -3543,7 +3597,7 @@ const generateAssign = (scope, decl, _global, _name, valueUnused = false) => {
3543
3597
 
3544
3598
  const ifIdentifierErrors = (scope, decl) => {
3545
3599
  if (decl.type === 'Identifier') {
3546
- const out = generateIdent(scope, decl);
3600
+ const out = generate(scope, decl);
3547
3601
  if (out[1]) return true;
3548
3602
  }
3549
3603
 
@@ -3620,7 +3674,7 @@ const generateUnary = (scope, decl) => {
3620
3674
  let toReturn = true, toGenerate = true;
3621
3675
 
3622
3676
  if (decl.argument.type === 'Identifier') {
3623
- const out = generateIdent(scope, decl.argument);
3677
+ const out = generate(scope, decl.argument);
3624
3678
 
3625
3679
  // if ReferenceError (undeclared var), ignore and return true. otherwise false
3626
3680
  if (!out[1]) {
@@ -4397,7 +4451,7 @@ const generateSwitch = (scope, decl) => {
4397
4451
  const ret = typeSwitch(scope, getNodeType(scope, decl.discriminant.arguments[0]), () => {
4398
4452
  const ret = [];
4399
4453
  for (const [type, consequent] of cases) {
4400
- const o = generateCode(scope, { body: consequent });
4454
+ const o = generate(scope, { type: 'BlockStatement', body: consequent });
4401
4455
  ret.push([type, o]);
4402
4456
  }
4403
4457
  return ret;
@@ -4440,7 +4494,7 @@ const generateSwitch = (scope, decl) => {
4440
4494
  depth.pop();
4441
4495
  out.push(
4442
4496
  [ Opcodes.end ],
4443
- ...generateCode(scope, { body: cases[i].consequent })
4497
+ ...generate(scope, { type: 'BlockStatement', body: cases[i].consequent })
4444
4498
  );
4445
4499
  }
4446
4500
 
@@ -5042,7 +5096,7 @@ const generateObject = (scope, decl, global = false, name = '$undeclared') => {
5042
5096
 
5043
5097
  if (type === 'SpreadElement') {
5044
5098
  out.push(
5045
- ...generateCall(scope, {
5099
+ ...generate(scope, {
5046
5100
  type: 'CallExpression',
5047
5101
  callee: {
5048
5102
  type: 'Identifier',
@@ -5237,7 +5291,8 @@ const generateMember = (scope, decl, _global, _name, _objectWasm = undefined) =>
5237
5291
  const type = TYPES[x.split('_prototype_')[0].slice(2).toLowerCase()];
5238
5292
  if (type == null) continue;
5239
5293
 
5240
- if (type === known) return generateCall(scope, {
5294
+ if (type === known) return generate(scope, {
5295
+ type: 'CallExpression',
5241
5296
  callee: {
5242
5297
  type: 'Identifier',
5243
5298
  name: x
@@ -5246,7 +5301,8 @@ const generateMember = (scope, decl, _global, _name, _objectWasm = undefined) =>
5246
5301
  _protoInternalCall: true
5247
5302
  });
5248
5303
 
5249
- bc[type] = generateCall(scope, {
5304
+ bc[type] = generate(scope, {
5305
+ type: 'CallExpression',
5250
5306
  callee: {
5251
5307
  type: 'Identifier',
5252
5308
  name: x
@@ -5281,7 +5337,7 @@ const generateMember = (scope, decl, _global, _name, _objectWasm = undefined) =>
5281
5337
  };
5282
5338
 
5283
5339
  bc[type] = [
5284
- ...generateIdent(scope, ident),
5340
+ ...generate(scope, ident),
5285
5341
  ...setLastType(scope, getNodeType(scope, ident))
5286
5342
  ];
5287
5343
  if (type === known) return bc[type];
@@ -5512,7 +5568,7 @@ const generateAwait = (scope, decl) => {
5512
5568
 
5513
5569
  // todo: warn here if -d?
5514
5570
 
5515
- return generateCall(scope, {
5571
+ return generate(scope, {
5516
5572
  type: 'CallExpression',
5517
5573
  callee: {
5518
5574
  type: 'Identifier',
@@ -5585,7 +5641,7 @@ const generateClass = (scope, decl) => {
5585
5641
 
5586
5642
  const k = getProperty(x, true);
5587
5643
 
5588
- let initKind = 'init';
5644
+ let initKind = type === 'MethodDefinition' ? 'method' : 'value';
5589
5645
  if (kind === 'get' || kind === 'set') initKind = kind;
5590
5646
 
5591
5647
  // default value to undefined
@@ -5628,10 +5684,10 @@ const generateClass = (scope, decl) => {
5628
5684
  ...toPropertyKey(outScope, generate(outScope, k), getNodeType(outScope, k), computed, true),
5629
5685
 
5630
5686
  ...generate(outScope, value),
5631
- ...(initKind !== 'init' ? [ Opcodes.i32_to_u ] : []),
5687
+ ...(initKind !== 'value' && initKind !== 'method' ? [ Opcodes.i32_to_u ] : []),
5632
5688
  ...getNodeType(outScope, value),
5633
5689
 
5634
- [ Opcodes.call, includeBuiltin(outScope, `__Porffor_object_expr_${initKind}`).index ],
5690
+ [ Opcodes.call, includeBuiltin(outScope, `__Porffor_object_class_${initKind}`).index ],
5635
5691
 
5636
5692
  [ Opcodes.drop ],
5637
5693
  [ Opcodes.drop ]
@@ -5748,7 +5804,7 @@ const funcByIndex = idx => {
5748
5804
  };
5749
5805
  const funcByName = name => funcByIndex(funcIndex[name]);
5750
5806
 
5751
- const generateFunc = (scope, decl, outUnused = false) => {
5807
+ const generateFunc = (scope, decl) => {
5752
5808
  const name = decl.id ? decl.id.name : `#anonymous${uniqId()}`;
5753
5809
  if (decl.type.startsWith('Class')) {
5754
5810
  const out = generateClass(scope, {
@@ -5757,6 +5813,7 @@ const generateFunc = (scope, decl, outUnused = false) => {
5757
5813
  });
5758
5814
 
5759
5815
  const func = funcByName(name);
5816
+ astCache.set(decl, out);
5760
5817
  return [ func, out ];
5761
5818
  }
5762
5819
 
@@ -5834,21 +5891,6 @@ const generateFunc = (scope, decl, outUnused = false) => {
5834
5891
  // todo: wrap in try and reject thrown value once supported
5835
5892
  }
5836
5893
 
5837
- if (!globalThis.precompile && func.constr && !func._onlyThisMethod) {
5838
- wasm.unshift(
5839
- // opt: do not check for pure constructors
5840
- ...(func._onlyConstr ? [] : [
5841
- // if being constructed
5842
- [ Opcodes.local_get, func.locals['#newtarget'].idx ],
5843
- Opcodes.i32_to_u,
5844
- [ Opcodes.if, Blocktype.void ],
5845
- ]),
5846
- // set prototype of this ;)
5847
- ...generate(func, setObjProp({ type: 'ThisExpression', _noGlobalThis: true }, '__proto__', getObjProp(func.name, 'prototype'))),
5848
- ...(func._onlyConstr ? [] : [ [ Opcodes.end ] ])
5849
- );
5850
- }
5851
-
5852
5894
  if (name === 'main') {
5853
5895
  func.gotLastType = true;
5854
5896
  func.export = true;
@@ -6004,7 +6046,8 @@ const generateFunc = (scope, decl, outUnused = false) => {
6004
6046
  // force generate all for precompile
6005
6047
  if (globalThis.precompile) func.generate();
6006
6048
 
6007
- const out = decl.type.endsWith('Expression') && !outUnused ? funcRef(func) : [];
6049
+ const out = decl.type.endsWith('Expression') ? funcRef(func) : [];
6050
+ astCache.set(decl, out);
6008
6051
  return [ func, out ];
6009
6052
  };
6010
6053
 
@@ -62,6 +62,8 @@ const compile = async (file, _funcs) => {
62
62
  __Porffor_object_setStrict: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.f64, Valtype.i32 ],
63
63
  __Porffor_object_expr_init: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.f64, Valtype.i32 ],
64
64
  __Porffor_object_expr_initWithFlags: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.f64, Valtype.i32, Valtype.i32, Valtype.i32 ],
65
+ __Porffor_object_class_value: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.f64, Valtype.i32 ],
66
+ __Porffor_object_class_method: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.f64, Valtype.i32 ],
65
67
  __Porffor_object_define: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.f64, Valtype.i32, Valtype.i32, Valtype.i32 ],
66
68
  };
67
69
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.36.6+732d836d7",
4
+ "version": "0.36.7+e872827a7",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.36.6+732d836d7';
3
+ globalThis.version = '0.36.7+e872827a7';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {