Zoltan Herczeg
b1237dbc5a
Detect keyword type even if the keyword is identifier. ( #3448 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-16 13:36:26 +01:00
Zoltan Herczeg
40d930d62c
Implement \u{hex} support. ( #3447 )
...
A large rework because surrogate pairs must be combined.
Currently only the 0x10C80..0x10CF2 is accepted as valid identifier character from the non-basic plane.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-16 11:26:02 +01:00
László Langó
c525b1f10a
Fixed segmentation fault in scanner. ( #3444 )
...
The register end index was not correctly calculated when
only holes presented in the arguments list of a function.
Fixes #3419 , fixes #3431
JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
2019-12-12 12:17:45 +01:00
Robert Fancsik
9b33fc8cbd
Revise the usage of the global error value/exception flag ( #3426 )
...
This patch also fixes #3422 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-12-10 14:42:10 +01:00
Zoltan Herczeg
531f1e9687
Support let identifier in non-strict mode. ( #3427 )
...
This code adds a lot of checks and complexity to the code.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-10 14:32:08 +01:00
Zoltan Herczeg
b8bc013fc0
Keywords must not contain escape sequences. ( #3429 )
...
The ES5.1 standard is unclear about this rule.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-09 14:37:41 +01:00
Zoltan Herczeg
5ceffd209e
Fix post increase / decrease in the pre-scanner. ( #3430 )
...
Fixes #3397 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-06 13:53:34 +01:00
Zoltan Herczeg
1a4972fc3f
Implement yield* operation in generator functions. ( #3407 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-05 13:50:53 +01:00
Robert Fancsik
1829d2df55
Fix scanner_create_variables for empty destructuring patterns ( #3417 )
...
This patch fixes #3383 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-12-04 15:38:50 +01:00
Zoltan Herczeg
31988877b2
Support destructuring bindings as catch variables. ( #3399 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-03 12:52:20 +01:00
Zoltan Herczeg
132de45c0b
Remove CBC_EXT_CONTINUE_EXEC opcode. ( #3378 )
...
There is no need for a specific opcode after yield because
the return and throw commands can be redirected to fake byte code sequences.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-02 12:37:13 +01:00
Robert Fancsik
0bc42a3fd5
Allow lexical function declaration in labeled statements. ( #3386 )
...
This patch fixes #3381 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-29 16:41:21 +01:00
Zoltan Herczeg
fee3a600af
Support assignment expressions in the pre-scanner. ( #3382 )
...
Fixes #3355 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-29 15:47:47 +01:00
Dániel Bátyai
35c0a6e299
Implement RegExp unicode and sticky flags ( #3379 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2019-11-29 14:08:30 +01:00
Zoltan Herczeg
8956eff2bd
Implement generator support for object initializers and classes. ( #3372 )
...
Large part of the code is also reworked.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-29 12:28:51 +01:00
Zoltan Herczeg
110f75c99d
Implement the core of the generator functions. ( #3368 )
...
Some things are missing:
- yield* support
- generator definition in object literal
- the hidden GeneratorFunction
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-28 11:54:27 +01:00
Robert Fancsik
cbeecdb703
Fix this property reference on assignment patterns ( #3365 )
...
This patch fixes #3348 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-26 15:49:55 +01:00
Robert Fancsik
12211d8aaa
Fix the order of the function arguments for spread operation ( #3369 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-26 15:47:36 +01:00
Robert Fancsik
aeb8431aff
Fix the scanning of default array/object literals. ( #3367 )
...
Scanning should continue with `SCAN_MODE_POST_PRIMARY_EXPRESSION` in all cases.
Fixes #3360 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-26 13:07:28 +01:00
Robert Fancsik
62356796fc
Support get/set as property name in object literal ( #3340 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-22 16:05:38 +01:00
Roland Takacs
996bf76f59
Support ES6 based octal literals ( #3338 )
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
2019-11-21 15:13:11 +01:00
Robert Fancsik
2ddf134cef
Add iterator close support for array destructuring ( #3337 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-21 12:55:52 +01:00
Zoltan Herczeg
6b43ef8605
Arrow functions should be parsed as assignment expressions. ( #3336 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-21 11:32:33 +01:00
Robert Fancsik
7f6f562adb
Throw error for using rest parameter in property setter ( #3335 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-20 12:21:05 +01:00
Robert Fancsik
830011c033
Eliminate the allocation of spread object ( #3333 )
...
ECMA_VALUE_SPREAD_ELEMENT can be used to represent that the next argument needs to be spreaded, therefore no allocation is needed.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-19 18:16:43 +01:00
Zoltan Herczeg
70566a52fb
Improve eval call parsing. ( #3330 )
...
Eval calls are recognised when the eval identifier is encapsulated in brackets.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-19 15:55:53 +01:00
Robert Fancsik
a1189cfb62
Add validation for single statement lexical declarations ( #3326 )
...
This patch fixes #3275 and fixes #3276 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-19 15:44:12 +01:00
Robert Fancsik
22766a855e
Implement spread operator for function call arguments ( #3329 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-19 14:06:12 +01:00
Zoltan Herczeg
bf630c0c54
Implement binding pattern support for rest argument and for statement. ( #3327 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-19 14:02:17 +01:00
Zoltan Herczeg
8bdb32cc88
Implement function destructuring argument support. ( #3322 )
...
Furthermore create unmapped arguments objects if a function has a non-simple argument.
A few destructuring pattern issues were fixed as well.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-18 14:15:36 +01:00
Robert Fancsik
8cf5f96c15
Introduce parser statement flags ( #3318 )
...
These flags makes the code more readable also makes the process of introducing a new statement type easier.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-15 15:57:42 +01:00
Robert Fancsik
fca0c94002
Fix the initialization of let/const patterns when block context is needed. ( #3320 )
...
Also some code cuplication is removed.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-15 14:38:14 +01:00
Robert Fancsik
8eda9bc1c3
Fix the usage of escaped identifiers in scanner_scope_find_let_declaration ( #3317 )
...
This patch fixes #3313 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-14 14:46:01 +01:00
Robert Fancsik
be95aa33b4
Improve delete property with undefined base ( #3312 )
...
This patch finally resolves #2891 also the removes the related bytecode since it has become unnecessary.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-14 13:53:52 +01:00
Robert Fancsik
213544ae47
Implement array/object destructuring ( #3305 )
...
This patch implements the core functionality of destructuring patterns.
Function argument/for in-of pattern are currently unsupported.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-14 13:49:49 +01:00
Zoltan Herczeg
b4b55a67a2
Fix for propagating arguments reference from nested blocks. ( #3309 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-14 13:48:58 +01:00
Zoltan Herczeg
55c7590767
Remove PARSER_ARGUMENTS_NOT_NEEDED parser flag. ( #3308 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-14 13:47:11 +01:00
Zoltan Herczeg
c0cc5a1b08
Allow extending statements with block context. ( #3296 )
...
The block contexts bound to different statements are handled in the same way.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-13 12:37:23 +01:00
Zoltan Herczeg
419ccff611
Fix local variable declaration issues after function argument initialization. ( #3304 )
...
Fixes #3298
Fixes #3299
Fixes #3300
Fixes #3302
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-13 12:35:28 +01:00
Zoltan Herczeg
da69589f05
Implement for[in/of]-let construct. ( #3294 )
...
This patch implements let/const support for all "for" statements.
It includes an algorithm for cloning declarative lexical environments.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-11 13:53:32 +01:00
Zoltan Herczeg
58f71e6ffa
Implement left-hand-side expression parsing. ( #3292 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-08 16:20:24 +01:00
kisbg
4996542f02
Added missing logical operator in js-parser-expr ( #3293 )
...
This fix is needed to build JerryScript 2.1 on a STM board.
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis [email protected]
2019-11-08 16:10:51 +01:00
Zoltan Herczeg
dc458111ba
Local functions should not be created globally. ( #3290 )
...
Fixes #3286 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-08 14:03:19 +01:00
Zoltan Herczeg
e1fc90db0e
Delay the variable construction in the function body. ( #3289 )
...
Local variables inside the function body should be constructed after the
parameters are initialized. Furthermore arguments should be available
during parameter initialization.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-08 12:18:23 +01:00
Robert Fancsik
525c35f148
Introduce jerry_get_resource_name API function ( #3236 )
...
This new API function adds possibility to query the resource name of the currently executed script (including modules) or a function object.
This patch closes #2170 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-06 15:05:49 +01:00
Zoltan Herczeg
ab8fa74b86
Correctly handle variables imported or exported by modules. ( #3270 )
...
Remove var declaration workarounds and correctly create / use variables for modules.
Still missing: create lexical environment for automatic module conversion.
(Or remove this feature overall.)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-04 16:51:26 +01:00
Robert Fancsik
6f83da4c0b
Implement the spread operator for array initialization ( #3265 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-11-04 16:36:58 +01:00
Zoltan Herczeg
6a342fcdd6
Implement throwing ReferenceErrors for let/const variables. ( #3264 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-10-31 11:09:02 +01:00
Zoltan Herczeg
1edfa81c76
Implement correct construction of let/const declarations and function statements. ( #3259 )
...
Various cbc opcodes are added to support the different instantiations.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-10-30 16:01:55 +01:00
Robert Fancsik
448c239f08
Export statement parsing should construct new ident literal ( #3256 )
...
This patch fixes #3253 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2019-10-28 15:30:47 +01:00