porffor 0.19.3 → 0.19.5
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/arraybuffer.ts +3 -3
- package/compiler/builtins/dataview.ts +2 -2
- package/compiler/builtins/set.ts +1 -1
- package/compiler/builtins/z_map.ts +2 -2
- package/compiler/codegen.js +1 -1
- package/compiler/generated_builtins.js +583 -583
- package/compiler/types.js +12 -8
- package/compiler/wrap.js +4 -1
- package/package.json +1 -1
- package/runner/index.js +1 -1
@@ -32,7 +32,7 @@ i32.const 0
|
|
32
32
|
i32.ge_s
|
33
33
|
select
|
34
34
|
i32.from_u
|
35
|
-
i32.const
|
35
|
+
i32.const 1
|
36
36
|
return`;
|
37
37
|
};
|
38
38
|
|
@@ -49,7 +49,7 @@ i32.const 0
|
|
49
49
|
i32.ge_s
|
50
50
|
select
|
51
51
|
i32.from_u
|
52
|
-
i32.const
|
52
|
+
i32.const 1
|
53
53
|
return`;
|
54
54
|
};
|
55
55
|
|
@@ -61,7 +61,7 @@ i32.load 0 0
|
|
61
61
|
i32.const 4294967295
|
62
62
|
i32.eq
|
63
63
|
i32.from_u
|
64
|
-
i32.const
|
64
|
+
i32.const 2
|
65
65
|
return`;
|
66
66
|
};
|
67
67
|
|
@@ -67,7 +67,7 @@ i32.to_u
|
|
67
67
|
i32.add
|
68
68
|
i32.load8_u 0 4
|
69
69
|
i32.from_u
|
70
|
-
i32.const
|
70
|
+
i32.const 1
|
71
71
|
return`;
|
72
72
|
};
|
73
73
|
|
@@ -225,7 +225,7 @@ local.get ${int}
|
|
225
225
|
i32.to_u
|
226
226
|
f32.reinterpret_i32
|
227
227
|
f64.promote_f32
|
228
|
-
i32.const
|
228
|
+
i32.const 1
|
229
229
|
return`;
|
230
230
|
};
|
231
231
|
|
package/compiler/builtins/set.ts
CHANGED
@@ -6,7 +6,7 @@ export const __Map_prototype_size$get = (_this: Map) => {
|
|
6
6
|
|
7
7
|
export const __Map_prototype_has = (_this: Map, key: any) => {
|
8
8
|
const keys: Set = Porffor.wasm.i32.load(_this, 0, 0);
|
9
|
-
return __Set_prototype_has(key);
|
9
|
+
return __Set_prototype_has(keys, key);
|
10
10
|
};
|
11
11
|
|
12
12
|
export const __Map_prototype_get = (_this: Map, key: any) => {
|
@@ -46,7 +46,7 @@ export const __Map_prototype_delete = (_this: Map, key: any) => {
|
|
46
46
|
__Set_prototype_delete(keys, key);
|
47
47
|
|
48
48
|
const vals: any[] = Porffor.wasm.i32.load(_this, 0, 4);
|
49
|
-
__Array_prototype_splice(keyIdx, 1);
|
49
|
+
__Array_prototype_splice(vals, keyIdx, 1);
|
50
50
|
|
51
51
|
return true;
|
52
52
|
};
|
package/compiler/codegen.js
CHANGED
@@ -3095,8 +3095,8 @@ const generateUnary = (scope, decl) => {
|
|
3095
3095
|
[TYPES.undefined]: makeString(scope, 'undefined', false, '#typeof_result'),
|
3096
3096
|
[TYPES.function]: makeString(scope, 'function', false, '#typeof_result'),
|
3097
3097
|
[TYPES.symbol]: makeString(scope, 'symbol', false, '#typeof_result'),
|
3098
|
-
|
3099
3098
|
[TYPES.bytestring]: makeString(scope, 'string', false, '#typeof_result'),
|
3099
|
+
[TYPES.empty]: makeString(scope, 'undefined', false, '#typeof_result'),
|
3100
3100
|
|
3101
3101
|
// object and internal types
|
3102
3102
|
default: makeString(scope, 'object', false, '#typeof_result'),
|