porffor 0.20.6 → 0.20.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.
- package/compiler/builtins/object.ts +28 -0
- package/compiler/builtins/set.ts +1 -4
- package/compiler/builtins/weakref.ts +1 -1
- package/compiler/builtins/z_map.ts +2 -4
- package/compiler/builtins/z_weakmap.ts +3 -5
- package/compiler/builtins/z_weakset.ts +2 -5
- package/compiler/codegen.js +15 -16
- package/compiler/generated_builtins.js +132 -119
- package/compiler/types.js +10 -16
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/types.js
CHANGED
@@ -1,27 +1,21 @@
|
|
1
|
+
export const TYPE_FLAGS = {
|
2
|
+
parity: 0b10000000,
|
3
|
+
length: 0b01000000,
|
4
|
+
};
|
5
|
+
|
1
6
|
export const TYPES = {
|
2
7
|
empty: 0x00,
|
3
8
|
number: 0x01,
|
4
9
|
boolean: 0x02,
|
5
|
-
string: 0x03,
|
6
|
-
|
7
|
-
|
10
|
+
string: 0x03 | TYPE_FLAGS.length,
|
11
|
+
bigint: 0x04,
|
12
|
+
symbol: 0x05,
|
8
13
|
function: 0x06,
|
9
|
-
|
10
|
-
bigint: 0x08
|
11
|
-
};
|
14
|
+
object: 0x07,
|
12
15
|
|
13
|
-
|
14
|
-
export const TYPE_FLAGS = {
|
15
|
-
// iterable: 0b10000000,
|
16
|
-
parity: 0b10000000,
|
17
|
-
length: 0b01000000,
|
16
|
+
undefined: 0x00 | TYPE_FLAGS.parity,
|
18
17
|
};
|
19
18
|
|
20
|
-
// TYPES.string |= TYPE_FLAGS.iterable;
|
21
|
-
TYPES.string |= TYPE_FLAGS.length;
|
22
|
-
|
23
|
-
TYPES.undefined = TYPES.empty | TYPE_FLAGS.parity;
|
24
|
-
|
25
19
|
export const TYPE_NAMES = {
|
26
20
|
[TYPES.empty]: 'empty',
|
27
21
|
[TYPES.number]: 'Number',
|
package/package.json
CHANGED