Add support for function argument initializers. (#2571)

EcmaScript 2015 14.1.

Note: arrow functions with default arguments are not supported yet.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-10-30 10:48:35 +01:00
committed by László Langó
parent aeddb1cd88
commit 83fc0aa04f
8 changed files with 164 additions and 18 deletions
+8 -1
View File
@@ -32,6 +32,9 @@ Alternatively, if you want to use a custom profile at
# Turn off every ES2015 feature EXCEPT the arrow functions
CONFIG_DISABLE_ES2015_BUILTIN
CONFIG_DISABLE_ES2015_CLASS
CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER
CONFIG_DISABLE_ES2015_MAP_BUILTIN
CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER
CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS
CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
@@ -87,6 +90,8 @@ In JerryScript all of the features are enabled by default, so an empty profile f
Disable the built-in updates of the 5.1 standard. There are some differences in those built-ins which available in both [5.1](http://www.ecma-international.org/ecma-262/5.1/) and [2015](http://www.ecma-international.org/ecma-262/6.0/) versions of the standard. JerryScript uses the latest definition by default.
* `CONFIG_DISABLE_ES2015_CLASS`:
Disable the [class](https://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions) language element.
* `CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER`:
Disable the [default value](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions) for formal parameters.
* `CONFIG_DISABLE_ES2015_MAP_BUILTIN`:
Disable the [Map](http://www.ecma-international.org/ecma-262/6.0/#sec-keyed-collection) built-ins.
* `CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER`:
@@ -98,4 +103,6 @@ In JerryScript all of the features are enabled by default, so an empty profile f
* `CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN`:
Disable 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.
* `CONFIG_DISABLE_ES2015`: Disable all of the implemented [ECMAScript2015 features](http://www.ecma-international.org/ecma-262/6.0/).
(equivalent to `CONFIG_DISABLE_ES2015_ARROW_FUNCTION`, `CONFIG_DISABLE_ES2015_BUILTIN`, `CONFIG_DISABLE_ES2015_CLASS`, `CONFIG_DISABLE_ES2015_PROMISE_BUILTIN`, `CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS`, and `CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN`).
(equivalent to `CONFIG_DISABLE_ES2015_ARROW_FUNCTION`, `CONFIG_DISABLE_ES2015_BUILTIN`, `CONFIG_DISABLE_ES2015_CLASS`,
`CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER`, `CONFIG_DISABLE_ES2015_MAP_BUILTIN`, `CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER`,
`CONFIG_DISABLE_ES2015_PROMISE_BUILTIN`, `CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS`, and `CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN`).