Skip to content

Commit 4924f9f

Browse files
authored
Remove ES_NEXT macro (#4915)
- remove all '#JERRY_ESNEXT' macro - remove 5.1 build profile, update test runner accordingly (Note: all builtins are turn on by default) - move tests from tests/jerry/esnext into tests/jerry, concatenate files with same names - add skiplist to some snapshot tests that were supported only in 5.1 - fix doxygen issues that were hidden before (bc. of es.next macro) Co-authored-by: Martin Negyokru [email protected] JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
1 parent 7640360 commit 4924f9f

File tree

973 files changed

+1892
-8230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

973 files changed

+1892
-8230
lines changed

.github/workflows/gh-actions.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,11 @@ jobs:
7575
- run: sudo apt install gcc-multilib
7676
- run: $RUNNER --buildoption-test
7777

78-
Conformance_Tests_ES5_1:
79-
runs-on: ubuntu-latest
80-
steps:
81-
- uses: actions/checkout@v2
82-
- run: $RUNNER --test262
83-
- run: $RUNNER --test262 --build-debug
84-
8578
Conformance_Tests_ESNext:
8679
runs-on: ubuntu-latest
8780
steps:
8881
- uses: actions/checkout@v2
89-
- run: $RUNNER --test262-esnext=update
82+
- run: $RUNNER --test262 update
9083
- uses: actions/upload-artifact@v2
9184
if: success() || failure()
9285
with:
@@ -98,7 +91,7 @@ jobs:
9891
runs-on: ubuntu-latest
9992
steps:
10093
- uses: actions/checkout@v2
101-
- run: $RUNNER --test262-esnext=update --build-debug --test262-test-list=built-ins,annexB,harness,intl402
94+
- run: $RUNNER --test262 update --build-debug --test262-test-list=built-ins,annexB,harness,intl402
10295
- uses: actions/upload-artifact@v2
10396
if: success() || failure()
10497
with:
@@ -110,7 +103,7 @@ jobs:
110103
runs-on: ubuntu-latest
111104
steps:
112105
- uses: actions/checkout@v2
113-
- run: $RUNNER --test262-esnext=update --build-debug --test262-test-list=language
106+
- run: $RUNNER --test262 update --build-debug --test262-test-list=language
114107
- uses: actions/upload-artifact@v2
115108
if: success() || failure()
116109
with:

docs/02.API-REFERENCE.md

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,13 +2863,6 @@ jerry_value_is_object (const jerry_value_t value)
28632863

28642864
Returns whether the given `jerry_value_t` is a promise value.
28652865

2866-
*Notes*:
2867-
- This API depends on a build option (`JERRY_ESNEXT`) and can be checked
2868-
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
2869-
see: [jerry_feature_enabled](#jerry_feature_enabled).
2870-
- The es.next profile enables this by default.
2871-
2872-
28732866
**Prototype**
28742867

28752868
```c
@@ -2884,8 +2877,6 @@ jerry_value_is_promise (const jerry_value_t value)
28842877

28852878
*New in version 2.0*.
28862879

2887-
*Changed in version [[NEXT_RELEASE]]*: Build option dependency changed from `JERRY_BUILTIN_PROMISE` to `JERRY_ESNEXT`.
2888-
28892880
**Example**
28902881

28912882
```c
@@ -3003,12 +2994,6 @@ jerry_value_is_string (const jerry_value_t value)
30032994

30042995
Returns whether the given `jerry_value_t` is a symbol value.
30052996

3006-
*Notes*:
3007-
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
3008-
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
3009-
see: [jerry_feature_enabled](#jerry_feature_enabled).
3010-
- The es.next profile enables this by default.
3011-
30122997
**Prototype**
30132998

30142999
```c
@@ -5728,11 +5713,6 @@ The function returns the result of a Promise object.
57285713
*Notes*:
57295714
- Returned value must be freed with [jerry_value_free](#jerry_value_free) when it
57305715
is no longer needed.
5731-
- This API depends on a build option (`JERRY_ESNEXT`) and can be checked
5732-
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
5733-
see: [jerry_feature_enabled](#jerry_feature_enabled).
5734-
- The es.next profile enables this by default.
5735-
57365716

57375717
**Prototype**
57385718

@@ -5750,8 +5730,6 @@ jerry_promise_result (const jerry_value_t promise);
57505730

57515731
*New in version 2.2*.
57525732

5753-
*Changed in version [[NEXT_RELEASE]]*: Build option dependency changed from `JERRY_BUILTIN_PROMISE` to `JERRY_ESNEXT`.
5754-
57555733
**Example**
57565734

57575735
[doctest]: # (test="compile")
@@ -5796,11 +5774,6 @@ example (void)
57965774
*Notes*:
57975775
- Returned value must be freed with [jerry_value_free](#jerry_value_free) when it
57985776
is no longer needed.
5799-
- This API depends on a build option (`JERRY_ESNEXT`) and can be checked
5800-
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
5801-
see: [jerry_feature_enabled](#jerry_feature_enabled).
5802-
- The es.next profile enables this by default.
5803-
58045777

58055778
**Prototype**
58065779

@@ -5817,8 +5790,6 @@ jerry_promise_state (const jerry_value_t promise);
58175790

58185791
*New in version 2.2*.
58195792

5820-
*Changed in version [[NEXT_RELEASE]]*: Build option dependency changed from `JERRY_BUILTIN_PROMISE` to `JERRY_ESNEXT`.
5821-
58225793
**Example**
58235794

58245795
[doctest]: # (test="compile")
@@ -6107,11 +6078,6 @@ Reject the promise with an argument.
61076078
*Note*:
61086079
- Returned value must be freed with [jerry_value_free](#jerry_value_free) when it
61096080
is no longer needed.
6110-
- This API depends on a build option (`JERRY_ESNEXT`) and can be checked
6111-
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
6112-
see: [jerry_feature_enabled](#jerry_feature_enabled).
6113-
- The es.next profile enables this by default.
6114-
61156081

61166082
**Prototype**
61176083

@@ -6128,8 +6094,6 @@ jerry_promise_reject (jerry_value_t promise, jerry_value_t argument);
61286094

61296095
*New in version 2.0*.
61306096

6131-
*Changed in version [[NEXT_RELEASE]]*: Build option dependency changed from `JERRY_BUILTIN_PROMISE` to `JERRY_ESNEXT`.
6132-
61336097
**Example**
61346098

61356099
```c
@@ -6171,10 +6135,6 @@ Get the well-known symbol corresponding to the given [well-known symbol id](#jer
61716135
*Notes*:
61726136
- Returned value must be freed with [jerry_value_free](#jerry_value_free) when it
61736137
is no longer needed.
6174-
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
6175-
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
6176-
see: [jerry_feature_enabled](#jerry_feature_enabled).
6177-
- The es.next profile enables this by default.
61786138
- If the symbol support is not enabled an undefined will be returned.
61796139

61806140
**Prototype**
@@ -6231,11 +6191,6 @@ Returns with the `[[Description]]` internal property of a symbol value.
62316191
*Notes*:
62326192
- Returned value must be freed with [jerry_value_free](#jerry_value_free) when it
62336193
is no longer needed.
6234-
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
6235-
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
6236-
see: [jerry_feature_enabled](#jerry_feature_enabled).
6237-
- The es.next profile enables this by default.
6238-
- If symbol support is not enabled an exception will be returned.
62396194

62406195
**Prototype**
62416196

@@ -6294,11 +6249,6 @@ Based on ECMA 262 v6 19.4.3.2.1 this is in the form of `Symbol(<description>)`.
62946249
*Notes*:
62956250
- Returned value must be freed with [jerry_value_free](#jerry_value_free) when it
62966251
is no longer needed.
6297-
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
6298-
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
6299-
see: [jerry_feature_enabled](#jerry_feature_enabled).
6300-
- The es.next profile enables this by default.
6301-
- If symbol support is not enabled an exception will be returned.
63026252

63036253
**Prototype**
63046254

jerry-core/api/jerry-snapshot.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ snapshot_get_global_flags (bool has_regex, /**< regex literal is present */
5050
#if JERRY_BUILTIN_REGEXP
5151
flags |= (has_regex ? JERRY_SNAPSHOT_HAS_REGEX_LITERAL : 0);
5252
#endif /* JERRY_BUILTIN_REGEXP */
53-
#if JERRY_ESNEXT
53+
5454
flags |= (has_class ? JERRY_SNAPSHOT_HAS_CLASS_LITERAL : 0);
55-
#endif /* JERRY_ESNEXT */
5655

5756
return flags;
5857
} /* snapshot_get_global_flags */
@@ -68,9 +67,8 @@ snapshot_check_global_flags (uint32_t global_flags) /**< global flags */
6867
#if JERRY_BUILTIN_REGEXP
6968
global_flags &= (uint32_t) ~JERRY_SNAPSHOT_HAS_REGEX_LITERAL;
7069
#endif /* JERRY_BUILTIN_REGEXP */
71-
#if JERRY_ESNEXT
70+
7271
global_flags &= (uint32_t) ~JERRY_SNAPSHOT_HAS_CLASS_LITERAL;
73-
#endif /* JERRY_ESNEXT */
7472

7573
return global_flags == snapshot_get_global_flags (false, false);
7674
} /* snapshot_check_global_flags */
@@ -164,7 +162,6 @@ snapshot_add_compiled_code (const ecma_compiled_code_t *compiled_code_p, /**< co
164162
uint8_t *copied_code_start_p = snapshot_buffer_p + globals_p->snapshot_buffer_write_offset;
165163
ecma_compiled_code_t *copied_code_p = (ecma_compiled_code_t *) copied_code_start_p;
166164

167-
#if JERRY_ESNEXT
168165
if (compiled_code_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)
169166
{
170167
globals_p->snapshot_error =
@@ -176,7 +173,6 @@ snapshot_add_compiled_code (const ecma_compiled_code_t *compiled_code_p, /**< co
176173
{
177174
globals_p->class_found = true;
178175
}
179-
#endif /* JERRY_ESNEXT */
180176

181177
#if JERRY_BUILTIN_REGEXP
182178
if (!CBC_IS_FUNCTION (compiled_code_p->status_flags))
@@ -629,7 +625,6 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
629625
extra_bytes += (uint32_t) (argument_end * sizeof (ecma_value_t));
630626
}
631627

632-
#if JERRY_ESNEXT
633628
/* function name */
634629
if (CBC_FUNCTION_GET_TYPE (bytecode_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)
635630
{
@@ -641,7 +636,6 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
641636
{
642637
extra_bytes += (uint32_t) sizeof (ecma_value_t);
643638
}
644-
#endif /* JERRY_ESNEXT */
645639

646640
#if JERRY_SOURCE_NAME
647641
/* source name */
@@ -1011,12 +1005,10 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */
10111005
JERRY_ASSERT (global_object_p == (ecma_object_t *) ecma_op_function_get_realm (bytecode_p));
10121006
#endif /* JERRY_BUILTIN_REALMS */
10131007

1014-
#if JERRY_ESNEXT
10151008
if (bytecode_p->status_flags & CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED)
10161009
{
10171010
ecma_create_global_lexical_block (global_object_p);
10181011
}
1019-
#endif /* JERRY_ESNEXT */
10201012

10211013
ecma_object_t *lex_env_p = ecma_get_global_scope (global_object_p);
10221014
ecma_object_t *func_obj_p = ecma_op_create_simple_function_object (lex_env_p, bytecode_p);

0 commit comments

Comments
 (0)