3525 Commits

Author SHA1 Message Date
Robert Sipka
3d3e6fdf58
[Debugger] Create a simplified transmission layer (#2781)
It supports the raw packet sending over a TCP/IP protocol

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2019-03-18 11:00:15 +01:00
Péter Gál
fbd734ed28 Split the Travis checks into two test calls (#2797)
The cppcheck can run for quite a long time, sometimes even more than
10 minutes. This change splits the test execution into two part:
* First, do all checks excluding the cppcheck call with the default timeout.
* Second, do the cppcheck call with a 30 minutes maximum timeout.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-03-18 09:32:40 +01:00
wangzhikang123
f3c8eeecb5 Fix the vm stop checking bug (#2795)
when the vm executes VM_OC_LESS operation, the lookahead optimization will cause the by-passing of vm stop checking.
Thus we need to disable the optimization here if JERRY_VM_EXEC_STOP is defined.

JerryScript-DCO-1.0-Signed-off-by: Wang Zhikang wzk0406@mail.ustc.edu.cn
2019-03-13 15:18:35 +01:00
Robert Fancsik
7d48e011c9 Fix getting the iterated object's length property (#2784)
This patch fixes #2782.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-13 13:56:01 +01:00
Péter Gál
162ba8c116 Make jerryx_port_handler_print_char truly a port function (#2789)
In the previous approach `jerryx_port_handler_print_char` was implemented
in by the jerry-default-port. This implementation however required the
jerry-ext handler header file which created a requirement in the
jerry-default-port for the jerry-ext headers.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-03-13 10:19:30 +01:00
Robert Fancsik
90f37a5573 Optimize LCache entrys keys (#2767)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-08 18:46:12 +01:00
Robert Fancsik
ea195cd131 Use [[DefineOwnProperty]] in the iterator next step in ecma_builtin_promise_do_all (#2773)
This patch fixes #2770.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-07 08:04:19 +01:00
Robert Fancsik
1fba8901d6 Ensure that Symbol.toStringTag property is copied to buffer as a cesu8 string (#2772)
This path fixes #2769.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-06 18:45:50 +01:00
Robert Fancsik
9c7b96878b Iterated object should be marked during GC (#2785)
This patch fixes #2783

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-06 18:23:57 +01:00
Robert Fancsik
dfe7ff8ddb Add missing builtin object type checks from ecma_object_check_class_name_is_object (#2780)
This patch fixes #2779 and the same issue for the Symbol.prototype object, also fixes the check
for the Iterator/ArrayIterator object as well since these checks macro guards were misplaced.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-06 18:18:59 +01:00
Robert Fancsik
2f18b92e0f Fix the rest parameter behavior if the arguments object needs to be created (#2778)
This patch fixes #2777.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-06 18:16:10 +01:00
Robert Fancsik
e4fee93b92 Fix the JSON stringify context abort in case of error (#2776)
This patch fixes #2774 and fixes #2775 as well.
Also add a shortcut to access the length of the array in `ecma_builtin_json_array`.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-06 18:11:00 +01:00
Robert Fancsik
cedf8e460a Builtin Object constructor should handle symbol arguments (#2771)
This patch fixes #2768.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-06 17:12:03 +01:00
Akos Kiss
85e05094e9 Bump NuttX target to 7.28 (#2787)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-03-05 10:14:56 +01:00
Akos Kiss
6cc70d4adc Bump Mbed OS target to 5.11.5 (#2788)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-03-05 09:52:52 +01:00
Robert Sipka
6d490c7296 Separate the debugger-client to support the later usage of other communication protocols (#2764)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2019-02-26 10:56:44 +01:00
Robert Fancsik
d4e27d3003 Target arraybuffer's buffer should be absolute addressed in ecma_op_typedarray_set_with_typedarray (#2758)
This patch fixes #2757, also adds a short path for the case when the source and the target typedarrays are the same.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-21 13:24:52 +01:00
wille.io
a1fdcf06cb Compile with clang-7.0 (#2754)
jerry_debugger_scope_variable_type_t was not explicitly sized by the compiler as 8bit, accept uint8_t instead (you still can call the fn with a jerry_debugger_scope_variable_type_t)

JerryScript-DCO-1.0-Signed-off-by: wille-io mike@wille.io
2019-02-19 20:23:49 +01:00
Istvan Miklos
9c10d82e4a Fix JSON.stringify (#2759)
There was a wrong check on the property types, it did not check that the
property was name accessor. Also fixed a test case.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2019-02-19 11:29:13 +01:00
Robert Fancsik
60bbd731e5
Add new symbol related API functions. (#2741)
New functions:
 - ecma_create_symbol
 - ecma_value_is_symbol
 - jerry_get_symbol_descriptive_string

Also improve the jerryx_handler_print to be able to print symbol values via using the jerry_get_symbol_descriptive_string API function for symbol values.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-19 07:45:50 +01:00
Robert Fancsik
cffb299f37
Ensure that symbol properties can be set via computed object literals (#2747)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-13 18:32:36 +01:00
Robert Fancsik
044b4ea827 Add missing error checks for ecma_regexp_exec_helper (#2756)
This patch fixes #2755.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-13 12:50:01 +01:00
László Langó
2d16705050
Added 'instanceof' binary operation to the API (#2751)
Added 'JERRY_BIN_OP_INSTANCEOF' to 'jerry_binary_operation_t' and
'jerry_binary_operation'. Added unit tests for this new operation
and updated the documentations.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-02-13 12:49:28 +01:00
Robert Fancsik
ed0662612d Use custom dispatcher for Array.prototype routines (#2742)
Binary size gain:
 - Intel: ~2.5KB (gcc-7.3)
 - Arm: ~1.2KB (arm-linux-gnueabi-gcc-7.3)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-13 10:46:57 +01:00
Péter Gál
f22eea5c6e Allow build artifacts on AppVeyor (#2752)
Enabled the creation of JerryScript Windows binary artifacts during builds.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-02-09 17:01:31 +01:00
Robert Fancsik
4f5ffb4f3a
Implement Iterator interface and Array iterators (#2640)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-08 11:10:32 +01:00
Robert Fancsik
2dd854d28b
Ensure that ecma_get_number throws error for symbol values. (#2744)
This patch fixes #2743.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-07 16:07:35 +01:00
Robert Fancsik
243e14ac21
Reduce the memory allocations while getting a string's length property (#2736)
This patch reduces the number of string to string object conversion during property managing operations,
via access the length property directly from the string instead of the newly created string object.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-07 16:07:13 +01:00
László Langó
81ccd6a743
Added new 'jerry_binary_operation' API function (#2746)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-02-06 15:40:54 +01:00
Robert Fancsik
5e846c9efa Fix instanceof operator for implicit class constructors (#2748)
Implicit class constructor functions should not be handled as bound functions during [[HasInstance]] check.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-06 15:06:43 +01:00
Robert Fancsik
6b9c924d08 Add recursion limit for VM (#2737)
This patch adds posibility to supervise the VM call stack to avoid aborts/crashes due to the recursion calls.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-01 15:32:26 +01:00
Robert Fancsik
5c1a4f18ea Implement @@toStringTag well-known symbol related features (#2739)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-02-01 14:59:22 +01:00
Robert Fancsik
ca8442c523 Add duplicated argument check for function rest parameter (#2740)
Also add a missing word from `PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER` error message.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-31 14:15:42 +01:00
Robert Fancsik
1ff322b72f Ensure that symbol properties are not listed in ecma_builtin_list_lazy_property_names (#2734)
This patch fixes #2733.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-31 13:42:18 +01:00
Robert Fancsik
924f4bbd74 Fix the order of value finalizing in ecma_builtin_typedarray_prototype_join (#2726)
This patch fixes #2724.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-25 11:03:11 +01:00
Robert Fancsik
4c1ee94652 Add support for function rest parameter (#2647)
ECMAScript v6, 14.1.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-25 09:24:39 +01:00
Robert Fancsik
a42f239abb Fix super keyword parsing for arrow functions. (#2664)
This patch fixes #2657.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-22 09:21:28 +01:00
László Langó
858c3e68a1 Fixed unreachable jump statements. (#2722)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-01-22 09:19:33 +01:00
Robert Fancsik
7ed7935084 Add missing ecma_deref_ecma_string call to ecma_builtin_json_object (#2720)
This patch fixes #2719.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-22 01:26:34 +01:00
Robert Fancsik
5becf43ede Fix %TypedArray% object instances symbol properties (#2704)
Add missing check for during property handling for %TypedArray% object since until now only string property names were possible.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-22 01:11:58 +01:00
Robert Fancsik
71608288e6 Substitute symbols with their descriptive string in ecma_raise_standard_error_with_format (#2708)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-22 01:10:42 +01:00
Akos Kiss
2365b4ec35 Fix out-of-bounds writes (buffer overflows) in unit tests (#2714)
Fixes #2711
Fixes #2712

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-21 12:40:27 +01:00
Akos Kiss
936766d241 Bump Tizen RT target to release 2.0 (#2709)
Current build test uses and documentation refers to release 1.1,
however, 2.0 has been out since Oct 2018. This commit bumps the
target to that latest release.

Co-authored-by: Roland Takacs <rtakacs.uszeged@partner.samsung.com>
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-21 12:28:39 +01:00
Akos Kiss
772a88050b Fix buffer overflow while printing unhandled exception (#2710)
Fixes #2675

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-21 12:22:27 +01:00
Akos Kiss
77767c2161 Add pkg-config metadata files for libraries (#2680)
Should core, ext, libm, and/or port libraries be properly installed
on some system, help compilation and linking against them by
providing standard `.pc` files, which can be picked up by
pkg-config.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-21 09:38:05 +01:00
Akos Kiss
67ef396354 Use union to convert between jerryx_arg_int_option_t and uintptr_t (#2718)
This fixes potential out-of-bounds reads in jerry-ext when dealing
with integer argument mappings.

Fixes #2713

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-21 09:29:34 +01:00
Istvan Miklos
c23cf4176a Add RegExp recursion depth limit (#2543)
The regexp engine does not have any recursion depth check, thus it can cause problems with various regexps. Added a new build option `--regexp-recursion-limit N` whose
default value is 0, which is for unlimited recursion depth. Also added a build-option-test.

Fixes #2448
Fixes #2190

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2019-01-17 20:16:50 +01:00
Roland Takacs
162e2ddcb6 Use logical operators for bool converions. (#2707)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2019-01-17 14:30:05 +01:00
Roland Takacs
0b3d5edc06 Fix some type conversions in ecma-builtins. (#2706)
Added missing parentheses and explicit type conversions.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2019-01-17 12:50:16 +01:00
Péter Gál
545c6c771b Update the debugger to work on Windows (#2684)
Changed the debugger-tcp.c file to include Windows specific
socket handling code and mode user all components are compilable
for Windows.

Added appveyor configuration to build with and without debugger.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-01-17 11:40:29 +01:00