Szilagyi Adam
181570ff41
Implement EscapeRegExpPattern method ( #3543 )
...
the algorithm is based on ECMA-262 v6, 21.2.3.2.4
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-18 09:49:54 +01:00
Zoltan Herczeg
fda02d4b2a
Fix local scoping for functions. ( #3559 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-02-18 09:49:03 +01:00
Szilagyi Adam
44e63e038d
Use stringbuilder in ecma_get_symbol_descriptive_string ( #3560 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-18 09:47:53 +01:00
Hyukwoo Park
54e4de39ab
Fix attributes of length property for builtin objects ( #3556 )
...
* length property has the attributes {[[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true} based on ECMA-262 v6, 19.2.4.1
JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
2020-02-14 10:25:26 +01:00
Szilagyi Adam
4d67ac3225
Use stringbuilder in ecma_builtin_string_prototype_object_concat ( #3557 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-13 17:42:07 +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 zherczeg.u-szeged@partner.samsung.com
2020-02-13 17:39:56 +01:00
Szilagyi Adam
8cd5d06620
Update ecma_op_typedarray_from to use iterable objects ( #3501 )
...
Added steps 6-8 from ECMA-262 v6, 22.2.2.1.1
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-13 15:53:41 +01:00
Robert Fancsik
5fdeb7c1d6
[[Prototype]] object's reference count should be increased by jerry_get_prototype ( #3550 )
...
This patch ensures that the implementation satisfies the requirements of the public API documentation.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-02-07 18:20:39 +01:00
Dániel Bátyai
d7404700ad
Update API version to 2.2.0 ( #3547 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2020-02-07 15:38:49 +01:00
Paul Sokolovsky
b044d4ad76
jerry_init: Calculate structure part address more safely. ( #3545 )
...
GCC 9.2 issues a warning-as-error trying to perform a large memset into
what it thinks as a single field of a structure. So, instead of taking
an address of that field, perform explicit address calculaton using
structure address and offset of that field.
Fixes #3544 .
JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2020-02-06 14:18:19 +01:00
Péter Gál
fa81944743
Foreach API methods should not iterate over internal objects ( #3537 )
...
The `jerry_objects_foreach` and `jerry_objects_foreach_by_native_info` methods
iterates over all objects. However in ES 2015 there are a few special objects
which should only be used internally thus these objects should not be accessed
by the API user.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2020-02-03 19:07:24 +01:00
Dániel Bátyai
a78c8d4f16
Add vera rules to check consecutive and trailing empty lines ( #3540 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2020-02-03 16:39:04 +01:00
Robert Fancsik
563a5d93e9
Fix 'arguments' and 'caller' properties lazy listing in ES2015 profile ( #3539 )
...
This patch fixes #3536 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-02-03 15:12:59 +01:00
Robert Fancsik
7734f87fbb
For in-of declaration should only throw error after initialization. ( #3541 )
...
This patch fixes the error introduced in #3513 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-02-03 15:12:12 +01:00
Szilagyi Adam
2fe06f82f1
Add strict mode check to for-in and for-of header in parser_parse_for_statement_start ( #3513 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-01-28 13:24:30 +01:00
Robert Fancsik
b73100d933
Add missing release value call to Array.prototype.pop fast path. ( #3535 )
...
This patch fixes #3534 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-24 10:54:55 +01:00
Robert Fancsik
e693854dae
Fix array-indexed property name calculation for fast access mode arrays in property name listing ( #3533 )
...
This patch fixes #3532 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-23 17:21:35 +01:00
Robert Fancsik
3c5fb342be
Update "arguments" and "caller" properties of function object to conform ES6 changes ( #3530 )
...
This patch resolves #3393 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-23 15:53:37 +01:00
Péter Gál
608bc9e5ff
Improve new.target handling in case of eval calls ( #3517 )
...
Only direct eval calls propagate the "new.target" information.
In any other eval cases the "new.target" invocation is a syntax error.
Added test cases also.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2020-01-21 18:01:35 +01:00
Robert Fancsik
05b4bda927
Colon must be expected after computed property name in object destructuring ( #3529 )
...
This patch fixes #3527 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-20 16:49:08 +01:00
Péter Gál
24af089643
Introduce new.target C api ( #3522 )
...
Added new "jerry_get_new_target" API function
and updated the unit test.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2020-01-18 10:58:33 +01:00
Daniel Balla
f46d061d19
Allow API usage in native_free_callbacks ( #3515 )
...
This patch allows the use of API functions in native_free_callbacks for native pointers once again.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2020-01-18 10:05:32 +01:00
Robert Fancsik
71d4e12105
Fix assignment opcode transformation for CBC_PUSH_THIS_LITERAL ( #3525 )
...
This patch fixes #3477 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-17 11:37:10 +01:00
Robert Fancsik
c4948936c2
Add missing release value to ecma_op_object_get_property_names ( #3524 )
...
This patch fixes #3523 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-17 11:36:40 +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 zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2020-01-16 17:00:49 +01:00
Péter Gál
daf3b36ea6
Fix new.target invalidity check ( #3521 )
...
Fixes #3519
Only check the assert if the new.target bytecode is detected.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2020-01-16 16:03:59 +01:00
Peter Marki
51244b6d08
Add option to list symbols in Object.getOwnPropertyNames() ( #3507 )
...
Also a little refactoring of Object.getOwnPropertyNames()
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2020-01-16 15:59:27 +01:00
Robert Fancsik
8b41bf306a
Introduce builtin intrinsic object to share property values between builtin objects ( #3490 )
...
Fixed:
- Global symbol access
- Array.prototype.values and Array.prototype[Symbol.iterator] must be the same function object
To test the new functionality arguments object Symbol.iterator property is added.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-16 15:57:27 +01:00
Robert Fancsik
4a331b2edc
Add builtin GeneratorFunction support ( #3499 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-15 12:01:58 +01:00
Robert Fancsik
210b631b21
Fix iterator position calculation for array patterns ( #3494 )
...
This patch fixes #3455 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-14 16:03:26 +01:00
Peter Marki
c8ce7d8791
Construct non-fast array in ecma_op_array_species_create ( #3514 )
...
Fixes #3506
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2020-01-14 15:35: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 zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2020-01-14 15:10:19 +01:00
Péter Gál
0fd1ed6f27
Add support for new.target ( #3469 )
...
Notable changes:
* Extracted the pure JS/builtin and external C method invocations
into two new methods (`ecma_op_function_call_{simple, external}`).
* Updated parser/scanner to handle "new.target" correctly.
* Added JS test case.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2020-01-14 13:34:19 +01:00
Robert Fancsik
be8ae3aae8
Add iterator close support for for-of statement ( #3401 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-13 17:38:47 +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 zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2020-01-13 15:13:57 +01:00
Robert Fancsik
be83ff6b71
Update Function.prototype.bind to conform ES6 requirements ( #3504 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-13 11:43:11 +01:00
Robert Fancsik
d0e8629342
Support nested destructuring patterns in catch header ( #3488 )
...
This patch fixes #3433 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-13 11:39:07 +01:00
Daniel Balla
1725e014b8
Support iterable objects in Promise.all and Promise.race functions ( #3496 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2020-01-10 15:44:52 +01:00
Szilagyi Adam
c407e8a04c
Refactor ecma_builtin_error_prototype_object_to_string to use stringbuilder ( #3503 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-01-10 15:40:00 +01:00
Virag Orkenyi
b6c2e6eb54
toNumber operation should handle binary and octal literals ( #3471 )
...
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-01-10 15:31:54 +01:00
Robert Fancsik
b3b1dfdabd
Tagged template object references should be released only in post_processing ( #3495 )
...
This patch fixes #3483 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-10 15:25:40 +01:00
László Langó
2960dffb50
Support all literals in 'jerry_get_literals_from_snapshot' when C format is used. ( #3472 )
...
The literals must be saved in hex format to support cases with special
characters, like `var s = 'hello",\n"world';`
JerryScript-DCO-1.0-Signed-off-by: László Langó lango@inf.u-szeged.hu
2020-01-10 14:57:10 +01:00
Peter Marki
08da8bc7aa
Add length check to ecma_builtin_array_prototype_object_slice ( #3481 )
...
Fixes #3479
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2020-01-10 12:16:53 +01:00
Robert Fancsik
dc3de8d8ae
Fix for-of block context creation for empty destructuring pattern ( #3492 )
...
This patch fixes #3421 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-08 14:55:02 +01:00
Szilagyi Adam
aedd55b1f8
Add unscopables check to ecma_op_get_value_lex_env_base ( #3476 )
...
Also added a special test case for this to symbol-unscopables.js
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-01-07 15:13:28 +01:00
Robert Fancsik
003694d259
Throw error for generator function class constructor ( #3489 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-01-07 14:52:01 +01:00
Szilagyi Adam
22e52e45af
Fix value release in ecma_builtin_typedarray_prototype_map ( #3491 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-01-07 14:25:59 +01:00