Skip to content

Commit 47ce368

Browse files
committed
Add global variables from latest ECMAScript draft standard
1 parent 245410a commit 47ce368

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/global-variables.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@ constexpr const char8 global_variables_ecmascript[] =
2121
u8"parseInt\0"
2222

2323
// ECMA-262 18.3 Constructor Properties of the Global Object
24-
u8"Array\0"
24+
u8"AggregateError\0"
2525
u8"ArrayBuffer\0"
26-
u8"BigInt\0"
26+
u8"Array\0"
2727
u8"BigInt64Array\0"
28+
u8"BigInt\0"
2829
u8"BigUint64Array\0"
2930
u8"Boolean\0"
3031
u8"DataView\0"
3132
u8"Date\0"
3233
u8"Error\0"
3334
u8"EvalError\0"
35+
u8"FinalizationRegistry\0"
3436
u8"Float32Array\0"
3537
u8"Float64Array\0"
3638
u8"Function\0"
@@ -57,6 +59,7 @@ constexpr const char8 global_variables_ecmascript[] =
5759
u8"Uint8Array\0"
5860
u8"Uint8ClampedArray\0"
5961
u8"WeakMap\0"
62+
u8"WeakRef\0"
6063
u8"WeakSet\0"
6164

6265
// ECMA-262 18.4 Other Properties of the Global Object
@@ -179,7 +182,7 @@ const global_group global_groups[] = {
179182
.globals = global_variables_ecmascript,
180183
.non_writable_globals = global_variables_ecmascript_non_writable,
181184
.non_shadowable_globals = nullptr,
182-
.globals_count = 51,
185+
.globals_count = 54,
183186
.non_writable_globals_count = 3,
184187
.non_shadowable_globals_count = 0,
185188
},

test/test-lint.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ constexpr const char8 *writable_global_variables[] = {
4343
u8"parseInt",
4444

4545
// ECMA-262 18.3 Constructor Properties of the Global Object
46+
u8"AggregateError",
4647
u8"Array",
4748
u8"ArrayBuffer",
4849
u8"BigInt",
@@ -53,6 +54,7 @@ constexpr const char8 *writable_global_variables[] = {
5354
u8"Date",
5455
u8"Error",
5556
u8"EvalError",
57+
u8"FinalizationRegistry",
5658
u8"Float32Array",
5759
u8"Float64Array",
5860
u8"Function",
@@ -79,6 +81,7 @@ constexpr const char8 *writable_global_variables[] = {
7981
u8"Uint8Array",
8082
u8"Uint8ClampedArray",
8183
u8"WeakMap",
84+
u8"WeakRef",
8285
u8"WeakSet",
8386

8487
// ECMA-262 18.4 Other Properties of the Global Object

0 commit comments

Comments
 (0)