Skip to content

Commit

Permalink
Update profile README file (#4523)
Browse files Browse the repository at this point in the history
Add previously missed new defines to the documentation and update the
defines to be in lexicographical order.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
  • Loading branch information
galpeter authored Jan 22, 2021
1 parent d646cf5 commit 8ba0d1b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 27 deletions.
44 changes: 22 additions & 22 deletions jerry-core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
# define JERRY_BUILTIN_ARRAY JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_ARRAY) */

#ifndef JERRY_BUILTIN_BOOLEAN
# define JERRY_BUILTIN_BOOLEAN JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_BOOLEAN) */

#ifndef JERRY_BUILTIN_DATE
# define JERRY_BUILTIN_DATE JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_DATE) */
Expand All @@ -48,10 +52,6 @@
# define JERRY_BUILTIN_ERRORS JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_ERRORS) */

#ifndef JERRY_BUILTIN_BOOLEAN
# define JERRY_BUILTIN_BOOLEAN JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_BOOLEAN) */

#ifndef JERRY_BUILTIN_JSON
# define JERRY_BUILTIN_JSON JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_JSON) */
Expand Down Expand Up @@ -79,9 +79,9 @@
# define JERRY_ESNEXT 1
#endif /* !defined (JERRY_ESNEXT) */

#ifndef JERRY_BUILTIN_REALMS
# define JERRY_BUILTIN_REALMS JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_REALMS) */
#ifndef JERRY_BUILTIN_BIGINT
# define JERRY_BUILTIN_BIGINT JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_BIGINT) */

#ifndef JERRY_BUILTIN_DATAVIEW
# define JERRY_BUILTIN_DATAVIEW JERRY_ESNEXT
Expand All @@ -91,18 +91,6 @@
# define JERRY_BUILTIN_MAP JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_MAP) */

#ifndef JERRY_BUILTIN_SET
# define JERRY_BUILTIN_SET JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_SET) */

#ifndef JERRY_BUILTIN_WEAKMAP
# define JERRY_BUILTIN_WEAKMAP JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_WEAKMAP) */

#ifndef JERRY_BUILTIN_WEAKSET
# define JERRY_BUILTIN_WEAKSET JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_WEAKSET) */

#ifndef JERRY_BUILTIN_PROMISE
# define JERRY_BUILTIN_PROMISE JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_PROMISE) */
Expand All @@ -111,17 +99,29 @@
# define JERRY_BUILTIN_PROXY JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_PROXY) */

#ifndef JERRY_BUILTIN_REALMS
# define JERRY_BUILTIN_REALMS JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_REALMS) */

#ifndef JERRY_BUILTIN_REFLECT
# define JERRY_BUILTIN_REFLECT JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_REFLECT) */

#ifndef JERRY_BUILTIN_SET
# define JERRY_BUILTIN_SET JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_SET) */

#ifndef JERRY_BUILTIN_TYPEDARRAY
# define JERRY_BUILTIN_TYPEDARRAY JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_TYPEDARRAY) */

#ifndef JERRY_BUILTIN_BIGINT
# define JERRY_BUILTIN_BIGINT JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_BIGINT) */
#ifndef JERRY_BUILTIN_WEAKMAP
# define JERRY_BUILTIN_WEAKMAP JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_WEAKMAP) */

#ifndef JERRY_BUILTIN_WEAKSET
# define JERRY_BUILTIN_WEAKSET JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_WEAKSET) */

#ifndef JERRY_MODULE_SYSTEM
# define JERRY_MODULE_SYSTEM JERRY_ESNEXT
Expand Down
33 changes: 28 additions & 5 deletions jerry-core/profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,39 +98,62 @@ defined to `1`.

#### ES2015+ features

* `JERRY_BUILTIN_BIGINT`:
Enables or disables the [BigInt](https://262.ecma-international.org/11.0/#sec-ecmascript-language-types-bigint-type) syntax and built-in.
* `JERRY_BUILTIN_DATAVIEW`:
Enables or disables the [DataView](https://www.ecma-international.org/ecma-262/6.0/#sec-dataview-objects) built-in.
* `JERRY_BUILTIN_MAP`:
Enables or disables the [Map](http://www.ecma-international.org/ecma-262/6.0/#sec-keyed-collection) built-ins.
* `JERRY_BUILTIN_SET`:
Enables or disables the [Set](https://www.ecma-international.org/ecma-262/6.0/#sec-set-objects) built-in.
* `JERRY_BUILTIN_PROMISE`:
Enables or disables the [Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects) built-in.
* `JERRY_BUILTIN_PROXY`:
Enables or disables the [Proxy](https://262.ecma-international.org/11.0/#sec-proxy-object-internal-methods-and-internal-slots) related internal workings and built-in.
* `JERRY_BUILTIN_REALMS`:
Enables or disables the [Realms](https://262.ecma-international.org/11.0/#sec-code-realms) support in the engine.
* `JERRY_BUILTIN_REFLECT`:
Enables or disables the [Reflext](https://262.ecma-international.org/11.0/#sec-reflect-object) built-in.
* `JERRY_BUILTIN_SET`:
Enables or disables the [Set](https://www.ecma-international.org/ecma-262/6.0/#sec-set-objects) built-in.
* `JERRY_BUILTIN_TYPEDARRAY`:
Enables or disables the [ArrayBuffer](http://www.ecma-international.org/ecma-262/6.0/#sec-arraybuffer-objects) and [TypedArray](http://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects) built-ins.
* `JERRY_BUILTIN_WEAKMAP`:
Enables or disables the [WeakMap](https://262.ecma-international.org/11.0/#sec-weakmap-objects) built-in.
* `JERRY_BUILTIN_WEAKSET`:
Enables or disables the [WeakSet](https://262.ecma-international.org/11.0/#sec-weakmap-objects) built-in.
* `JERRY_MODULE_SYSTEM`:
Enables or disable the [module system](http://www.ecma-international.org/ecma-262/6.0/#sec-modules) language element.
* `JERRY_ESNEXT`: Enables or disables all of the implemented [ECMAScript2015+ features](http://www.ecma-international.org/ecma-262/10.0/).
* `JERRY_ESNEXT`: Enables or disables all of the implemented [ECMAScript2015+ features](http://www.ecma-international.org/ecma-262/10.0/) above.
* [arrow functions](http://www.ecma-international.org/ecma-262/6.0/#sec-arrow-function-definitions) language element.
* [async functions](https://262.ecma-international.org/11.0/#sec-async-function-definitions) language element.
* [class](https://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions) language element.
* [default value](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions) for formal parameters.
* [destructuring assignment](http://www.ecma-international.org/ecma-262/6.0/#sec-destructuring-assignment) language element.
* [destructuring binding pattern](http://www.ecma-international.org/ecma-262/6.0/#sec-destructuring-binding-patterns) declarations.
* [enhanced object initializer](http://www.ecma-international.org/ecma-262/6.0/#sec-object-initializer) language element.
* [for-of](https://www.ecma-international.org/ecma-262/6.0/#sec-for-in-and-for-of-statements) language element.
* [for-await-of](https://262.ecma-international.org/11.0/#sec-for-in-and-for-of-statements) language element.
* [generator functions](http://www.ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions) language element.
* [iterator](https://www.ecma-international.org/ecma-262/6.0/#sec-iterator-interface) built-in.
* [nullish coalescing](https://262.ecma-international.org/11.0/#prod-CoalesceExpression) built-in.
* [numeric separator](https://github.com/tc39/proposal-numeric-separator) language element.
* [rest parameter](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions) language element.
* [rest operator with object destructuring](https://262.ecma-international.org/11.0/#prod-ObjectBindingPattern) language element.
* [spread](https://262.ecma-international.org/11.0/#prod-SpreadElement) syntax.
* [symbol](https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects) language element.
* [template strings](http://www.ecma-international.org/ecma-262/6.0/#sec-static-semantics-templatestrings) language element.

Furthermore all builtins follow the latest ECMAScript specification including those which behave differently in ES5.1.
This option is evaulated first, any other `JERRY_<name>` defines will override that specific entry.
Equivalent with setting the following defines to the `JERRY_ESNEXT` value:
* `JERRY_BUILTIN_BIGINT`
* `JERRY_BUILTIN_DATAVIEW`
* `JERRY_BUILTIN_MAP`
* `JERRY_BUILTIN_SET`
* `JERRY_BUILTIN_PROMISE`
* `JERRY_BUILTIN_PROXY`
* `JERRY_BUILTIN_REALMS`
* `JERRY_BUILTIN_REFLECT`
* `JERRY_BUILTIN_SET`
* `JERRY_BUILTIN_TYPEDARRAY`
* `JERRY_BUILTIN_WEAKMAP`
* `JERRY_BUILTIN_WEAKSET`
* `JERRY_MODULE_SYSTEM`

0 comments on commit 8ba0d1b

Please sign in to comment.