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
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
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
fix length property of builtin functions to be configurable (ECMA-262 v6, 19.2.4.1)
JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
Math.cosh, Math.sinh, Math.tanh
C implementation ported from fdlibm.
Part of Issue #3568
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
Math.acosh, Math.asinh, Math.acosh
C implementation ported from fdlibm
Part of Issue #3568
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
In ES2015 many builtin prototypes are no longer valid instances of their
respective classes. This change updates affected prototypes to be
regular objects as required.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
fix length property of bound function objects to be configurable (ECMA-262 v6, 19.2.4.1)
JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
Math.log2, Math.log10, Math.log1p, Math.expm1
C implementation ported from fdlibm
Part of Issue #3568
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
Ubuntu 14.04 reached its end of life on April 30m 2019.
Let's bump the reference to the latest LTS, which is 18.04.
Ubuntu 18.04 has newer Pylint and Cppcheck, the necessary
fixes and suppresses are also included in this PR.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
When a fast array was used during the Array.slice call and
the input array's properties were removed the property
list was used incorrectly.
Fixes: #3637
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
We are using the already existing Object.getPrototypeOf and
Object.setProtoypeOf methods
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This change deletes two routine arguments and creates an argument list in their place.
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
The Global object parseFloat and parseInt fuctions have been moved to the number helpers and intrinsic properties have been created the are used for both the Number and Global methods.
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
The following methods have been implemented:
- RegExpAlloc, based on ECMA-262 v6, 21.2.3.2.1
- RegExpInitialize, based on ECMA-262 v6, 22.2.3.2.2
- RegExpCreate, based on ECMA-262 v6, 21.2.3.2.3
Co-authored-by: Robert Fancsik frobert@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
Changes:
- Use the pre-scanner to provide information for the parser about the existence of the class constructor
- The allocation of the super declarative environment is no longer needed
- The VM frame context holds the information about the this binding status
- Reduce the number of class related VM/CBC instructions
- Improve ecma_op_function_{construct, call} to properly set new.target
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
First step to fix issue #3568.
Changes:
- Implemented Math.clz32(), Math.fround(), Math.imul(), Math.hypot().
- Implemented all remaining Math functions with calling the standard
libm functions, but they throw UNIMPLEMENTED exception with jerry-libm,
because the necessary fdlibm functions are missing and should be ported.
All Math related test262 tests pass (except function name and length tests)
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
- Internal routines of the of the proxy object are unimplemented
- For-in enumerate with proxy target is currently not supported
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
Also removed the ecma_append_magic_string_to_string method,
because it doesn't get used anymore.
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This patch implements the get, set, has, deleteProperty, ownKeys, and construct methods of the Reflect objects. The Reflect.construct method is missing the new_target support because ecma_op_function_construct doesn't support it yet.
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
Empty values in array were omitted. Predicate should be called
for every element from 0 to length.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
* 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
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