Zoltan Herczeg
cfd69d3b70
Implement relational operators for BigInts ( #4087 )
...
Improve BigInt constructor as well
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-08-03 13:46:34 +02:00
Zoltan Herczeg
df2f7782f7
Implement BigInt primitve type and some of its operations ( #4062 )
...
Supported operations:
- parse BigInt (decimal, hexadecimal, binary)
- toString with any radix between 2 and 36
- arithmetic operations: negate, add, subtract, multiply, divide, modulo
- left and right shift
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-30 12:08:34 +02:00
Zoltan Herczeg
dff2a2a6da
Rework ascii string to use less memory. ( #4030 )
...
Furthermore rename utf8_string to short_string.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-28 15:47:07 +02:00
Zoltan Herczeg
d92d9db40f
Fix property name comparison when external strings are used. ( #4033 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-22 15:17:39 +02:00
Zoltan Herczeg
0124368ae7
Implement external strings. ( #4028 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-22 12:27:12 +02:00
Zoltan Herczeg
80716cca90
Implement missing async function and async iterator prototypes. ( #3962 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-03 11:04:27 +02:00
Zoltan Herczeg
9e18ff29c6
Implement ... support for object initializers. ( #3968 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-02 15:04:21 +02:00
Zoltan Herczeg
6389816f67
Implement AsyncIteratorClose for for-await-of statement. ( #3955 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-07-01 12:40:39 +02:00
Zoltan Herczeg
37049c4968
Support catch statement without argument. ( #3956 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-30 18:00:40 +02:00
Zoltan Herczeg
cd949d9d64
Rework flags representing arrow functions and complex arguments ( #3957 )
...
This allows detecting cases which was not possible before.
Fixes #3944
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-30 14:00:35 +02:00
Zoltan Herczeg
5535ea88ac
Implement for-await-of statement. ( #3946 )
...
AsyncIteratorClose has not supported yet.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-30 11:21:50 +02:00
Zoltan Herczeg
0b404ea893
Support caching of next method in for-of and built-in methods. ( #3939 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-26 14:47:39 +02:00
Zoltan Herczeg
b7e3baeecb
Support caching of next method in generators. ( #3937 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-26 12:09:36 +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 [email protected]
2020-06-25 17:11:16 +02:00
Zoltan Herczeg
5d8c5f3e92
Support comma after last argument for function declarations ( #3910 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-24 10:41:03 +02:00
Zoltan Herczeg
8ccccd9705
Fix a few small issues in generators ( #3919 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-22 13:55:33 +02:00
Zoltan Herczeg
b2a6109430
Implement async generators ( #3916 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-22 13:54:18 +02:00
Zoltan Herczeg
b1912e7224
Fix async function call parsing. ( #3909 )
...
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 [email protected]
2020-06-17 15:35:02 +02:00
Zoltan Herczeg
8e010146a9
Reduce try context stack consumption to 1 from 2. ( #3898 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-17 14:39:53 +02:00
Zoltan Herczeg
8719f72e61
Implement async function execution. ( #3897 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-17 12:08:01 +02:00
Zoltan Herczeg
1b2e0aec8c
Create extend byte code flags with function types. ( #3802 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-15 13:40:55 +02:00
Zoltan Herczeg
38111c0889
Fix redeclaration of existing var variables in functions with argument context. ( #3891 )
...
Fixes #3888
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-11 11:36:37 +02:00
Zoltan Herczeg
1bf52f5847
Fix initializer detection in for-in expressions. ( #3884 )
...
Also fix column update when comments are parsed.
Fixes #3882
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-10 12:37:52 +02:00
Zoltan Herczeg
36bf1ec09d
Implement argument redefinition with var statement. ( #3811 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-08 13:43:50 +02:00
Zoltan Herczeg
2058ea1286
Implement eval support for functions with arguments lexical env. ( #3806 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-08 12:11:54 +02:00
Zoltan Herczeg
1230d4532c
Asterisk should be ignored by object initializers. ( #3872 )
...
Fixes #3869
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-08 10:27:42 +02:00
Zoltan Herczeg
ab2e821777
Fix three async function issues. ( #3863 )
...
- Invalid assert
- Add missing async prefix check when an identifier is enclosed in brackets
- Adding a new byte-code
Fixes #3855
Fixes #3856
Fixes #3857
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-08 10:25:34 +02:00
Zoltan Herczeg
10e78a4eef
Context break should honor private contexts. ( #3852 )
...
Fixes #3830
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-05 14:39:13 +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 [email protected]
2020-06-04 13:27:32 +02:00
Zoltan Herczeg
562dcc8630
Fix Promise thenable. ( #3799 )
...
A single promise can be resolved any number of times due to
thenable functions, but each resolver pair can only be called once.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-28 10:48:44 +02:00
Zoltan Herczeg
1105b43c22
Optimize Promise data structures. ( #3768 )
...
This patch reworks several structures:
- Fulfill and reject reactions are combined into one collection. The values in this collection
are compressed: a capability followed by an optional fulfill and reject functions.
- Fulfill and reject reactions are directly stored, no need to allocate an object for them.
- The job queue directly stores its items, this saves a pointer to the value, and the
callback is replaced by an uint8 type.
- Promise status and already resolved is stored in extra_info.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-25 18:00:43 +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 [email protected]
2020-05-18 13:16:16 +02:00
Zoltan Herczeg
c4d5c2c9e1
There is no block info after invalid if-function construct. ( #3755 )
...
Fixes #3713 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-18 13:15:16 +02:00
Zoltan Herczeg
2570f8e745
Move an assertion after post processing. ( #3754 )
...
Fixes #3752 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-18 13:14:17 +02:00
Zoltan Herczeg
09ac2ffa67
Update obsolote assert. ( #3752 )
...
Fixes #3713 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-18 13:13:43 +02:00
Zoltan Herczeg
bd1c4df9a6
Fix keyword parsing after use strict. ( #3740 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-15 22:32:04 +02:00
Zoltan Herczeg
4aa27371b6
Array or object pattern must be assignment expression. ( #3744 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
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 [email protected]
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 [email protected]
2020-05-12 14:38:17 +02:00
Zoltan Herczeg
132a2008c9
Fix function argument handling issues caused by the parser. ( #3705 )
...
1) Nested function declarations should not overwrite arguments.
2) Functions should be created in the correct scope.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-05-04 14:55:46 +02:00
Zoltan Herczeg
4b780507e1
Implement throwing const re-assignment error. ( #3697 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-29 15:50:22 +02:00
Zoltan Herczeg
9e6c44be4f
Fix function declaration issues inside catch blocks. ( #3700 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-29 13:53:14 +02:00
Zoltan Herczeg
85401db547
Support function statements after 'if' or 'else'. ( #3699 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-29 13:50:01 +02:00
Zoltan Herczeg
f254b1a8b7
Fix invalid / unhandled this_literal cases. ( #3696 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-27 14:54:21 +02:00
Zoltan Herczeg
4e8dac8ce1
Implement exponentiation operation. ( #3692 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
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 [email protected]
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 [email protected]
2020-04-24 16:55:12 +02:00
Zoltan Herczeg
dcf8ccfd03
Function declaration outside of blocks in direct eval must be ES5.1 compatible. ( #3690 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-24 10:45:14 +02:00
Zoltan Herczeg
3900152631
Fix delayed variable creation for function declarations. ( #3687 )
...
Fixes #3658 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-21 11:59:30 +02:00
Zoltan Herczeg
52f1476061
Fix assignment expression pre-scanning for arrow functions. ( #3688 )
...
Fixes #3656 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-21 11:25:36 +02:00
Zoltan Herczeg
1b01171a60
Update forcing of lexical environment creation for functions. ( #3683 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-20 09:30:17 +02:00
Zoltan Herczeg
4be9ffda84
Use symbolic constants for code size checks. ( #3682 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-17 13:05:07 +02:00
Zoltan Herczeg
28f2772d9c
Python debugger cleanup ( #3635 )
...
- Rename scopes to scope
- Make functions private
- Reorder some functions
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-04-02 17:57:23 +02:00
Zoltan Herczeg
1cfda262bd
Catch paramter must not be scanned as function in ES5.1 ( #3618 )
...
Fixes #3554
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-03-17 13:06:59 +01:00
Zoltan Herczeg
57b8599581
Fix some style issues in the python debugger client. ( #3603 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-03-11 16:01:12 +01:00
Zoltan Herczeg
bd2696f7c7
Add global status flags for the parser. ( #3572 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-02-24 11:22:20 +01:00
Zoltan Herczeg
fda02d4b2a
Fix local scoping for functions. ( #3559 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-02-18 09:49:03 +01:00
Zoltan Herczeg
4b325ea9e3
Rework map_to member of the scope chain that it can store flags. ( #3552 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-02-13 17:39:56 +01:00
Zoltan Herczeg
f3d49f65dd
Always mark the identifers which are propagated to upper level after argument parsing. ( #3516 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-16 17:01:56 +01:00
Zoltan Herczeg
22eabd0e0b
Allow an extra comma before the end of a function call. ( #3520 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-16 17:00:49 +01:00
Zoltan Herczeg
0d7b461185
Correctly handle celestial plane codepoints in ES5.1. ( #3510 )
...
Fixes #3498 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-14 15:11:59 +01:00
Zoltan Herczeg
d6070a9fed
Call filter arguments after the global arguments are parsed. ( #3511 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-14 15:10:19 +01:00
Zoltan Herczeg
f1dd59e4bd
Property modifiers should not be checked before an equals. ( #3509 )
...
Fixes #3434 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-13 15:14:29 +01:00
Zoltan Herczeg
9a8160176c
Nested destructuring binding patterns should inherit the PARSER_PATTERN_ARGUMENTS flag. ( #3508 )
...
Fixes #3398 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-13 15:13:57 +01:00
Zoltan Herczeg
fa2ddb2466
Create a new file for scanner operations. ( #3475 )
...
Compared to utils, the functions here scan the input (e.g. uses lexer_next_token).
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-06 11:05:39 +01:00
Zoltan Herczeg
dc15944ebd
Remove lexer_process_char_literal function. ( #3474 )
...
Add a test for using large literals.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-01-06 10:13:05 +01:00
Zoltan Herczeg
8cb2be6001
Support parsing async modifiers for functions. ( #3460 )
...
Only parsing is implemented, so the async functions currently behave
like normal function except they return with a resolved Promise object
when the function is terminated correctly.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-20 09:55:41 +01:00
Zoltan Herczeg
d0b4e7dd04
Free three parser status flag bits. ( #3451 )
...
The operations covered by these bits can be done in a different way.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-17 11:43:37 +01:00
Zoltan Herczeg
3c0beaf87d
Support strict mode detection in the pre-scanner. ( #3450 )
...
Furthermode an error is thrown when 'use strict' is used in a function with non-simple arguments
and function arguments are not moved to lexical environment when unmapped arguments are present.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-12-17 10:59:03 +01:00
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
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
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
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
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
1b01bb034f
Change JERRY_ES2015_BUILTIN to JERRY_ES2015. ( #3377 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-29 11:17:15 +01:00
Zoltan Herczeg
f41afeb89f
Change JERRY_ES2015_BUILTIN_ITERATOR macro to JERRY_ES2015. ( #3374 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-28 14:44:55 +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
Zoltan Herczeg
9725936848
Rework register reference in the vm. ( #3370 )
...
The aim is storing only ecma values on the vm stack.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-26 16:03:20 +01:00
Zoltan Herczeg
d006f068f4
Improve the performance of the interpreter. ( #3344 )
...
Registers are stored immediately after the frame pointer and an argument is dropped from vm_run.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-11-22 12:47:11 +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
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
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
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
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
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
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
Zoltan Herczeg
3d797b8836
Implement the core of let/const statement. ( #3239 )
...
This patch implements the core part of let/const statements. Redeclarations are correctly
detected and separate contexts are correctly created for these statements. Register
optimizations are also emplyed whenever possible.
Lots of features are still missing:
- checking the var statements in eval
- const are treated as lets
- single statement checks are missing
- export declarations are exported as vars, let/const export is not supported
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2019-10-25 18:08:10 +02:00