porffor 0.35.4 → 0.36.0
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.
@@ -6,12 +6,16 @@ export const __Porffor_object_getObject = (obj: any): any => {
|
|
6
6
|
if (underlying == null) {
|
7
7
|
underlying = {};
|
8
8
|
|
9
|
-
|
10
|
-
const
|
11
|
-
|
9
|
+
// set prototype and prototype.constructor if constructor
|
10
|
+
const flags: i32 = __Porffor_funcLut_flags(funcI32);
|
11
|
+
if (flags & 0b10) { // constructor
|
12
|
+
const proto = {};
|
13
|
+
const key1: bytestring = 'prototype';
|
14
|
+
__Porffor_object_expr_initWithFlags(underlying, key1, proto, 0b1000);
|
12
15
|
|
13
|
-
|
14
|
-
|
16
|
+
const key2: bytestring = 'constructor';
|
17
|
+
__Porffor_object_expr_initWithFlags(proto, key2, obj, 0b1010);
|
18
|
+
}
|
15
19
|
|
16
20
|
underlyingFuncObjs.set(funcI32, underlying);
|
17
21
|
}
|
@@ -18,6 +18,7 @@ export const __Object_keys = (obj: any): any[] => {
|
|
18
18
|
if (obj == null) throw new TypeError('Argument is nullish, expected object');
|
19
19
|
const out: any[] = Porffor.allocate();
|
20
20
|
|
21
|
+
obj = __Porffor_object_getObject(obj);
|
21
22
|
const t: i32 = Porffor.rawType(obj);
|
22
23
|
if (t == Porffor.TYPES.object) {
|
23
24
|
let ptr: i32 = Porffor.wasm`local.get ${obj}` + 5;
|
@@ -82,9 +83,9 @@ local.set ${key}`;
|
|
82
83
|
|
83
84
|
export const __Object_values = (obj: any): any[] => {
|
84
85
|
if (obj == null) throw new TypeError('Argument is nullish, expected object');
|
85
|
-
|
86
86
|
const out: any[] = Porffor.allocate();
|
87
87
|
|
88
|
+
obj = __Porffor_object_getObject(obj);
|
88
89
|
const t: i32 = Porffor.rawType(obj);
|
89
90
|
if (t == Porffor.TYPES.object) {
|
90
91
|
let ptr: i32 = Porffor.wasm`local.get ${obj}` + 5;
|
@@ -177,7 +178,7 @@ export const __Object_prototype_hasOwnProperty = (_this: any, prop: any) => {
|
|
177
178
|
const tmp2: bytestring = 'length';
|
178
179
|
if (p == tmp2) return !__Porffor_funcLut_isLengthDeleted(_this);
|
179
180
|
|
180
|
-
return
|
181
|
+
return Porffor.object.lookup(_this, p) != -1;
|
181
182
|
}
|
182
183
|
|
183
184
|
const keys: any[] = __Object_keys(_this);
|
@@ -193,10 +194,6 @@ export const __Porffor_object_in = (obj: any, prop: any) => {
|
|
193
194
|
return true;
|
194
195
|
}
|
195
196
|
|
196
|
-
if (Porffor.rawType(obj) != Porffor.TYPES.object) {
|
197
|
-
return false;
|
198
|
-
}
|
199
|
-
|
200
197
|
let lastProto = obj;
|
201
198
|
while (true) {
|
202
199
|
obj = obj.__proto__;
|
@@ -265,8 +262,8 @@ export const __Porffor_object_assignAll = (target: any, source: any) => {
|
|
265
262
|
export const __Object_prototype_propertyIsEnumerable = (_this: any, prop: any) => {
|
266
263
|
const p: any = ecma262.ToPropertyKey(prop);
|
267
264
|
|
268
|
-
const
|
269
|
-
if (
|
265
|
+
const obj: any = __Porffor_object_getObject(_this);
|
266
|
+
if (Porffor.rawType(obj) == Porffor.TYPES.object) {
|
270
267
|
const entryPtr: i32 = Porffor.object.lookup(_this, p);
|
271
268
|
if (entryPtr == -1) return false;
|
272
269
|
|
@@ -365,23 +362,24 @@ export const __Object_isSealed = (obj: any): any => {
|
|
365
362
|
export const __Object_getOwnPropertyDescriptor = (obj: any, prop: any): any => {
|
366
363
|
const p: any = ecma262.ToPropertyKey(prop);
|
367
364
|
|
368
|
-
const
|
369
|
-
if (
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
365
|
+
const entryPtr: i32 = Porffor.object.lookup(obj, p);
|
366
|
+
if (entryPtr == -1) {
|
367
|
+
if (Porffor.rawType(obj) == Porffor.TYPES.function) {
|
368
|
+
// hack: function .name and .length
|
369
|
+
const v = obj[p];
|
370
|
+
if (v != null) {
|
371
|
+
const out: object = {};
|
372
|
+
out.writable = false;
|
373
|
+
out.enumerable = false;
|
374
|
+
out.configurable = true;
|
375
|
+
|
376
|
+
out.value = v;
|
377
|
+
return out;
|
378
|
+
}
|
380
379
|
}
|
381
|
-
}
|
382
380
|
|
383
|
-
|
384
|
-
|
381
|
+
return undefined;
|
382
|
+
}
|
385
383
|
|
386
384
|
const out: object = {};
|
387
385
|
|
@@ -27,7 +27,7 @@ export default function({ builtinFuncs }, Prefs) {
|
|
27
27
|
|
28
28
|
let ptr;
|
29
29
|
if (existingFunc) {
|
30
|
-
ptr =
|
30
|
+
ptr = builtin(name, true);
|
31
31
|
} else {
|
32
32
|
ptr = allocPage(scope, `builtin object: ${name}`);
|
33
33
|
}
|
@@ -90,15 +90,12 @@ export default function({ builtinFuncs }, Prefs) {
|
|
90
90
|
};
|
91
91
|
|
92
92
|
if (existingFunc) {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
...originalWasm(...args)
|
100
|
-
];
|
101
|
-
};
|
93
|
+
this[name] = (scope, { builtin, funcRef }) => [
|
94
|
+
[ Opcodes.call, builtin('#get_' + name) ],
|
95
|
+
[ Opcodes.drop ],
|
96
|
+
...funcRef(name)
|
97
|
+
];
|
98
|
+
this[name].type = TYPES.function;
|
102
99
|
} else {
|
103
100
|
this[name] = (scope, { builtin }) => [
|
104
101
|
[ Opcodes.call, builtin('#get_' + name) ],
|
@@ -109,10 +106,9 @@ export default function({ builtinFuncs }, Prefs) {
|
|
109
106
|
|
110
107
|
for (const x in props) {
|
111
108
|
const d = props[x];
|
109
|
+
const k = prefix + x;
|
112
110
|
|
113
|
-
if (Object.hasOwn(d, 'value')) {
|
114
|
-
const k = prefix + x;
|
115
|
-
|
111
|
+
if (Object.hasOwn(d, 'value') && !Object.hasOwn(builtinFuncs, k) && !Object.hasOwn(this, k)) {
|
116
112
|
if (typeof d.value === 'number') {
|
117
113
|
this[k] = number(d.value);
|
118
114
|
this[k].type = TYPES.number;
|
@@ -159,7 +155,7 @@ export default function({ builtinFuncs }, Prefs) {
|
|
159
155
|
const builtinFuncKeys = Object.keys(builtinFuncs);
|
160
156
|
const autoFuncKeys = name => {
|
161
157
|
const prefix = makePrefix(name);
|
162
|
-
return builtinFuncKeys.filter(x => x.startsWith(prefix)).map(x => x.slice(prefix.length));
|
158
|
+
return builtinFuncKeys.filter(x => x.startsWith(prefix)).map(x => x.slice(prefix.length)).filter(x => !x.startsWith('prototype_'));
|
163
159
|
};
|
164
160
|
const autoFuncs = name => props({
|
165
161
|
writable: true,
|
@@ -209,7 +205,6 @@ export default function({ builtinFuncs }, Prefs) {
|
|
209
205
|
}
|
210
206
|
|
211
207
|
|
212
|
-
// todo: support when existing func
|
213
208
|
object('Number', {
|
214
209
|
...props({
|
215
210
|
writable: false,
|
@@ -227,9 +222,13 @@ export default function({ builtinFuncs }, Prefs) {
|
|
227
222
|
MIN_SAFE_INTEGER: valtype === 'i32' ? -2147483648 : -9007199254740991,
|
228
223
|
|
229
224
|
EPSILON: 2.220446049250313e-16
|
230
|
-
})
|
225
|
+
}),
|
226
|
+
|
227
|
+
...autoFuncs('Number')
|
231
228
|
});
|
232
229
|
|
230
|
+
object('Object', autoFuncs('Object'));
|
231
|
+
|
233
232
|
|
234
233
|
// these technically not spec compliant as it should be classes or non-enumerable but eh
|
235
234
|
object('navigator', {
|
@@ -305,8 +304,8 @@ export default function({ builtinFuncs }, Prefs) {
|
|
305
304
|
}
|
306
305
|
if (!t) continue;
|
307
306
|
|
308
|
-
if (!done.has(name)) {
|
309
|
-
console.log(name
|
307
|
+
if (!done.has(name) && !done.has('__' + name)) {
|
308
|
+
console.log(name, !!builtinFuncs[name]);
|
310
309
|
done.add(name);
|
311
310
|
}
|
312
311
|
}
|
@@ -3,9 +3,9 @@ import { number } from './embedding.js';
|
|
3
3
|
|
4
4
|
export const BuiltinFuncs = function() {
|
5
5
|
this.__Porffor_object_getObject = {
|
6
|
-
wasm:(_,{allocPage,glbl,builtin})=>[[32,1],[184],[68,6],[97],[4,64],[32,0],[33,2],...glbl(35,'underlyingFuncObjs',124),[33,4],[65,20],[33,5],[32,4],[32,5],[32,2],[65,1],[16,builtin('__Map_prototype_get')],[33,6],[34,3],[68,0],[97],[4,64],[16,builtin('__Porffor_allocate')],[184],[33,3],[16,builtin('__Porffor_allocate')],[184],[33,
|
6
|
+
wasm:(_,{allocPage,glbl,builtin})=>[[32,1],[184],[68,6],[97],[4,64],[32,0],[33,2],...glbl(35,'underlyingFuncObjs',124),[33,4],[65,20],[33,5],[32,4],[32,5],[32,2],[65,1],[16,builtin('__Map_prototype_get')],[33,6],[34,3],[68,0],[97],[4,64],[16,builtin('__Porffor_allocate')],[184],[33,3],[32,2],[252,2],[16,builtin('__Porffor_funcLut_flags')],[183],[34,7],[68,2],[16,builtin('f64_&')],[252,3],[4,64],[16,builtin('__Porffor_allocate')],[184],[33,8],[65,7],[33,9],...number(allocPage(_,'bytestring: __Porffor_object_getObject/key1','i8'),124),[33,10],[32,3],[252,2],[65,7],[32,10],[252,2],[65,195,1],[32,8],[32,9],[65,8],[65,1],[16,builtin('__Porffor_object_expr_initWithFlags')],[33,6],[183],[26],...number(allocPage(_,'bytestring: __Porffor_object_getObject/key2','i8'),124),[33,11],[32,8],[252,2],[32,9],[32,11],[252,2],[65,195,1],[32,0],[32,1],[65,10],[65,1],[16,builtin('__Porffor_object_expr_initWithFlags')],[33,6],[183],[26],[11],...glbl(35,'underlyingFuncObjs',124),[33,4],[65,20],[33,5],[32,4],[32,5],[32,2],[65,1],[32,3],[65,7],[16,builtin('__Map_prototype_set')],[33,6],[26],[11],[32,3],[65,7],[15],[11],[32,0],[32,1],[15]],
|
7
7
|
params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
8
|
-
locals:[124,124,124,127,127,124,127,124,124],localNames:["obj","obj#type","funcI32","underlying","#proto_target","#proto_target#type","#last_type","proto","proto#type","key1","key2"],
|
8
|
+
locals:[124,124,124,127,127,124,124,127,124,124],localNames:["obj","obj#type","funcI32","underlying","#proto_target","#proto_target#type","#last_type","flags","proto","proto#type","key1","key2"],
|
9
9
|
globalInits:{underlyingFuncObjs:(_,{glbl,loc,builtin})=>[[68,1],[65,6],[16,builtin('__Porffor_allocate')],[184],[65,7],[68,0],[65,128,1],[16,builtin('Map')],[34,loc('#last_type',127)],[26],...glbl(36,'underlyingFuncObjs',124)]},data:{"bytestring: __Porffor_object_getObject/key1":[9,0,0,0,112,114,111,116,111,116,121,112,101],"bytestring: __Porffor_object_getObject/key2":[11,0,0,0,99,111,110,115,116,114,117,99,116,111,114]},
|
10
10
|
};
|
11
11
|
this.__Porffor_strcmp = {
|
@@ -1505,14 +1505,14 @@ locals:[124,127,124],localNames:["#newtarget","#newtarget#type","#this","#this#t
|
|
1505
1505
|
constr:1,
|
1506
1506
|
};
|
1507
1507
|
this.__Object_keys = {
|
1508
|
-
wasm:(_,{builtin,internalThrow})=>[[32,0],[33,2],[32,1],[33,3],[2,127],[32,3],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,3],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,2],[68,0],[97],[12,1],[11],[32,3],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Argument is nullish, expected object`),[11],[16,builtin('__Porffor_allocate')],[183],[33,4],[32,1],[
|
1508
|
+
wasm:(_,{builtin,internalThrow})=>[[32,0],[33,2],[32,1],[33,3],[2,127],[32,3],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,3],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,2],[68,0],[97],[12,1],[11],[32,3],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Argument is nullish, expected object`),[11],[16,builtin('__Porffor_allocate')],[183],[33,4],[32,0],[32,1],[16,builtin('__Porffor_object_getObject')],[34,5],[33,1],[33,0],[32,1],[184],[34,6],[68,7],[97],[4,64],[32,0],[68,5],[160],[34,7],[32,0],[252,2],[40,0,0],[183],[68,14],[162],[160],[33,8],[68,0],[33,9],[3,64],[32,7],[32,8],[99],[4,64],[2,64],[32,7],[252,2],[65,1],[16,builtin('__Porffor_object_isEnumerable')],[33,5],[183],[33,2],[32,5],[33,3],[2,124],[32,3],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,2],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,3],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,2],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,2],[68,0],[97],[184],[11,"TYPESWITCH_end"],[252,3],[4,64],[12,1],[11],[32,7],[252,3],[40,0,0],[34,12],[65,30],[118],[34,13],[4,127],[65,5],[65,195,0],[32,13],[65,3],[70],[27],[33,11],[32,12],[65,255,255,255,255,3],[113],[5],[65,195,1],[33,11],[32,12],[11],[184],[33,10],[32,4],[33,16],[32,9],[32,9],[68,1],[160],[33,9],[33,17],[32,16],[252,3],[32,17],[252,3],[65,9],[108],[106],[34,15],[32,10],[34,14],[57,0,4],[32,15],[32,11],[58,0,12],[11],[32,7],[68,14],[160],[34,7],[12,1],[11],[11],[32,4],[252,3],[34,20],[32,9],[34,19],[252,3],[54,1,0],[5],[32,6],[68,80],[97],[32,6],[68,195],[97],[114],[32,6],[68,67],[97],[114],[4,64],[32,0],[252,3],[40,1,0],[184],[33,21],[32,4],[252,3],[34,20],[32,21],[34,19],[252,3],[54,1,0],[68,0],[33,9],[3,64],[32,9],[32,21],[99],[4,64],[32,4],[33,16],[32,9],[33,17],[32,16],[252,3],[32,17],[252,3],[65,9],[108],[106],[34,15],[32,9],[65,1],[68,0],[65,128,1],[16,builtin('__Number_prototype_toString')],[33,5],[34,14],[57,0,4],[32,15],[32,5],[58,0,12],[32,9],[68,1],[160],[33,9],[12,1],[11],[11],[11],[11],[32,4],[65,208,0],[15]],
|
1509
1509
|
params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
1510
|
-
locals:[124,127,124,124,124,124,124,
|
1510
|
+
locals:[124,127,124,127,124,124,124,124,124,127,127,127,124,127,124,124,127,124,127,124],localNames:["obj","obj#type","#logicinner_tmp","#typeswitch_tmp1","out","#last_type","t","ptr","endPtr","i","key","key#type","raw","msb","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_obj","#member_prop_assign","#swap","__length_setter_tmp","__member_setter_ptr_tmp","len"],
|
1511
1511
|
};
|
1512
1512
|
this.__Object_values = {
|
1513
|
-
wasm:(_,{builtin,internalThrow})=>[[32,0],[33,2],[32,1],[33,3],[2,127],[32,3],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,3],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,2],[68,0],[97],[12,1],[11],[32,3],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Argument is nullish, expected object`),[11],[16,builtin('__Porffor_allocate')],[183],[33,4],[32,1],[
|
1513
|
+
wasm:(_,{builtin,internalThrow})=>[[32,0],[33,2],[32,1],[33,3],[2,127],[32,3],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,3],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,2],[68,0],[97],[12,1],[11],[32,3],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[4,64],...internalThrow(_,'TypeError',`Argument is nullish, expected object`),[11],[16,builtin('__Porffor_allocate')],[183],[33,4],[32,0],[32,1],[16,builtin('__Porffor_object_getObject')],[34,5],[33,1],[33,0],[32,1],[184],[34,6],[68,7],[97],[4,64],[32,0],[68,5],[160],[34,7],[32,0],[252,2],[40,0,0],[183],[68,14],[162],[160],[33,8],[68,0],[33,9],[3,64],[32,7],[32,8],[99],[4,64],[2,64],[32,7],[252,2],[65,1],[16,builtin('__Porffor_object_isEnumerable')],[33,5],[183],[33,2],[32,5],[33,3],[2,124],[32,3],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,2],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,3],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,2],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,2],[68,0],[97],[184],[11,"TYPESWITCH_end"],[252,3],[4,64],[12,1],[11],[32,7],[252,3],[34,12],[43,0,4],[33,10],[32,12],[45,0,13],[33,11],[32,4],[33,15],[32,9],[32,9],[68,1],[160],[33,9],[33,16],[32,15],[252,3],[32,16],[252,3],[65,9],[108],[106],[34,14],[32,10],[34,13],[57,0,4],[32,14],[32,11],[58,0,12],[11],[32,7],[68,14],[160],[34,7],[12,1],[11],[11],[32,4],[252,3],[34,19],[32,9],[34,18],[252,3],[54,1,0],[5],[32,6],[68,80],[97],[32,6],[68,195],[97],[114],[32,6],[68,67],[97],[114],[4,64],[32,0],[252,3],[40,1,0],[184],[33,20],[32,4],[252,3],[34,19],[32,20],[34,18],[252,3],[54,1,0],[68,0],[33,9],[3,64],[32,9],[32,20],[99],[4,64],[2,64],[32,4],[33,15],[32,9],[33,16],[32,15],[252,3],[32,16],[252,3],[65,9],[108],[106],[34,14],[32,0],[33,15],[32,9],[33,21],[32,1],[33,3],[2,124],[32,3],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,15],[252,3],[32,1],[32,21],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,17],[252,3],[32,17],[16,builtin('__Porffor_object_get')],[33,5],[12,1],[11],[32,3],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,15],[252,3],[32,1],[32,21],[65,1],[16,builtin('__ecma262_ToPropertyKey')],[33,17],[252,3],[32,17],[16,builtin('__Porffor_object_get')],[33,5],[12,1],[11],[32,3],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('__Porffor_allocate')],[34,23],[65,1],[54,0,0],[32,23],[32,21],[252,3],[65,2],[108],[32,15],[252,3],[106],[47,0,4],[59,0,4],[32,23],[184],[65,195,0],[33,5],[12,1],[11],[32,3],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,21],[252,3],[65,9],[108],[32,15],[252,3],[106],[34,22],[43,0,4],[32,22],[45,0,12],[33,5],[12,1],[11],[32,3],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[106],[45,0,4],[184],[65,1],[33,5],[12,1],[11],[32,3],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[106],[44,0,4],[183],[65,1],[33,5],[12,1],[11],[32,3],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[106],[45,0,4],[184],[65,1],[33,5],[12,1],[11],[32,3],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,5],[12,1],[11],[32,3],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,5],[12,1],[11],[32,3],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,5],[12,1],[11],[32,3],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,5],[12,1],[11],[32,3],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,5],[12,1],[11],[32,3],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,15],[252,3],[40,0,4],[32,21],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,5],[12,1],[11],[32,3],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11],[32,3],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16,builtin('__Porffor_allocate')],[34,23],[65,1],[54,0,0],[32,23],[32,21],[252,3],[32,15],[252,3],[106],[45,0,4],[58,0,4],[32,23],[184],[65,195,1],[33,5],[12,1],[11],[68,0],[65,128,1],[33,5],[11,"TYPESWITCH_end"],[34,13],[57,0,4],[32,14],[32,5],[58,0,12],[11],[32,9],[68,1],[160],[33,9],[12,1],[11],[11],[11],[11],[32,4],[65,208,0],[15]],
|
1514
1514
|
params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
1515
|
-
locals:[124,127,124,124,124,124,124,
|
1515
|
+
locals:[124,127,124,127,124,124,124,124,124,127,127,124,127,124,124,127,124,127,124,124,127,127],localNames:["obj","obj#type","#logicinner_tmp","#typeswitch_tmp1","out","#last_type","t","ptr","endPtr","i","val","val#type","ptr32","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_obj","#member_prop_assign","#swap","__length_setter_tmp","__member_setter_ptr_tmp","len","#member_prop","#loadArray_offset","#member_allocd"],
|
1516
1516
|
};
|
1517
1517
|
this.__Object_entries = {
|
1518
1518
|
wasm:(_,{builtin})=>[[16,builtin('__Porffor_allocate')],[183],[33,2],[32,0],[32,1],[16,builtin('__Object_keys')],[33,4],[33,3],[32,0],[32,1],[16,builtin('__Object_values')],[33,4],[33,5],[32,3],[252,3],[40,1,0],[184],[33,6],[32,2],[252,3],[34,8],[32,6],[34,7],[252,3],[54,1,0],[68,0],[33,9],[3,64],[32,9],[32,6],[99],[4,64],[16,builtin('__Porffor_allocate')],[183],[34,10],[252,3],[34,8],[68,2],[34,7],[252,3],[54,1,0],[32,10],[33,13],[68,0],[33,14],[32,13],[252,3],[32,14],[252,3],[65,9],[108],[106],[34,12],[32,3],[33,13],[32,9],[34,15],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,16],[43,0,4],[32,16],[45,0,12],[33,4],[34,11],[57,0,4],[32,12],[32,4],[58,0,12],[32,10],[33,13],[68,1],[33,14],[32,13],[252,3],[32,14],[252,3],[65,9],[108],[106],[34,12],[32,5],[33,13],[32,9],[34,15],[252,3],[65,9],[108],[32,13],[252,3],[106],[34,16],[43,0,4],[32,16],[45,0,12],[33,4],[34,11],[57,0,4],[32,12],[32,4],[58,0,12],[32,2],[33,13],[32,9],[33,14],[32,13],[252,3],[32,14],[252,3],[65,9],[108],[106],[34,12],[32,10],[34,11],[57,0,4],[32,12],[65,208,0],[58,0,12],[32,9],[68,1],[160],[33,9],[12,1],[11],[11],[32,2],[65,208,0],[15]],
|
@@ -1525,7 +1525,7 @@ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
|
1525
1525
|
locals:[124,127,127,127,124,127,124,127,127,124,127,124,127,124,124,124,127,127,127,127],localNames:["iterable","iterable#type","out","#forof_base_pointer0","#forof_length0","#forof_counter0","#forof_tmp0","#forof_tmp0#type","x","x#type","#last_type","#logicinner_tmp","#typeswitch_tmp1","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_obj","#member_prop_assign","#member_prop","#loadArray_offset","#member_allocd","#swap","#forof_allocd"],
|
1526
1526
|
};
|
1527
1527
|
this.__Object_prototype_hasOwnProperty = {
|
1528
|
-
wasm:(_,{allocPage,builtin})=>[[32,2],[32,3],[16,builtin('__ecma262_ToPropertyKey')],[34,6],[33,5],[33,4],[32,1],[184],[34,7],[68,7],[97],[4,64],[32,0],[252,2],[32,1],[32,4],[252,2],[32,5],[16,builtin('__Porffor_object_lookup')],[33,6],[183],[68,-1],[98],[184],[65,2],[15],[11],[32,7],[68,6],[97],[4,64],...number(allocPage(_,'bytestring: __Object_prototype_hasOwnProperty/tmp1','i8'),124),[33,8],[32,4],[32,5],[32,8],[65,195,1],[16,builtin('__Porffor_compareStrings')],[26],[252,3],[4,64],[32,0],[252,2],[16,builtin('__Porffor_funcLut_isNameDeleted')],[183],[68,0],[97],[184],[65,2],[15],[11],...number(allocPage(_,'bytestring: __Object_prototype_hasOwnProperty/tmp2','i8'),124),[33,9],[32,4],[32,5],[32,9],[65,195,1],[16,builtin('__Porffor_compareStrings')],[26],[252,3],[4,64],[32,0],[252,2],[16,builtin('__Porffor_funcLut_isLengthDeleted')],[183],[68,0],[97],[184],[65,2],[15],[11],[
|
1528
|
+
wasm:(_,{allocPage,builtin})=>[[32,2],[32,3],[16,builtin('__ecma262_ToPropertyKey')],[34,6],[33,5],[33,4],[32,1],[184],[34,7],[68,7],[97],[4,64],[32,0],[252,2],[32,1],[32,4],[252,2],[32,5],[16,builtin('__Porffor_object_lookup')],[33,6],[183],[68,-1],[98],[184],[65,2],[15],[11],[32,7],[68,6],[97],[4,64],...number(allocPage(_,'bytestring: __Object_prototype_hasOwnProperty/tmp1','i8'),124),[33,8],[32,4],[32,5],[32,8],[65,195,1],[16,builtin('__Porffor_compareStrings')],[26],[252,3],[4,64],[32,0],[252,2],[16,builtin('__Porffor_funcLut_isNameDeleted')],[183],[68,0],[97],[184],[65,2],[15],[11],...number(allocPage(_,'bytestring: __Object_prototype_hasOwnProperty/tmp2','i8'),124),[33,9],[32,4],[32,5],[32,9],[65,195,1],[16,builtin('__Porffor_compareStrings')],[26],[252,3],[4,64],[32,0],[252,2],[16,builtin('__Porffor_funcLut_isLengthDeleted')],[183],[68,0],[97],[184],[65,2],[15],[11],[32,0],[252,2],[32,1],[32,4],[252,2],[32,5],[16,builtin('__Porffor_object_lookup')],[33,6],[183],[68,-1],[98],[184],[65,2],[15],[11],[32,0],[32,1],[16,builtin('__Object_keys')],[33,6],[34,10],[65,208,0],[32,4],[32,5],[68,0],[65,128,1],[16,builtin('__Array_prototype_includes')],[34,6],[15]],
|
1529
1529
|
params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
1530
1530
|
locals:[124,127,127,124,124,124,124],localNames:["_this","_this#type","prop","prop#type","p","p#type","#last_type","t","tmp1","tmp2","keys"],
|
1531
1531
|
data:{"bytestring: __Object_prototype_hasOwnProperty/tmp1":[4,0,0,0,110,97,109,101],"bytestring: __Object_prototype_hasOwnProperty/tmp2":[6,0,0,0,108,101,110,103,116,104]},
|
@@ -1536,7 +1536,7 @@ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
|
1536
1536
|
locals:[127],localNames:["obj","obj#type","prop","prop#type","#last_type"],
|
1537
1537
|
};
|
1538
1538
|
this.__Porffor_object_in = {
|
1539
|
-
wasm:(_,{builtin,internalThrow})=>[[32,0],[32,1],[32,2],[32,3],[16,builtin('__Object_prototype_hasOwnProperty')],[33,4],[33,5],[32,4],[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,1],[65,2],[15],[11],[32,
|
1539
|
+
wasm:(_,{builtin,internalThrow})=>[[32,0],[32,1],[32,2],[32,3],[16,builtin('__Object_prototype_hasOwnProperty')],[33,4],[33,5],[32,4],[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,1],[65,2],[15],[11],[32,0],[33,7],[32,1],[33,8],[3,64],[65,1],[4,64],[32,0],[33,9],[65,128,128,8],[34,14],[65,9],[54,1,0],[32,14],[65,223,0],[58,0,4],[32,14],[65,223,0],[58,0,5],[32,14],[65,240,0],[58,0,6],[32,14],[65,242,0],[58,0,7],[32,14],[65,239,0],[58,0,8],[32,14],[65,244,0],[58,0,9],[32,14],[65,239,0],[58,0,10],[32,14],[65,223,0],[58,0,11],[32,14],[65,223,0],[58,0,12],[32,14],[184],[33,10],[32,1],[33,6],[2,124],[32,6],[65,1],[70],[4,64,"TYPESWITCH|Number"],[16,builtin('#get___Number_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,2],[70],[4,64,"TYPESWITCH|Boolean"],[16,builtin('#get___Boolean_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,5],[70],[4,64,"TYPESWITCH|Symbol"],[16,builtin('#get___Symbol_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,9],[252,3],[32,1],[32,10],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,13],[252,3],[32,13],[16,builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,9],[252,3],[32,1],[32,10],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,13],[252,3],[32,13],[16,builtin('__Porffor_object_get')],[33,4],[12,1],[11],[32,6],[65,18],[70],[4,64,"TYPESWITCH|Date"],[16,builtin('#get___Date_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,19],[70],[4,64,"TYPESWITCH|Set"],[16,builtin('#get___Set_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,20],[70],[4,64,"TYPESWITCH|Map"],[16,builtin('#get___Map_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,21],[70],[4,64,"TYPESWITCH|ArrayBuffer"],[16,builtin('#get___ArrayBuffer_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,22],[70],[4,64,"TYPESWITCH|SharedArrayBuffer"],[16,builtin('#get___SharedArrayBuffer_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,23],[70],[4,64,"TYPESWITCH|DataView"],[16,builtin('#get___DataView_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,33],[70],[4,64,"TYPESWITCH|WeakRef"],[16,builtin('#get___WeakRef_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,34],[70],[4,64,"TYPESWITCH|WeakSet"],[16,builtin('#get___WeakSet_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,35],[70],[4,64,"TYPESWITCH|WeakMap"],[16,builtin('#get___WeakMap_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,36],[70],[4,64,"TYPESWITCH|Promise"],[16,builtin('#get___Promise_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('#get___String_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[16,builtin('#get___Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[16,builtin('#get___Uint8Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[16,builtin('#get___Int8Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[16,builtin('#get___Uint8ClampedArray_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[16,builtin('#get___Uint16Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[16,builtin('#get___Int16Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[16,builtin('#get___Uint32Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[16,builtin('#get___Int32Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[16,builtin('#get___Float32Array_prototype')],[184],[65,7],[33,4],[12,1],[11],[32,6],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[16,builtin('#get___Float64Array_prototype')],[184],[65,7],[33,4],[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('#get___ByteString_prototype')],[184],[65,7],[33,4],[12,1],[11],[68,0],[65,128,1],[33,4],[11,"TYPESWITCH_end"],[34,0],[32,4],[33,1],[26],[32,0],[33,5],[32,1],[33,6],[2,127],[32,6],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,6],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,5],[68,0],[97],[12,1],[11],[32,6],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[32,0],[32,7],[97],[114],[4,64],[12,1],[11],[32,0],[34,7],[32,1],[33,8],[26],[32,0],[32,1],[32,2],[32,3],[16,builtin('__Object_prototype_hasOwnProperty')],[33,4],[33,5],[32,4],[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,1],[65,2],[15],[11],[12,1],[11],[11],[68,0],[65,2],[15]],
|
1540
1540
|
params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
1541
1541
|
locals:[127,124,127,124,127,124,124,127,127,127,127],localNames:["obj","obj#type","prop","prop#type","#last_type","#logicinner_tmp","#typeswitch_tmp1","lastProto","lastProto#type","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","#makearray_pointer_tmp"],
|
1542
1542
|
};
|
@@ -1557,9 +1557,9 @@ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
|
1557
1557
|
locals:[124,127,124,127,127,127,127,124,127,124,127,124,127,124,124,124,127,127,127,127],localNames:["target","target#type","source","source#type","#logicinner_tmp","#typeswitch_tmp1","keys","#last_type","#forof_base_pointer1","#forof_length1","#forof_counter1","#forof_tmp1","#forof_tmp1#type","x","x#type","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_obj","#member_prop_assign","#member_prop","#loadArray_offset","#member_allocd","#swap","#forof_allocd"],
|
1558
1558
|
};
|
1559
1559
|
this.__Object_prototype_propertyIsEnumerable = {
|
1560
|
-
wasm:(_,{builtin})=>[[32,2],[32,3],[16,builtin('__ecma262_ToPropertyKey')],[34,6],[33,5],[33,4],[32,1],[
|
1560
|
+
wasm:(_,{builtin})=>[[32,2],[32,3],[16,builtin('__ecma262_ToPropertyKey')],[34,6],[33,5],[33,4],[32,0],[32,1],[16,builtin('__Porffor_object_getObject')],[34,6],[33,8],[33,7],[32,8],[184],[68,7],[97],[4,64],[32,0],[252,2],[32,1],[32,4],[252,2],[32,5],[16,builtin('__Porffor_object_lookup')],[33,6],[183],[34,9],[68,-1],[97],[4,64],[68,0],[65,2],[15],[11],[32,9],[252,2],[65,1],[16,builtin('__Porffor_object_isEnumerable')],[33,6],[183],[32,6],[15],[11],[32,0],[32,1],[16,builtin('__Object_keys')],[33,6],[34,10],[65,208,0],[32,4],[32,5],[68,0],[65,128,1],[16,builtin('__Array_prototype_includes')],[34,6],[15]],
|
1561
1561
|
params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
1562
|
-
locals:[124,127,127,124,124,124],localNames:["_this","_this#type","prop","prop#type","p","p#type","#last_type","
|
1562
|
+
locals:[124,127,127,124,127,124,124],localNames:["_this","_this#type","prop","prop#type","p","p#type","#last_type","obj","obj#type","entryPtr","keys"],
|
1563
1563
|
};
|
1564
1564
|
this.__Object_is = {
|
1565
1565
|
wasm:(_,{builtin})=>[[2,127,"string_only"],[32,0],[34,4,"string_only"],[32,2],[34,5,"string_only"],[32,1,"string_only|start"],[65,128,1],[114],[65,195,1],[70],[32,3],[65,128,1],[114],[65,195,1],[70],[114],[4,64],[32,4],[32,1],[32,5],[32,3],[16,builtin('__Porffor_compareStrings')],[26],[252,3],[12,1],[11,"string_only|end"],[97],[11,"string_only"],[32,1],[65,128,1],[114],[32,3],[65,128,1],[114],[70],[113],[4,64],[32,0],[68,0],[97],[4,64],[68,1],[32,0],[163],[68,1],[32,2],[163],[97],[184],[65,2],[15],[11],[68,1],[65,2],[15],[11],[32,1],[184],[68,1],[97],[184],[34,6],[252,3],[4,124],[32,0],[16,builtin('__Number_isNaN')],[65,2],[33,7],[5],[32,6],[65,2],[33,7],[11],[33,8],[32,7],[33,9],[2,127],[32,9],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[32,8],[252,3],[40,1,0],[12,1],[11],[32,9],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,8],[252,3],[40,1,0],[12,1],[11],[32,8],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,2],[16,builtin('__Number_isNaN')],[65,2],[15],[11],[68,0],[65,2],[15]],
|
@@ -1597,9 +1597,9 @@ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
|
1597
1597
|
locals:[127,124,127],localNames:["obj","obj#type","#last_type","#logicinner_tmp","#typeswitch_tmp1"],
|
1598
1598
|
};
|
1599
1599
|
this.__Object_getOwnPropertyDescriptor = {
|
1600
|
-
wasm:(_,{builtin,internalThrow})=>[[32,2],[32,3],[16,builtin('__ecma262_ToPropertyKey')],[34,6],[33,5],[33,4],[32,1],[
|
1600
|
+
wasm:(_,{builtin,internalThrow})=>[[32,2],[32,3],[16,builtin('__ecma262_ToPropertyKey')],[34,6],[33,5],[33,4],[32,0],[252,2],[32,1],[32,4],[252,2],[32,5],[16,builtin('__Porffor_object_lookup')],[33,6],[183],[34,7],[68,-1],[97],[4,64],[32,1],[184],[68,6],[97],[4,64],[32,0],[33,10],[32,4],[33,11],[32,1],[33,15],[2,124],[32,15],[65,6],[70],[4,64,"TYPESWITCH|Function"],[32,10],[252,3],[32,1],[32,11],[32,5],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[16,builtin('__Porffor_object_get')],[33,6],[12,1],[11],[32,15],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,10],[252,3],[32,1],[32,11],[32,5],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[16,builtin('__Porffor_object_get')],[33,6],[12,1],[11],[32,15],[65,195,0],[70],[4,64,"TYPESWITCH|String"],[16,builtin('__Porffor_allocate')],[34,13],[65,1],[54,0,0],[32,13],[32,11],[252,3],[65,2],[108],[32,10],[252,3],[106],[47,0,4],[59,0,4],[32,13],[184],[65,195,0],[33,6],[12,1],[11],[32,15],[65,208,0],[70],[4,64,"TYPESWITCH|Array"],[32,11],[252,3],[65,9],[108],[32,10],[252,3],[106],[34,12],[43,0,4],[32,12],[45,0,12],[33,6],[12,1],[11],[32,15],[65,216,0],[70],[4,64,"TYPESWITCH|Uint8Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[106],[45,0,4],[184],[65,1],[33,6],[12,1],[11],[32,15],[65,217,0],[70],[4,64,"TYPESWITCH|Int8Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[106],[44,0,4],[183],[65,1],[33,6],[12,1],[11],[32,15],[65,218,0],[70],[4,64,"TYPESWITCH|Uint8ClampedArray"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[106],[45,0,4],[184],[65,1],[33,6],[12,1],[11],[32,15],[65,219,0],[70],[4,64,"TYPESWITCH|Uint16Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,1],[33,6],[12,1],[11],[32,15],[65,220,0],[70],[4,64,"TYPESWITCH|Int16Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,1],[33,6],[12,1],[11],[32,15],[65,221,0],[70],[4,64,"TYPESWITCH|Uint32Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,1],[33,6],[12,1],[11],[32,15],[65,222,0],[70],[4,64,"TYPESWITCH|Int32Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,1],[33,6],[12,1],[11],[32,15],[65,223,0],[70],[4,64,"TYPESWITCH|Float32Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,1],[33,6],[12,1],[11],[32,15],[65,224,0],[70],[4,64,"TYPESWITCH|Float64Array"],[32,10],[252,3],[40,0,4],[32,11],[252,3],[65,8],[108],[106],[43,0,4],[65,1],[33,6],[12,1],[11],[32,15],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],...internalThrow(_,'TypeError',`Cannot read property of undefined`),[68,0],[12,1],[11],[32,15],[65,195,1],[70],[4,64,"TYPESWITCH|ByteString"],[16,builtin('__Porffor_allocate')],[34,13],[65,1],[54,0,0],[32,13],[32,11],[252,3],[32,10],[252,3],[106],[45,0,4],[58,0,4],[32,13],[184],[65,195,1],[33,6],[12,1],[11],[68,0],[65,128,1],[33,6],[11,"TYPESWITCH_end"],[33,8],[32,6],[33,9],[32,8],[33,16],[32,9],[33,15],[2,127],[32,15],[65,0],[70],[4,64,"TYPESWITCH|empty"],[65,1],[12,1],[11],[32,15],[65,7],[70],[4,64,"TYPESWITCH|Object"],[32,16],[68,0],[97],[12,1],[11],[32,15],[65,128,1],[70],[4,64,"TYPESWITCH|undefined"],[65,1],[12,1],[11],[65,0],[11,"TYPESWITCH_end"],[69],[4,64],[16,builtin('__Porffor_allocate')],[184],[34,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,8],[54,1,0],[32,21],[65,247,0],[58,0,4],[32,21],[65,242,0],[58,0,5],[32,21],[65,233,0],[58,0,6],[32,21],[65,244,0],[58,0,7],[32,21],[65,225,0],[58,0,8],[32,21],[65,226,0],[58,0,9],[32,21],[65,236,0],[58,0,10],[32,21],[65,229,0],[58,0,11],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[68,0],[65,2],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,10],[54,1,0],[32,21],[65,229,0],[58,0,4],[32,21],[65,238,0],[58,0,5],[32,21],[65,245,0],[58,0,6],[32,21],[65,237,0],[58,0,7],[32,21],[65,229,0],[58,0,8],[32,21],[65,242,0],[58,0,9],[32,21],[65,225,0],[58,0,10],[32,21],[65,226,0],[58,0,11],[32,21],[65,236,0],[58,0,12],[32,21],[65,229,0],[58,0,13],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[68,0],[65,2],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,12],[54,1,0],[32,21],[65,227,0],[58,0,4],[32,21],[65,239,0],[58,0,5],[32,21],[65,238,0],[58,0,6],[32,21],[65,230,0],[58,0,7],[32,21],[65,233,0],[58,0,8],[32,21],[65,231,0],[58,0,9],[32,21],[65,245,0],[58,0,10],[32,21],[65,242,0],[58,0,11],[32,21],[65,225,0],[58,0,12],[32,21],[65,226,0],[58,0,13],[32,21],[65,236,0],[58,0,14],[32,21],[65,229,0],[58,0,15],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[68,1],[65,2],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,5],[54,1,0],[32,21],[65,246,0],[58,0,4],[32,21],[65,225,0],[58,0,5],[32,21],[65,236,0],[58,0,6],[32,21],[65,245,0],[58,0,7],[32,21],[65,229,0],[58,0,8],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,8],[32,9],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[65,7],[15],[11],[11],[68,0],[65,128,1],[15],[11],[16,builtin('__Porffor_allocate')],[184],[33,17],[32,7],[252,2],[47,0,12],[183],[33,22],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,12],[54,1,0],[32,21],[65,227,0],[58,0,4],[32,21],[65,239,0],[58,0,5],[32,21],[65,238,0],[58,0,6],[32,21],[65,230,0],[58,0,7],[32,21],[65,233,0],[58,0,8],[32,21],[65,231,0],[58,0,9],[32,21],[65,245,0],[58,0,10],[32,21],[65,242,0],[58,0,11],[32,21],[65,225,0],[58,0,12],[32,21],[65,226,0],[58,0,13],[32,21],[65,236,0],[58,0,14],[32,21],[65,229,0],[58,0,15],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,22],[68,2],[16,builtin('f64_&')],[252,2],[69],[69],[183],[65,2],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,10],[54,1,0],[32,21],[65,229,0],[58,0,4],[32,21],[65,238,0],[58,0,5],[32,21],[65,245,0],[58,0,6],[32,21],[65,237,0],[58,0,7],[32,21],[65,229,0],[58,0,8],[32,21],[65,242,0],[58,0,9],[32,21],[65,225,0],[58,0,10],[32,21],[65,226,0],[58,0,11],[32,21],[65,236,0],[58,0,12],[32,21],[65,229,0],[58,0,13],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,22],[68,4],[16,builtin('f64_&')],[252,2],[69],[69],[183],[65,2],[16,builtin('__Porffor_object_set')],[26],[26],[32,22],[68,1],[16,builtin('f64_&')],[252,3],[4,64],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,3],[54,1,0],[32,21],[65,231,0],[58,0,4],[32,21],[65,229,0],[58,0,5],[32,21],[65,244,0],[58,0,6],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,7],[252,2],[65,1],[16,builtin('__Porffor_object_accessorGet')],[33,6],[183],[32,6],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,3],[54,1,0],[32,21],[65,243,0],[58,0,4],[32,21],[65,229,0],[58,0,5],[32,21],[65,244,0],[58,0,6],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,7],[252,2],[65,1],[16,builtin('__Porffor_object_accessorSet')],[33,6],[183],[32,6],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[65,7],[15],[11],[32,7],[252,2],[43,0,4],[33,23],[65,1],[33,24],[32,22],[252,3],[65,8],[118],[33,24],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,8],[54,1,0],[32,21],[65,247,0],[58,0,4],[32,21],[65,242,0],[58,0,5],[32,21],[65,233,0],[58,0,6],[32,21],[65,244,0],[58,0,7],[32,21],[65,225,0],[58,0,8],[32,21],[65,226,0],[58,0,9],[32,21],[65,236,0],[58,0,10],[32,21],[65,229,0],[58,0,11],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,22],[68,8],[16,builtin('f64_&')],[252,2],[69],[69],[183],[65,2],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[33,10],[16,builtin('__Porffor_allocate')],[34,21],[65,5],[54,1,0],[32,21],[65,246,0],[58,0,4],[32,21],[65,225,0],[58,0,5],[32,21],[65,236,0],[58,0,6],[32,21],[65,245,0],[58,0,7],[32,21],[65,229,0],[58,0,8],[32,21],[184],[33,20],[32,10],[252,3],[65,7],[32,20],[65,195,1],[16,builtin('__ecma262_ToPropertyKey')],[33,14],[252,3],[32,14],[32,23],[32,24],[16,builtin('__Porffor_object_set')],[26],[26],[32,17],[65,7],[15]],
|
1601
1601
|
params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
|
1602
|
-
locals:[124,127,127,124,124,127,124,124,127,127,127,127,124,124,124,127,124,127,124,124,
|
1602
|
+
locals:[124,127,127,124,124,127,124,124,127,127,127,127,124,124,124,127,124,127,124,124,127],localNames:["obj","obj#type","prop","prop#type","p","p#type","#last_type","entryPtr","v","v#type","#member_obj","#member_prop","#loadArray_offset","#member_allocd","#swap","#typeswitch_tmp1","#logicinner_tmp","out","#member_setter_val_tmp","#member_setter_ptr_tmp","#member_prop_assign","#makearray_pointer_tmp","tail","value","value#type"],
|
1603
1603
|
};
|
1604
1604
|
this.__Object_getOwnPropertyDescriptors = {
|
1605
1605
|
wasm:(_,{builtin,internalThrow})=>[[16,builtin('__Porffor_allocate')],[184],[33,2],[32,1],[184],[68,7],[98],[4,64],[32,0],[32,1],[16,builtin('__Porffor_object_getObject')],[34,3],[33,1],[33,0],[32,1],[184],[68,7],[98],[4,64],[32,2],[65,7],[15],[11],[11],[32,0],[32,1],[16,builtin('__Reflect_ownKeys')],[33,3],[34,4],[252,3],[33,5],[65,0],[33,7],[65,208,0],[65,208,0],[70],[65,208,0],[65,19],[70],[114],[65,208,0],[65,195,0],[70],[114],[65,208,0],[65,195,1],[70],[114],[65,208,0],[65,216,0],[78],[65,208,0],[65,224,0],[76],[113],[114],[69],[4,64],...internalThrow(_,'TypeError',`Tried for..of on non-iterable type`),[11],[32,5],[40,1,0],[34,6],[4,64],[3,64],[32,5],[43,0,4],[33,8],[32,5],[45,0,12],[33,9],[32,8],[33,10],[32,9],[33,11],[2,64],[32,2],[33,14],[32,10],[33,15],[32,14],[252,3],[65,7],[32,15],[32,11],[16,builtin('__ecma262_ToPropertyKey')],[33,16],[252,3],[32,16],[32,0],[32,1],[32,10],[32,11],[16,builtin('__Object_getOwnPropertyDescriptor')],[34,3],[16,builtin('__Porffor_object_set')],[26],[26],[32,5],[65,9],[106],[33,5],[32,7],[65,1],[106],[34,7],[32,6],[71],[13,1],[11],[11],[11],[32,2],[65,7],[15]],
|
package/compiler/codegen.js
CHANGED
@@ -5730,24 +5730,27 @@ const objectHack = node => {
|
|
5730
5730
|
|
5731
5731
|
if (node.type === 'MemberExpression') {
|
5732
5732
|
const out = (() => {
|
5733
|
+
const abortOut = { ...node, object: objectHack(node.object) };
|
5733
5734
|
if (node.computed || node.optional) return;
|
5734
5735
|
|
5735
5736
|
// hack: block these properties as they can be accessed on functions
|
5736
|
-
if (node.property.name === 'length' || node.property.name === 'name' || node.property.name === 'call') return;
|
5737
|
+
if (node.property.name === 'length' || node.property.name === 'name' || node.property.name === 'call') return abortOut;
|
5737
5738
|
|
5738
|
-
if (node.property.name === '__proto__') return;
|
5739
|
+
if (node.property.name === '__proto__') return abortOut;
|
5739
5740
|
|
5740
5741
|
let objectName = node.object.name;
|
5741
5742
|
|
5742
5743
|
// if object is not identifier or another member exp, give up
|
5743
|
-
if (node.object.type !== 'Identifier' && node.object.type !== 'MemberExpression') return;
|
5744
|
-
if (objectName && ['undefined', 'null', 'NaN', 'Infinity'].includes(objectName)) return;
|
5744
|
+
if (node.object.type !== 'Identifier' && node.object.type !== 'MemberExpression') return abortOut;
|
5745
|
+
if (objectName && ['undefined', 'null', 'NaN', 'Infinity'].includes(objectName)) return abortOut;
|
5745
5746
|
|
5746
5747
|
if (!objectName) objectName = objectHack(node.object)?.name?.slice?.(2);
|
5747
5748
|
if (!objectName || (!objectHackers.includes(objectName) && !objectHackers.some(x => objectName.startsWith(`${x}_`)))) {
|
5748
|
-
return;
|
5749
|
+
return abortOut;
|
5749
5750
|
}
|
5750
5751
|
|
5752
|
+
if (objectName !== 'Object_prototype' && (node.property.name === 'propertyIsEnumerable' || node.property.name === 'hasOwnProperty' || node.property.name === 'isPrototypeOf')) return abortOut;
|
5753
|
+
|
5751
5754
|
const name = '__' + objectName + '_' + node.property.name;
|
5752
5755
|
if (Prefs.codeLog) log('codegen', `object hack! ${node.object.name}.${node.property.name} -> ${name}`);
|
5753
5756
|
|
package/package.json
CHANGED