New method uses length of source to calculate raw string length.
Also bug with template literal was fixed. Template object should have
indexed properties enumerable.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
The regexp flag should be correctly referenced and released
if an existing regexp like object is used for constructing a new one.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Template literals already supports escaping backslash and backtick,
this commit enables escaping this in String.raw.
It also fixes invalid behaviour of String.raw when using
new line character.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
The release of the regexp pattern string during creating
was incorrect as it was dereferenced a bit to early.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Fixes two bugs in the index calculations that affect the result
of the `String.startsWith` function:
- Fixes the implementation of ECMA-262 v6, 21.1.3.18, step 14:
"If searchLength+start is greater than len, return false".
- Fixes the return value of the helper function
`ecma_builtin_helper_string_find_index`. If it is called with a
starting search position, the returned index should be
not less than that.
These changes fix the following test cases in the test262 suite:
- built-ins/String/prototype/startsWith/return-true-if-searchstring-is-empty.js
- built-ins/String/prototype/startsWith/searchstring-found-with-position.js
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
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
In ES6 accessors of built in object are by default configurable.
Also lastIndex property of RegExp object is created when only used.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
During ecma_collection_append the underlying collection
was not increased in the required case. This triggered
a buffer overflow when processing the bound function's arguments
during call or during the Proxy ownKeys method.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
During "put" with receiver the fast arrays were not converted to normal
objects to correctly set properties on it.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Internal property [[Prototype]] of EvalError, RangeError, ReferenceError,
SyntaxError, TypeError and URIError should be Error.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
Removes the unused `ecma_op_check_object_type_is_class` function
declaration from `ecma-helpers.h`. This also makes the file pass
the Doxygen check.
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
So far Travis doesn't support 10.15 (Catalina), but it does support a newer version (10.14, Mojave) than what we've been using (10.13, High Sierra).
This updates clang version too from 9.1.0 to 11.0.3.
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
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 zherczeg.u-szeged@partner.samsung.com
Had an error on OSx when trying to build jerry, stating: "implicit conversion loses integer precision: 'cbc_opcopde_t' to 'uint16_t'"
Clang version: 11.0.3
OSx version: 10.15.4 (Catalina)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu