2787 Commits

Author SHA1 Message Date
tdusnoki
cb40106693 Use jerry_is_feature_enabled function instead of macros where possible (#2271)
JerryScript-DCO-1.0-Signed-off-by: Tibor Dusnoki tdusnoki@inf.u-szeged.hu
2018-04-09 08:26:36 +02:00
Peter Marki
8392eef8ad Implement the ES2015 version of Object.getPrototypeOf and add a test file for it (#2256)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-04-05 14:28:28 +02:00
Zoltan Herczeg
7b226f53e0
Rework snapshot generation API. (#2259)
Also remove eval context support. It provides no practical advantage.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-05 13:43:55 +02:00
Martijn Thé
35926f3f85 Add finalize_cb to jerry_context_data_manager_t (#2269)
This patch adds a new finalize_cb callback to jerry_context_data_manager_t.
The callback is run as the very last thing in jerry_cleanup, after the VM has been torn down entirely.
There was already the deinit_cb, which is run while the VM is still in the process of being torn down.
The reason the deinit_cb is not always sufficient is that there may still be objects alive (because they still being referenced) that have native pointers associated with the context manager that is being deinit'ed.
As a result, the free_cb's for those objects can get called *after* the associated context manager's deinit_cb is run. This makes cleanup of manager state that is depended on by the live objects impossible to do in the deinit_cb. That type of cleanup can only be done when all values have been torn down completely.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2018-04-05 12:57:51 +02:00
Zoltan Herczeg
27939f0884
Simplify debugger-ws.h (#2266)
Remove several macros and types from it. This change simplifies
the external debugger interface.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-05 11:22:44 +02:00
ZsoltRaduska
78bd11e732 Add json parse and stringify function to jerryscript c api (#2243)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Raduska rzsolt@inf.u-szeged.hu
2018-04-05 09:58:07 +02:00
ZsoltRaduska
0476523f1a Improve jerry_is_feature_enabled with object availability information (#2250)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Raduska rzsolt@inf.u-szeged.hu
2018-04-05 09:54:07 +02:00
Daniel Balla
f06d637238 Add ecma_free_all_enqueued_jobs function (#2265)
This function releases any remaining promise job that wasn't completed.
Also added this function to `jerry_cleanup ()`, therefore it will be automatically run.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-04-05 09:49:25 +02:00
Geoff Gustafson
634d9d38da Fix bug in stringToCesu8 conversion for 0x7ff (#2267)
JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
2018-04-04 10:17:16 +02:00
Istvan Miklos
ff37959195 Remove TARGET_HOST macros (#2264)
Remove TARGET_HOST defines from the jerry-libc module and replace with compiler provided macros.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-04-03 14:58:47 +02:00
Jimmy Huang
a0e315719b Remove websocket message macros in debugger (#2262)
JERRY_DEBUGGER_INIT_SEND_MESSAGE
JERRY_DEBUGGER_SET_SEND_MESSAGE_SIZE
JERRY_DEBUGGER_SET_SEND_MESSAGE_SIZE_FROM_TYPE

JerryScript-DCO-1.0-Signed-off-by: Jimmy Huang jimmy.huang@intel.com
2018-04-03 09:06:20 +02:00
Péter Gál
708f66ad91 Fix accessing the contents of a direct string (#2261)
In the `ecma_string_get_chars` method
the contents of a direct string is accessed incorrectly.
It tries to extract the magic string id from the
string pointer but the direct string does not need
this step.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-03-29 20:20:59 +02:00
Daniel Vince
ba22072db8 Fix typo and redundant text in the documentation. (#2260)
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
2018-03-29 10:52:20 +09:00
Daniel Balla
8af89d951e Add the ability to throw an error to python debugger (#2188)
This patch makes it possible to throw an error from the python debugger client using the `throw` command.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-03-28 16:46:24 +02:00
Tamas Zakor
79289714dc Remove unused functions which caused build error on clang (#2257)
JerryScript-DCO-1.0-Signed-off-by: Tamas Zakor ztamas@inf.u-szeged.hu
2018-03-27 16:10:49 +02:00
Peter Marki
e54dde55fe Add tests for the es5.1 profile to tools/run-tests.py (#2217)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-03-24 10:48:08 +09:00
imiklos
15f6ca9f70 Move the sleep function to jerry-port (#2245)
Now the jerry-debugger uses the jerry-port's sleep, therefore if there are systems that don't support
usleep or nanosleep can now define their own function.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-03-22 10:36:40 +09:00
haesik
d701a7bfb1 Remove ineffective codes (#2248)
Results of assert statements are always true,
I think we don't need these assert statements anymore

JerryScript-DCO-1.0-Signed-off-by: Haesik Jun haesik.jun@samsung.com
2018-03-21 18:37:46 +09:00
imiklos
6e9a94bf1a Remove new line from output log in python client. (#2244)
There was an unnecessary new line character in the python debugger client.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-03-21 18:37:13 +09:00
Péter Gál
66d0f53bbb Remove a few ECMA_TRY_CATCH macro usages (#2246)
By removing the ECMA_TRY_CATCH macros at these
places  ~200 bytes of .text is saved on rpi2.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-03-21 18:36:38 +09:00
Gabriel "_|Nix|_" Schulhof
3664d9ddd1 Add an API to traverse objects by their associated native data (#2236)
JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2018-03-21 08:48:27 +01:00
Zoltan Herczeg
bb84466fcf Support static snapshots. (#2239)
Unlike normal snapshots, no part of a static snapshot is loaded into
the RAM when executed from ROM. Static snapshots rely heavily on
external magic strings.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-03-20 07:46:52 +09:00
Achie72
dde09cc4b6 Fix JSON.stringify, to allow TypedArray printing (#2242)
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-03-19 14:12:33 +01:00
Yuyupo
0b76ea6c82 Create snapshot test (#2241)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2018-03-14 14:01:03 +01:00
Imre Kiss
a79c217aa0 Add finish debugger command. (#2240)
With this command the engine continue running just after the function
in the current stack frame returns.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2018-03-12 14:42:48 +01:00
Daniel Balla
685af74a10 Multiple nexts with one command (#2207)
Make a next command more gdb like.
If an argument is given `next 10`, it does 10 nexts.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-03-08 10:46:03 +01:00
Roland Takacs
29b337d159 Eliminate early memory deallocations in case of NuttX and TizenRT (#2235)
The error value is released in the print_unhandled_exception function, however
that value is used and released later. This patch fixes this bug.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-03-06 08:22:22 +01:00
Yuyupo
63e3eaf087 Remove ecma_get_length_string (#2234)
Fixes #2231

JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2018-03-05 15:17:29 +01:00
Zoltan Herczeg
7b0e1672ae
Improve property search. (#2232)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-03-05 14:54:33 +01:00
Zoltan Herczeg
b9f96a64d9
Support large string constants in 32 bit cpointer mode. (#2233)
After this patch, all sunspider tests run when cpointer 32 is enabled.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-03-05 11:41:52 +01:00
László Langó
94760b1213
Improve builtin instantiation (#2226)
* Resolve linker errors with -O0 in some compilers
 * Reduce the stack usage

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-03-02 14:37:03 +01:00
Péter Gál
55058cf151 Add quiet mode for test runner(s) (#2228)
In one of the previous PR we have encountered a problem,
where the Travis cuts off the test execution
as the generated log file is too big.

By adding a quiet mode for the test runners, we will
only report the failing tests.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-03-02 10:18:17 +09:00
Péter Gál
575ec7e10a Check _XOPEN_SOURCE macro before defining (#2220)
In jrt.h the _XOPEN_SOURCE macro is defined.
However if the compiler already specifies this as
a default define, it can lead to compiler warnings
or errors.

By adding a macro check the warnings/errors can be
avoided.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-03-02 10:17:25 +09:00
Zoltan Herczeg
d60d4dbba9
Improve magic string handling. (#2221)
Remove unnecessary ref / deref calls when magic strings are used.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-03-01 13:31:15 +01:00
Martijn Thé
26ee8f7137 Bugfix: check context manager deinit callback for NULL before calling it (#2222)
The deinit_cb should be allowed to be NULL.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2018-03-01 09:31:39 +01:00
siposb94
ccc283289c Added several negative tests (#2215)
JerryScript-DCO-1.0-Signed-off-by: Balint Sipos siposb@inf.u-szeged.hu
2018-02-28 05:47:56 +01:00
László Langó
e10f6d6adf Modified ecma string to utf8 string conversion to reduce binary size. (#2214)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-27 14:52:30 +01:00
László Langó
72b51accc8 Reduce the memory footprint of 'ecma_instantiate_builtin' (#2218)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-27 10:16:23 +01:00
László Langó
fbc53f78b7 Eliminate the pylint warnings and update the pylint configuration (#2210)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-27 10:14:48 +01:00
László Langó
88f7baa192 Fix build failure of NuttX tools (#2225)
The CI is broken after '164450f982',
because it cannot find 'aclocal-1.15'.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-27 10:12:05 +01:00
Geoff Gustafson
d990832569 fix typos in debugger code (#2219)
JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
2018-02-23 08:22:16 +09:00
Zoltan Herczeg
51e3c4455a Implement direct strings. (#2196)
Direct strings are a new type of direct ecma-values (no memory allocation
is needed for encoding them) in JerryScript. Currently magic strings,
external magic strings and uint values are encoded as direct strings.

The constant pool of JerryScript byte-code is changed to hold ecma-values
rather than cpointers to support direct strings.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-23 08:21:46 +09:00
László Langó
fbf5c32747 Removed 'is_static' parameter from 'BUILTIN' macro, because was never used. (#2216)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-22 09:14:56 +09:00
Zoltan Herczeg
d841270747 Exclude hashmaps from GC marks. (#2212)
Fixes #2146.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-22 09:13:49 +09:00
Martijn Thé
b8656877e2 Fix misc. compiler warnings (#2202)
JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2018-02-20 16:13:04 +01:00
László Langó
6fce323fa5 Fix assertion in 're_insert_simple_iterator' (#2209)
It is a followup fix after #2169. It also fixes a memory leak.
This fixes #2198 and fixes #2204

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-19 16:57:45 +09:00
László Langó
c4b61db57a Fix '--cmake-param' option of the build script. (#2208)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-19 11:29:58 +09:00
Martijn Thé
3c57698ed8 Fix buffer overrun while parsing malformed JSON hex escape sequence (#2201)
Fixes https://github.com/jerryscript-project/jerryscript/issues/2200

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2018-02-16 09:02:03 +01:00
Péter Gál
d7991ae54c Add C API to query the type of a JS value (#2195)
New API function:
 * jerry_value_get_type

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-02-13 13:48:07 +01:00
Péter Gál
4652c3caaf Add OpenWrt build guide (#2199)
There was an OpenWrt toolchain file however it's a bit outdated and
we did not have any guide on how to build for this target at all.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-02-12 17:21:57 +09:00