Re-target for ES.Next (#3901)
A list of changes: - 'es2015-subset' profile is deprecated, and an 'es.next' profile is added. - The default profile is changed to 'es.next' - Renamed the JERRY_ES2015 guard to JERRY_ESNEXT - Renamed JERRY_ES2015_BUILTIN_* guards to JERRY_BUILTIN_* - Moved es2015 specific tests to a new 'es.next' subdirectory - Updated docs, targets, and test runners to reflect these changes Resolves #3737. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
@@ -51,10 +51,10 @@ tools/build.py --debug --logging=on --error-messages=on --line-info=on
|
||||
python tools/build.py --cmake-param=CMAKE_PARAM
|
||||
```
|
||||
|
||||
**Set a profile mode (ES5.1, subset of ES2015, minimal)**
|
||||
**Set a profile mode (ES.next, ES5.1, minimal)**
|
||||
|
||||
```bash
|
||||
python tools/build.py --profile=es5.1|es2015-subset|minimal
|
||||
python tools/build.py --profile=es.next|es5.1|minimal
|
||||
```
|
||||
|
||||
See also the related [README.md](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
|
||||
|
||||
@@ -41,7 +41,7 @@ that can be used by the debugger to identify the currently executed source conte
|
||||
### Profiles
|
||||
|
||||
This option can be used to enable/disable available JavaScript language features by providing profile files. Profile files contain a list of C definitions that configure each individual feature.
|
||||
The `path` value for CMake and Python arguments should be a file path to the profile file, or one of `es2015-subset`, `es5.1`, or `minimal`, which are the pre-defined profiles.
|
||||
The `path` value for CMake and Python arguments should be a file path to the profile file, or one of `es.next`, `es5.1`, or `minimal`, which are the pre-defined profiles.
|
||||
To see how a profile file should be created, or what configuration options are available in C, see the profile [README](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
|
||||
|
||||
| Options | |
|
||||
|
||||
+42
-42
@@ -1459,10 +1459,10 @@ jerry_value_is_array (const jerry_value_t value)
|
||||
Returns whether the given `jerry_value_t` is an ArrayBuffer object.
|
||||
|
||||
*Notes*:
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -1584,10 +1584,10 @@ jerry_value_is_constructor (const jerry_value_t value)
|
||||
Returns whether the given `jerry_value_t` is a DataView object value.
|
||||
|
||||
*Notes*:
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_DATAVIEW`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_DATAVIEW`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_DATAVIEW` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -1841,10 +1841,10 @@ jerry_value_is_object (const jerry_value_t value)
|
||||
Returns whether the given `jerry_value_t` is a promise value.
|
||||
|
||||
*Notes*:
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
|
||||
**Prototype**
|
||||
@@ -1890,10 +1890,10 @@ jerry_value_is_promise (const jerry_value_t value)
|
||||
Returns whether the given `jerry_value_t` is a proxy value.
|
||||
|
||||
*Notes*:
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROXY`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_PROXY`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_PROXY` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
|
||||
**Prototype**
|
||||
@@ -1978,10 +1978,10 @@ jerry_value_is_string (const jerry_value_t value)
|
||||
Returns whether the given `jerry_value_t` is a symbol value.
|
||||
|
||||
*Notes*:
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_SYMBOL`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -2038,10 +2038,10 @@ main (void)
|
||||
Checks whether the given `jerry_value_t` is a TypedArray object or not.
|
||||
|
||||
*Notes*:
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -2096,11 +2096,11 @@ main (void)
|
||||
Checks whether the given `jerry_value_t` is the given `jerry_container_type_t` type container object.
|
||||
|
||||
*Notes*
|
||||
- This API function depends on a build option (`JERRY_ES2015_BUILTIN_CONTAINER`) and can be checked
|
||||
- This API function depends on a build option (`JERRY_BUILTIN_CONTAINER`) and can be checked
|
||||
runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`
|
||||
feature enum values.
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
*New in version 2.3*.
|
||||
|
||||
@@ -3376,7 +3376,7 @@ jerry_value_to_string (const jerry_value_t value);
|
||||
|
||||
# Functions for promise objects
|
||||
|
||||
These APIs all depend on the ES2015-subset profile (or on some build options).
|
||||
These APIs all depend on the es.next profile (or on some build options).
|
||||
|
||||
## jerry_get_promise_result
|
||||
|
||||
@@ -3387,10 +3387,10 @@ The function returns the result of a Promise object.
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
|
||||
**Prototype**
|
||||
@@ -3454,10 +3454,10 @@ example (void)
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
|
||||
**Prototype**
|
||||
@@ -3525,10 +3525,10 @@ Resolve or reject the promise with an argument.
|
||||
*Note*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
|
||||
**Prototype**
|
||||
@@ -3582,7 +3582,7 @@ jerry_resolve_or_reject_promise (jerry_value_t promise,
|
||||
|
||||
# Functions for symbols
|
||||
|
||||
These APIs all depend on the ES2015-subset profile (or on build options).
|
||||
These APIs all depend on the es.next profile (or on build options).
|
||||
|
||||
## jerry_get_symbol_descriptive_string
|
||||
|
||||
@@ -3594,10 +3594,10 @@ Based on ECMA 262 v6 19.4.3.2.1 this is in the form of `Symbol(<description>)`.
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_SYMBOL`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
- If the symbol support is not enabled an error will be returned.
|
||||
|
||||
**Prototype**
|
||||
@@ -3767,7 +3767,7 @@ jerry_create_array (uint32_t size);
|
||||
Create a jerry_value_t representing an ArrayBuffer object.
|
||||
|
||||
*Note*:
|
||||
- This API depends on the ES2015-subset profile.
|
||||
- This API depends on the es.next profile.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
|
||||
@@ -3815,7 +3815,7 @@ After the object is not needed the GC will call the `free_cb`
|
||||
so the user can release the buffer which was provided.
|
||||
|
||||
*Note*:
|
||||
- This API depends on the ES2015-subset profile.
|
||||
- This API depends on the es.next profile.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
|
||||
@@ -3988,7 +3988,7 @@ jerry_create_error_sz (jerry_error_t error_type,
|
||||
Create new JavaScript DataView object.
|
||||
|
||||
*Note*:
|
||||
- This API depends on the ES2015-subset profile.
|
||||
- This API depends on the es.next profile.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
|
||||
@@ -4304,7 +4304,7 @@ Create an empty promise object which can be resolved or rejected later
|
||||
by calling jerry_resolve_or_reject_promise.
|
||||
|
||||
*Note*:
|
||||
- This API depends on the ES2015-subset profile.
|
||||
- This API depends on the es.next profile.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
|
||||
@@ -4344,7 +4344,7 @@ jerry_create_promise (void)
|
||||
Create a new Proxy object with the given target and handler.
|
||||
|
||||
*Note*:
|
||||
- This API depends on the ES2015-subset profile.
|
||||
- This API depends on the es.next profile.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
|
||||
@@ -4572,7 +4572,7 @@ Create symbol from an API value.
|
||||
|
||||
*Note*:
|
||||
- The given argument is converted to string. This operation can throw an error.
|
||||
- This API depends on the ES2015-subset profile.
|
||||
- This API depends on the es.next profile.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
|
||||
@@ -4714,10 +4714,10 @@ and element count can be specified.
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -4770,10 +4770,10 @@ one of the allowed TypedArray functions.
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -4831,10 +4831,10 @@ one of the allowed TypedArray functions.
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -4887,11 +4887,11 @@ Create a jerry_value_t representing a given type container object.
|
||||
- This method is expected to work the same way as the JavaScript Map constructor.
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||
when it is no longer needed.
|
||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_CONTAINER`) and can be checked
|
||||
- This API depends on a build option (`JERRY_BUILTIN_CONTAINER`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`
|
||||
feature enum values.
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- The ES2015-subset profile enables this by default.
|
||||
- The es.next profile enables this by default.
|
||||
|
||||
*New in version 2.3*.
|
||||
|
||||
@@ -7926,10 +7926,10 @@ If used outside of a native C function it will return "undefined" value.
|
||||
*Notes*:
|
||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||
is no longer needed.
|
||||
- This feature depends on build option (`JERRY_ES2015`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value (as symbols are enabled in case of ES2015),
|
||||
- This feature depends on build option (`JERRY_ESNEXT`) and can be checked
|
||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value (as symbols are enabled in case of ES.next),
|
||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||
- If the ES2015 mode is not enabled this method will always return the "undefined" value.
|
||||
- If the ES.next mode is not enabled this method will always return the "undefined" value.
|
||||
|
||||
**Prototype**
|
||||
|
||||
@@ -8050,7 +8050,7 @@ main (int argc, char** argv)
|
||||
|
||||
# ArrayBuffer and TypedArray functions
|
||||
|
||||
These APIs all depend on the ES2015-subset profile.
|
||||
These APIs all depend on the es.next profile.
|
||||
|
||||
## jerry_get_arraybuffer_byte_length
|
||||
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ information.
|
||||
void jerry_port_print_char (char c);
|
||||
```
|
||||
|
||||
### ES2015 Module system
|
||||
### Jerry Module system
|
||||
|
||||
The port API provides functions that can be used by the module system to open
|
||||
and close source files, and normalize file paths.
|
||||
@@ -135,7 +135,7 @@ jerry_port_normalize_path (const char *in_path_p, /**< input file path */
|
||||
* Get the module object of a native module.
|
||||
*
|
||||
* Note:
|
||||
* This port function is called by jerry-core when ES2015_MODULE_SYSTEM
|
||||
* This port function is called by jerry-core when JERRY_MODULE_SYSTEM
|
||||
* is enabled.
|
||||
*
|
||||
* @param name String value of the module specifier.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The module system allows users to write import and export statements in scripts, which can be used to separate the logic of the application into custom modules.
|
||||
The standard's relevant part can be found [here](https://www.ecma-international.org/ecma-262/6.0/#sec-modules).
|
||||
Embedders wishing to use native builtin modules with ES6 imports can use the [Port API](05.PORT-API.md#es2015-module-system) to do so.
|
||||
Embedders wishing to use native builtin modules with ES6 imports can use the [Port API](05.PORT-API.md#jerry-module-system) to do so.
|
||||
|
||||
## General
|
||||
|
||||
@@ -76,7 +76,7 @@ export var version = "1.0 (e92ae0fb)";
|
||||
|
||||
```js
|
||||
// module_2.js
|
||||
var featureName = "EcmaScript 2015 modules";
|
||||
var featureName = "EcmaScript modules";
|
||||
var year = 2018;
|
||||
|
||||
export function getFeatureDetails() {
|
||||
|
||||
Reference in New Issue
Block a user