porffor 0.60.14 → 0.60.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/builtins/object.ts +15 -16
- package/compiler/builtins_precompiled.js +424 -424
- package/foo.js +26 -7
- package/package.json +1 -1
- package/runtime/index.js +1 -1
@@ -81,22 +81,22 @@ export const __Object_values = (obj: any): any[] => {
|
|
81
81
|
|
82
82
|
let i: i32 = 0;
|
83
83
|
for (; ptr < endPtr; ptr += 18) {
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
local.
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
84
|
+
const tail: i32 = Porffor.wasm.i32.load16_u(ptr, 0, 16);
|
85
|
+
if (!(tail & 0b0100)) continue; // not enumerable
|
86
|
+
|
87
|
+
if (tail & 0b0001) {
|
88
|
+
// accessor
|
89
|
+
const get: Function = Porffor.object.accessorGet(ptr);
|
90
|
+
if (Porffor.wasm`local.get ${get}` == 0) {
|
91
|
+
out[i++] = undefined;
|
92
|
+
continue;
|
93
|
+
}
|
94
|
+
|
95
|
+
out[i++] = get.call(obj);
|
96
|
+
continue;
|
97
|
+
}
|
98
98
|
|
99
|
-
out[i++] =
|
99
|
+
out[i++] = Porffor.object.readValue(ptr);
|
100
100
|
}
|
101
101
|
|
102
102
|
out.length = i;
|
@@ -731,7 +731,6 @@ export const __Porffor_object_spread = (dst: object, src: any): object => {
|
|
731
731
|
|
732
732
|
const len: i32 = keys.length;
|
733
733
|
for (let i: i32 = 0; i < len; i++) {
|
734
|
-
// target[keys[i]] = vals[i];
|
735
734
|
Porffor.object.expr.init(dst, keys[i], vals[i]);
|
736
735
|
}
|
737
736
|
|