aboutsummaryrefslogtreecommitdiff
path: root/jerry-core
AgeCommit message (Collapse)Author
2018-08-08Revisit unused global functions in jerry-core (#2450)Akos Kiss
There are some leftover global functions in the code that are not referenced at all anymore. These functions are removed by this patch. There are also some global functions that are only used in their own modules. These functions are made static by this patch. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-06Fix a few parser style issues. (#2442)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-06Use #include<> for system headers and #include"" for own headers (#2445)Akos Kiss
They are no big differences between the two forms as "" falls back to <>. There are some inconsistencies in the code, though, which are fixed by this patch. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-05Simplify redundant condition in jerry-snapshot.c (#2444)Akos Kiss
Redundant condition: is_c_format. '!A || (A && B)' is equivalent to '!A || B'. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-03Add total frame counter to backtrace in debugger (#2428)Daniella Barsony
This was needed for the VScode extension so we know in total howmany frames we have in the backtrace. JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2018-08-01Fix for null pointer dereference in jmem_heap_free_block (#2440)Daniel Balla
Fixes #2435. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-07-31Remove unnecessary cbc_code_flag (#2443)Robert Fancsik
The removed flag can be substituted with the combination of two existing ones. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-30Improve lexer_expect_object_literal_id option handling (#2436)Robert Fancsik
This patch allows to add further options flags to `lexer_expect_object_literal_id` to handle unique behaviors more easily also substitutes `PARSER_IS_CLASS` flag hence it is removed. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-20Simplify source evaluation options. (#2431)Robert Fancsik
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-19Move low-level debugger connection handling into jerry-ext. (#2426)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-19Remove jerry_get_arg_value function. (#2425)Zoltan Herczeg
Remove automatic conversion of errors. Errors are primary values, just like numbers or strings. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-18Reduce with stack consumption by 1. (#2430)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-16Added literal list loading feature to the snapshot tool. (#2422)László Langó
It is needed to load literals and register them as magic strings to be able to generate static snapshots. Also modified the list format saving feature to save all of the literals not only the identifiers. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-07-13Fixes for ES2015 classes. (#2424)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-13Rework JerryScript transport layer. (#2421)Zoltan Herczeg
Introducing jerryscript-debugger-transport.h interface, which allows chaining multiple protocols (e.g. tcp and websocket). JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-13Implement ES2015 class feature (part I.) (#2404)Robert Fancsik
This patch is the first milestone of the implementation of this new language element. Currently supported: - Class statement - Class expression - Static methods JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-12Add start to backtrace for debugger (#2407)Daniella Barsony
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2018-07-11Rework function call. (#2414)Zoltan Herczeg
Furthermore add a construct flag, which disallows calling certain functions without new. Constructing bound arrow functions correctly throws error now. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-10Optimize JSON `Quote` operation. (#2420)Anthony Calandra
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-07-03Add %TypedArray%.prototype.fill(value, [ begin [, end ] ]) support. (#2415)Anthony Calandra
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-07-03Support for %TypedArray%.prototype.set(typedArray [, offset]). (#2405)Anthony Calandra
This patch allows developers to set a typedarray given a source typedarray. This patch attempts to follow section 22.2.3.22.2 in the ECMAScript spec as closely as possible. JerryScript-DCO-1.0-Signed-off-by: AnthonyCalandra anthony@anthony-calandra.com
2018-06-28Add %TypedArray%.prototype.subarray([ begin [, end ] ]) support. (#2410)Anthony Calandra
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-06-28Replace jerry_value_set_abort_flag with jerry_create_abort_from_value (#2411)Istvan Miklos
Replaced the function, added some tests for it. Also changed the functions order to alphabetical. JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-06-23Fix escape sequence parsing in lexer_compare_identifier_to_current. (#2409)Zoltan Herczeg
Furthermore do not allow escape sequences in object initializer get/set functions. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-22Fix jerry_create_error_from_value (#2403)Istvan Miklos
Fixed the release issue, added some test cases for the function JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-06-22Add restart command to the debugger (#2401)Imre Kiss
With this feature the use can restart the actual debug session (similar to the multiple source context reset) within a client. JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2018-06-21Fix parse_print_final_cbc dump when arguments is used (#2400)Zoltan Herczeg
Currently the byte code start is incorrectly set when a non-strict arguments object is present, and a random memory area is dumped as byte code. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-20Remove ECMA_LEXICAL_ENVIRONMENT_OBJECT_BOUND. (#2408)Zoltan Herczeg
Only the global object bound to the root node of the lexical environment tree does not have a provideThis flag, and ecma_op_implicit_this_value() falls back to the global object. Hence we get the same effect regardless of provideThis. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-20Add literal property to the byte code list. (#2397)Zoltan Herczeg
Initializing a property with a constant is frequent in object initializers. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-18Fix literal free when show opcodes is enabled. (#2398)Zoltan Herczeg
A literal might be not freed if it is stored in a register, and PARSER_DUMP_BYTE_CODE is enabled, but opcodes are not shown. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-15Add operational mode for jerry_gc API call. (#2385)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-14Reduce code duplication between String.charAt and charCodeAt (#2331)Mátyás Mustoha
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-06-13Improve instanceof operator. (#2395)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-12Rework 128 bit arithmetics of ecma_utf8_string_to_number (#2392)Akos Kiss
* Rewritten 128-bit integer "type" to use two 64-bit ints (they are enough), and made it a proper struct instead of an array. * Rewritten all single-bit shift loops to multi-bit shifts with the help of CLZ, and used `__builtin_clzll` where available. * Simplified (and documented) 128-bit DIV10 operation. * Renamed 128-bit integer handling macros to use simpler names. (And removed unused macros that were laying around.) JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-12Fix jerry_get_value_from_error (#2394)Istvan Miklos
Fix the function to take into account the second argument even if it is called with not an error value. JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-06-11Fixed assertion in 're_insert_into_group'. (#2388)László Langó
Assertion 'qmin <= qmax' failed in 're_insert_into_group', but it should throw a SyntaxError. Fixes #2384. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-06-11Fix wrong code order in opfunc_in (#2390)Zoltan Herczeg
Also no conversion if the left value is a string. Fixes #2386. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-11On simple strings the utf8 substring copy api call created an assert (#2389)Péter Gál
When the `jerry_substring_to_utf8_char_buffer` was called with direct strings the assert incorrectly assumed that the string is a ref counted string and tried to access the refcount value resulting in a failed assert. Added direct string check for the underlying implementation and created a test case for such simple string. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-06-11Replace the jerry_value_set_error_flag function with ↵Istvan Miklos
jerry_create_error_from_value (#2367) JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-06-08Remove the indentation of preprocessor directives. (#2379)László Langó
Indenting preprocessor directives reduces the code readability, because it make preprocessor directives harder to spot. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-06-06Merged conditions of if statements where possible. (#2380)László Langó
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-06-06Rework command line handling of build tool (#2373)Akos Kiss
In `tools/build.py`: - For the sake of readability, group CLI arguments as general build options, options to control the building of components, and component-specific options. - To prevent duplications, remove the defaults from those CLI arguments that correspond to CMake options and have defaults in any of the CMakeLists. Should any of the defaults change, they will have to be changed at a single place only. (Those options that are not set on the command line of `tools/build.py` are not passed as options to `cmake` either.) - Convert `--unittests` and `--doctests` to ON/OFF options like the rest of the component switches. - Touch on some of the help messages of the CLI arguments. Other changes: - The change in `--unittests` and `--doctests` is a slightly CLI- breaking change of `tools/build.py`. Thus, follow up on this in `tools/run-tests.py`. - Move `ENABLE_ALL_IN_ONE` into `jerry-core` as it is not a general option but specific to that component. - Remove the forcing of `ENABLE_ALL_IN_ONE` for some compilers/ platforms as it is still an option, not a hard requirement. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-05Buildable as shared libraries (#2351)willeio
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: wille-io mike@wille.io
2018-06-04Declare parser_error_to_string conditionally (#2376)Akos Kiss
Its implementation is only available if `JERRY_ENABLE_ERROR_MESSAGES` is defined. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-04Remove the leftover declaration of ecma_op_create_global_environment (#2375)Akos Kiss
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-04Remove legacy public headers (#2372)Akos Kiss
Recent changes to master have already introduced API-breaking changes. So, if someone is still including the legacy headers, following up on the header file name changes will be the least of their problems. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-03Direct alloc/dealloc implementations for ecma_number_t (#2377)Akos Kiss
As a result of earlier developments, there remained no other instatiations of the `ALLOC`, `DEALLOC`, and `DECLARE_ROUTINES_FOR` templates. So, it's simpler to write the alloc/dealloc routines directly for `ecma_number_t` as well. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-03Make sure that API function jerry_debugger_send_output is always implemented ↵Akos Kiss
(#2374) Also add some missing comments to `#else` directives. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-01Removed unused macro definitions. (#2369)László Langó
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-05-30Reverse the generation of line info. (#2363)Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com