If the module system is disabled however the es.next is enabled the following
code triggers an assert:
```js
class Demo {}
```
This was due to an incorrect scanner data processing where it was always
assumed that there is a module related information.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
A new shared frame context data is created which allows sharing
data between the function call and vm main loop. Furthermore
rest arguments and current function object handling is reworked.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Missing features:
- this binding in static fields are not supported
- static field evaluation order is wrong
- function names are not supported
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Also rename LEXER_IS_BINARY_LVALUE_TOKEN to LEXER_IS_BINARY_LVALUE_OP_TOKEN
because its name is wrong.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This patch adds several small features:
- Support right shift with negative numbers
- Support exponentation operator
- BigInts can be enabled in ES5.1 mode
- Remove dead code from ecma_deref_bigint
- Support longer BigInt literals in the parser
- Fix various BigInt comparison issues
- Do not discard unary plus for BigInt constants
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
JSON strings can contain unescaped LINE SEPARATOR and PARAGRAPH SEPARATOR in ES11
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
With a disabled ES2015 module system the build fails as an enum value
is incorrectly guarded and used.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
In case of ARM Nuttx build with IoT.js there are small conversion
and signedness warnings resulting in a build failure.
```
ecma-builtin-regexp-prototype.c: error: conversion from 'int' to '_Bool8' {aka 'unsigned char'}
may change value [-Werror=conversion]
116 | return ecma_make_boolean_value (flags & re_flags[offset]);
| ~~~~~~^~~~~~~~~~~~~~~~~~
js-scanner-util.c: In function 'scanner_pop_literal_pool':
js-scanner-util.c:628:43: error: comparison of integer expressions of different signedness:
'intptr_t' {aka 'int'} and 'unsigned int' [-Werror=sign-compare]
628 | else if (diff >= -UINT8_MAX && diff <= UINT16_MAX)
| ^~
js-scanner-util.c:891:43: error: comparison of integer expressions of different signedness:
'intptr_t' {aka 'int'} and 'unsigned int' [-Werror=sign-compare]
891 | else if (diff >= -UINT8_MAX && diff <= UINT16_MAX)
```
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This patch updates the early return types in the parser to SyntaxError instead of ReferenceError
in ESNEXT
This patch also includes a lot of tests for LeftHandSideExpression validation when using the = operator
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
As stated in ES 16.1, "arguments" and "caller" must not be created in:
- strict functions created using the Function constructor
- generator functions created using the Generator constructor
- async functions created using the AsyncFunction constructor
- functions created using the bind
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
The "async" identifier processing is delayed until it is detected that it cannot
be part of an arrow expression. The "async" identifier should be processed at this
point, but it was not happened in this case.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com