3525 Commits

Author SHA1 Message Date
Daniella Barsony
11818f1cb0 Fix issue about Number.prototype.toString (#3232)
Fixes #3229

JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-10-29 08:35:55 +01:00
Robert Fancsik
87f60da14f
Add arithmetic operations support for the API (#3249)
This patch extends the jerry_binary_operation_t list with arithmetic operations.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-28 15:46:35 +01:00
Robert Fancsik
448c239f08
Export statement parsing should construct new ident literal (#3256)
This patch fixes #3253.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-28 15:30:47 +01:00
Szilagyi Adam
072aedb4ef Fix wrong error handling in ecma_builtin_function_helper_get_function_arguments (#3257)
Fixes #3252

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-10-28 14:23:53 +01:00
Péter Gál
eebbed143d Introduce new Promise API methods (#3186)
The new API methods make it possible to get a Promise object's
result and it's state.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-10-28 14:07:37 +01:00
Robert Fancsik
351b88184c
Arrow functions prototype property should not be lazy instantiated (#3251)
This patch fixes #3250

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-28 10:33:28 +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 zherczeg.u-szeged@partner.samsung.com
2019-10-25 18:08:10 +02:00
Szilagyi Adam
4b352758c1 Refactor ecma_op_to_string (#3171)
Similar to the ecma_op_to_object rework, in this new method we
return directly with the pointer to the ecma string, and we don't
wrap the result into an ecma_value_t

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-10-25 15:58:47 +02:00
Robert Fancsik
b7aa21ebc7
Fix lazy instantiation of external functions 'prototype' property (#3246)
This patch resolves #2302.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-25 15:56:37 +02:00
Robert Fancsik
100a012931
Fix integer overflow during byteLength calculation for %TypedArray%s (#3244)
This patch fixes #3243.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-25 12:36:23 +02:00
Robert Fancsik
99ad34af4a Sort function breakpoints before enabling them (#3238)
Function breakpoints should be sorted before enabling then since the object enumeration order does not grant consistent result.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-24 15:08:03 +02:00
Daniel Vince
9e83032ada Fix error type when creating TypedArray with detached ArrayBuffer (#3230)
Based on the ES2015 standard TypeError should be returned
when a TypedArray is created for a detached ArrayBuffer.

JerryScript-DCO-1.0-Signed-off-by: Dániel Vince vinced@inf.u-szeged.hu
2019-10-24 15:04:38 +02:00
Robert Fancsik
48f34adea5 General GC optimizations (#3221)
- Enable recursive GC marking with a limited recursion count (this option is configurable)
- No need to decrease the reference count of the gray objects anymore
- Bound function object marking is seperated into a helper function

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-24 14:49:47 +02:00
Robert Fancsik
3b73562fa5 Revise ES2015 feature guards (#3240)
All the basic language element guards are merged into JERRY_ES2015 macro guard.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-24 14:44:51 +02:00
Csaba Osztrogonác
59e0d6e262 Make snapshot unittest easily updatable (#3242)
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2019-10-22 18:46:56 +02:00
Daniella Barsony
7b589d1381 Refactor code to use ToLength (#3210)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-10-21 14:08:13 +02:00
Virag Orkenyi
3fb6f15730 Implement Reflect object (#3036)
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2019-10-21 13:46:29 +02:00
Robert Fancsik
edf66f4e9b
Extend the API documentation for jerry_create_string_* functions (#3234)
- The given string pointer cannot be NULL.
 - Fixed API prototype for jerry_create_string_sz_from_utf8
 - Assert is added for non-NULL pointer in lit_zt_utf8_string_size

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-21 13:42:31 +02:00
Daniel Vince
6a2767a09a Add documentation about x86 and floating-point operations (#3228)
If JerrScript is compiled for x86 then it is possible that the
floating-point operations are not correct for the JS standard.

To "fix" this the users should be advised to use at least SSE2
during build for this platform.

JerryScript-DCO-1.0-Signed-off-by: Dániel Vince vinced@inf.u-szeged.hu
2019-10-21 11:14:30 +02:00
Daniel Vince
d85988af96 Implement ES2015 Function.prototype[@@hasInstance] (#3225)
Added hasInstance well known symbol implementation for Function.prototype.
This change however does not implement the ES2015 `instanceof` operator changes.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Vince vinced@inf.u-szeged.hu
2019-10-21 11:04:12 +02:00
Daniel Vince
d60587f838 Add @@hasInstance Symbol support for instanceof operator (#3226)
Implemented ES2015 modifications for `instanceof` operator.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Vince vinced@inf.u-szeged.hu
2019-10-21 11:03:43 +02:00
Zoltan Herczeg
7df87b7778
Create function variables using the data produced by the pre-scanner. (#3199)
The pre-scanner now is able to track all variable declarations and produces a compressed
stream which store this data for each function and catch block. When a function or
catch block is parsed, this information is decoded and the appropriate variables are
created. Furthermore a stack scope is created which contains the currently available
local variables and their register or literal index.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-10-17 15:20:04 +02:00
Robert Fancsik
fd1f7eab9f
Add public API functions for internal property management (#3128)
These 4 new API functions give possibility to perform [[Get]], [[Set]], [[Has]], [[Delete]] operations for properties
which are not accessible from the JavaScript context only from the public API.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-17 13:56:49 +02:00
Robert Fancsik
a40eb9bab8
Remove duplicated error raising in ecma_op_typedarray_set_with_typedarray (#3223)
This patch fixes #3222.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-17 11:56:14 +02:00
Daniel Balla
fd8203ce98 Add missing error checks to API functions (#3190)
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-10-16 16:51:03 +02:00
legendecas
2e86bdae6f Add ArrayBuffer detach operations (#3208)
JerryScript-DCO-1.0-Signed-off-by: legendecas legendecas@gmail.com
2019-10-16 16:41:27 +02:00
Szilagyi Adam
09c5d98e25 Optimize array push/pop for fast-array cases (#3187)
Performance results:
ARM: 1m19s -> 0m57s
Intel: 0m7,5s -> 0m5s

Binary size increase: 168 bytes

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-10-16 16:41:01 +02:00
Daniella Barsony
390916e989 Add Array.prototype.fill method (#3201)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-10-16 16:37:56 +02:00
Szilagyi Adam
5320f5a396 Use stringbuilder in typedArry toLocaleString (#3207)
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-10-16 16:37:19 +02:00
Csaba Osztrogonác
e8bc7a2b93 Update API version to 2.1.0. (#3220)
Closes #3104.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
v2.1.0
2019-10-16 15:14:56 +02:00
Robert Fancsik
8f39d90f7c Static strings should be reference counted in debug mode (#3219)
This patch helps to find out invalid reference count usage for ecma-strings.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-16 14:00:47 +02:00
Robert Fancsik
7518b7bfe6 Remove ECMA_PROPERTY_HASHMAP_SHIFT_LIMIT (#3217)
Ecma-string hash limit has already been increased to UINT32_MAX so all the string hashes can be stored directly in the hashmap.
This patch fixes #3216.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-16 13:59:43 +02:00
Zoltan Herczeg
f0e432c9b9
Set post-processing mode after an arrow expression scanning is completed (#3215)
Fixes #3214.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2019-10-14 11:26:16 +02:00
Csaba Osztrogonác
84a56efd4f Fix undefined references build error on Windows (#3212)
We should emit symbol for ecma_make_nan_value (void), because
it is used by unit-core/test-to-integer.c and test-to-length.c.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2019-10-11 12:26:19 +02:00
Robert Fancsik
fc2a2f94fd Properly release scanner info in parser_parse_for_statement_start (#3211)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-10 12:44:29 +02:00
Robert Fancsik
9e323cdcd6
Improve ecma_typedarray_info_t (#3205)
- The structure members have been renamed and the members got more detailed description.
- Updated the usage of the typedarray info structure in all occurrences to use absolute addressing from the underlying arraybuffer pointer.

This patch also fixes #3204.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-10-09 14:10:54 +02:00
legendecas
ede1957932 Fix handle-scope unittest force conversion complaints (#3209)
JerryScript-DCO-1.0-Signed-off-by: legendecas legendecas@gmail.com
2019-10-08 23:48:16 +02:00
Roland Takacs
6f515f079e Remove ARTIK 053 from the targets. (#3206)
ARTIK devices are no longer supported by the manufacturer.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs r.takacs2@partner.samsung.com
2019-10-08 16:50:32 +02:00
Szilagyi Adam
848a9854c3 Add missing value release in typedArray toLocaleString (#3200)
Fixes #3162

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-10-07 16:28:30 +02:00
Daniel Balla
7dc2d1dcd7 Fix delete operation in Set objects (#3203)
Delete should return false if an element doesn't exist in a set.
ECMA_VALUE_EMPTY wasn't checked in case of a deleted property.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-10-07 16:27:34 +02:00
Péter Gál
eb97860509 Add support for Symbols when using the 'in' operation (#3202)
The change adds support for the 'in' operation to handle Symbols.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-10-07 15:31:06 +02:00
Szilagyi Adam
0f754ff33c Fix count variable calculation in typedarray copyWithin (#3158)
Fixes #3130

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-10-07 11:31:44 +02:00
Péter Gál
3e23a3b62f Improve documentation on native pointer API methods (#3191)
Added extra notes on the native pointer API usages to clarify
when the free callback function is invoked. Also added a note
for the free callback typedef to inform users to not call API methods
in the callback.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-10-04 16:57:16 +02:00
Zsolt Borbély
e54666b448 Fix the include format of math.h (#3197)
The order of includes are also fixed.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2019-10-03 17:39:57 +02:00
Zsolt Borbély
b206d60842 Remove superfluous include (#3198)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2019-10-03 17:39:21 +02:00
Daniella Barsony
466dc903fb Add toLength and toInteger operations (#3146)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-10-03 14:05:23 +02:00
Dániel Bátyai
c17da4f33b Use a string builder in Array.prototype.join and toLocaleString (#3184)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-10-03 11:30:38 +02:00
Dániel Bátyai
cfaecc6698
Fix an undefined read during module cleanup after parse error (#3181)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-10-03 11:01:11 +02:00
Dániel Bátyai
2180d979b7 Remove abort-on-fail from the default port (#3182)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-10-03 09:50:47 +02:00
Csaba Osztrogonác
6a848a36fd Make Date.parse handle 24:00:00.000 time properly (#3196)
ES5.1 15.9.1.15 Note1 defines that 24:00 is same as 0:00
of the next day. The spec explicitly doesn't mention that
24:01 should be invalid, but it should be self-evident.
(FireFox and Chrome also refuses times bigger than 24:00)

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2019-10-03 09:49:51 +02:00