Robert Fancsik
0628ae1e7b
Remove the ENABLED/DISABLED macros ( #4515 )
...
The removal of these macros enabled cppcheck to reveal new errors.
These errors are also fixed by the patch.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-02-04 23:47:05 +01:00
Robert Fancsik
e7d11eaf9e
Improve destructuring patterns ( #4527 )
...
- Fix evaluation order of the operands
- Implement proper iterator closing of array destructuring
- Support next method caching
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-02-04 13:11:11 +01:00
Robert Fancsik
3e548401fd
Invalid regexp literals should throw syntax error in ES11 ( #4506 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-01-19 16:20:23 +01:00
Robert Fancsik
979a0c7826
Fix bytecode emitting for invalid regexp literals ( #4422 )
...
This patch fixes #4408 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-01-07 17:19:52 +01:00
Leesoo Ahn
290e845759
Do not check call_arguments twice through parsing call expression ( #4346 )
...
Checking call_arguments twice happens in a special case that
only if call_arguments <= 1 and opcode variable has CBC_EXT_SUPER_CALL.
JerryScript-DCO-1.0-Signed-off-by: Leesoo Ahn lsahn@ooseel.net
2020-12-01 11:29:25 +01:00
Peter Marki
25bb5083be
Fix await parsing in modules ( #4266 )
...
Fixes #4189
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2020-11-10 09:53:00 +01:00
Zoltan Herczeg
c7986fd2c5
Implement rest parameter support for destructuring object patterns. ( #4318 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-10-29 10:49:08 +01:00
Dániel Bátyai
080abb94ca
Check for prototype bound name in class static accessors ( #4257 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2020-10-16 17:02:17 +02:00
Zoltan Herczeg
4b2dbd5c21
Correctly set flags of identifiers related to classes ( #4233 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-09-30 12:45:53 +02:00
Zoltan Herczeg
bc64957d19
Properly implement static class fields. ( #4221 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-09-25 14:23:02 +02:00
Zoltan Herczeg
d9653823ca
Initial implementation of class fields ( #4191 )
...
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
2020-09-17 15:22:55 +02:00
Zoltan Herczeg
2bc3111e31
Improve error detection of nullish coalescing operator ( #4179 )
...
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
2020-09-07 14:43:41 +02:00
Robert Fancsik
2f08d8ac08
Fix evaluation order in non-binding destructuring patterns ( #4173 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-08-28 15:13:02 +02:00
Zoltan Herczeg
84bc1e03fb
Detect assignment pattern for for-in/of ( #4140 )
...
Furthermore do not allow default value for rest parameter
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-08-24 14:47:10 +02:00
Zoltan Herczeg
f761427a3e
Improve BigInt support ( #4118 )
...
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
2020-08-11 11:25:01 +02:00
Csaba Osztrogonác
c76736eadf
Methods shouldn't have prototype property ( #3964 )
...
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-08-05 14:01:58 +02:00
Robert Fancsik
dbea5e6a22
Indentifier should be expected after static in class body. ( #4061 )
...
This patch fixes #4055 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-28 10:58:09 +02:00
Robert Fancsik
9872c441e3
Fix invalid destructuring function arguments parsing ( #4074 )
...
This patch fixes #4016 and fixes #4019 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-28 10:41:45 +02:00
Robert Fancsik
11c2ae30d1
Invalid regexp patterns should not throw syntax error during parsing ( #4038 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-27 09:28:26 +02:00
Robert Fancsik
f596211553
Fix tagged template literal call precedence for new operator ( #3998 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-24 11:22:09 +02:00
kisbg
dfd9d4497a
Implement nullish coalescing operator ( #3997 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-07-17 15:42:51 +02:00
Robert Fancsik
b90fa63255
LEXER_ASSIGN_GROUP_EXPR should not be emitted when parsing LHS expression ( #3990 )
...
This patch fixes #3935 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-10 08:35:33 +02:00
Szilagyi Adam
69f917650e
Update parser early return type in ESNEXT ( #3742 )
...
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
2020-07-06 13:36:28 +02:00
Robert Fancsik
f98d7f24a7
Support super property reference in object methods/accessors ( #3940 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-03 12:16:23 +02:00
Zoltan Herczeg
9e18ff29c6
Implement ... support for object initializers. ( #3968 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-07-02 15:04:21 +02:00
Zoltan Herczeg
f88489beef
Implement yield* operator ( #3923 )
...
Missing features:
- caching next() method (this also true for normal generators)
- automatic sync to async generator conversion
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-25 17:11:16 +02:00
Zoltan Herczeg
b2a6109430
Implement async generators ( #3916 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-22 13:54:18 +02:00
Dániel Bátyai
fde0d556ac
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
2020-06-12 17:55:00 +02:00
Zoltan Herczeg
2058ea1286
Implement eval support for functions with arguments lexical env. ( #3806 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-08 12:11:54 +02:00
Robert Fancsik
1770ccaecd
Object/Array initializers should be parsed as AssignmentExpression ( #3851 )
...
This patch fixes #3849 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-05 13:25:05 +02:00
Zoltan Herczeg
e6ebc2be78
Don't continue parsing expressions after ternary operators. ( #3847 )
...
Further benefits: new code requires less checks.
Fixes #3841
Fixes #3842
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-04 13:27:32 +02:00
Robert Fancsik
1414e9bb00
Fix invalid AssignmentExpression lookahead in parser_process_group_expression ( #3846 )
...
This patch fixes #3845 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-04 13:23:25 +02:00
Robert Fancsik
fe09200d61
Fix assignment lookahead in parser_process_group_expression ( #3828 )
...
This patch fixes #3815 and fixes #3819 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-03 15:29:26 +02:00
Robert Fancsik
4660bab16b
Fix PropertyDefinition parsing in ObjectInitializer ( #3832 )
...
This patch fixes #3822 and fixes #3823 and fixes #3824 and fixes #3825 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-03 15:28:13 +02:00
Robert Fancsik
5895b96bdb
Class extends expression should be parsed is strict mode ( #3801 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-05-28 16:23:56 +02:00
Robert Fancsik
104001df68
Implement function name support for script functions and classes ( #3745 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-05-28 12:33:21 +02:00
Zoltan Herczeg
e01cfda0b8
Check next token before reparsing identifiers in object assignments. ( #3756 )
...
Fixes #3735 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-05-18 13:16:16 +02:00
Zoltan Herczeg
4aa27371b6
Array or object pattern must be assignment expression. ( #3744 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-05-15 22:29:27 +02:00
Zoltan Herczeg
1f00d750b7
Implement parsing await. ( #3738 )
...
Several bugs fixed for parsing yield as well.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-05-15 22:26:05 +02:00
Zoltan Herczeg
4dc2cb3328
Implement proper creation of function arguments, let and const declarations. ( #3725 )
...
After the rework it is possible to detect use before init errors for function arguments.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-05-12 14:38:17 +02:00
Robert Fancsik
40a9f27314
Fix __proto__ parsing in object literals ( #3704 )
...
Co-authored-by: Rafal Walczyna r.walczyna@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-05-04 14:49:15 +02:00
Zoltan Herczeg
4b780507e1
Implement throwing const re-assignment error. ( #3697 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-29 15:50:22 +02:00
Zoltan Herczeg
f254b1a8b7
Fix invalid / unhandled this_literal cases. ( #3696 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-27 14:54:21 +02:00
Zoltan Herczeg
4e8dac8ce1
Implement exponentiation operation. ( #3692 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-27 11:43:35 +02:00
Zoltan Herczeg
daeee77d63
Fix invalid assignment code generation. ( #3695 )
...
This patch prevents assigning a value to a string literal after a this token.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-27 10:14:29 +02:00
Zoltan Herczeg
e2807c28fa
Implement separate context for arguments. ( #3686 )
...
Fixes #3396 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-24 16:55:12 +02:00
Robert Fancsik
b209e95daa
Fix iterator step calculation for bracketed property expressions ( #3678 )
...
This patch fixes #3665 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-04-20 19:32:59 +02:00
Zoltan Herczeg
1b01171a60
Update forcing of lexical environment creation for functions. ( #3683 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-20 09:30:17 +02:00
Robert Fancsik
60db840cf4
Fix super property assignment for namedaccessor properties ( #3654 )
...
Tha patch also updates the [[Put]] internal method with the new steps from the ES6 standard.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-04-09 17:08:08 +02:00
Robert Fancsik
d63936f371
CBC_PUSH_THIS should not be mutated in array literal parsing. ( #3652 )
...
This patch fixes #3650 and slightly reverts the changes of #3594 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-03-27 21:20:37 +01:00