Robert Fancsik
42b4af5921
Fix exception handling in ecma_op_create_promise_object ( #3385 )
...
This patch fixes #3376 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-29 15:45:41 +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 dbatyai@inf.u-szeged.hu
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 zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2019-11-28 11:54:27 +01:00
Robert Fancsik
14e95a4775
Fix the handling of unresolvable reference in VM_OC_TYPEOF_IDENT ( #3371 )
...
This patch fixes #3363 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-27 22:27:34 +01:00
Szilagyi Adam
b7508c636c
Fix value release in ecma_op_is_concat_spreadable ( #3346 )
...
Fixes #3356
Fixes #3361
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-27 11:06:51 +01:00
Szilagyi Adam
0c6b306429
Implement Regexp.prototype[@@match] method ( #3345 )
...
The algorithm is based on ECMA-262 v6, 21.2.5.6
The following helper methods are also implemented:
- RegExpExec: ECMA-262 v6, 21.2.5.2.1
- AdvanceStringIndex: ECMA-262 v6, 21.2.5.2.3
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-26 16:05:48 +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 frobert@inf.u-szeged.hu
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 frobert@inf.u-szeged.hu
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 frobert@inf.u-szeged.hu
2019-11-26 13:07:28 +01:00
Robert Fancsik
f63e4c363b
Fix the assertion for VM_OC_EVAL. ( #3366 )
...
Eval flag can be set for spreaded argument function calls as well.
This patch fixes #3364 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-26 13:05:56 +01:00
Dániel Bátyai
16d0e83b64
Fix adding fast arrays as keys to a weak container ( #3362 )
...
Fixes #3359 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-26 08:21:33 +01:00
Dániel Bátyai
37850bbfef
Fix refcount when returning with the argument in Object built-ins ( #3353 )
...
Fixes #3350 .
Fixes #3351 .
Fixes #3352 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-25 11:49:24 +01:00
Dániel Bátyai
b2d34724d4
Fix Reflect.getPrototypeOf for primitive arguments ( #3354 )
...
Fixes #3349 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-25 11:49:04 +01:00
Dániel Bátyai
1c6f334f62
Fix class name check for WeakMap and WeakSet prototype ( #3358 )
...
Fixes #3357 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-25 11:48:33 +01:00
Robert Fancsik
62356796fc
Support get/set as property name in object literal ( #3340 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-22 16:05:38 +01:00
Dániel Bátyai
279d4d4119
Add handling for RegExp unicode and sticky flags ( #3341 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-22 14:04:03 +01:00
Dániel Bátyai
fc2218e828
Fix weakrefs when adding a key to the same container multiple times ( #3343 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-22 13:55:36 +01:00
Dániel Bátyai
3bf2bc50bc
Properly handle primitive arguments in Object methods ( #3342 )
...
ES2015 allows primitive arguments for most of the Object built-ins.
This change implements handling for these arguments in affected methods.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-22 12:48:10 +01:00
Roland Takacs
996bf76f59
Support ES6 based octal literals ( #3338 )
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs r.takacs2@partner.samsung.com
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 frobert@inf.u-szeged.hu
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 zherczeg.u-szeged@partner.samsung.com
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 frobert@inf.u-szeged.hu
2019-11-20 12:21:05 +01:00
Szilagyi Adam
a0a71da025
Implement toPrimitive method and Date.prototype.toPrimitve ( #3287 )
...
The algorithms are based on ECMA-262 v6 7.1.1 and 20.3.4.45
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-20 11:51:02 +01:00
Szilagyi Adam
c31452c138
Implement IsRegExp operation ( #3321 )
...
Algorithm is based on ECMA-262 v6, 22.1.3.1.1
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-20 11:50:26 +01:00
Dániel Bátyai
bd0cb33172
Implement WeakMap and WeakSet ( #3328 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-19 19:27:31 +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 zherczeg.u-szeged@partner.samsung.com
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 frobert@inf.u-szeged.hu
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 frobert@inf.u-szeged.hu
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 zherczeg.u-szeged@partner.samsung.com
2019-11-19 14:02:17 +01:00
Szilagyi Adam
a7d129c8b2
Implement Symbol.isConcatSpreadable ( #3307 )
...
Algorithm is based on ECMA-262 v6, 22.1.3.1.1
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-19 13:55:49 +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 zherczeg.u-szeged@partner.samsung.com
2019-11-18 14:15:36 +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 frobert@inf.u-szeged.hu
2019-11-15 14:38:14 +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 frobert@inf.u-szeged.hu
2019-11-14 13:53:52 +01:00
Robert Fancsik
204de302aa
Fix ecma_op_get_value_lex_env_base for let/const declarations ( #3311 )
...
This patch fixes #3306 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-14 13:52:12 +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 zherczeg.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-14 13:49:49 +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 zherczeg.u-szeged@partner.samsung.com
2019-11-13 12:35:28 +01:00
Szilagyi Adam
452c78182d
Implement String.prototype.codePointAt method ( #3291 )
...
The algorithm is based on ECMA-262 v6, 21.1.3.3
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-11 15:54:49 +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 zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2019-11-08 16:20:24 +01:00
Szilagyi Adam
798655a871
Implement Array.prototype's copyWithin method ( #3269 )
...
The algorithm is based on ECMA-262 v6, 22.1.3.3
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-08 15:41:20 +01:00
Zoltan Herczeg
dc458111ba
Local functions should not be created globally. ( #3290 )
...
Fixes #3286 .
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-11-08 14:03:19 +01:00
Szilagyi Adam
35d9b1ab17
Implement String.fromCodePoint method ( #3281 )
...
The algorithm is based on ECMA-262 v6, 21.1.2.2
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-11-08 13:48:05 +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 zherczeg.u-szeged@partner.samsung.com
2019-11-08 12:18:23 +01:00
Dániel Bátyai
923fd128b5
Refactor String.prototype.replace ( #3284 )
...
This change brings the replace operation up to date with ES6 by
implementing support for the @@replace well-known symbol, while
also improving performance and memory usage.
Also fixes #3070 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-11-08 12:15:28 +01:00
Ádám Kallai
a8b627a80c
Implement Object.is routine from ES2015 specification ( #3272 )
...
Related part of the standard: ECMA-262 v6, 19.1.2.10
JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
2019-11-05 19:38:13 +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 zherczeg.u-szeged@partner.samsung.com
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 frobert@inf.u-szeged.hu
2019-11-04 16:36:58 +01:00
Robert Fancsik
fc3cfc4fdc
Arrow functions "prototype" property should not be lazy listed ( #3268 )
...
This patch fixes #3267 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-04 12:12:01 +01:00
Robert Fancsik
f93fa98a75
Add Number.{EPSILON, {MAX,MIN}_SAFE_INTEGER} to the builtin descriptor ( #3258 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-31 15:06:19 +01:00