aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-02List scope chain levels and their variables to the selected stack frame.variables_listRobert Sipka
It supports to list the scope chain of the current execution context and see which variables are available. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-09-24Change Promise properties to internal properties (#2526)Daniel Balla
There was an issue in the Promise implementation where properties were accessible from JavaScript. ie. `Object.defineProperty(Object.prototype, 0, {})` could modify properties which should've been inaccessible. The reason behind that is somewhat interesting as 0-7 were the same values as the enum values in the property list of the Promise object. Changing these properties to internal, makes them inaccessible from JS side. Also some tests have been changed, namely 2490 and 2465. The 2490 one got renamed, and all of the testcases from the issue have been added. 2465 got changed as well, since currently our Promise implementation can't display Promise errors, so we should check if an error is correctly returned. Fixes #2490 Co-authored-by: Robert Fancsik <frobert@inf.u-szeged.hu> JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-09-24Fix '--skip-list' argument of the test runner script. (#2536)László Langó
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-24Fix not checking errno after calling recv() (#2538)Daniel Balla
There was an issue not checking if recv() set the error value to EWOULDBLOCK or EAGAIN (both equals 11). If recv() returns 0 that means the connection was gracefully closed from the other side. However, if you are using non-blocking sockets, and recv() returns 0, but sets the errno to EWOULDBLOCK or EAGAIN it means the socket operation would block. This patch fixes #2537 JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-09-20Increase the debugger version field size from 1 byte to 4 byte (#2513)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-20Add more `const`s to external magic strings to get data moved from .data to ↵László Langó
.rodata. (#2534) JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-19Fix memory leak in the snapshot creation. (#2533)László Langó
Bytecode must be freed when the source is parsed succesfully, but the snapshot generating fails for some other reason. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-18Add soft assert handler to jerry-ext (#2516)Akos Kiss
Allow developers to choose whether they want a hard or a soft implementation behind `assert`, i.e., whether they want to kill the whole engine in case of an assertion failure in the executed script or just throw a JS error. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-17Fix JERRY_CONTEXT (error_value) handling during ↵Robert Fancsik
ecma_builtin_promise_reject_abrupt (#2519) Fixes #2489. Co-authored-by: Daniel Balla <dballa@inf.u-szeged.hu> JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-09-17Send print output to debugger client from the port implementation (#2515)Akos Kiss
... not from the print handler extension. The sending of logs is already in the port implementation. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-17Fix LCache invalidation issue for native properties during GC. (#2530)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-17Fix ecma_op_function_list_lazy_property_names in case of arrow function (#2529)Robert Fancsik
Fixes #2528. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-09-17Don't use `strlen` for string literals (#2517)Akos Kiss
Their length (size) is known at compile time. Therefore `sizeof` is more efficient for them. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-14Fix check-magic-strings.sh to return with non-zero if error happens (#2525)Tóth Béla
Running `tools/run_tests.py --check-magic-strings` causes an IndexError, but the script exits with 0, indicating error-less run. Added error checking to the file, to indicate errors in the future. Fixes #2522 JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-09-14Remove bad assertion in ecma_builtin_json_str_helper (#2521)Peter Marki
Fixes #2494 JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-09-14Update regular expressions in gen-magic-strings.py (#2527)Tóth Béla
In their past form, they could not recognize preprocessor directives, if they didn't start on column 0. Updated them to fix this problem. JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-09-13Remove the JERRY_GET_CURRENT_CONTEXT macro (#2512)Akos Kiss
It was an unused and undocumented macro that enabled diverting the `jerry_port_get_current_context` calls, an approach that was not used anywhere else in the Port API. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-12Remove leading space from before `#if`s (#2523)Akos Kiss
It both is against coding style and confuses the `gen-magic-strings.py` build tool. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-11targets: zephyr: Update for Zephyr 1.13 and SDK 0.9.3 (#2497)Paul Sokolovsky
Zephyr 1.13 made some refactorings to its CMake infrastructure which must be propagated to applications. Also, some config options were removed/refactored, so cleanup prj.conf. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2018-09-10Properly guard off LCache-related functionality (#2511)Akos Kiss
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-06Fix ecma_op_object_put return value not being handled (#2514)Daniel Balla
Fixes #2487 Fixes #2488 Co-authored-by: Robert Fancsik frobert@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-09-06Improve API of literal save and the snapshot (command line) tool (#2507)László Langó
Removed 'jerry_parse_and_save_literals' and introduced 'jerry_get_literals_from_snapshot' instead which works on snapshot buffers rather than source code. Added literal saving feature to snapshot merge in the snapshot command line tool. Also added missing 'jerry_cleanup()' calls to the snapshot tool. Improved the console messages of the snapshot tool. Based on previous work of Tamas Zakor <ztamas@inf.u-szeged.hu> JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-04Promote dynamic memory management from debugger transport to core API (#2503)Akos Kiss
Under the cover of the debugger transport layer, allocation on the engine's heap has been made available to the public. As there are actually no restrictions on what the allocated memory can be used for, the memory management functions better fit in the core part of the API. Closes #1805 JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-04Introducing internal properties. (#2485)Zoltan Herczeg
Native handle and pointer are moved to internal properties. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-04Merge instance into context (#2501)Akos Kiss
There was quite some confusion about terminology around instances and contexts. All the docs mentioned external contexts but functions and types were referring to instances, and the relation between these two concepts were not clear. This commit keeps (external) context as the only surviving concept. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-04Implement the core of the map object. (#2447)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-04Fix UTF8 string length calculation (#2508)Daniel Balla
Fixes #2451 Fixes #2452 Fixes #2453 Co-authored-by: Robert Fancsik <frobert@inf.u-szeged.hu> JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-09-04Fixup JMEM_HEAP_STAT_xxx definitions (#2509)Akos Kiss
- Get the macro definition indentations right. - Define some of the macros only if system allocator is not in use. - Ensure that macros with arguments don't cause unused variable warnings even if memory statistics is disabled. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-04Fix run-test-suite (#2505)Daniella Barsony
You could not interrupt the test with Ctrl+C JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2018-09-03Fix constantness of 'jerry_merge_snapshots' function. (#2504)László Langó
'jerry_merge_snapshots' should not modify the input snapshots. Updated the related unit test. Also fixed some minor style issues. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-03Fix logging issues in the debugger. (#2483)Zoltan Herczeg
- Properly handle logging during transport close - Properly display data during parse Furthermore hide global functions of the debugger. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-03Clean up memory statistics printing functions (#2502)Akos Kiss
- Remove leftover declaration of `jmem_pools_stats_print`. - Remove unnecessary trampoline function `jmem_stats_print`. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-31Fix ecma_builtin_promise_race_or_all function (#2491)Daniel Balla
If a new Capability was created no check was issued if it happened to be an error. Fixes #2465 Fixes #2468 Also fixes the second variant of #2490. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-08-31Reorganize heap context related elements (#2500)Akos Kiss
- Moved global context's `JMEM_HEAP_SIZE` to jcontext.h as external context's heap size is declared there, too. - Moved the assert on `jmem_heap_t` vs `JMEM_HEAP_SIZE` to jcontext.c, as both entities are declared in the corresponding header. - Removed superfluous checks on `JMEM_HEAP_SIZE` as it is not a publicly configurable macro (opposed to `CONFIG_MEM_HEAP_AREA_SIZE`). - Ensured that all definitions of and references to `jmem_heap_t`, `JERRY_HEAP_CONTEXT`, `JERRY_HEAP_SIZE`, and `JERRY_HEAP_AREA_SIZE` are guarded by `#ifndef JERRY_SYSTEM_ALLOCATOR`, as they are meaningless if the system allocator is used. The commit also contains some stylistic changes in jcontext.h JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-31Merge lcache into context (#2498)Akos Kiss
It is superfluous to maintain multiple globals when the whole reason of context is to keep them in a single place. It also simplifies initialization and external context creation a bit. Also removed unused lcache header includes. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-30Remove character pointer typedefs (#2492)Akos Kiss
The `[jerry|ecma]_char_ptr_t` types are some old legacy that are used quite inconsistently. Their `[jerry|ecma]_char_t *` variants are used a lot more often, so it's better to stick to one form throughout the code base. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-30Added missing documentation of JerryScript instances to the API reference. ↵László Langó
(#2482) JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-08-29Remove deprecated native handle support. (#2496)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-29Change `jerry_debugger_send_{output,log}` to take `const jerry_char_t *` (#2495)Akos Kiss
... instead of `jerry_char_t []`, which is not used anywhere else in the API. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-29Move the 'init/fini arrays' build option to jerry-ext (#2493)Akos Kiss
Since the removal of jerry-libc, only jerry-ext uses the `FEATURE_INIT_FINI` optional feature. Thus, it's better to move it from the global cmakelists to that of jerry-ext. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-28Move some internal functions into JerryDebugger. (#2484)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-28Implement computed properties for object literals. (#2481)Zoltan Herczeg
Also disable ES5.1 property name dumplication checks when ES2015 object literals are enabled. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-22Improve python debugger client. (#2441)Zoltan Herczeg
Replace DisplayData to DebuggerAction. The new class has only four type options. Furthermore several functions returning with DisplayData is changed to return with string. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-22Add %TypedArray%.prototype.sort([ compareFunction ]) support. (#2437)Anthony Calandra
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-08-21Align the RIOT target with the clang build of RIOT OS (#2477)Akos Kiss
This means cross building with clang and using short enums. Also bump RIOT OS version to latest 2018.07. Note: On Travis CI, clang-3.9 is used for testing. That version is widely available, from Ubuntu 14.04 to 18.04. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-21Doctest debugger examples and fix revealed issues (#2475)Akos Kiss
This will help to keep the debugger documentation up to date. (Note: only compilation & linking is possible as execution would require a connecting debugger client, which is not supported for unit/doctests.) JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-21Remove jerry-libc (#2332)Akos Kiss
Rationale: - There is no port under targets/ that would use it. All of them turn it off when building. - That's no surprise, as jerry-libc supports no barebone MCUs but posix targets with syscalls only. Actually, that's Linux only, because macOS builds have turned off the use of jerry-libc a while ago. - And there is no point in maintaining a highly restricted set of libc functions: as soon as someone wants to use JerryScript in a scenario that needs more functions than jerry-main, they have to choose a different libc (most problably the compiler's default one). I think that we should not keep supporting an otherwise unused library for the purposes of jerry-main on arm/x86/x64-linux only. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-21Fix LLVM/clang conversion errors (#2473)Martine Lenders
This fixes some conversion errors one gets when compiling with LLVM/clang. Most of them are caused when a bit-specific type (i.e. `uint16_t`) is implicitly cast to an `enum` of smaller value range. The fix is just an explicit casting of those types to the desired target type. JerryScript-DCO-1.0-Signed-off-by: Martine Lenders m.lenders@fu-berlin.de
2018-08-21Add a validation before evaluating the source code (#2480)Robert Fancsik
This patch checks whether the source code is a valid UTF-8 string before evaluating it in prompt mode. Also fixes #2476. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-08-21Fix syntax error when closing a block after a return statement (#2479)Marc Jessome
This adds a right brace to the list of tokens that will end a return statement. JerryScript-DCO-1.0-Signed-off-by: Marc Jessome marc.jessome@fitbit.com