3258 Commits

Author SHA1 Message Date
Péter Gál 27da5a538c Update API version number (#3000)
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-08-01 13:24:41 +02:00
Péter Gál 8ebd3230a1 Make sure that snapshot API return values are the same as in the docs (#2997)
The snapshot API docs describe that those functions returns error if
the related features are not enabled. Updated the return values to follow
the API documentation.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-31 19:23:55 +02:00
Péter Gál 1409a68dcb Generate jerryscript-config.h before build (#2934)
Previously after the library was build there was no easy way
to get back the information of how it was build.

This change adds a bit of CMake code to generate the
jerryscript-config.h file containing the default options
and adding the modified build options/features.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-31 19:21:24 +02:00
Péter Gál c90306449e Correctly handle call arguments when using 'super' calls (#2996)
There are two interconnected changes here:
* Added missing argument number handling for `super.propname(..)` calls.
* The `super.propname.call(...)` is does not need extra 'this' binding helper.

Fixes #2990.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-31 15:13:06 +02:00
Dániel Bátyai dfafb1aa6b Fix unhandled exceptions with unicode error messages (#2994)
Fixes #2993

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-30 19:48:56 +02:00
Dániel Bátyai a2d242eab9 Use python3 for mbedOS build on Travis (#2995)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-30 16:46:16 +02:00
Péter Gál 99b061ad10 Fix incorrect feature guard for class support (#2992)
In `ecma-helpers.c` there was an incorrect macro guard which
tested the `JERRY_ES2015` feature but the `JERRY_ES2015_CLASS`
feature should be tested instead.

Profile options for testing:
* JERRY_ES2015=0
* JERRY_ES2015_CLASS=1
* JERRY_ES2015_OBJECT_INITIALIZER=1

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-29 14:29:21 +02:00
Péter Gál c64ee882da Introduce new jerry-ext methods to ease property registration (#2715)
New methods
* jerryx_set_properties: Allows multiple property registration for via a single call
* jerryx_set_property_str: Allows property registration without the need to
    create the property name JS value. The property name can be directly passed
    as a `const char*` value and must be zero terminated.
* jerryx_get_property_str: Allows getting a property value on a given object.
    The property name can be directly passed as a `const char*` value.
* jerryx_has_property_str: Allows checking if a property exists on a given object.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-25 20:37:44 +02:00
Péter Gál 3e12738037 Improve single-source generation (#2989)
Detected and fixed minor issues with the single-source generation:
* On Windows the line info generation now correctly escapes the path separators.
* Fixed an incorrect C file include order. Now the global object C file is
  force included to get all common headers at the start in the generated source
  file.
* Added a missing colon which fixed the correct removal of the config.h include.
* Fix the command line help.
* Small typo fix.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-25 20:34:12 +02:00
Dániel Bátyai 6744376bbe Add Configuration doc to the README (#2988)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-25 20:33:20 +02:00
Istvan Miklos 7575fa454a Migration Guide (#2419)
* Migration Guide

Migration guide from JerryScript 1.0 to 2.0.

Co-authored-by: László Langó llango.u-szeged@partner.samsung.com
Co-authored-by: Peter Gal pgal.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu

* Add version information for API methods

For each API method/type the documentation now includes
the version it was introduced or a change occured.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-25 20:33:03 +02:00
Dániel Bátyai d3c78d8c6a Improve lastIndex calculation in RegExp match (#2982)
Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-25 18:20:51 +02:00
Péter Gál 50be3a5384 Document and improve the single-source generation (#2986)
Changes done:
* Added usage/configuration info for this mode.
* Created `tools/srcgenerator.py` to allow source/header generation
  without using CMake.
* Adapted CMake to use the `srcgenerator.py` script.
* Added jerry-libm single-source build.
* Improved the `srcmerger.py` script to correctly handle the line numbering.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-25 12:46:00 +02:00
Csaba Osztrogonác 7685afddf9 Fix Math.pow (#2985)
The Math.pow implementation calls libm's pow. The ISO C and ES5.1
standards differ on some special cases of pow. jerry-libm is already
ES5.1 conform, but system libm libraries on Linux and Windows aren't.

Math.pow(NaN, +/-0.0) is NaN on Windows and Linux with system libm,
but should be 1.0 according to ES5.1 / 15.8.2.13.

This patch handles this special case in Math.pow instead of calling pow of libm.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2019-07-24 19:41:03 +02:00
Szilagyi Adam ea577d6ed0 Add keys, values, entires functions for typedArray (#2925)
Extended the typedArray functionality based on ES2015

Co-authored-by: Tibor Dusnoki tdusnoki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-07-24 15:48:28 +02:00
Péter Gál 434994eb67 Add extra details for the api example page (#2956)
Add simple examples and details on how to execute them.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-24 15:47:55 +02:00
Csaba Osztrogonác 81c3763a30 Update README.md after renaming 01.GETTING-STARTED.md (#2983)
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2019-07-24 11:41:35 +02:00
Dániel Bátyai 5d6eebac4c Add documentation for configuration options (#2977)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-23 15:32:41 +02:00
Robert Fancsik 4a9e185840 Rework the engine's internal recursion limit (#2969)
This patch unifies the recursion limit checking for RegExp, function call and JSON as well.
Until now the limit was only a counter which was increased/decreased at certain points.
This counter has been substituted with a numeric limit which allows to restrict the stack usage.

This patch fixes #2963 and resolves the closed #2258 issue.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-23 15:31:37 +02:00
Péter Gál f53dba1a3a Add dependency info for accessing memstats from API (#2979)
The documentation of `jerry_get_memory_stats` method was missing
the requirements on what build option or feature is required.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-22 11:15:19 +02:00
Dániel Bátyai ec11a7b4e9 Resolve module paths relative to the current module (#2976)
The current module implementation resolves module paths relative to the
current working directory, but paths should be resolved relative to the
currently evaluated module/source.

This requires a change in the jerry_port_normalize_path port API
function, so that it also takes the current module path as an argument.
On the engine side, we now also create a module object for the main
script, so that we can properly identify the base path for other
modules.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-17 14:44:18 +02:00
Robert Fancsik 6c441091b4 Optional arguments should advance the iterator in jerryx_arg_transform_optional (#2962)
This patch fixes #2288

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 14:16:41 +02:00
Dániel Bátyai ff22634e27 Refactor memory management (#2954)
This PR is a general cleanup for garbage collection and memory
allocation code paths.

Changes:
  * Removed an unnecesary local variable from 'ecma_gc_mark'.
  * Refactored 'ecma_gc_run' to have an implicit list head during
    iteration, which results in one less condition in the loops,
    and changed the loops to use compressed pointers to reduce the
    overall amount of compression/decompression.
  * Renamed 'jmem_free_unused_memory_severity_t' to 'jmem_pressure_t',
    and added additional values.
  * Removed 'jmem_free_unused_memory_callback', instead
    'ecma_free_unused_memory' is now called directly.
  * Reworked 'ecma_free_unused_memory' to handle all code paths related
    to 'jmem_pressure_t', and moved all relevant code paths into this
    function. This simplifies the code paths in other places.
  * Reworked 'jmem_heap_gc_and_alloc_block' to be more streamlined.
  * Changed mem-stats to not report unused pool chunks as allocated
    memory.
  * Created an allocator internal API for allocating/freeing memory blocks
    that are not reported as used memory in mem-stats.
  * Removed iteration statistics for the jerry allocator from mem-stats,
    as they don't provide any actually useful information.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-17 14:12:23 +02:00
Dániel Bátyai a44d584842 Fix 'eval' checking in import/export statements. (#2978)
Fixes #2975

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-17 14:11:13 +02:00
Robert Fancsik 329b1fd3f7 Use custom dispatcher for Number.prototype routines (#2968)
Binary size gain:
     - Intel: ~630B (gcc-7.3)
     - Arm: ~280B (arm-linux-gnueabi-gcc-7.3)

Futher improvements:
 - Separate toFixed, toExponential, toPrecision common part into a helper function

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 14:10:20 +02:00
Robert Fancsik 7aa3bfdc6d Use custom dispatcher for Function.prototype routines (#2967)
Binary size gain:
     - Intel: ~70B (gcc-7.3)
     - Arm: 50 B (arm-linux-gnueabi-gcc-7.3)

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 14:10:05 +02:00
Robert Fancsik c0b8845530 Use custom dispatcher for Object routines (#2966)
Binary size gain:
     - Intel: ~370B (gcc-7.3)
     - Arm: ~240B (arm-linux-gnueabi-gcc-7.3)

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 14:09:44 +02:00
Robert Fancsik f158dd4fb5 Use custom dispatcher for Object.prototype routines (#2965)
Binary size gain:
     - Intel: ~250B (gcc-7.3)
     - Arm: ~65B (arm-linux-gnueabi-gcc-7.3)

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 14:09:29 +02:00
Robert Fancsik 603cd88006 Use custom dispatcher for String.prototype routines (#2964)
Binary size gain:
     - Intel: ~1.3KB (gcc-7.3)
     - Arm: ~650B (arm-linux-gnueabi-gcc-7.3)

Co-authored-by: Marko Fabo mfabo@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 14:09:14 +02:00
Robert Fancsik a21a4191ca Improve RegExp.prototype.compile (#2971)
This patch fixes the return value of the routine also fixes several incorrect regression-tests
due to the previously incorrect [[RegExpMatcher]] internal slot check.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-17 08:14:38 +02:00
Robert Fancsik 2700e66c4b Improve class literal parsing (#2970)
Until now "get"/"set" were always parsed as special 'keywords' for accessor methods,
but they should be parsed as simple class method if no identifier is followed by them.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-16 13:52:05 +02:00
Robert Fancsik 6bd7d70a69 Fix Lcache and property hashmap related buildoption tests (#2973)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-16 13:04:40 +02:00
Dániel Bátyai 75728980a3 Fix mbedos5 build on Travis (#2974)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-15 20:21:00 +02:00
Virag Orkenyi 3c2088cf7b Math.sign and Math.trunc (#2943)
JerryScript-DCO-1.0-Signed-off-by: Örkényi Virág orkvi@inf.u-szeged.hu
2019-07-11 19:42:27 +02:00
Dániel Bátyai c304b9a38a Include file path in Syntax error messages (#2941)
When using ES6 modules it was not possible to identify which module
an error originates from.

This PR changes the error message to also include the file path using
the file:line:column format, and updates the source context printing for
unhandled exceptions to use the correct file.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-11 12:33:02 +02:00
Robert Fancsik 3f47e1b0aa Container object's internal object must be allocated firstly (#2961)
This patch slightly reworks the container objects internal objects allocation.
This rework allows the same lifetime of the objects without the manual allocation/deallocation of the internal object.

This patch also fixes #2951.

Co-authored-by: Dániel Bátyai <dbatyai@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-11 12:32:17 +02:00
Robert Fancsik a3cd2d7ff6 This argument must be pseudo-array in {Map/Set}Iterator.prototype.next routine (#2960)
This patch fixes #2950.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-11 11:33:17 +02:00
Robert Fancsik 06000b5161 Fix the repeat count checking in String.prototype.repeat (#2959)
This patch fixes #2948

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-11 11:32:11 +02:00
Robert Fancsik 788fdc6603 Add missing release value call to %TypedArray%.prototype.findIndex routine (#2958)
This patch fixes #2947

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-11 11:31:04 +02:00
Péter Gál 1374d5f562 Update and improve API documentation (#2952)
A few parts of the API documentation was not clear enough.
Added extra details and examples.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-10 22:43:33 +02:00
Daniella Barsony d4ce20d0fd Implement String startsWith/includes/endsWith (#2926)
Co-authored-by: Tamas Keri tkeri@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-07-10 14:41:38 +02:00
Dániel Bátyai 04d5d56a68 Fix URLs in the repository after organization switch (#2955)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-07-09 19:13:57 +02:00
Péter Gál ef5dd5c698 Rework CMake options to use the new macro config format (#2933)
Updated all feature related CMake option to use JERRY_ format.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-08 18:25:17 +02:00
Robert Fancsik 2b8c428694 Improve gen-unicode.py to support unicode ranges (#2944)
This patch fixes #2936

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-05 15:44:56 +02:00
Robert Fancsik e902b870aa Limit the call stack size for native/builtin functions as well (#2935)
VM_RECURSION_LIMIT only prevented the recursion of interpreted codeblocks but
native/builtin function calls can also create stack overflow due to the too deep recursion.

This patch fixes #2905.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-05 12:21:48 +02:00
Robert Fancsik 8766bb3b37 CBC_PUSH_THIS_LITERAL must be converted back to CBC_PUSH_THIS during emitting unary lvalue opcode (#2939)
This patch fixes #2937.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-04 18:26:46 +02:00
Akos Kiss d22f6b451b Add pull request template (#2942)
Provide contributors with a checklist to ensure quality PRs and to
avoid common pitfalls. The items in the checklist are mostly beyond
the capabilities of automated checker tools and more like reminders
of best practices. Still, they can save lot of valuable reviewer
time (hopefully).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-07-04 10:35:05 +02:00
Akos Kiss b137942ea7 Add issue template for bug reports (#2940)
Help both the community and ourselves by describing what
information is required in a bug report.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-07-02 16:12:40 +02:00
Robert Fancsik a72d14f575 Make API unavailable while processing native free callbacks (#2932)
This patch fixes #2889 and extends the API documentation of the native free callbacks.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-02 15:46:19 +02:00
Péter Gál eef1efa394 Rework usages/naming of configuration macros [part 3] (#2927)
Reworked the JERRY_DEBUGGER macro to be a 0/1 switch.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-01 13:12:19 +02:00
Szilagyi Adam 1ea77cc490 Fix buffer-overflow in ecma_op_typedarray_set_with_typedarray (#2922)
Wrong method were used to get the source buffer pointer
Fixes #2851

Co-authored-by: Tibor Dusnoki tdusnoki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-07-01 13:09:39 +02:00
Akos Kiss dea73d87e8 Hide info about --libfuzzer in tools/build.py behind --devhelp (#2929)
This reduces the noise when a user asks for help via `--help`, as
libfuzzer support is very developer-only.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-06-28 11:03:49 +02:00
Robert Fancsik f6f52a2bf1 Update the internals documentation (#2923)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-27 12:56:06 +02:00
Akos Kiss de71fe4f71 Fix implicit integer conversion reported by Clang 8 (#2928)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-06-27 09:53:00 +02:00
Robert Fancsik 9d4c2315f3 Implement the Map/Set iterator operations (#2882)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-24 11:18:37 +02:00
Daniella Barsony 6f7dbbce7e Implement Array/TypedArray find index (#2893)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-06-24 11:14:06 +02:00
Robert Fancsik 95650993a2 Container object's properties must be marked during GC. (#2913)
This patch fixes #2895 and fixes #2911.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-24 11:13:11 +02:00
Robert Fancsik 44b21de7fc Ensure that the constructed object in [[Set]] operation with primitive base cannot be extensible (#2917)
Related part of the standard: https://www.ecma-international.org/ecma-262/5.1/#sec-8.7 1st note.

This patch fixes #2914.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-24 11:12:23 +02:00
Dániel Bátyai cbd41df5eb Module sources should be parsed in strict mode (#2920)
Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-06-24 08:14:34 +02:00
Szilagyi Adam 03202995a0 Add missing release to ecma_op_container_foreach (#2912)
The result of the callback function was not freed
Fixes #2910

Co-authored-by: Tibor Dusnoki tdusnoki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-06-21 19:02:06 +02:00
Robert Fancsik 8b459d9643 Resolve build error after #2888 (#2921)
This patch fixes the build error due to #2888 since this patch has been merged without rebasing to #2903.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-21 15:44:35 +02:00
Szilagyi Adam 7b65167e81 Fix allocation problems when using import and export (#2919)
Construct ecma_string only when there is no parser error using lit_object's index in parser_module_parse_export_caluse and parser_module_parse_import_clause
Fixes #2908

Co-authored-by: Tibor Dusnoki tdusnoki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-06-21 14:21:08 +02:00
Robert Fancsik b707c3f8da Reduce the size of vm_frame_ctx_t. (#2886)
The reference to the previous context is only used by the debugger and the backtrace info,
so this element should not be part of the structure by default.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-21 14:04:24 +02:00
Akos Kiss 78657e667d Make libfuzzer driver properly handle ES2015 test inputs with Promises (#2918)
Not running enqueued jobs (resulting from promises) caused false
alarms (internal assertion failures) at cleanup.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-06-20 09:24:11 +02:00
Gabriel Schulhof 3275c062f8 Improve JS object native pointer unit test (#2915)
After setting a second native pointer, check that both the pointer that
was first set and the second pointer that was set are there.

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2019-06-20 09:09:04 +02:00
Szilagyi Adam 6e9cf4d459 Release operands properly in opfunc_addition (#2909)
Right and left value release wasn't complete
Fixes #2901
Fixes #2902

Co-authored-by: Tibor Dusnoki <tdusnoki@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-06-19 12:29:58 +02:00
Péter Gál 01ecc7bb7b Rework usages/naming of configuration macros [part 2] (#2903)
There are quite a few configuration macros in the project.
As discussed in the #2520 issue there are a few awkward constructs.

Main changes:

* The following macros are now 0/1 switches:
** Renamed CONFIG_ECMA_LCACHE_DISABLE to JERRY_LCACHE.
** Renamed CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE to JERRY_PROPERTY_HASHMAP.
** Renamed CONFIG_DISABLE_UNICODE_CASE_CONVERSION to JERRY_UNICODE_CASE_CONVERSION.
** Renamed ENABLE_REGEXP_STRICT_MODE to JERRY_REGEXP_STRICT_MODE.
** Renamed JERRY_DISABLE_JS_PARSER to JERRY_PARSER.
** Renamed JERRY_ENABLE_ERROR_MESSAGES to JERRY_ERROR_MESSAGES.
** Renamed JERRY_ENABLE_EXTERNAL_CONTEXT to JERRY_EXTERNAL_CONTEXT.
** Renamed JERRY_ENABLE_LINE_INFO to JERRY_LINE_INFO.
** Renamed JERRY_ENABLE_LOGGING to JERRY_LOGGING.
** Renamed JERRY_ENABLE_SNAPSHOT_EXEC to JERRY_SNAPSHOT_EXEC.
** Renamed JERRY_ENABLE_SNAPSHOT_SAVE to JERRY_SNAPSHOT_SAVE.
** Renamed JERRY_SYSTEM_ALLOCATOR to JERRY_SYSTEM_ALLOCATOR.
** Renamed JERRY_VM_EXEC_STOP to JERRY_VM_EXEC_STOP.
** Renamed JMEM_GC_BEFORE_EACH_ALLOC to JERRY_MEM_GC_BEFORE_EACH_ALLOC.
** Renamed JMEM_STATS to JERRY_MEM_STATS.
** Renamed PARSER_DUMP_BYTE_CODE to JERRY_PARSER_DUMP_BYTE_CODE.
** Renamed REGEXP_DUMP_BYTE_CODE to JERRY_REGEXP_DUMP_BYTE_CODE.
* Recursion check changes:
** Renamed REGEXP_RECURSION_LIMIT to JERRY_REGEXP_RECURSION_LIMIT.
** Renamed VM_RECURSION_LIMIT to JERRY_VM_RECURSION_LIMIT.
* Attribute macro changes:
** Renamed JERRY_CONST_DATA to JERRY_ATTR_CONST_DATA.
** Renamed JERRY_HEAP_SECTION_ATTR to JERRY_ATTR_GLOBAL_HEAP.
  Now the macro can specify any attribute for the global heap object.
* Other macro changes:
** Renamed CONFIG_MEM_HEAP_AREA_SIZE to JERRY_GLOBAL_HEAP_SIZE.
   Then new macro now specify the global heap size in kilobytes.
* Updated documentations to reflect the new macro names.

For more deatils please see jerry-core/config.h.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-06-19 12:28:21 +02:00
Daniella Barsony 985de93d04 Implement String repeat (#2904)
Co-authored-by: Tamas Keri tkeri@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-06-19 12:19:21 +02:00
Akos Kiss 8ee8bc2767 Improve libfuzz integration (#2916)
- Allow command line tools to build together with libfuzzer driver.
  Compile everything with `-fsanitize=fuzzer-no-link` to prevent
  linking in libfuzzers's `main` symbol in all executables (causing
  duplicate symbol errors in command line tools), and add
  `-fsanitize=fuzzer` to the libfuzzer driver only.

- Make ASan optional when building with libfuzzer to allow the user
  to choose freely from available sanitizers (e.g., UBSan, MSan,
  HWASan).

- Stabilize libfuzzer by resetting PRNG seed at every invocation.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-06-19 11:34:06 +02:00
Dániel Bátyai 3953fee035 Correctly propagate errors when parsing modules (#2907)
Fixes #2896.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-06-14 03:29:26 -04:00
szilagyiadam 351acdf545 Add missing release value call for opfunc_addition (#2899)
Right_value wasn't correctly freed in case of an error.
Fixes #2894
Fixes #2897

Co-authored-by: Tibor Dusnoki <tdusnoki@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-06-11 17:42:14 +02:00
Renáta Hodován e2646f93cc Integrate LLVM's libfuzzer engine with JerryScript (#2898)
JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
2019-06-07 14:43:20 +02:00
Robert Fancsik 343e80053b Implement the for of statement (#2871)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-07 12:35:42 +02:00
Daniella Barsony b6fc4e13ae Fix rounding issue (#2890)
Fixes #2802

JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-05-31 08:31:36 +02:00
Robert Fancsik 076f515d61 Implement the string iterators (#2873)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-30 12:34:19 -04:00
Robert Fancsik 442e482afa Add missing error check for ecma_regexp_exec_helper (#2887)
This patch fixes #2885.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-28 14:22:57 +02:00
Robert Fancsik e1c552ba2e Cleanup unused macros/typedefs from ecma-globals.h (#2888)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-28 10:56:10 +02:00
László Langó 8e39fbc46f Fixed 'C4028' compiler warnings. (#2881)
The formal paramters of some function definitions were different
from the declarations.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-05-21 09:17:10 +02:00
Dániel Bátyai 0ba2d17faf Fix heap limit calculation when using the system allocator. (#2872)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-05-17 11:28:00 +02:00
Dániel Bátyai 9a512c8fcf Properly release property name collection in for-in opcode handler (#2875)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-05-16 15:34:41 +02:00
Dániel Bátyai fd3e982e69 Fix ecma collection header deallocation (#2874)
Collection headers are allocated using the pool allocator, so they
should be freed by it as well.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-05-14 14:10:39 +02:00
Robert Fancsik 76a1fc5674 Support external context in the snapshot tool (#2870)
This patch fixes #2869.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-13 16:07:39 +02:00
Robert Fancsik 4331e39b9a Implement the Set builtin object (#2841)
Also implement the missing iterator initializer part from the Map builtin object constructor.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-10 20:28:43 +02:00
Robert Fancsik 99c7a4040f Super parsing options should be set only in direct eval call (#2863)
This patch fixes #2846.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-10 12:23:29 +02:00
Robert Fancsik 063e7fde2b undefined byteLength should be treated 0 in DataView constructor (#2856)
This patch fixes #2854.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-10 10:47:25 +02:00
Dániel Bátyai 4bdc3a1c46 Implement path normalization in port-default (#2861)
Updated the default port so that it now provides path normalization for
common platforms.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-05-09 18:31:58 +02:00
Dániel Bátyai 57f08ee70e Add NuttX specific port implementation. (#2864)
The NuttX target has been problematic for some time, due to the fact
that NuttX apps are built with NuttX's own libc implementation, while
the default-port in JerryScript was compiled with the host libc, which
caused a mismatch between the two.

In order to work around this issue, most of the port implementation is already
duplicated in the NuttX target's jerry_main.c.

This PR adds a NuttX specific port implementation by moving the already
implemented port functions from jerry_main into a separate file, adding
implementation for the missing functions, and disabling the default-port
in JerryScript.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-05-09 16:33:25 +02:00
László Langó 0e41311989 Fixed build issues with ES2015 subset profile on Windows. (#2865)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-05-09 16:31:54 +02:00
Robert Fancsik 2d1ad149c1 Fix key iteration in ecma_op_map_foreach (#2855)
This patch fixes #2852 and fixes #2853 as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-08 15:21:43 +02:00
Robert Fancsik eb993d57ed DataView object underlying ArrayBuffer should be marked during GC. (#2849)
This patch fixes #2848 and fixes #2850 as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-08 15:14:21 +02:00
László Langó 372ebd8260 Fixed linker issues of handle scope in jerry-ext on Windows platform. (#2862)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-05-08 11:42:02 +02:00
Dániel Bátyai 3ec6b68063 Clear top module context after local variables have been imported (#2859)
This fixes an assertion failure which was caused by incorrectly importing
the same variables multiple times.

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-05-06 17:35:33 +02:00
Mate Dabis 3823d2fc81 Fixed typo in parser (#2860)
JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
2019-05-06 12:57:14 +02:00
Daniella Barsony a2e7816485 Update README (#2844)
Removed Artik053 and updated the links to the measurement site.

JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-04-30 15:20:38 +02:00
Dániel Bátyai 1cdb3c6c56 Fix identifier handling inside export statements (#2843)
Fixes #2842

Co-authored-by: Marko Fabo <mfabo@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2019-04-30 10:53:48 +02:00
legendecas 097e1862d2 Set constructor to prototype for ES2015 Classes (#2818)
JerryScript-DCO-1.0-Signed-off-by: legendecas legendecas@gmail.com
2019-04-29 13:36:23 +02:00
Robert Fancsik 56b6d3a45d Class this binding must be bound to non-heritage contexts as well (#2829)
This patch fixes #2822.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-26 13:34:02 +02:00
Daniel Vince 37b7645e6a Rework ES2015 module system and add missing features. (#2792)
Co-authored-by: Dániel Bátyai <dbatyai@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
2019-04-25 14:57:17 +02:00
Robert Sipka 938e9c7530 [Debugger] Fixes the processing methods of incoming part messages (#2840)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2019-04-25 13:43:33 +02:00
László Langó 806b9f05c0 Fixed build failure caused by conversion warning with GCC-5.4 (#2839)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-04-25 10:27:52 +02:00
László Langó a6a7d8c7b8 Make the underlying buffer of the ArrayBuffer accessible. (#2836)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-04-24 16:03:56 +02:00
Akos Kiss c4ac67d4af Bump Zephyr target to 1.14.0 (#2837)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-04-24 14:47:58 +02:00
Philippe Coval d3234c2b8c Add STM32F7 support (#2838)
Some flags are not defined because,
they can be deduced from CPU type.

It was tested on NucleoF767ZI running current NuttX master branch.

Change-Id: I68c9787fe3003338228f47fbaf3e7a9522bcd6d5
Forwarded: https://github.com/pando-project/jerryscript/pull/2838
Relate-to: https://github.com/pando-project/libtuv/pull/136
JerryScript-DCO-1.0-Signed-off-by: Philippe Coval p.coval@samsung.com
2019-04-24 14:46:14 +02:00
Robert Fancsik 10d820165d Enable 32bit cpointers by default if the given heap size is greater than 512KB (#2833)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-24 14:41:07 +02:00
Robert Fancsik 6801871161 Super parse options should be cleared before setting it's value (#2831)
This patch fixes #2825.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-24 14:40:09 +02:00
Robert Fancsik 962d549be6 Non-object values should give early false result for instanceof operator (#2830)
This patch fixes #2823.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-24 14:39:04 +02:00
Robert Fancsik 760fc4fb95 Remove incorrect assertions from class construction instructions (#2827)
A class expression can be part of any kind of expression since the asserts for the stack position calculation were incorrect.
This patch fixes #2819.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-24 14:36:19 +02:00
jerry-weng 9d7a0db0dd Add missing jerry_release_value by calling jerry_set_property and jerry_set_property_by_index (#2821)
JerryScript-DCO-1.0-Signed-off-by: jerry-weng jjweng2007@gmail.com
2019-04-18 11:24:27 +02:00
László Langó 5be93dc7f7 Minor fixes of the documentation (#2834)
* Fixed wrong file name indexes in the docs folder.
 * Added description of the logging options into the getting started guide
 * Added missing files to the 'update-webpage.sh' script

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-04-18 10:16:45 +02:00
Robert Fancsik d2931c6e40 Rework Map object (#2760)
This patch reworks the core of the builtin Map object.

Advantages:
 - Provide sublinear access time for the elements via Lcache and property hashmap
 - This implementation is suitable for the builtin Set object as well

Also add the missing 'forEach' routine for the builtin object as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-17 14:50:03 +02:00
László Langó bc9efb07a5 Updated the API reference (#2828)
Fixed style issues, fixed inaccurate descriptions and added missing information.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-04-17 11:45:33 +02:00
Robert Fancsik 5c72d995e4 Implement DataView builtin (#2804)
New API functions:
 - jerry_create_dataview
 - jerry_value_is_dataview
 - jerry_get_dataview_buffer

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-16 08:26:39 +02:00
Robert Fancsik b3f4aa6816 Allow the JS objects to have more than one native pointer data (#2814)
Currently JS objects can only have one native pointer data which could be a limitation in special cases.
This patch allows to register multiple native infos, which can be accessed/associated with the corresponding `jerry_object_native_info_t`.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-16 07:50:49 +02:00
Robert Fancsik c818930cdc Use custom dispatcher for Global object's routines (#2794)
Binary size gain:
     - Intel: ~780B (gcc-7.3)
     - Arm: ~450B (arm-linux-gnueabi-gcc-7.3)

The change also contains the renovation of each builtin routine to use early return in case of error to make the code less complicated.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-16 07:48:04 +02:00
lidija-b e944cdaa8b Add endian set for default toolchain (#2808)
When default toolchain is used and architecture not listed in
"#if" in jerry-libm-internal.h on little endian around 90
test-suite tests, 4 unittests and 30 jerry-tests fails depending
on setup tested.
This change checks endians in case no toolchain is found and
sets __LITTLE_ENDIAN macro if it is little endian. This way
it will be set for any future arhitectures using little endian
and architecture that can have both big and little endian not
listed in jerry-libm-internal.h check.

JerryScript-DCO-1.0-Signed-off-by: Lidija Besker lidija.besker@rt-rk.com
2019-04-12 16:32:58 +02:00
Mate Dabis 09d8793e30 Increase branch coverage: Array.prototype functions (#2796)
Added new test cases to improve branch coverage in Array.prototype routines.

The following script is made for testing branch coverage with all the test suites (--jerry-test-suite --test262 --unittests --jerry-tests), or with only one .js file.

https://github.com/matedabis/jerryscript/blob/gcov_coverage_tester/tests/gcov-tests/gcovtester.py

While measuring the branch coverage we dont count JERRY_ASSERT s. The results are measured by running all the test scripts, with the modifications in the PRs.

Branch coverage including pando-project#2682 and pando-project#2674:
	-before: 399 / 476
	-after:  472 / 476

There are 28 functions in ecma-builtin-array-prototype.c, we hit 14 from them.
The other 14 functions are either already covered, or we could not improve the coverage of it.

More information about the coverage improvement and the branches not reached:
https://gist.github.com/matedabis/d7b9fc0690aa2f4be6aa160fdf482e0e

While improving the coverage we found an unnecessary condition check, which can not be false in any cases.

Co-authored-by: Csaba Repasi repasics@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
2019-04-12 14:00:44 +02:00
Robert Fancsik 48cec485e1 Identifiers should be stored in the lexical environment if argument object needs to be created (#2816)
This patch fixes #2699.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-12 13:48:02 +02:00
Péter Gál 40f7b1c27f Rework usages/naming of configuration macros [part 1] (#2793)
There are quite a few configuration macros in the project.
As discussed in the #2520 issue there are a few awkward constructs.

Main changes:

* Renamed all CONFIG_DISABLE_<name>_BUILTIN macro to JERRY_BUILTIN_<name> format.
* The special JERRY_BUILTINS macro specifies the basic config for all es5.1 builtins.
* Renamed all CONFIG_DISABLE_ES2015_<name> to JERRY_ES2015_<name> format.
* The special JERRY_ES2015 macro specifies the basic config for all es2015 builtins.
* Renamed UNICODE_CASE_CONVERSION to JERRY_UNICODE_CASE_CONVERSION.
* Renamed ENABLE_REGEXP_STRICT_MODE to JERRY_REGEXP_STRICT_MODE.
* All options (in this change) can have a value of 0 or 1.
* Renamed ENABLE_REGEXP_STRICT_MODE to JERRY_REGEXP_STRICT_MODE.
  JERRY_REGEXP_STRICT_MODE is set to 0 by default.
* Reworked CONFIG_ECMA_NUMBER_TYPE macro to JERRY_NUMBER_TYPE_FLOAT64 name and now
  it uses the value 1 for 64 bit floating point numbers and 0 for 32 bit floating point
  number.
  By default the 64-bit floating point number mode is enabled.
* All new JERRY_ defines can be used wit the `#if ENABLED (JERRY_...)` construct to
  test if the feature is enabled or not.
* Added/replaced a few config.h includes to correctly propagate the macro values.
* Added sanity checks for each macro to avoid incorrectly set values.
* Updated profile documentation.
* The CMake feature names are not updated at this point.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-04-09 10:14:46 +02:00
Daniella Barsony 722d092528 Add missing port functions for artik053 target (#2811)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2019-04-03 11:20:57 +02:00
László Langó 89cf1a988c Run test262 test suite in both release and debug mode on Travis CI. (#2810)
The CI ran test262 test suite in release mode only to save time.
This patch enables the debug testing on the test suite, which means
the runtime of the "Conformance Tests" job will increase by a few
minutes.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-04-02 20:26:21 +02:00
Robert Fancsik 4b9fee1ba0 Fix typo in the API documentation (#2809)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-04-02 10:13:41 +02:00
Péter Gál 3f6599c358 Add a "single" source/header file generation and build mode (#2790)
Introduce a new way of building: before any file is compiled
all source files are combined into a single C file and all
header files into a single H file (per subdir).

This new approach makes it possible to quickly integrate JerryScript
into other projects:

```
$ gcc -o demo demo.c jerryscript.c jerryscript-port-default.c -lm
```

To use the source generator run:
```
$ cmake -Bbuild_dir -H. -DENABLE_ALL_IN_ONE_SOURCE=ON
$ make -C build_dir generate-single-source
```

This will create the following files in the `build_dir`:
* jerryscript.c
* jerryscript.h
* jerryscript-config.h
* jerryscript-port-default.c
* jerryscript-port-default.h

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-04-01 11:06:13 +02:00
Robert Fancsik e063b8af80 Fix bound functions with no arguments after #2801 (#2805)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-29 12:13:27 +01:00
László Langó 4a67f131bb Fixed typo in README.md of particle target. (#2806)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-03-29 12:09:25 +01:00
Robert Fancsik f23c746b45 Merge external direct magic strings into direct magic strings (#2766)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-29 09:38:54 +01:00
László Langó 6efdb283aa Fixed 'jerry_get_object_keys' API function. (#2807)
'jerry_get_object_keys' always gave back an empty array.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-03-28 19:02:44 +01:00
legendecas 5b29bf6288 Implement handle scope API in jerry-ext (#2753)
JerryScript-DCO-1.0-Signed-off-by: legendecas legendecas@gmail.com
2019-03-27 14:49:59 +01:00
legendecas 772ab277ea Fixes assertion on calling String builtin with symbol (#2803)
JerryScript-DCO-1.0-Signed-off-by: legendecas legendecas@gmail.com
2019-03-26 16:14:04 +01:00
Robert Sipka 3d656cdf57 [Debugger] Implementation of transport over serial connection (#2800)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2019-03-26 09:39:51 +01:00
Robert Fancsik 0981985134 Remove outer loop from ecma_op_function_call (#2801)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-25 15:11:06 +01:00
Akos Kiss 61a79af8c1 Bump RIOT OS target to 2019.01 (#2786)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-03-22 09:46:19 +01:00
Robert Fancsik 7b23ecc272 Merge base resolve + get/put operations for lexical environments to increase performance (#2798)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-03-21 09:45:56 +01:00
Daniel Vince 4123f35a3b Part I: Implement ES2015 module system. (#2599)
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
2019-03-18 16:22:06 +01:00
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
Akos Kiss 7934117625 Bump Mbed target to Mbed OS 5.11.1 (#2695)
The git hash mbed-os.lib was pointing to marked Mbed OS 5.5.5 and
was more than a year old and more than 10.000 commits behind latest
mbed-os master.

This commit forwards the reference to the latest Mbed OS release
(5.11.1).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-17 10:38:02 +01:00
Daniel Vince 243f2ffcad Style fix in the lexer.h (#2705)
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
2019-01-17 07:50:05 +01:00
Robert Fancsik 86e60ddf8d Fix inner classes in class heritage environment (#2686)
This patch is the proper fix for #2667, since #2269 did not fix the problem entirely.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-16 14:36:54 +01:00
t-harvey cfdb5eddb3 Added the _restore function to "unpop" the argument stack. (#2592)
Added a unit test for the jerryx_arg_js_iterator_restore function.
Added the specification to the documentation.

JerryScript-DCO-1.0-Signed-off-by: Timothy Harvey t-harvey@ti.com
2019-01-16 11:43:36 +01:00
Robert Fancsik 7e3d688e5b Implement the Symbol builtin object (#2601)
This patch contains the base functionalities that the new builtin object requires.

Currently unavailable:
 - print (Symbol('foo')) - this features requires the refactor of the print handler function
 - Several global symbol based builtin routines (follow up patch)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-16 10:09:23 +01:00
Akos Kiss 08c7183ef8 Update slug, org, and project key info for the SonarCloud service (#2690)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-16 16:24:12 +09:00
Kristof Kosztyo 325c426c1e Fix api example in the documentation (#2703)
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkristof@inf.u-szeged.hu
2019-01-15 20:21:58 +01:00
Robert Fancsik d716f900e1 Fix getting array length in ecma_builtin_promise_do_{race, all} (#2702)
This patch fixes #2700.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-15 17:31:59 +01:00
Robert Fancsik b4df594d3e Normalize routine's arguments before dispatch (#2687)
Binary size gain:
 - Intel: ~860B (gcc-7.3)
 - Arm: ~660B (arm-linux-gnueabi-gcc-7.3)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-15 16:45:16 +01:00
Akos Kiss a9c3ddff1f Bump NuttX RTOS target to 7.27 (#2696)
Both documentation and travis makefile were referring to NuttX 7.22,
which was released in Sep 2017. This commit bumps the version to the
latest release (7.27, from Nov 2018).

Additionally, it also sets the stlink tool to a fixed (and tagged)
version.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-15 14:02:55 +01:00
Robert Fancsik c305d70b11 Fix "arguments" and "eval" parsing (#2661)
This patch fixes #2656 and fixes #2659 as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-15 13:29:56 +01:00
Peter Marki 98aa08e33c Add subdir-level gitignore to the nuttx target directory (#2635)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2019-01-15 11:16:53 +01:00
Robert Fancsik ee267e8aa9 Add missing ecma_deref_ecma_string in ecma_builtin_typedarray_prototype_join (#2701)
This patch fixes #2698.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-15 09:01:33 +01:00
Akos Kiss 9ced3addaa Bump ESP8266 target to SDK v2.1.0 (#2697)
Until now, the ESP8266 target used a non-tagged git hash revision
of the RTOS SDK (from Oct 2017). Moreover, the compiler was also a
custom-built gcc.

This commit sets the RTOS SDK version to v2.1.0, released Oct 2018,
which is the latest old-style SDK for ESP. The commit also changes
the used gcc to an Espressif-provided pre-built toolchain, which is
tagged for the (latest) v3.0.1 SDK release.

(The SDK bump is not to the latest SDK version because the new
v3.x line of the SDK is "ESP-IDF style", which is incompatible with
the current target code base. On the other hand, the toolchain
comes from the latest SDK release because the v2.x line had no
pre-built toolchain suggestions -- but it builds v2.x sources
correctly.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-15 08:35:39 +01:00
Robert Fancsik f02de7a31f Add missing error check in ecma_builtin_promise_do_all (#2694)
This patch fixes #2693.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-14 23:46:01 +01:00
Robert Fancsik 2c031c1220 Implement Object.assign routine (#2678)
Related part of the standard: ECMA-262 v6, 19.1.2.1

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-14 15:04:00 +01:00
Akos Kiss 52fdf4ef3f Travis CI config maintenance (#2683)
- `sudo: false` has been deprecated.
- `install` step is skipped by default for C projects, so there is
  no need setting it explicitly.
- Homebrew addon can be used to install dependencies for OSX jobs
  (and, by experience, it is a lot faster than manually invoking
  brew).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-14 14:45:36 +01:00
Akos Kiss adb80c2045 Update links in docs (#2691)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-11 18:57:30 +09:00
Robert Fancsik 93ec226650 Extract binary lvalue operators (#2630)
This patch substitutes all binary lvalue operators with an assigment + the corresponding binary operator.
E.g. A += (expression) is pasred as A = A + (expression).

Due to this replacement, all the related binary lvalue CBC opcodes can be removed.
Also the arithmetic related VM instructions can put their result directly onto the stack, since no more checking is needed.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-10 08:47:45 +01:00
Robert Fancsik e8502fa8cc Fix class extends value (#2662)
This patch fixes #2658 and ensures that when a class extends value is null and the class has no explicit constructor
the proper error is raised during constructing a class instance.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-09 14:27:50 +01:00
Daniel Balla 3ee771655f Fix JerryScript build with clang-6.0 (#2610)
This patch fixes the following error with Clang-6.0

```
jerryscript/jerry-core/api/jerry.c:1527:71: error: implicit conversion loses integer precision:
      'jerry_regexp_flags_t' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wconversion]
  jerry_value_t ret_val = ecma_op_create_regexp_object (ecma_pattern, flags);
```

Also change the `jerry_create_regexp` and `jerry_create_regexp_sz` functions' `flags` parameter to `uint16_t` since the values created with `bitwise inclusive OR` are not part of the enum.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-01-09 09:22:47 +01:00
Robert Fancsik 99b968de3c Reduce the memory footprint of 'ecma_instantiate_builtin' (#2646)
This patch introduces a new builtin descriptor table to substitute the generated switch-case structure in 'ecma_instantiate_builtin',
also removes the corresponding helpers functions to simplify the instantiation process.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-09 09:04:21 +01:00
Zsolt Borbély 0c20f8e701 Fix broken links in README (#2679)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2019-01-08 09:59:27 +01:00
Akos Kiss e5fc13f6db Build test disabled jerry-libm (#2681)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-08 09:57:51 +01:00
Robert Fancsik ef2c3b46d7 Fix super property reference parsing (#2672)
`PARSER_CLASS_SUPER_PROP_REFERENCE` flag should be applied for only binary lvalue tokens.
This patch fixed #2671.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-08 09:33:26 +01:00
László Langó 7b48be81c3 Fixed assertion in RegExp built-in. (#2663)
Fixes #2660

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-01-08 09:04:58 +01:00
László Langó 2f8c0a168f Removed ECMA_TRY_CATCH macros from RegExp built-in (#2642)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2019-01-04 15:12:03 +01:00
Akos Kiss f2404ac0e1 Simplify the collection of sources in cmake files (#2673)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-04 08:59:15 +01:00
Robert Fancsik af91072f44 Ensure that ecma_builtin_json_str_helper uses [[DefineOwnProperty]] internal method (#2665)
This patch fixes #2652 and fixes #2653 as well, also reverts #2521.
Related part of the standard ECMAScript v5.1 15.12.3.10.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-03 15:30:22 +01:00
Akos Kiss 1f204de150 Maintenance of fatal code enum (#2670)
- `ERR_SYSCALL` is a legacy that has not been used anymore since
  the removal of jerry-libc. This commit removes it from the port
  API.
- `ERR_DISABLED_BYTE_CODE` is a (relatively) recent addition to the
  fatal code enum. At the time it was added, the documentation has
  not been updated. This commit adds the missing documentation.
  (Plus, it removes a superfluous `JERRY_UNREACHABLE` from after a
  `jerry_fatal (ERR_DISABLED_BYTE_CODE)`.)

Note: As the port API is modified, this is an API-breaking change.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-03 15:27:09 +01:00
Robert Fancsik b80935ba92 Fix ecma_op_resolve_reference_base for super object bound lexical environments (#2668)
All ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND type lexical environments should return their outer reference during resolving syntactic reference.
This patch fixes #2666.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-03 13:37:01 +01:00
Robert Fancsik 1068b07cbe Ensure that inner classes do not inherit the parent's class HAS_SUPER flag. (#2669)
This patch fixes #2667.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-03 13:36:37 +01:00
Robert Fancsik b69f3fd0ff Add missing error check after vm_op_get_value (#2655)
This patch fixes #2654.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-01-02 12:56:02 +01:00
Akos Kiss aae50c9da0 Simplify version key in AppVeyor configuration (#2650)
The format `1.0.{build}` is artificial, the 1.0 prefix has no
meaning, `{build}` is enough.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-01-02 10:11:02 +01:00
Robert Fancsik ec142f5ff6 Fix the Map builtin name property (#2648)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-12-19 13:00:54 +01:00
Akos Kiss ae91800e4b Ensure fresh Python 2.7 on Trusty and compatible Intervaltree (#2645)
Recent failures of the Mbed OS target came from two independent
issues:
- some python packages started requiring Python>=2.7.10, and
- the latest Intervaltree 3.0.0 release was released broken.

This patch ensures a fresh python by 'lying' to the CI that this
is a Python project (Python images on the CI come with a recent
interpreter, not with the one shipped as default with the OS), and
locks Intervaltree to a stable version.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-12-17 16:15:14 +01:00
Daniel Balla a1595fa23a Fix possible failure in backtrace info (#2643)
Make sure to ignore static snapshots when sending backtrace information to the debugger.
The `JMEM_SET_NON_NULL_POINTER` macro requires the frame context's `bytecode_header_p` pointer to be a heap pointer, but due to the static snapshot it might not be, causing an assertion failure.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-12-17 00:17:11 +01:00
Akos Kiss 5779a5b8a8 Fix MbedOS build (#2644)
Since recently, the newly released mbed-host-tests 1.4.4 gets
installed during the python requirement installation step. That
package requires pyocd>=0.14.0, which cannot be satisfied for
whatever reason. This quick fix pins mbed-host-tests to version
1.4.2, which does not have unsatisfiable requirements.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-12-14 18:08:32 +01:00
Akos Kiss 8ed5078e96 Rewrite debugger test runner to use portable redirect-and-append notation (#2641)
The test runner used `&>>` to channel stderr to stdout and append
all that to a file. However, that's Bash 4 syntax, which is not
available everywhere, e.g., on MacOS. Bash pre-4 syntax requires
the classic `>>file 2>&1` notation.

This commit rewrites the test runner to use the portable syntax.
Moreover, it also rewrites `&>` to `>file 2>&1` for the sake of
consistency.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-12-14 12:54:46 +01:00
László Langó 9b24bde4c6 Fixed connection lost of debugging sessions. (#2636)
The peek of the socket does not work on other platforms,
beacause the errno is not set correctly. The code path
added by #2427 Linux specific, so it has been guarded
to solve connection lost issues during debugging sessions
when the client does not send data but still connected.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-12-12 15:41:42 +01:00
Robert Sipka 93e71150fe Update the storage locations of the status badges (#2639)
The name of the database has been changed to jsremote-testrunner from remote-testrunner

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-12-12 13:43:26 +01:00
Zoltan Herczeg 83ee9cfca3 Fix named function expression creation. (#2634)
Create a local lexical environment with the name of the function. While
this is not too memory efficient, some corner cases requires its existence.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-12-12 12:50:03 +01:00
Robert Fancsik 4f0b075f85 Implement ES2015 {Array, %TypedArray%}.prototype.find routine (#2631)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-12-12 10:13:05 +01:00
Daniel Balla c6a2fd5d3d Fix an issue while debugging with static snapshots (#2606)
The issue was found when debugging IoT.js with static snapshots turned on, if an error was thrown an assertion failure was caused. The reason is the frame context's bytecode_header_p pointer was not a heap pointer. The jerry_debugger_breakpoint_hit function tries to set a compressed pointer which points to bytecode_header_p with the JMEM_CP_SET_NON_NULL_POINTER macro, which has an assertion that requires the above mentioned bytecode_header_p to be a heap pointer, which is obviously not.


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-12-11 18:51:00 +01:00
Robert Fancsik 101f62ce9d Improve the vm_loop suspending for exec operations (#2589)
Exec operations{call, construct, super_call} related bytecode sequences no longer executed twice.
The execution continues with the next opcode or a specific bytecode sequence if an error occurs during the operation.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-12-06 15:36:26 +01:00
Robert Fancsik 79b2df124e Separate VM_OC_PROP_GET to a single operation in vm_loop (#2607)
VM_OC_PROP_GET is the general vm instruction for getting an object's property.
This opcode can be mutated into several other opcodes depending on the context (pre- post increment, ident reference).
Since these mutated opcodes perform additional checks and VM_OC_PROP_GET is a highly frequent instruction and it is worth to introduce a special case for it.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-12-06 14:31:30 +01:00
Roland Takacs 3f9dd0f1f9 Use Thumb instructions on TizenRT. (#2629)
In order to decrease the binary size of JerryScript, enabled the Thumb
instruction set that is supported on ARM Cortex-R series processors.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-12-02 09:56:27 +01:00
Zoltan Herczeg bc1b13dcb6 Fix floating number parsing. (#2628)
This patches fixes floating point number parsing when the number starts with dot.

Fixes #2614.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-12-01 17:22:39 +01:00
László Langó a08291eb12 Unify the usage of boolean value creations. (#2623)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-11-30 11:33:30 +01:00
Robert Fancsik 6dfa4efbfb Remove unnecessary check from VM_OC_NOT (#2622)
This patch removes the ECMA_IS_VALUE_ERROR check from VM_OC_NOT, since the general toBoolean operation cannot throw an exception.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-30 07:45:48 +01:00
Robert Fancsik 24817b27f9 Optimize property call opcodes (#2609)
In with contexts the object base value must be resolved before executing a call operation.
Since this happens rarely the base resolving code paths has been seperated to an other VM opcode
so these extra checks do not burden the general property call steps.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-29 09:00:22 +01:00
Robert Fancsik e11c499b4b Reduce ecma_{ref, deref}_object calls while using ecma_builtin_get (#2616)
The following stucture was highly frequented in the code base:

 - Get a builtin object // This operation increases the reference count of the object
 - Use it for create a new object
 - Deref the builtin object

After a builtin has been instantiated there is always at least one reference to "keep it alive",
so increase/decrease the reference count for getting the value only is unnecessary.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-28 20:23:21 +01:00
Tóth Béla 8410570dd9 Seperate tests from test-api.c - Property (#2596)
Seperate the property based test from the `test-api.c` file.

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-11-28 13:13:24 +01:00
Roland Takacs 5151f9161f Use logical operators for bool converions. (#2620)
The explicit boolean type conversion (introduced by #2575) desn't work
with TizenRT if custom boolean representation is used. Of course,
TizenRT gives an opportunity to use the C99 standard boolean (that works
well if that is set).

I've replaced all the explicit boolean type conversions with double
negations that helps to work JerryScript well with custom boolean types.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-11-28 11:35:12 +01:00
Akos Kiss 17178ec185 Make CONFIG_ECMA_LCACHE_DISABLE and CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE build-tested (#2615)
Because these feature guards don't have their counterpart options in cmake, they
seem to be less tested. This commit makes them build-tested at least.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-11-28 09:40:54 +01:00
Csaba Repasi 5533b8ba9b Add new tests (#2578)
Added tests/jerry/unusual.js to test corner cases
Added tests/jerry-test-suite/11/11.08/11.08.06/11.08.06-008.js (a new test of instanceof)
Added new floatingpoint test case to tests/jerry/arithmetics-2.js
Added new test case to tests/jerry/arithmetics-bignums.js

JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2018-11-22 10:10:37 +01:00
Zoltan Herczeg a0a6eaaee8 Support identifier references for object initializers. (#2597)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-11-22 10:07:11 +01:00
Daniel Balla 3d33d3258a Rename a regression test to match the issue number (#2613)
There was a typo in a regression test name, referencing to a different pull request rather than the issue it fixes.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-11-22 02:24:48 +01:00
Robert Fancsik 8e28316b1a Fix a typo in Object.getOwnPropertyNames test (#2612)
With the change the test file truly checks the corresponding part of the standard (ECMAScript v5, 15.2.3.4.1).

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-22 02:08:06 +01:00
Daniel Balla f9e21540d6 Typo fixes related to jerry_json_stringify (#2611)
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-11-22 02:05:34 +01:00
Renáta Hodován c87aa83b0d Skip -m32 build-test on non-Linux non-x86 platforms (#2558)
The `-m32/64` compiler flags are x86/64-specific (mostly; at least in the
context of JerryScript-supported architectures) and macOS has deprecated 32-bit
support, so it's better to keep the build-testing of `-m32` to x86[-64]/Linux
only.

JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
2018-11-21 20:15:45 +01:00
Marko Fabo 22b08518c7 target: mbedos5: Modify generate_pins.py (#2524)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2018-11-20 14:53:19 +01:00
Robert Fancsik 49a0836daa Add missing ecma_free_value in ecma_builtin_promise_do_all (#2604)
This patch fixes #2602 and fixes #2603 as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-20 14:40:34 +01:00
Daniel Balla 704eb45cb8 [API] Add RegExp C API (#2542)
This patch supports creating a RegExp object through the C API.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-11-19 13:18:00 +01:00
Robert Sipka 47fa5904b1 Improve the evaluate requests (#2583)
Currently it evaluates the given expression in the context of the top most stack frame.
The expression should access to any variables and arguments that are in the scope chain.
Implement the eval_at request with the level of the scope chain as a further argument.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-11-15 15:53:10 +01:00
Robert Sipka 6c4b316609 [Debugger] Modify the object representation in case of variables request. (#2594)
Return with the object`s toString() method instead of create a json formated string from it.
It could have led to an error in previous cases (an object contains itself etc.)

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-11-15 14:13:49 +01:00
Robert Fancsik 9535a230ba Reduce the argument count of ecma_op_object_get_property_names (#2598)
Introduce ECMA_LIST_ARRAY_INDICES[_ENUMBERABLE[_PROTOTYPE]] flags instead of passing 3 boolean arguments.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-15 13:40:44 +01:00
Ádám Kallai ba8e144f7b docs: Fix jerry_get_property API example (#2590)
The first paramter of the function should be 'global_object' instead of obj_val
in this case.

JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
2018-11-13 13:30:59 +01:00
Ádám Kallai 8219595c2d targets: Speculative workaround for Zephry Travis CI (#2595)
The latest version of Pyocd does not install on Linux,
in Zephry master branch the version was locked to 0.12.0 in requirements.txt.
It's temporary workaround to fix Travis CI for Zephry v1.13.0.

JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
2018-11-13 13:15:05 +01:00
Robert Fancsik ecf385888f Disable class Array/%TypedArray%.prototype.{slice, map, concat, filter, splice} related tests (#2588)
This patch fixes #2587.
The reason of disabling these tests is that the current implementation slightly differs from the related part of the standard (ECMA-262 v6, 9.4.2.3.6.d.1).
This part requires the hidden Symbol.@@species property, hence this functionality has not been implemented yet in the project.
Also add the related test case to prevent further errors.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-09 09:42:16 +01:00
Robert Fancsik 1fc369e493 Use binary search for keyword checking (#2584)
This patch improves keyword searching during identifier parsing.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-08 10:24:53 +01:00
László Langó 7f17210d98 Added missing include for debugger build. (#2586)
In certain platforms the explicit include of 'sys/socket.h' is needed,
e.g.: TizenRT.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-11-06 18:15:27 +01:00
Robert Fancsik 3faec79071 Reduce ecma_builtin_helper_def_prop arguments (#2585)
This patch uses the ECMA_PROPERTY_CONFIGURABLE[_ENUMERABLE_[WRITABLE]] marco to pass the options instead of using 3 boolean arguments for it.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-11-06 18:13:38 +01:00
matedabis 74d474248d Enable the already fixed test cases (#2570)
Enable already fixed asserts

JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
2018-10-31 09:53:21 +01:00
repasics 3c1d0e6100 Enable test cases (#2566)
Enable previously disabled test cases in math-pow.js. Everything works as expected.

JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2018-10-30 15:25:54 +01:00
Tóth Béla 63e8287f2b Seperate tests from test-api.c - Strings (#2564)
`test-api.c` is contains testing for all API functions. This file is too big and hard to read. This patch moves the strings and string methods into a separate test file.

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-10-30 11:42:54 +01:00
Zoltan Herczeg 83fc0aa04f Add support for function argument initializers. (#2571)
EcmaScript 2015 14.1.

Note: arrow functions with default arguments are not supported yet.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-10-30 10:48:35 +01:00
Akos Kiss aeddb1cd88 Get rid of ? true : false (#2575)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-10-29 14:51:59 +01:00
Robert Sipka 34c5e229ee List scope chain levels and their variables to the selected stack frame. (#2557)
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-10-29 14:33:31 +01:00
Akos Kiss 7120b8ec02 Improve .travis.yml (#2577)
- Use builtin support of Travis CI for job names instead of using
  a custom environment variable for the same purpose.
- Use `skip` in `script` and `install` steps instead of `true`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-10-29 13:37:19 +01:00
Zoltan Herczeg 93567fbb8f Support methods for object initializers. (#2567)
MethodDefinition in ES-2015 12.2.6.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-10-26 23:47:08 +02:00
Roland Takacs ffbd6e6c5c Fix type conversion errors in case of TizenRT. (#2572)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-10-26 14:21:00 +02:00
Robert Fancsik d1860d0e34 Implement ES2015 class feature (part II.) (#2439)
This patch is the second milestone of the implementation of this new language element.

Supported:
 - Single class inheritance
 - Functionality of 'super' keyword
 - Implicit constructor in class heritage
 - Specific behaviour while extending with the built-in 'Array' or '%TypedArray%' object
 - Abstract subclasses (Mix-ins)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-10-25 16:00:48 +02:00
Zoltan Herczeg e0e6363f85 Fix object initializer prescanning issues. (#2563)
This patch fixes incorrect syntax errors reported by the prescanner for
ES5.1 getter/setter property initializers and ES2015 computed properties.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-10-19 13:49:41 +02:00
Tóth Béla f8f691deb1 Move version numbers to public headers (#2556)
JERRY_SNAPSHOT_VERSION and JERRY_DEBUGGER_VERSION were moved into public headers, to grant access to them.

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-10-19 11:49:53 +02:00
Zoltan Herczeg 5060579b90 Fix double literal free. (#2535)
Fixes #2531.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-10-18 01:17:53 +02:00
crazy2be 3afc4b0b85 Change jerry_port interface to allow for a correct implementation of timezones. (#2540)
The previous jerry_port interface did not allow timezones to be handled correctly,
even if the host system was up to the task. This PR changes the jerry_port interface
to allow a completely correct implementation to exist, and provides one (for Linux/BSD
systems) in default-date.c.

Fixes #1661

JerryScript-DCO-1.0-Signed-off-by: crazy2be crazy1be@gmail.com
2018-10-18 00:58:18 +02:00
crazy2be 9ab33e86d3 Add some progress printing to the test262 tests (#2559)
Previously, these would run for several minutes without printing
any progress. Now, at least print the number of tests executed.

JerryScript-DCO-1.0-Signed-off-by: crazy2be crazy1be@gmail.com
2018-10-15 08:22:29 +02:00
Akos Kiss afe2a80431 Ensure that tests are always executed in a proper time zone (#2551)
The America/Los_Angeles time zone is already enforced for test262
Travis CI jobs but that doesn't guarantee the correctness of
locally executed tests. So, this patch moves the setting of the
`TZ` environment variable from `.travis.yml` to `run-tests.py`.

The date-related tests in the jerry test suite also rely on a time
zone (UTC). Thus, `TZ` is forced for those tests, too.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-10-09 11:43:07 +02:00
Akos Kiss 1393e9c3da Remove the support for "N*.js"-named disabled tests (#2553)
The only such test was a legacy of the long removed compact
profile, which is also removed.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-10-08 13:48:39 +02:00
Akos Kiss a9c6364bce Fix mismatch in context getter/setter names of default port (#2554)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-10-08 13:48:23 +02:00
Akos Kiss 4a0dd587fc Fix documentation of jerryx_handler_assert (#2555)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-10-08 13:48:09 +02:00
Roland Takacs 1302887498 Remove the JERRY_SNAPSHOT_FOUR_BYTE_CPOINTER snapshot flag. (#2550)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-10-05 09:55:37 +02:00
Zoltan Herczeg d5a635a54a Fix use after free during creation of Promise reactions. (#2532)
The ecma_enqueue_promise_reaction_job() function allocates memory,
which might trigger a GC run. During this GC the objects in the
reactions collection are not marked.

Fixes #2486.
Fixes #2506.
Fixes #2541.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-10-05 08:08:41 +02:00
Zsolt Borbély 48810a9d88 Add missing doc to webpage generator script (#2548)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2018-10-04 10:59:30 +02:00
Zoltan Herczeg a8399f4416 Rework op_construct. (#2547)
The new form should be more suitable for classes.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-10-03 11:52:01 +02:00
Robert Fancsik abf22597e5 Add missing error check in ecma_builtin_promise_do_race (#2546)
Fixes #2544.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-10-03 11:39:43 +02:00
Daniel Vince e12d015bd2 Fix typo in the byte code documentation. (#2545)
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
2018-10-01 12:19:42 +02:00
Daniel Balla 7717d2ee27 Change Promise properties to internal properties (#2526)
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-24 13:49:41 +02:00
László Langó d08b46d15a Fix '--skip-list' argument of the test runner script. (#2536)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-24 13:17:04 +02:00
Daniel Balla 0523278a98 Fix not checking errno after calling recv() (#2538)
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-24 09:21:35 +02:00
Zoltan Herczeg 35fbcd1ffd Increase the debugger version field size from 1 byte to 4 byte (#2513)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-20 09:33:56 +02:00
László Langó df69e1e08b Add more consts to external magic strings to get data moved from .data to .rodata. (#2534)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-09-20 09:17:58 +02:00
László Langó 81810d58f8 Fix memory leak in the snapshot creation. (#2533)
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-19 20:47:16 +02:00
Akos Kiss cfa7cfc08c Add soft assert handler to jerry-ext (#2516)
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-18 14:42:28 +02:00
Robert Fancsik 685d8b3675 Fix JERRY_CONTEXT (error_value) handling during 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-17 18:27:00 +02:00
Akos Kiss b97f5ffca0 Send print output to debugger client from the port implementation (#2515)
... 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-17 18:17:16 +02:00
Zoltan Herczeg 3031a11f86 Fix LCache invalidation issue for native properties during GC. (#2530)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-17 17:31:50 +02:00
Robert Fancsik 6c21c08b0e Fix ecma_op_function_list_lazy_property_names in case of arrow function (#2529)
Fixes #2528.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-09-17 13:31:17 +02:00
Akos Kiss 3d3a8008a8 Don't use strlen for string literals (#2517)
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-17 10:07:24 +02:00
Tóth Béla 2d83d8ed17 Fix check-magic-strings.sh to return with non-zero if error happens (#2525)
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-14 13:37:48 +02:00
Peter Marki 0d05dfcd68 Remove bad assertion in ecma_builtin_json_str_helper (#2521)
Fixes #2494

JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-09-14 12:04:47 +02:00
Tóth Béla 08e4a95394 Update regular expressions in gen-magic-strings.py (#2527)
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-14 08:22:35 +02:00
Akos Kiss f114f83720 Remove the JERRY_GET_CURRENT_CONTEXT macro (#2512)
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-13 14:18:47 +02:00
Akos Kiss 4ec607a58b Remove leading space from before #ifs (#2523)
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-12 15:00:05 +02:00
Paul Sokolovsky 5472aff0dc targets: zephyr: Update for Zephyr 1.13 and SDK 0.9.3 (#2497)
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-11 15:13:07 +02:00
Akos Kiss 7825e4756a Properly guard off LCache-related functionality (#2511)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-10 13:27:39 +02:00
Daniel Balla 8f64339e5f Fix ecma_op_object_put return value not being handled (#2514)
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-06 21:05:37 +02:00
László Langó 99c9a22b78 Improve API of literal save and the snapshot (command line) tool (#2507)
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-06 13:45:15 +02:00
Akos Kiss 054717fd29 Promote dynamic memory management from debugger transport to core API (#2503)
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-04 16:31:26 +02:00
Zoltan Herczeg 0a40f55e5f Introducing internal properties. (#2485)
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-04 15:43:35 +02:00
Akos Kiss 30b7a72344 Merge instance into context (#2501)
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-04 13:56:49 +02:00
Zoltan Herczeg d3d42f7685 Implement the core of the map object. (#2447)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-09-04 13:30:00 +02:00
Daniel Balla 65e81f3262 Fix UTF8 string length calculation (#2508)
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-04 10:47:28 +02:00
Akos Kiss b934dd8308 Fixup JMEM_HEAP_STAT_xxx definitions (#2509)
- 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-04 10:24:24 +02:00
Daniella Barsony 9ea9061aa2 Fix run-test-suite (#2505)
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-04 10:23:59 +02:00
László Langó 8547380d46 Fix constantness of 'jerry_merge_snapshots' function. (#2504)
'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-03 14:00:07 +02:00
Zoltan Herczeg 2ad883ea48 Fix logging issues in the debugger. (#2483)
- 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-03 11:14:57 +02:00
Akos Kiss d270f82ecb Clean up memory statistics printing functions (#2502)
- 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-09-03 09:21:21 +02:00
Daniel Balla f5757e4c91 Fix ecma_builtin_promise_race_or_all function (#2491)
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-31 16:45:32 +02:00
Akos Kiss c3b6bfe8b6 Reorganize heap context related elements (#2500)
- 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-31 14:58:11 +02:00
Akos Kiss 6049c0378d Merge lcache into context (#2498)
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-31 13:10:37 +02:00
Akos Kiss a2645601ae Remove character pointer typedefs (#2492)
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-30 09:33:05 +02:00
László Langó df1893042d Added missing documentation of JerryScript instances to the API reference. (#2482)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-08-30 09:25:11 +02:00
Zoltan Herczeg 7d41d38e3c Remove deprecated native handle support. (#2496)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-29 12:51:37 +02:00
Akos Kiss b4dc6b0cbe Change jerry_debugger_send_{output,log} to take const jerry_char_t * (#2495)
... 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-29 15:53:11 +09:00
Akos Kiss fa5c361774 Move the 'init/fini arrays' build option to jerry-ext (#2493)
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-29 08:39:59 +02:00
Zoltan Herczeg 25f1718d84 Move some internal functions into JerryDebugger. (#2484)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-28 23:56:57 +02:00
Zoltan Herczeg bd42403600 Implement computed properties for object literals. (#2481)
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-28 15:28:16 +02:00
Zoltan Herczeg 300e40ba9d Improve python debugger client. (#2441)
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-22 17:34:32 +02:00
Anthony Calandra b2cf7eb659 Add %TypedArray%.prototype.sort([ compareFunction ]) support. (#2437)
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-08-22 08:49:12 +02:00
Akos Kiss 6e94414f9c Align the RIOT target with the clang build of RIOT OS (#2477)
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-21 10:46:45 +02:00
Akos Kiss f6ccdbdddd Doctest debugger examples and fix revealed issues (#2475)
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-21 09:42:56 +02:00
Akos Kiss 7639e613a4 Remove jerry-libc (#2332)
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-21 09:26:53 +02:00
Martine Lenders 851f4f0b89 Fix LLVM/clang conversion errors (#2473)
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-21 08:22:57 +02:00
Robert Fancsik 505dace719 Add a validation before evaluating the source code (#2480)
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-21 13:53:56 +09:00
Marc Jessome cffeaba2a6 Fix syntax error when closing a block after a return statement (#2479)
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
2018-08-21 13:51:40 +09:00
Zoltan Herczeg 767dd68ce1 Change literal status flags to enum. (#2474)
Also fix a white space typo.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-18 08:06:37 +02:00
Akos Kiss 4e58ccf680 Update debugger documentation (#2471)
The documentation has not been updated when the HTML client got
removed nor when the new transport layer replaced the previous
debug server initialization process.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-16 07:59:12 +09:00
Akos Kiss b52fff1f9d Distinguish between public and private headers in jerry-core (#2472)
The patch also ensures that all components access only the public
headers of other components (except for unit tests, which are
allowed to use private headers, too).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-16 07:55:38 +09:00
Akos Kiss a3112ab901 Split string-sending debugger API into output- and log-sending functions (#2461)
This helps to avoid the use of non-public headers and
protocol-internal constants in external code (e.g., in jerry-port
and jerry-ext).

The patch also cleans up the necessary includes in jerry-core public
headers, and the include order in jerry-port/default public headers.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-14 16:29:06 +09:00
Akos Kiss b9aa0da402 Fix unpacking mismatch in run-tests.py (#2466)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-14 08:25:13 +02:00
Akos Kiss 990b5d24dd Fix include directories of jerry-ext (#2464)
The distinction between public and private include directories was
not maintained and the install paths got confusing.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-13 13:02:10 +09:00
Akos Kiss b31e43075a Add explicit casts to enum-to-integer conversions (#2467)
Clang 6 is more picky about implicit conversions and complains
about loss of presicion and/or change of signedness.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-13 13:01:37 +09:00
Akos Kiss d7cb48d4cc Rename debugger-ws.h to debugger-sha1.h in debugger extension (#2463)
The renamed header doesn't contain any declarations related to
debugger-ws.c but contains the declaration of a function from
debugger-sha1.c.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-13 12:43:36 +09:00
Akos Kiss 79d1a3cc7e Fix FILE_PATTERNS of Doxyfile and some of the issues it was hiding (#2446)
`FILE_PATTERNS` is a space-separated list, in contrary to what is
suggested by its documentation. The pattern `*.h, *.c` does not
match header files but files with `.h,` extension only. Rewriting
the current comma-separated pattern makes Doxygen actually process
header files. However, it also reveals several hitherto hidden
issues (mostly missing documentation) in the code. This patch fixes
some of these documentation problems (and lists the files with
outstanding issues in a 'backlog').

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-13 12:42:19 +09:00
Akos Kiss 29e7330b9b Move all (nano|u)sleep-related decisions to default port implementation (#2462)
... where they belong.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-11 00:06:25 +02:00
Akos Kiss fb35e34801 Make string constants const char * const (#2458)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-10 21:08:49 +02:00
yangfasheng 81f37cf134 Modify header file contains. (#2460)
JerryScript-DCO-1.0-Signed-off-by: yangfasheng yangfasheng@rt-thread.com
2018-08-10 08:45:59 +02:00
Akos Kiss 17eb78aa63 Don't use a shell variable to store error output of doxygen (#2455)
Storing the error output of doxygen into a shell variable first and
echoing it later is error prone. In case of a long error output,
the whole shell will crash before being able to print the doxygen
diagnostics at all. This patch rewrites the check script to tee the
diagnostics (pipe them to console and store them to a file at the
same time) and check the output file size at the end.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-09 10:26:09 +02:00
Akos Kiss 3fd7e98d53 Make cppcheck print diagnostics only (#2456)
The progress messages of cppcheck produce a lengthy and verbose
log, making errors and warnings hard to find. This patch adds
`--quiet` to the invocation of `cppcheck`

Additionally, the patch relayouts the script to use a consistent
two-spaces indentation everywhere.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-09 10:12:18 +02:00
Akos Kiss f6b99b60d2 Reduce the scope of variable str_buf in jerry-main (#2457)
Also reduce the number of magic constants used in the code.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-09 10:11:25 +02:00
Akos Kiss 29f6ffc35b Make logging an optional feature and disable it by default (#2449)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-08-08 23:35:03 +09:00
Akos Kiss 58c568a68f Revisit unused global functions in jerry-core (#2450)
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-08 23:34:13 +09:00
Peter Marki 47087dec56 Improve the output format of the testrunner (#2438)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-08-08 23:33:02 +09:00
Zoltan Herczeg 1ac2903d3c Fix a few parser style issues. (#2442)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-08-06 18:08:53 +02:00
Akos Kiss 2534d32339 Use #include<> for system headers and #include"" for own headers (#2445)
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-06 18:00:49 +02:00
Akos Kiss c93bea32c4 Simplify redundant condition in jerry-snapshot.c (#2444)
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-05 15:41:58 +02:00
Daniella Barsony 64051b5bd8 Add total frame counter to backtrace in debugger (#2428)
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-03 11:30:13 +02:00
Daniel Balla 87897849f6 Fix for null pointer dereference in jmem_heap_free_block (#2440)
Fixes #2435.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-08-01 23:09:30 +09:00
Robert Fancsik 1f20bb3fe5 Remove unnecessary cbc_code_flag (#2443)
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-31 20:15:27 +02:00
Daniel Balla ba76b506f5 Fix broken pipe error in Jerry Debugger (#2427)
This patch fixes an error caused by trying to send data to a closed socket.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-07-31 17:36:37 +09:00
Robert Fancsik a6ace5efdf Improve lexer_expect_object_literal_id option handling (#2436)
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-30 15:12:35 +02:00
Tamas Zakor 8482fef41a Splitting the debugger and console part of the python debugger (#2406)
Move DebuggerPrompt to jerry_client.py
Implement JerryDebugger functions in the jerry_client_ws.py file
Server response is displayed by jerry_client.py

JerryScript-DCO-1.0-Signed-off-by: Tamas Zakor ztamas@inf.u-szeged.hu
2018-07-23 13:10:39 +02:00
Robert Fancsik 77d9314b1d Simplify source evaluation options. (#2431)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-20 08:50:39 +02:00
Zoltan Herczeg 76ff084dc7 Move low-level debugger connection handling into jerry-ext. (#2426)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-19 10:14:43 +09:00
Zoltan Herczeg 88589902e2 Remove jerry_get_arg_value function. (#2425)
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-19 10:13:40 +09:00
Tóth Béla 66dddadfd2 Change ../../libapps paths in TizenRT configuration Makefile (#2429)
This change helps the symlink method to work also with TizenRT/jerryscript configuration, while maintaining the old cp method usability.

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-07-18 15:52:50 +02:00
Zoltan Herczeg 9513f3792d Reduce with stack consumption by 1. (#2430)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-18 15:52:00 +02:00
László Langó 5f4a220a65 Added literal list loading feature to the snapshot tool. (#2422)
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-16 15:13:18 +09:00
Zoltan Herczeg f86d7459d1 Fixes for ES2015 classes. (#2424)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-13 14:59:53 +02:00
Robert Fancsik 0ca04376a5 Fix typos in the API documentation. (#2423)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-13 09:36:21 +02:00
Zoltan Herczeg 857ba99694 Rework JerryScript transport layer. (#2421)
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-13 01:21:08 +09:00
Robert Fancsik 43aae199ce Implement ES2015 class feature (part I.) (#2404)
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-13 01:20:08 +09:00
Daniella Barsony 62cdb3965f Add start to backtrace for debugger (#2407)
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2018-07-12 12:44:54 +02:00
Zoltan Herczeg 04dcefe087 Rework function call. (#2414)
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-11 09:35:44 +09:00
Anthony Calandra 50daa39ee8 Optimize JSON Quote operation. (#2420)
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-07-10 15:00:19 +02:00
Istvan Miklos 0c6b5eae65 Fix incorrect output from JSON.stringify (#2416)
This patch fixes the #2383 issue

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-07-03 19:21:45 +09:00
Anthony Calandra a456c90c1d Add %TypedArray%.prototype.fill(value, [ begin [, end ] ]) support. (#2415)
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-07-03 19:21:14 +09:00
Anthony Calandra d5cd32b0c0 Support for %TypedArray%.prototype.set(typedArray [, offset]). (#2405)
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-07-03 15:19:53 +09:00
Anthony Calandra a74bf7dc91 Add %TypedArray%.prototype.subarray([ begin [, end ] ]) support. (#2410)
JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
2018-06-28 09:41:07 +02:00
Istvan Miklos b9f2b1cf25 Replace jerry_value_set_abort_flag with jerry_create_abort_from_value (#2411)
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-28 08:09:03 +02:00
Zoltan Herczeg 34c081095a Fix escape sequence parsing in lexer_compare_identifier_to_current. (#2409)
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-23 10:02:14 +09:00
Istvan Miklos dfc0757242 Fix jerry_create_error_from_value (#2403)
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-22 12:19:13 +09:00
Imre Kiss e3265883fd Add restart command to the debugger (#2401)
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-22 12:18:18 +09:00
Zoltan Herczeg 35ac0e0445 Fix parse_print_final_cbc dump when arguments is used (#2400)
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-21 08:38:17 +09:00
Zoltan Herczeg 03274c112a Remove ECMA_LEXICAL_ENVIRONMENT_OBJECT_BOUND. (#2408)
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-20 15:27:45 +02:00
Zoltan Herczeg acdbbf2261 Add literal property to the byte code list. (#2397)
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-20 09:06:59 +02:00
László Langó 7f56756e11 Improve sonarqube analysis to cover more code path. (#2381)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-06-20 10:34:49 +09:00
Zoltan Herczeg 86ecc81130 Fix literal free when show opcodes is enabled. (#2398)
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-18 09:31:13 +02:00
Zoltan Herczeg 1044523af7 Add operational mode for jerry_gc API call. (#2385)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-15 16:31:48 +09:00
Mátyás Mustoha bc827cb497 Reduce code duplication between String.charAt and charCodeAt (#2331)
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-06-14 17:48:25 +09:00
Paul Sokolovsky 49c79e4774 targets: zephyr: Remove old option from prj.conf (#2396)
CONFIG_CONSOLE_HANDLER_SHELL is an old option which was removed quite
some time ago from Zephyr. (And newer versions will warn/error on
usage on such options.)

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2018-06-13 21:47:56 +09:00
Zoltan Herczeg 9625fb842e Improve instanceof operator. (#2395)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-13 19:33:27 +09:00
Akos Kiss 5398e07f99 Rework 128 bit arithmetics of ecma_utf8_string_to_number (#2392)
* 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-12 16:04:47 +02:00
Istvan Miklos 62dee2dd71 Fix jerry_get_value_from_error (#2394)
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-12 12:54:17 +02:00
Péter Gál efa8850783 Use binary mode when opening via fopen in the tools (#2371)
In the snapshot tool the files were opened
in text mode. However the snapshot files
are binary files thus it is advised to use the
binary mode when opening the files.

Specifying the binary mode is a must on Windows
platform otherwise the read/write operations
are inserting extra '\r' characters.

To make the tools consitent across OSes all
fopen are now opening files in binary mode.

Also update jerry-libc to accept the 'b'
modifier and add a test case where the JS
file uses CR-LF line endings.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-06-12 04:38:35 +09:00
Péter Gál 9ae60a4910 Improve license checker line ending validation (#2391)
The license checker previously assumed that the
lines of the license will always end with \n
characters. However when checking a file
it could happen that other line endings are
returned (should only happen for test files) thus
the checker can incorrectly report invalid license
as the line endings are incorrect.

Additional note #1: in Python when reading a file
in text mode it can happen that the line endings are
converted to the host system's line ending.
However on Travis the conversion did not happen when
using the open built-in method. By switching to the
io.open call the conversion is enforced and
all line endings are converted to '\n' regardless of
the host system's line ending.

Additional note #2: it is possible that there
are input test files which are not utf-8 conformant
(eg.: to test the parser). These files can't be read
as utf-8 strings and an exception would occur.
By ignoring these errors the tool can check
the file's license. In the license text there is no
invalid utf-8 character so the check will work
correctly.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-06-11 19:37:28 +09:00
László Langó f32c183137 Fixed assertion in 're_insert_into_group'. (#2388)
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-11 16:25:53 +09:00
Zoltan Herczeg bd0ea4f474 Fix wrong code order in opfunc_in (#2390)
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-11 10:20:57 +09:00
Péter Gál d637e31933 On simple strings the utf8 substring copy api call created an assert (#2389)
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-11 10:19:39 +09:00
Istvan Miklos 2d0e37ff74 Replace the jerry_value_set_error_flag function with jerry_create_error_from_value (#2367)
JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-06-11 10:16:58 +09:00
László Langó be59d0a224 Remove the indentation of preprocessor directives. (#2379)
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-08 15:35:23 +09:00
Robert Sipka 64c5be812c [targets/tizenrt-artik053] Fix typo in Make.defs (#2387)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-06-07 18:21:28 +09:00
László Langó b4b0b7d572 Merged conditions of if statements where possible. (#2380)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-06-06 15:08:17 +09:00
Akos Kiss b61d0ed856 Rework command line handling of build tool (#2373)
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-06 15:07:06 +09:00
willeio 8b8bced67f Buildable as shared libraries (#2351)
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-05 08:39:30 +09:00
Akos Kiss e1af56586c Declare parser_error_to_string conditionally (#2376)
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-04 10:55:51 +09:00
Akos Kiss 71471a0416 Add better support for proper installation after build (#2370)
- Add `--install` option to `tools/build.py`.
- Make use of `--install` in `tools/run-tests.py` by testing the
  installed the executables instead of those in the build tree.

Related changes:
- Collect unit test binaries in the `tests` subdir of the build
  tree instead of `bin`.
- The `ls`-based collection of the unit test binaries had some
  shortcomings hitherto unrevealed (it didn't filter for files so
  it could potentially "collect" dictionaries, too), which has now
  been replaced with a more stable `find`-based solution.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-04 10:55:29 +09:00
Akos Kiss 2cabb6f8ea Remove the leftover declaration of ecma_op_create_global_environment (#2375)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-06-04 10:50:02 +09:00
Akos Kiss 9da010ae6e Remove legacy public headers (#2372)
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-04 10:49:38 +09:00
Akos Kiss 1b2c565850 Direct alloc/dealloc implementations for ecma_number_t (#2377)
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-03 15:29:28 +02:00
Paul Sokolovsky eec2623cd9 targets: zephyr: Separate CMake definitions from options. (#2378)
Add a space between definition and options substitution groups, otherwise
they make expand to something like -DFOO-DBAR.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2018-06-03 14:38:37 +02:00
Akos Kiss 3e934723a3 Make sure that API function jerry_debugger_send_output is always implemented (#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-03 14:28:18 +02:00
László Langó 117ea1f899 Removed unused macro definitions. (#2369)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-06-01 10:00:10 +02:00
Akos Kiss 2291467c99 Remove duplications from test runner (#2364)
- Code contains syntactic duplications (e.g., build options copy-
  pasted repeatedly).
- Build options for test suites contain semantic duplications
  (ES5.1 profile builds happen multiple times, once by not
  specifying a profile and once by specifying es5.1 profile
  explicitly).
- External build options are not taken into account when detecting
  duplicated builds.

This patch provides improvement for these issues.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-30 19:57:38 +09:00
Zoltan Herczeg 7be9f91d22 Reverse the generation of line info. (#2363)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-05-30 19:57:12 +09:00
Akos Kiss d5593c12b4 Maintenance and merging of Valgrind and Valgrind-Freya code paths (#2362)
None of the code paths have been tested for long and especially the
Freya code paths have been long abandoned. This patch:
- Merges Valgrind-Freya into Valgrind code path (there should be no
  need to choose between them, Valgrind should work just fine).
- Removes leftover code (`VALGRIND_FREYA_CHECK_MEMPOOL_REQUEST` and
  `valgrind_freya_mempool_request`).
- Adds `JMEM_` prefix to Valgrind-related macros (to correctly
  leave the `VALGRIND_` prefix to Valgrind).
- Moves the definition of the Valgrind-related macros to a common
  header to avoid duplication.

Note: Adding a CI job to perform Valgrind Memchecks is left for
follow-up as it turns out to be excessively slow (>50 mins for a
`--jerry-tests --jerry-test-suite` run, and even a simple
`--jerry-tests` may get terminated prematurely because of timeout
issues).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-29 16:33:14 +09:00
Akos Kiss 3560c60c73 Make test runners support execution runtimes (#2360)
If the result of a build is not directly executable on the host
system or needs an execution runtime for any other reason (e.g.,
cross-compiled ARM binaries on Intel, emscripten-generated JS
files, binaries built with Valgrind support) then the current test
runners cannot work with them. This patch makes test runners
execute binaries via a runtime given in the `$RUNTIME` environment
variable (if it is specified).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-29 15:22:57 +09:00
Akos Kiss a509570c1d Simplify the AppVeyor configuration file (#2361)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-28 18:59:46 +09:00
Robert Fancsik e6664f6364 Fix heap buffer overflow in re_parse_char_class (#2352)
This patch fixes #2230 and fixes #2237.
Test cases are added for both issues and also adds new cases which caused the same error.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-05-28 10:13:17 +02:00
Istvan Miklos ac9fce1d8d Merge jerry_get_value_without_error and jerry_value_clear_error_flag functions (#2350)
JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-05-25 11:40:35 +02:00
Akos Kiss 4779451284 Cleanup code around JERRY_UNREACHABLEs (#2342)
`JERRY_UNREACHABLE`s often signal code structure that could be
improved: they can usually either be rewritten to `JERRY_ASSERT`s
or eliminated by restructuring loops, `if`s or `#if`s. Roughly,
the only valid occurences are in default cases of `switch`es. And
even they can often be merged into non-default cases.

Moreover, it is dangerous to write meaningful code after
`JERRY_UNREACHABLE` because it pretends as if there was a way to
recover from an impossible situation.

This patch rewrites/eliminates `JERRY_UNREACHABLE`s where possible
and removes misleading code from after them.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-25 07:27:30 +02:00
Zoltan Herczeg acb3e71436 Add JERRY_VLA calls to the snapshot tool. (#2357)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-05-25 10:34:55 +09:00
Akos Kiss 06910b456e Fix issues revealed by cppcheck 1.83 (#2355)
A more recent cppcheck has revealed some extra issues not detected
by the old one running on CI.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-24 15:48:34 +09:00
Robert Fancsik 9eb9fbf5f1 Fix heap buffer overflow in lit_utf_incr (#2345)
This patch fixes #2344.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-05-22 10:32:40 +02:00
Akos Kiss 43075a2ce6 Consolidate compiler-specific parts of CMakeLists (#2349)
The cmakelists contained various compiler-specific parts scattered
across the file. This patch moves them to as few conditional blocks
as possible.

Additional changes:
- `-Werror` does not depend on whether jerry-libc is enabled.
- Some stylistic fixes.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-22 17:15:40 +09:00
Akos Kiss cc473425d3 Fix cmakelists of doctests to run generation only once (#2347)
Custom commands with outputs used in multiple targets are prone to
being executed multiple times in parallel builds (and the repeated
overwrites of the outputs may lead to various hard-to-debug
errors). The fix is to add a custom target that depends on the
custom command and make the existing targets using the outputs
depend on the new custom target.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-22 09:14:18 +02:00
Akos Kiss 299643400d Don't let doctests pollute the source tree (#2346)
The patch changes the cmakelists of the doctests to extract the
test sources from the markdown docs into the binary tree.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-20 14:37:38 +09:00
Akos Kiss 5ddbfa5953 Add AppVeyor badge to readme (#2341)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-20 14:32:52 +09:00
Akos Kiss 7424d299d8 Define JERRY_UNREACHABLE for MSVC (#2340)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-20 14:32:07 +09:00
Akos Kiss 22339e0b54 Retire the Mbed OS 3 target (#2343)
Mbed OS 3 is discontinued, long live Mbed OS 5.

resolves #2338

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-20 14:31:25 +09:00
Akos Kiss 145ab1ed79 Simplify run-time feature checks in unit tests (#2339)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-19 07:07:21 +09:00
Yonggang Luo 872825fb57 Add Windows support. (#2306)
JerryScript-DCO-1.0-Signed-off-by: PKarics karicska@gmail.com
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2018-05-18 19:42:14 +09:00
Akos Kiss 13bd30ff54 Remove legacy jerry_get_memory_limits API function and unused configuration macros (#2329)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-18 10:43:52 +02:00
Zoltan Herczeg 5560c76b41 Convert certain push number opcodes to literals (#2328)
Binary operations are much faster with literal arguments.
The byte immediates are still kept for other cases, e.g. array declarations.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-05-18 17:22:53 +09:00
László Langó 64b16bf190 Update Doxygen config file and fix Doxygen warnings (#2324)
A lot of warnings remained hibben because 'EXTRACT_ALL' was previously set to YES.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-05-18 15:43:17 +09:00
Akos Kiss fb6259b2ec Fix parameter constness differences in function declarations and definitions (#2337)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-18 09:39:42 +09:00
Mátyás Mustoha 0415d74a74 Reduce code duplication in the TypedArray implementations (#2319)
This patch was done in cooperation with Tamás Kéri.

JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-05-18 09:38:41 +09:00
Peter Gal 27dcfa51e1 Build fix after landing #2249
The old `jerry_value_has_error_flag` function was used
when the #2249 PR was merged.

Replaced with the correct `jerry_value_is_error` call.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-05-17 13:56:37 +02:00
Istvan Miklos ea1133b210 Add tests for TypedArrays by using indexing api. (#2249)
JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-05-17 10:29:52 +02:00
Akos Kiss 36f6435eb8 Revert the Mbed Travis CI job to sudo-based VM to avoid sporadic OOMs
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-16 16:34:19 +02:00
Akos Kiss 53bd845d9f Move (almost all) Travis CI jobs to container-based infrastructure (#2333)
Container-based VMs promise significantly faster boot times.

More or less related changes:
- Added a JOBNAME to all jobs.
- Added `install-noapt` target to several Makefile.travis files to
  avoid `sudo apt-get install ...` steps. Those installations are
  now handled by the apt addon of Travis. The `install` targets are
  kept anyway to keep the makefiles self-contained.
- Removed a legacy workaround from the Coverity Scan job as it
  isn't necessary anymore to fiddle with the cerificates of
  scan.coverity.com.
- Fixed the Mbed and the Zephyr jobs.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-16 19:15:15 +09:00
Akos Kiss 19451fa2d1 Use ecma_number_t instead of double where possible (#2330)
Some code paths explicitly used double instead of ecma_number_t
even though the values assigned from or compared to were of type
ecma_value_t.

Related to #2251

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-16 09:17:34 +09:00
Péter Gál 38f0dbf065 Remove 'useless' variable from function.bind (#2327)
The `args_length` variable in the `ecma_builtin_function_prototype_object_bind`
method is not needed, the `arguments_number` variable can be
directly used.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-05-15 09:03:40 +09:00
Peter Gal 86111acbc4 Remove usage of comma operator in array prototype
There was a typo in the `ecma_builtin_array_prototype_helper_set_length`
method as the comma operator was used to close the statement, incorrectly

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-05-15 00:52:30 +02:00
Akos Kiss 65ae949dc3 Add jerryscript-compiler.h public header to cover compiler incompatibilities (#2313)
In general, public headers should not have compiler-specific
constructs but both the core and the port headers have attributes,
which are non-standard. It's better to factor out such constructs
to a common place (a new header) and hide them behind macros, which
can then be defined on a per-compiler basis.

This patch moves the existing definitions of function attributes and
likely/unlikely builtins to the new header. At the same time, it
unifies the names of these attribute defines and where they are
used. Moreover, it touches on jerry-main and removes the uses of
`__attribute__((unused))` entirely and replaces them with the
elsewhere used `(void) ...` pattern.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-14 09:41:26 +09:00
László Langó 0e131da4f7 Add SonarQube badge to 'README.md' and update '.travis.yml' to fix a warning. (#2325)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-05-12 14:20:51 +09:00
László Langó c829b307e5 Followup fix for SonarQube setup (#2322)
Fix the condition whether Travis should run the SonarQube analysis

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-05-11 09:11:20 +02:00
Akos Kiss 134845e099 Simplify code paths within PARSER_DUMP_BYTE_CODE (#2316)
Also fix an uncovered issue in the reporting of switching to strict
mode.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-10 19:37:19 +09:00
László Langó b0120423da Setup SonarQube analysis in Travis CI (#2321)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-05-10 10:42:40 +02:00
Mátyás Mustoha 1261cf3a54 Fix some incorrect documentation (#2320)
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-05-09 17:37:27 +02:00
Akos Kiss d6cf634239 Refactor/fix/document the default port implementation (#2317)
- Various constructs could be expressed with simpler and/or more
  readable code.
- The jerry_port_log implementation for the debugger case was prone
  to buffer overflow error.
- Some documentation was still missing (even from
  jerryscript-port.h).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-09 11:15:45 +02:00
László Langó a1f71f8937 Update the 'README.md' of the JerryScript profiles. (#2309)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-05-08 17:14:41 +09:00
Akos Kiss fbb9bf31b2 Fix documentation of port API (#2312)
The patch fixes both the doc comments in the port header and the
corresponding markdown documentation.

The patch also removes an internal configuration macro guard
exposed by the public port header.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-08 15:07:05 +09:00
Akos Kiss 7981820dfb Use logging macros in jerry-core/debugger (#2315)
...instead of directly calling the logging port API function.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-08 11:41:51 +09:00
Istvan Miklos 7e4e551dd5 Fix sign-conversion warning on gcc when compiling to raspberry pi 2 (#2308)
JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-05-08 11:41:05 +09:00
Akos Kiss 5f60208d1e Tabulation/indentation fixes (#2314)
- Status messages in CMakeLists.txt files got misaligned, fixing.
- An extra space sneaked in before an `#ifdef`, fixing.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-07 15:51:55 +02:00
Gabriel "_|Nix|_" Schulhof 6dc2764a94 modules: add ability to clear cache (#2300)
This adds the ability to remove a single module from the cache, or to
clear the entire module cache.

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2018-05-04 10:12:17 +09:00
Istvan Miklos 369447aa09 Rename the jerry_value_has_abort_flag function. (#2291)
Rename the function to represent it's real functionality.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-05-03 16:50:16 +02:00
Peter Marki 51e193de57 Remove the html based debugger tools and add a readme with information about available debug tools (#2299)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-05-03 09:36:00 +02:00
Robert Sipka b750a9e0b2 Update links and add a new one to the latest memory usage and binary footprint results for Artik053 (#2304)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-05-03 08:32:16 +02:00
Istvan Miklos ba2e49caaa Rename the jerry_value_has_error_flag function. (#2290)
Rename the function to represent it's real functionality.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
2018-05-03 08:24:05 +02:00
Mátyás Mustoha d672d1e71c Reduce code duplication between Object.isFrozen and isSealed (#2296)
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-04-26 13:51:27 +02:00
Peter Marki 06ada9e6b4 Remove unused tool scripts (#2298)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-04-24 17:24:00 +09:00
Mátyás Mustoha 63ce292173 Reduce code duplication between RegExp.construct and [[Call]] (#2287)
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-04-20 15:27:33 +02:00
Mátyás Mustoha a76926623a Reduce code duplication between String.match and search (#2277)
Moved the common preparation code for 'search' and 'match'
to a separate function.

JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-04-20 14:04:59 +02:00
Achie72 3df6ef30c0 Implement toString and join for TypedArrays. (#2255)
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2018-04-19 10:14:34 +02:00
Mátyás Mustoha c288cdad48 Reduce code duplication between Array.reduce and reduceRight (#2280)
Their code differs only in handling the array index.

JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-04-19 09:13:20 +09:00
Zoltan Herczeg 5e097dc354 Add line info support. (#2286)
Add line info data to byte, which allows getting a backtrace info directly
from the engine. Snapshots are not supported.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-19 09:12:54 +09:00
Zoltan Herczeg 095b730f9d Improve stopping at errors. (#2278)
In some cases the debugger catches (reports) the same
exception multiple times. This is confusing since these
not new errors. This patch fixes this behaviour.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-18 19:31:17 +09:00
Zoltan Herczeg 96b528a486 Rework jerry_parse function. (#2282)
Remove jerry_parse_named_resource, merge its arguments to jerry_parse
and change is_strict argument to an option list for possible future extensions.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-17 09:51:52 +02:00
Mátyás Mustoha 3f3d4a64f1 Reduce code duplication between Array.forEach, some, and every (#2275)
Their implementation only differs in the stop condition and the
final return value.

JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2018-04-13 13:32:46 +02:00
László Langó 2bfd3b75b7 Put 'Zephyr/Arduino 101 Build Test' to allowed failures temporarily. (#2279)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-04-13 14:28:46 +09:00
Peter Marki d86a507fdf Eliminate dead code in ecma_builtin_object_object_get_prototype_of (#2276)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2018-04-11 21:03:35 +09:00
Zoltan Herczeg e91471727f Support abort in the debugger. (#2273)
Aborts are not caught by catch/finally blocks,
so it is possible to stop a script using the debugger.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-11 13:59:13 +02:00
Zoltan Herczeg 5c0c21b26a Rework snapshot execution api. (#2270)
The _at functions replaces the original functions.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-11 10:39:58 +09:00
Tibor Dusnoki 46309b1502 Fixes return value of 'Date.now' (#2274)
'Date.now()' should return an integer value. Fixes #2272
JerryScript-DCO-1.0-Signed-off-by: Tibor Dusnoki tdusnoki@inf.u-szeged.hu
2018-04-09 13:27:16 +02:00
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 'https://bitbucket.org/nuttx/tools/commits/164450f982b404fdc2b3233db51dc3eaa1f08b7f',
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
Daniel Balla e8608707b6 Make source scrolling command in python debugger (#2187)
Source is now scrollable after writing `scroll`.
Keys are `q` to quit, `w` to scroll up `s` to scroll down.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-02-07 09:38:54 +01:00
Zoltan Herczeg 67cee1f478 Remove arguments of ecma_new_values_collection. (#2197)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-07 13:05:04 +09:00
Péter Gál 6f339eb05c Introduce C API to query the type of an Error object (#2177)
New api function:
* jerry_get_error_type

Additionally update a few places where this new function
can be used.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-02-06 09:41:54 +01:00
Péter Gál 8041953a7a Add TypedArray C API (#2165)
New API functions added:
 - jerry_value_is_typedarray
 - jerry_create_typedarray
 - jerry_create_typedarray_for_arraybuffer_sz
 - jerry_create_typedarray_for_arraybuffer
 - jerry_get_typedarray_type
 - jerry_get_typedarray_length
 - jerry_get_typedarray_buffer

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-02-06 08:01:32 +01:00
mofosyne 0cc98340c3 Update documentation for jerry string to buffer function with suggestions to use substring. (#2174) (#2174)
In some use cases, you want to reliably copy jerry strings to buffer, even if it doesn't fit target buffer, but is acceptable to lose some bytes. In those cases, the documentation will now suggest using the substring function as an alternative instead.

JerryScript-DCO-1.0-Signed-off-by: Brian Khuu mofosyne@gmail.com
2018-02-02 12:09:57 +09:00
Daniel Balla c429530d02 Fix multiple JSON.parse issues (#2191)
Fixes #2180, #2192

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2018-02-01 22:34:21 +01:00
Zoltan Herczeg 36051ec92b Limit maximum number of arguments for apply(). (#2183)
The length*sizeof(ecma_value_t) may overflow on 32 bit systems which
cause a memory corruption when the values are filled.

Fixes #2182.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-01 15:09:53 +01:00
Zoltan Herczeg 06ebfc52ed Simplify ECMA_OP_TO_NUMBER_TRY_CATCH macro. (#2185)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-01 19:31:17 +09:00
Zoltan Herczeg c935e4b7e2 Return early if number conversion is failed in arraybuffer slice. (#2184)
Fixes #2181.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-01 19:30:03 +09:00
Szilard Ledan 607e605844 Fix regex brackets matching bug (#2179)
Fixes #2178.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan@inf.u-szeged.hu
2018-01-31 09:27:32 +01:00
Zoltan Herczeg 918eb22a01 Add support for aborts. (#2176)
Aborts are similar to exceptions except they are not caught by catch
and finally blocks. Callbacks should honor aborts as well and return
them without processing them. Aborts are never thrown by JavaScript
code.

In the future certain events such as out-of-memory condition may
also throw aborts.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-01-30 09:13:44 +09:00
Zoltan Herczeg b548eae4ad Improve get characters of a string function.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-01-29 10:35:56 +09:00
Martijn Thé 0d04c805ac Zero out unused bytes in snapshots (#1980)
Compiled code blocks are sized in multiples of JMEM_ALIGNMENT,
but it's possible that some bytes at the end remain unused and get filled
with junk. This causes snapshot output to become nondeterministic.
To fix this, zero out the compiled code buffer before using it.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2018-01-26 08:26:09 +01:00
Peter Gal 4b699e997a Add ArrayBuffer with user specified buffer
New API functions:
 - jerry_create_arraybuffer_external
 - jerry_get_arraybuffer_pointer

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-01-25 10:14:53 +09:00
Roland Takacs 7acd688513 Print the return value of the engine in case of TizenRT.
Since TizenRT doesn't have any commands to get the return value of a process,
added a debug print line that shows the return value.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-01-25 09:28:18 +09:00
Szilard Ledan a4afde2663 Change '{' regex parsing to work similarly to other engines (#2134) (#2169)
Changed regex parsing to be able to handle opening braces
as other engines do, and also added a compile flag which
can disable this behaviour.

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan@inf.u-szeged.hu
2018-01-24 12:18:44 +01:00
Zoltan Herczeg 1c64c1aeb7 Fix inserting pending breakpoints. (#2163)
Before this patch the JS execution is started right after the parsing
is completed. The problem is that some parts of the JS code is executed
before the debugger had any chance to insert pending breakpoints due
to network latency. This patch adds a delay after parsing when at least
one pendding breakpoint is available.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-01-23 10:47:47 +01:00
Peter Gal 40d05cdca2 Add version fields for debugger configuration
By adding version information to the debugger protocol
it is possible to report if the debugger client and server
have different expectations on debugger workings (opcodes, types, etc.).

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-01-23 10:17:33 +09:00
Robert Fancsik 52a14fa08f Fix the endianness of EPS8266 system
Also fix the order of js sources by evaluate the main.js for the last time.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-01-22 18:13:07 +09:00
Roland Takacs 680bafdc8c Modify the build method of TizenRT target
Introduced a cmake/toolchain_mcu_artik053.cmake file that defines
all the target specific compiler options.

Modified the Makefile.tizenrt to do not copy the created static
libraries to the TizenRT folder. Instead, the application builder
Makefile (tizenrt-artik053/apps/jerryscript/Makefile) copies the
required static libraries to TizenRT.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-01-16 10:57:37 +09:00
Péter Gál ded0d5a846 Introduce the Array Buffer C API (#2161)
Add C API to work with Array Buffers.
The following methods are added:
- jerry_value_is_arraybuffer
- jerry_create_arraybuffer
- jerry_arraybuffer_write
- jerry_arraybuffer_read
- jerry_get_arraybuffer_byte_length

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2018-01-11 20:36:08 +01:00
Zoltan Herczeg b9560b7c70 Rework ecma collection. (#2153)
Greatly simplify the iterator part and make it compatible with 32 bit cpointers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-01-10 15:55:56 +01:00
Roland Takacs f833da2c13 Modify the build method of NuttX target. (#2154)
Modified the Makefile of the NuttX target to build only the application
file (targets/nuttx-stm32f4/jerry-main.c) and not the whole project.
It helps to build JerryScript separately and use the static libs when
building NuttX.
Also modified the README.md to describe the new build process.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
2018-01-09 09:34:01 +01:00
Zidong Jiang 4e7a9d2d53 [jerryx/arg]add jerryx_arg_utf8_string (#2133)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2018-01-08 10:17:40 +01:00
Paul Sokolovsky 290bc22f0c targets: zephyr: Update for Zephyr 1.10 which uses CMake-based build. (#2155)
In 1.10, Zephyr RTOS switched to CMake as means to generate application
makefiles. Consequently, drop Makefile, and introduce CMakeLists.txt,
and update master Makefile.zephyr accordingly.

With these changes, take a chance to make following "cosmetic" changes:

1. Make "qemu_x86" board target the default instead of "arduino_101".
Arduino 101 is just one of the boards of many supported by Zephyr
(and thus JerryScript port), while qemu_x86 is something everyone has.

2. Zephyr make target to run QEMU switched from "qemu" to "run".

3. Don't rely that there's zephyr.strip, it's presence is now
board-dependent. The most we can rely on is zephyr.elf.

targets: zephyr: Remove deprecated prj.mdef file.

MDEF files have been deprecated and ignored for few Zephyr releases.

targets: zephyr: Increase main (i.e. interpreter) thread stack size.

qemu_x86 target now has stack guard enabled by default and it trips with
the default stack size. Set it to 2K for now.

targets: zephyr: Makefile.travis: Update for Zephyr 1.10.

Zephyr 1.10 requires SDK 0.9.2 and CMake 3.8.2.

Also, don't hardcode CC path, it depends on a board and choosed
automatically by Zephyr build system.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2018-01-08 09:49:07 +01:00
tkeri e0e6aa0319 Add new snapshot execution test cases (#2160)
Add new function to avoid code duplication.

Add two new test cases to jerry_exec_snapshot function:
* test enable copy byte-code with global mode
* test enable copy byte-code with eval mode

JerryScript-DCO-1.0-Signed-off-by: Tamas Keri tkeri@inf.u-szeged.hu
2018-01-08 09:44:50 +01:00
Robert Sipka d6df000fe5 Update tests results badge links in the README
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2018-01-06 12:33:06 +09:00
Robert Fancsik 543f75a6c3 Fix random number generation on ESP8266
This patch uses the onboard RTC for generating random seed. It also improves the print handler to support float values.
The rom segment is slightly increased to fit to the latest master.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-01-04 19:22:08 +09:00
Zidong Jiang c3c0bb8ddc [Bugfix]free error in typearray set value routine (#2147)
Issue: #2143

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-12-20 12:52:29 +01:00
tkeri be9e88784a Fix unit-test inconsistency for promises (#2152)
Use a helper function to check the availability of promise.

JerryScript-DCO-1.0-Signed-off-by: Tamas Keri tkeri@inf.u-szeged.hu
2017-12-20 12:50:12 +01:00
Zoltan Herczeg a2d3ea61eb Optimize string concatenation. (#2141)
This patch adds two new string concatenation functions:
ecma_append_chars_to_string and ecma_append_magic_string_to_string

The former appends a cesu8 byte array and the latter appends a magic string
to the end of an ecma-string. These two free (dereference) their ecma-string
argument, and this change is also applied to the original ecma_concat_ecma_strings
function which simplifies string handling in most cases.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-12-19 13:45:48 +01:00
Robert Sipka bd574956e3 Fix conversion warnings (#2126)
NuttX and artik053 build - compiling with strict Werror=conversion - fail when jerry-debugger option is enabled.
This patch based on #2007, because most of them are fixed earlier within that PR, but it was closed before the land.

Credit: Piotr Marcinkiewicz p.marcinkiew@samsung.com

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-12-19 10:37:24 +01:00
Greg Miell 10f777689f Add extern "C" to module.h (#2150)
JerryScript-DCO-1.0-Signed-off-by: Greg Miell greg@gothack.ninja
2017-12-18 21:08:45 +01:00
László Langó 623fabd6e6 Put 'Mbed/K64F Build Test' to allowed failures temporarily. (#2151)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-12-18 12:14:02 +01:00
Daniel Balla 96df210cc5 Add object type checking to instantiation
It wasn't properly checked if the given object was an arrow function, therefore it always got wrongly casted into `ecma_arrow_function_t`.
Fixes issue #2110
*plus fixing a typo in the comments

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-12-13 18:14:34 +09:00
Zidong Jiang 11e0c13094 Add api: jerry_get_value_without_error_flag (#2096)
It is used to get the reference value from a error value

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-12-13 12:46:20 +08:00
Robert Fancsik 458dc58b59 Improve multiplication in vm
This patch improves the ecma_integers_values multiplication by checking if the multiplier or multiplicand is power of 2.
If it is it uses right shift instead of multiplication.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-12-11 17:47:39 +09:00
Robert Fancsik 90f2473f08 Remove trivial ecma_number arithmetic functions (#2123)
The affected function calls have been replaced with the appropriate arithmetic operands.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-12-07 13:41:02 +01:00
Péter Gál 8b109510fd Move _XOPEN_SOURCE macro to a more generic place (#2136)
Building with all-in-one and enabled debugger caused
errors as the sleep functions were not defined.

By moving the _XOPEN_SOURCE macro to a generic place
we make sure that the required sleep functions are
present in every case.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-12-07 11:54:37 +01:00
Akos Kiss 75ac090dd9 Refactor CLI argument handling and test runner logic of run-tests.py (#2091)
On argument handling:
- Merged all signoff check options into one, option value chooses
  between strict/tolerant check variants.
- Added sensible metavars to options with arguments (consistent
  with metavars of build.py).
- Reordered options to match the order the checks are executed in.
- Added `--all` alias to `--precommit` check option.
- Beautified code (always placed `help` on separate line, removed
  unnecessary arguments of `add_argument` that just repeated their
  defaults).

On test runner logic:
There was too many code duplication on how checks were executed, it
got refactored. No change in semantics.

The only change was in Travis CI-related invocations,
`--check-signed-off-travis` had to be rewritten to
`--check-signed-off=travis`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-12-07 11:54:14 +01:00
Robert Fancsik e83de3accd Remove ecma_simple_value_t and refactor ecma_make_simple_value (#2135)
This patch removes all ecma_make_simple_value calls to make the code more easy to understand.
Also removes the type ecma_simple_value_t which improves the performance in related code paths by calculating the value of new ecma_value_t is no longer needed.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-12-06 18:06:07 +01:00
László Langó 1007b63024 Fix clearing of error reference (#2131)
'ecma_clear_error_reference' must increase the reference of the returned
ecma value referenced by the error if there are more than one reference.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-12-06 14:47:40 +01:00
Peter Gal a8a6122a93 Force python2 when running test262
The test262 python script is not python 3 compatible
so we force it to be executed with python2.

Additionally print out the reason if the execution
failed.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-12-06 13:16:25 +09:00
Zoltan Herczeg e964393abe Add fast path to ecma_op_object_get with magic string. (#2078)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-12-05 17:17:56 +01:00
Peter Gal a8dffe023e Fix the mbed Travis build
On Travis the Python (by default) is a bit old
and causes problems when the yotta is being used.

Switching to Python 2.7.13 solves half of the problem.

The other problem is the pyOpenSSL 17.5 and Linux
library incompatibilities. Thus we force the pyOpenSSL
to a pre-17.5 version.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-12-05 20:16:25 +09:00
Marko Fabo 0fe8f6abac Improve bitwise operations in VM. (#2117)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-11-30 10:13:04 +01:00
Sanggyu Lee bf78065bc6 Update build guide for TizenRT 1.1
Previous guide is out of date.
Updated guide works with TizenRT 1.1.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-11-30 09:04:47 +09:00
Daniel Balla a1df9c1420 Fix undefined behaviour of global object freezing
Freezing the global object and later trying to add properties to it caused an assertion error (issue #2105).
This patch fixes the issue.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-11-28 11:30:10 +09:00
Imre Kiss 1ed886b872 Fix function parsing for debugger. (#2119)
Since the JerryScript can able to parse functions directly the
PARSER_LEXICAL_ENV_NEEDED and the PARSER_NO_REG_STORE flags
should be in the context's status flags for executing eval operations
by the debugger.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2017-11-22 15:29:07 +01:00
Zidong Jiang 29056f9ab9 Fix error-free issue in promise
Fix issue: #2107

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-11-21 19:49:44 +09:00
Zidong Jiang 9a9dcf3332 Fix bug in promise resolve handler
Should get the error_value if `then` prop is an error.

Fix issue: #2111

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-11-21 14:25:51 +09:00
tkeri e15020be96 Fix api inconsistency for promises (#2113)
The change makes the jerry_value_is_promise api method
available in all cases, just like other promise api methods

JerryScript-DCO-1.0-Signed-off-by: Tamas Keri tkeri@inf.u-szeged.hu
2017-11-20 15:41:11 +01:00
Robert Fancsik fe6c7b9b61 Fixed TypedArray error handling
This patch fixes #2106. The problem was that the function always tried to transform the array-like object to TypedArray object even if there was an error during TypedArray creation.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-11-20 16:55:22 +09:00
rerobika 1dedc1b630 Fixed toFixed method string conversion (#2112)
This patch fixes #2108. The problem was if the convertible number had less significant fractions digits than the requested, the result was filled with memory junk instead of zeros.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-11-17 20:00:45 +01:00
rerobika 6c06a309c1 Fixed dynamic-stack-buffer-overflow in jerry_value_is_syntax_error (#2095)
Fixes issue #2094, which introduced an error caused by jerry_value_is_syntax_error.
The problem was that the function used strcmp instead of strncmp while checking if err_str_buf contains syntax error and it caused buffer overflow.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-11-17 11:39:11 +01:00
Marko Fabo b4a1825a83 Avoid code duplication in vm.
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-11-17 18:25:00 +09:00
Akos Kiss b43057c90b Add grouping macro guards for disabling engine features (#2084)
Until now, the engine's feature set was configurable either via
`CONFIG_*` macro guards defined individually on compiler command
line or via profiles (which are text files listing macro guards,
picked up by the cmake build system and turning them into compiler
command line options). And the features under profile control are
all enabled by default (i.e., all macros are `CONFIG_DISABLE_*`).

This causes a maintenance issue when new features are added to the
engine, because the disabling macros have to be added to all
profiles that don't include the new features. This can even cause
"compatibility break" for applications that embed JerryScript but
don't use the cmake or the python build system, because then
profiles are unavailable and all feature disabling guards have to
be explicitly passed to the compiler. (I.e., if such an application
wants to use the ES5.1 feature set, it must define all the ES2015
disable macros; if the engine is developed further and a new ES2015
feature gets implemented, then the new feature will sneak into the
application's binary unless its own build system is changed to add
the new feature guard.) Even the in-repo example Curie BSP target
seems to have suffered from this maintenance problem.

This patch introduces two new grouping macro guards that enable the
disabling of all ES5.1 builtins and all ES2015 features. As the
grouping logic is in config.h, the maintenance of non-cmake-based
build systems becomes easier (and there is no change for the python
and cmake-based build systems).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-16 16:31:30 +01:00
Akos Kiss 36479ddc1a Remove the 'external' toolchain file (#2089)
The 'external' toolchain file does nothing but transitively sets
some cmake system variables from values received on the command
line, and forcibly sets the C compiler. However, the same cmake
system variables can be directly set via the command line, together
with the C compiler, and specifying a toolchain is not a must.
Thus, this patch drops the superfluous 'external' toolchain file
and updates cmake-based targets to invoke cmake in a simpler form.

Related changes in this commit:
- While updating the cmake invocations, all the command line
  arguments have been reviewed and simplified (removed those, which
  did not change the defaults).
- Removed unnecessary forced C compiler settings from some
  toolchain files (and/or changed them to setting the "compiler
  works" flag to true, thus keeping cmake's compiler identification
  logic but disabling some of its overzealous compiler sanity
  checks).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-16 16:19:00 +01:00
Akos Kiss da24727824 Add Travis CI jobs for build testing several targets (#2102)
Hitherto, code under the `targets` directory was not tested and so
its maintenance was sometimes speculative. This commit adds build
testing for several targets to prevent them from bit rotting.
Targets covered by this commit are: ESP8266, Mbed, Mbed OS 5,
NuttX, RIOT, Tizen RT, and Zephyr.

Some issues were revealed and fixed:
- ESP8266: added missing include for `uint32_t` typedef.
- Tizen RT: replaced missing `str_to_uint` with `strtol`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-16 13:29:23 +01:00
Akos Kiss a0db3ee5b3 Ensure that the test version of the command line tool is stable for benchmarking (#2076)
Some benchmark suites contain test cases that have nonreproducible
behaviour. This is mostly caused by relying on "now" when dealing
with dates or timestamps, instead of using a fixed moment. (A
notorious example is the crypto-aes.js test case of the sunspider
bechmark suite, where the heap memory consumption can vary between
34K-41K heap because of using `(new Date()).getTime()`.)

This commit renames the jerry-minimal command line tool to
jerry-test (to better reflect its purpose) and adds extra code,
which intercepts some calls to libc (`gettimeofday`, `rand`) and
pins their results to some fixed values. This makes the tool
useless in a general case but ensures stable results when
benchmarking -- for which it is mostly used.

As a side effect, the commit also changes jerry-libc by making all
libc functions weak symbols to allow their override from
application code.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-16 12:36:58 +01:00
Péter Gál 7692aa9d66 Improve the heap limit measure tool (#2092)
Changes:
 * Added support for Python3
 * Suppressed the build output text
 * Code cleanup
 * Fixed pylint warnings

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-11-15 17:02:32 +01:00
Gabor Loki 1059fb1b30 Fix a small typo in the port API documentation (#2099)
JerryScript-DCO-1.0-Signed-off-by: Gabor Loki loki@inf.u-szeged.hu
2017-11-15 17:01:32 +01:00
Daniel Balla 7ad3edde08 Fix typo in byte-code.h (#2100)
Fixing a typo in byte-code.h, plus removing unnecessary guarding around it.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-11-15 17:01:01 +01:00
Akos Kiss 6b1ed6e021 Refactor/simplify .travis.yml (#2090)
Over time, `.travis.yml` grew somewhat organically and became quite
complex. With some rewrites, it can set up the Travis CI stages
better, and become simpler, more logical, and more maintainable.

The refactoring keeps all existing functionality.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-13 15:36:40 +01:00
Akos Kiss 52ecafc888 run-tests.py test options maintenance (#2087)
Pythonification of the `Options` class and unification of the
instance names.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-13 13:52:56 +01:00
rerobika 5d2000c954 Fix for issue #1993 (#1994)
This patch fixes this bug which caused corrupted stack by preventing unnecessary double to ascii conversion even if
the convertible number of digits is higher than allowed.
In addition, improved ecma_double_to_binary_floating_point function by removing a needless buffer.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-11-10 15:13:08 +01:00
Akos Kiss 1d2a686532 Whitespace gardening in jerry-libc (#2082)
Also includes the addition and styling of some doc comments (but
those are whitespace too).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-11-10 13:12:44 +01:00
Zidong Jiang 2865826fc4 [jerryx-module]Fix a bug in module name comparison (#2079)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-11-10 13:11:26 +01:00
Marko Fabo 9c013310ab Include missing header file in mbed/mbedos5. (#2083)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-11-10 12:58:53 +01:00
Daniel Balla 7e51423ca7 Fix Date.parse() in ecma-builtin-date.c (#2081)
Fixes issue #2073, which introduced an error caused by Date.parse()
The problem was that the function didn't properly check if there was a ':' after the hours.
If any UTF8 character was inserted there which got decoded into multiple characters, it caused the pointer to point at a wrong character.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-11-09 21:12:29 +01:00
Robert Fancsik 519ba8eb6c Fixed template literal parsing
Fixed an unhandled corner case while parsing slashes and template literals.
This patch fixes #2039 and adds a test case for it.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-11-09 14:12:34 +09:00
Robert Fancsik c3a9821171 Revive target: ESP8266
This patch updates ESP8266 build system and code base as well.
 - Removed unnecessary files.
 - Decreased code size.
 - Refactored jerry_{port, extapi, run}.c to make it more easy to handle.
 - Readme.md is updated as well which contains detailed step by step description about how to set up environment and use JerryScript.

Finally, it solves the related issue #1375.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-11-08 19:13:34 +09:00
Marko Fabo bdcd2d8179 Free JERRY_CONTEXT (error_value) (#2071)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-11-06 15:48:05 +01:00
Daniel Balla 3de6c7ec7a Fix jerry-libc's srand function (#2068)
The previous implementation of srand was wrong in jerry-libc.
It set all 4 values to the seed, not modifying anything in them, causing random values to be repeated pretty often.
This approach fixes the mentioned issue.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-11-06 11:31:22 +01:00
Péter Gál 8ae659227e Move snapshot generation function to the snapshot tool (#2057)
Now there is a snapshot tool which can merge snapshots
but was unable to generate snapshots by itself.

This change moves the snapshot generation utilities
to the snapshot tool.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-11-05 18:37:27 +01:00
Zsolt Borbély ee24965bcf Add missing headers for srand() to jerry-minimal and riot-stm32f4
A buildoption test is also added to test jerry-cmdline-minimal.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-11-04 12:17:59 +09:00
Daniel Balla 4690d128b3 Add info to documentation about random numbers, initialize srand (#2056)
Issue #2053 has highlighted the fact that random numbers are always generated with the same seed.
An example of generating different random numbers, other than the original seed, has been added to the documentation.
Furthermore srand initialization has been added to jerry-main, and targets.
Update test-common.h with srand call.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-11-03 15:31:57 +01:00
Marko Fabo 678fcb20ed Free the error_value of the global context before raise an error. (#2067)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-10-31 15:47:20 +01:00
Zidong Jiang 5bd72047cc jerryx: add jerryx_arg_array (#2052)
Related issue: #2046

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-10-30 20:39:14 +01:00
Akos Kiss 60bf613c07 Add regression test from issue #2008 (#2066)
The issue was reported against v1.0 and isn't reproducible anymore.
Still, adding the then-faulty input to the regression test suite to
prevent it occuring again.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-10-30 14:53:22 +01:00
Péter Gál 0ee7509030 Install pylint for user on Travis (#2064)
On Travis the pylint package can't be installed
due to insufficient permissions.

To fix this we'll try to install the package for the user
and not for the system.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-10-30 14:46:29 +01:00
Marko Fabo d9cc3fd4b7 Improve runtime by concatenation of opcodes. (#2059)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-10-29 08:19:18 +01:00
rerobika 6dae81565c Improve ecma_utf8_string_to_number function (#2006)
This patch extends the infinity and zero parsing of the convertible number by checking the normalized number exponent part.
This improvement prevents the engine's hanging while converting extreme big numbers.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-10-27 12:32:29 +02:00
Zidong Jiang 0bc4bb056d Fix promise thenable bug
Related Issue: #2060

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-10-27 18:37:58 +09:00
Marko Fabo d7c710d3d4 Delete unnecessary ?: statement.
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-10-25 09:45:49 +09:00
Zoltan Herczeg 53cd324179 Rework error to use a global slot to store the error value.
This change frees up the error bit in ecma_value_t, which allows
to define 4 more value types (e.g. symbols). To keep API
compatibility we introduce a box for values with error flag.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-10-24 17:33:04 +09:00
Akos Kiss 742654a3f1 Fix #endif comment at end of header files (#2049)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-10-21 14:47:37 +02:00
Daniel Balla 2f6c105522 Fix pending breakpoints in python debugger client (#2028)
There was an issue where pending breakpoints were incorrectly tried to be assigned to files, since they missed the sourcename check. It's also worth mentioning that pending breakpoints were not "moved" correctly to active status, just copied there instead, making them appear in the pending list still.
This patch fixes both of these issues.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-10-19 11:49:33 +02:00
Peter Gal 4913a42086 Fix API docs
The #2043 introduced a bit of error in the API
docs as there was missing backticks.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-10-19 16:26:59 +09:00
Péter Gál 6d988afbf4 Introduce a way to directly save snapshot functions and load them back (#2043)
Added two new api functions:
* jerry_parse_and_save_function_snapshot
* jerry_load_function_snapshot_at

The jerry_parse_and_save_function_snapshot function allows
creating snapshots from snapshot arguments and body source.

The jerry_load_function_snapshot_at function enables loading
back functions from a given snapshot as a JS function object.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-10-18 15:03:54 +02:00
Akos Kiss d0143adc82 Replace JERRY_JS_PARSER feature guard with JERRY_DISABLE_JS_PARSER (#2036)
* Replace JERRY_JS_PARSER feature guard with JERRY_DISABLE_JS_PARSER

All feature guards of jerry-core are deciding about the inclusion
or exclusion of a feature based on the state (defined or undefined)
of a macro -- except for the JS parser guard, which requires
`JERRY_JS_PARSER` to be defined with a value of either 0 or 1. This
has some issues:
- The engine cannot be built with a "clean" compiler invocation,
  i.e., without any `-D` command line macro definitions. This is
  painful for targets that must use a different build system from
  the project's own python/cmake-based one.
- Some build systems in targets and even some code in jerry-code
  are already confused about the different semantics of
  `JERRY_JS_PARSER`, and simply define it without a value and make
  decisions based on the macro being simply defined or not.

This patch renames the guard to `JERRY_DISABLE_JS_PARSER` and makes
use of it in jerry-core based on its state, not based on its value.
As obvious from the guard name, the default for the JS parser is
that it is included in the build.

The patch also touches those targets in the repository that
explicitly defined the original macro (correctly or incorrectly).

* Make cppcheck verbose

Cppcheck can be quite slow sometimes, especially on Travis CI,
which has a "10 mins without output means failure" rule. As the
code base of the project grows, we start to undeterministically
fall over that limit. Thus, this PR makes cppcheck verbose to
ensure that it keeps Travis CI continuously fed with output.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-10-17 17:11:54 +02:00
Zoltan Herczeg fe26674752 Support multiple primary functions in a single snapshot. (#1797)
This patch adds an extension to snapshots which allows storing
multiple position independent primary functions in a single
snapshot data. A new application called jerry-snapshot is
added to the project to manage snapshots. Currently the only
option is merging snapshots.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-10-12 14:43:32 +02:00
Zoltan Herczeg 9f0cf9ef1c Implement this binding for arrow functions.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-10-06 09:07:13 +09:00
Zsolt Borbély 1cc7cb58ce Enable promise builtin for nuttx-stm32f4 target (#2033)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-10-04 15:46:18 +02:00
Gabriel "_|Nix|_" Schulhof eb92b22b19 Fix possible uninitialized value (#2035)
JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-10-03 10:24:39 +02:00
László Langó 1027eb0c32 Updated the Doxyfile input directories. (#2024)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-10-02 11:57:28 +02:00
Zoltan Herczeg 29ea702fa4 Free the GC mark bit to increase the number of object types. (#2032)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-29 16:15:13 +02:00
Gabriel "_|Nix|_" Schulhof 6d53931055 module extension: add support for canonical name resolution (#2013)
Before attempting to load a module, each provided resolver must be given an
opportunity to examine the name of the requested module without actually
loading it so as to canonicalize it, in case a module can be referred to by
multiple names.

Then, modules are loaded and cached by their canonical name.

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-09-29 12:02:34 +02:00
Daniel Balla e527e41bac Fix typo in the debugger documentation (#2027)
The old function name was used in one occurrence.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-09-28 06:20:18 +02:00
Zoltan Herczeg 8a5bfd2279 Implement template literals. (#2025)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-27 11:24:51 +02:00
Gabriel "_|Nix|_" Schulhof fe864bcf53 Add job that tests with FEATURE_INIT_FINI turned ON (#2026)
Since modules behave differently depending on whether this feature is on or off
we should have a job that runs with the feature turned on.

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-09-27 10:51:42 +02:00
Zoltan Herczeg c6a33dd407 Implement arrow function parsing. (#2022)
Note: the special this behaviour of arrow functions is not implemented.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-26 10:40:45 +02:00
Gabriel "_|Nix|_" Schulhof 81952f3cd0 module: Re-implement using library constructors/destructors (#2018)
By using constructors/destructors we unify the case of static linking with
that of dynamic linking, and we reuse the build flag FEATURE_INIT_FINI. Using
constructors/destructors also allows us to cover the case where library
constructor/destructor functionality is unavailable, because we can expose the
module registration/unregistration functions as global symbols, to be called
explicitly from within the application.

Fixes https://github.com/jerryscript-project/jerryscript/issues/1952

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-09-22 12:35:38 +02:00
Zoltan Herczeg 8d916a44f1 Parse functions directly (#2015)
This patch adds direct function source code parsing, which
is useful to avoid source code duplications. The patch
also improves the Function constructor.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-21 11:03:23 +02:00
Zoltan Herczeg 7713d30702 Rework jerry_debugger_wait_for_client_source to use a callback.
The jerry_debugger_wait_and_run_client_source function is renamed to
jerry_debugger_wait_for_client_source and a callback is added which
is called when the source is received. Inside the callback the
application is free to do anything with the received source code.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-21 17:49:49 +09:00
Marko Fabo 9c3f814357 Fix #1931
The mentioned patch uses `this_obj` argument to get `setInterval` and
`setTimeout` properties from the global object, but `this_obj` is
undefined
in these scopes.

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-09-21 17:44:57 +09:00
Zsolt Borbély 9900fd930f Allow mem-stats when system allocator is enabled
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-09-21 09:58:43 +09:00
Robert Fancsik 15ee7bc036 Fixes pattern parsing in ecma_builtin_global_object_unescape ()
Issue #1990 revealed an unhandled corner case while parsing pattern. This patch fixes it and also adds a test case.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-09-21 09:58:15 +09:00
Robert Fancsik 30867e27e0 Fixes uint16_t overflow in ecma_new_ecma_string_from_utf8_converted_to_cesu8 ()
This unreported test issue revealed an assertion in jmem_heap_finalize ().
During the conversion the lot of additional information what a cesu8 represented string needs caused overflow while setting the new ecma_string_t variable's length. This patch fixes this issue and the mentioned test case is available here:
https://gist.github.com/rerobika/3bd590fdcf664a3fcfcc98f11b14c74e

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-09-20 15:09:15 +09:00
Imre Kiss 77ccdcc585 Add context reset to the debugger.
- The context reset request message can be sent anytime from a client.
- After the message received the engine will call the cleanup and init
  when in the source waiting mode (which means the currently processed file will be executed).
- After the reinitialization is done, the engine will wait
  for a new client connection(rest of the work is the client's responsibility).

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2017-09-13 18:12:44 +09:00
Zoltan Herczeg 04bccea6a6 Last line of the source code should be printed by the python debugger client.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-13 09:38:35 +09:00
Daniel Balla c8b99d05e1 Send every kind of output to the debugger client
Now correctly sending jerry_port_log output to the debugger client as well.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-09-07 19:02:24 +09:00
Zidong Jiang c21c21f9f9 [ecma-collection] Check whether the header's first chunk is NULL
Fix Issue: #1997

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-09-07 17:42:51 +09:00
László Langó a54427e255 Followup changes in JerryScript debugger after #1910.
* Remove 'jerry_debugger_cleaup'. Do it automatically in 'jerry_cleanup'.
* Updated the documentations.
* Updated the NuttX and Artik053 targets.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-09-07 17:26:03 +09:00
Daniel Balla a51def40e7 Fix #1947
If a literal was assigned the unused flag it wasn't freed, however it could have been not empty, therefore should've been freed.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-09-07 09:42:08 +09:00
Daniel Balla 7ccbe97b79 Move jerry_debugger_send_output to public API
The function jerry_debugger_send_output wasn't placed correctly in the public API.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-09-07 09:36:02 +09:00
Dániel Bátyai 01dd2f0b2a Clean up radix conversion in Number toString method (#2002)
The radix conversion code path was very messy which made it hard to understand
what was happening inside of it. The code got cleaned up, and a lot of comments
were added that explain what is happening and why.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2017-09-06 10:56:29 +02:00
Zidong Jiang 74045f2964 [Promise] check the argc of builtin resolve/reject handler
Fix issue: #1996

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-09-05 18:42:46 +09:00
Zidong Jiang 78e3d88bd9 [unix-main] call jerry_run_all_enqueued_jobs before cleanup
Related Issue: #1995

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-09-05 17:43:37 +09:00
Tamas Keri 39275c5dd2 Add minimal heapsize finder tool
Added a python tool which finds the smallest possible size of
JerryHeap without failing to run the given js file.

JerryScript-DCO-1.0-Signed-off-by: Tamas Keri tkeri@inf.u-szeged.hu
2017-09-05 17:42:42 +09:00
Yanhui Shen b32e5444d8 Allow "<NUL>" character within string literals in strict mode
JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2017-09-05 09:13:01 +09:00
Zoltan Herczeg 522c7d3f87 Correctly enumerate function property members.
Functions has several built-in non-enumerable properties, and
they are correctly ignored during enumeration after this patch.

External function prototype is also lazy enumerated.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-09-05 09:11:35 +09:00
Daniel Balla 7905422b19 Merge send_string functions in python debugger client (#1989)
Merging the messages to one check, therefore multiple duplicated lines are removed.
I didn't find a good solution though in the HTML client, since it would be nested switch cases / ifs, which wouldn't look okay IMO, the other solution would only save like 2 lines of code overall.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-09-04 12:33:28 +02:00
Jan Jongboom 5cdb98c75e target: mbedos5: Use math.h from stdlib, not from jerry-libm (#1988)
The math.h header file in JerryScript is lacking a number of functions which are required to build for certain mbed OS 5 targets. NUCLEO_F207ZG target fails to build as sqrtf() is not defined in this header file. Exclude this file from the build process, so the math.h from stdlib is included instead.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-09-04 12:11:02 +02:00
rerobika ce187049e9 GC should ignore not fully initialized objects (#1983)
Fixes #1970 which caused segmentation fault.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-09-04 10:25:19 +02:00
Robert Fancsik 0ef2418e5e Fix ecma_op_array_object_set_length method
So far a freed variable was tested during error flag inspection.
This patch fixes it and #1972 as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-08-31 08:55:51 +09:00
Daniel Balla 733f0ceea0 Send output to debugger client (#1955)
Sending the output to the debugger client, at the moment only the JS side prints are sent over.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-08-30 16:01:06 +02:00
Zoltan Herczeg e897858c64 Reduce the memory consumption of function objects. (#1954)
Several properties of strict and bound functions are moved to
lazy property instantiation. The memory consumption of bound
functions are also reduced when only a this is present.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-08-30 14:17:35 +02:00
Jan Jongboom 82a94d0f88 target: mbedos5: Update to mbed OS 5.5.5 (#1982)
Switches fatal implementation to JerryScript default, updates to latest stable version of mbed OS. Tested on K64F.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-08-30 13:08:01 +02:00
Robert Fancsik e62b5b601b Fix for issue #1974
The buffer size was previously badly computed since scale == 0 case was not checked, therefore the buffer size was smaller than intended.
This patch fixes this issue.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-08-30 09:07:26 +09:00
Tamas Keri 5d18ac8f0c Remove unnecessary if statement
JerryScript-DCO-1.0-Signed-off-by: Tamas Keri tkeri@inf.u-szeged.hu
2017-08-28 18:02:55 +09:00
fbmrk 1a18766488 target: mbedos5: Improve setInterval and setTimeout (#1931)
In setInterval and setTimeout there must be a reference increase to the given function.
If you use `jerry_acquire` and you want to cleanup the engine,
you get an assertion, because this value is released nowhere in the code.
In my opinion it is better to set the function as a property, so it is released automatically.

In launcher.cpp there is bad error handle. If `returned_value` has error flag, `parsed_code` is not released.

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-08-25 15:01:53 +02:00
fbmrk fe32b5c5d1 target: mbedos5: change all get/set_object_native_handle to get/set_object_native_pointer (#1898)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-08-25 11:24:04 +02:00
Hosung Kim 5de69b4ede target: tizenrt-artik053: Update porting
- rename artik05x to artik053
- fix to add library for jerryscript
- add rom patch for artik053
- enable jerry cmd in tizenrt
- change to absolute file path when loading file with jerry cmd
- update README.md and config file

JerryScript-DCO-1.0-Signed-off-by: Hosung Kim hs852.kim@samsung.com
2017-08-22 17:26:54 +09:00
Imre Kiss 3b1d578050 Multiple client source sending feature. (#1957)
Whit this enhancement the debugger can able handle more than one source file across the new source wait mode.
This feature can be used by the python client with the --client-source [paths] switch.
The client will store every source path, when the debugger send a signal about the waiting status, then the client will send one file from the list.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2017-08-21 09:19:36 +02:00
Zidong Jiang 2888a6f488 [jerryx-arg]Check NaN in jerryx_arg_int
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-08-17 09:15:35 +09:00
Sanggyu Lee c1cff3f961 Fix new ArrayBuffer(length) for variaous input (#1959)
Currently new ArrayBuffer(length) does not conform to ES2017.
Major JS implementations follow ES2017 for ArrayBuffer(length).

For example, new ArrayBuffer(length) should not throw RangeError
for length = NaN, undefined, negative number, floating point, and so on.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-08-16 18:20:41 +08:00
Sanggyu Lee af16a3ae1a Implement typedarary.set(array, offset)
JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-08-11 14:38:37 +09:00
Daniel Balla a48f24f8da Reworking jerry_debugger_send_string method
From now on, jerry_debugger_send_string can send a subtype of the string, making it more simple to send over strings with special parameters, therefore seperating different types of messages are simpler.
Enumerations for various subtypes can be made, while there's only need to have 2 entries for the header type.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-08-10 08:28:58 +09:00
Robert Fancsik ad608e30dc Improve toFixed function
Fixes #1367.
From now numbers are represented as binary floating-point which guarantees the expected operation of toFixed function.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-08-10 08:27:27 +09:00
Imre Kiss 148f91c90d Fix internal jmem_heap_finalize assertion in debugger.
In case of received client source the client_source_data_p was not freed.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2017-08-08 10:24:19 +09:00
Zidong Jiang c242248b47 Add API for get the memory stats (#1923)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-08-04 09:44:37 +02:00
Daniel Balla 8b5fe254d9 Implement source rework to HTML client (#1866)
Implementing the source command rework - along with display - to the html client too.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-08-04 09:44:05 +02:00
Imre Kiss 3e3d6373b8 Add source sending feature to the debugger. (#1932)
With this feature the debugger webIDE and the python client can able to send a source code to the debugger while that is running in wait mode.
This feature can be activated with the --debugger-wait-source switch and the debugger will wait for the source messages.
If every message part are received the debugger will continue the exectuion with the initalized options.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2017-08-03 14:29:47 +02:00
rerobika a3885be6ce ecma_delete_property must recreate the hashmap even if one of the properties is still valid. (#1938)
Fixes #1934.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-08-02 08:19:48 +02:00
Martijn Thé 66b072d5ae Fix: make jerryx_module_resolve resolvers argument const (#1942)
The resolvers argument that is passed to jerryx_module_resolve() is
not mutated by the function. Therefore the argument should be const.
In the docs, a static const array is passed, but this currently does not
work w/o a cast. This patch fixes this.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2017-08-01 15:39:21 +02:00
Zsolt Borbély 2a2a15f364 Make the webpage-generator script able to transform relative links
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-07-30 18:30:06 +09:00
Zidong Jiang 5b22e5e0ff Bugfix: the value in test cases should be invariable (#1939)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-07-27 13:37:20 +02:00
Zidong Jiang a4bc229592 Bugfix: should return error immediately in ecma_op_create_typedarray
Related issue: #1936

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-07-27 17:08:24 +09:00
Marko Fabo af2868ddb7 Add delete_property_by_index to the API
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-07-24 09:13:36 +09:00
fbmrk 1526bcc8c3 target: mbedos5: fix requirements.txt (#1933)
tools/generate_pins.py does not work with 2.18 version of pycparser

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-07-21 11:54:07 +02:00
rerobika d75710cf27 replace_str_curr_p must be inspected before dereferencing (#1926)
Fixes #1917.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-07-20 10:26:51 +02:00
László Langó ce1d555288 Fix regression after #1927
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-07-20 16:58:08 +09:00
fbmrk 44833cf7be Fix code inserting in API-REFERENCE.md (#1928)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-07-19 11:25:33 +02:00
László Langó 0ef9b8e027 Fix RegExp character class compilation on unicode ranges.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-07-19 10:26:23 +09:00
Sanggyu Lee 5fd98fa2be Change tizenrt-artik05x port reference board to artik053
Artik053 board is publicly announced about one month ago.
So I updated tizenrt-artik05x reference board from sidk_s5jt200 to artik053.
Now, tizenrt-artik05x port works with latest TizenRT repo on artik053 board.

Also, I replaced str_to_uint to strtol since #1891 is landed.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-07-19 10:15:52 +09:00
Marko Fabo 270dbb00b2 error_name must be freed before return
Fixes #1918

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-07-19 07:19:02 +09:00
Gabriel "_|Nix|_" Schulhof 66b2a7670f New extension: module (#1863)
This extension provides the following facilities:
  - registering modules,
  - module resolvers, and
  - an API for retrieving a module instance given its name.

A module is defined as a global static structure containing a pointer
to a string which is the name of the module, and a pointer to a function
which will be called when an instance of the module is needed.

A module resolver is a function that accepts a string holding the name
of the module and returns a `jerry_value_t` in an out-parameter and
`true` if the module was found, or `false` if it was not. If it returns
`true` and the out-parameter has the error flag set then the API will
pass it through without caching.

This extension provides a built-in module resolver which attempts to
load modules that follow the above module definition.

The API provided by this extension invokes all module resolvers it
receives in sequence to attempt to resolve the name of a single module.
After one resolver returns `true` and a `jerry_value_t` that represents
the module the API stops iterating over the remaining resolvers and
caches the value if its error flag is not set. It then returns the
`jerry_value_t`. The API will return a `jerry_value_t` containing an
error indicating that the module was not found if it reaches the end of
the list of resolvers. The error it returns has an extra property
`"moduleName"` the value of which is a string containing the name of the
module that the API was asked to resolve.

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-07-18 15:54:24 +02:00
yichoi 5f2c72c472 Add test result information to the README.md (#1911)
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2017-07-17 13:40:56 +02:00
Osamu-Nakamura bb8ac29cce Revise the mistake in the example function described in "Step 5. Description of JerryScript value descriptors in docs/03.API-EXAMPLE.md (#1919)
JerryScript-DCO-1.0-Signed-off-by: Osamu Nakamura osamu.nakamura.xt@renesas.com
2017-07-16 10:32:01 +02:00
Akos Kiss 1f7606fc05 Improve pylint runner script (#1915)
- On OSX, `find` is more picky about its arguments than on Linux
  and requires the start directory(-ies) to be explicitly mentioned
  before the expressions (a.k.a. "primaries"). However, until now,
  the `pylint` runner script called `find` without a start dir,
  which caused an error on OSX.

- Until now, `find` looked for python scripts in all subdirectories
  of the project, causing `pylint` to check scripts under `targets/`
  and `tests/test262` (if `test262` was checked out). However, the
  files under `targets/` are less strictly controlled while
  `test262` is completely beyond the control of the project. This
  caused a lot of superfluous lint warnings.

This patch makes the `pylint` runner script call `find` in the
cross-platform way, and also limits the scope of the lint checks to
the `tools/` and `jerry-debugger/` directories.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-07-14 19:53:59 +02:00
yichoi 0844499cec Add IRC badge for convenience (#1920)
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2017-07-14 17:52:36 +02:00
Zidong Jiang 8c9b0d4086 Fix empty string issue in ext/args (#1921)
Now the js string "" can be converted to C array by jerryx_arg_string

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-07-14 17:41:02 +02:00
Akos Kiss 00f93bc287 Add support for doctests (#1909)
Markdown files in the docs/ directory can now be annotated to turn
fenced C code blocks into unit tests. The recognized syntax is:

    [doctest]: # (name="test.c", test="run")

    ```c
    // unit test code
    ```

The commit also fixes the issues revealed during the initial
annotation.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-07-14 16:18:20 +02:00
Robert Fancsik 3d744c958f Shifting array element down in the tree must be finished even if an error occurs
Fixes #1671

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-07-13 17:54:14 +09:00
Daniel Balla dbfb0170c1 JerryDebugger breakpoint system rework (#1908)
Reworking the python JerryDebugger breakpoint system.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-07-13 10:26:14 +02:00
Robert Sipka 89015a6119 Improve split method to gain memory (#1893)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-07-10 10:49:16 +02:00
Martijn Thé 91912689ad Fix hash calculation for strings created using jerry_create_string_from_utf8 (#1912)
The hash was being calculated over the bytes *after* the actual string bytes.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2017-07-10 08:53:58 +02:00
Akos Kiss 18283d22c0 Make debugger port runtime configurable
Convert debug server port from a compile-time constant to a context
variable. This enables each engine instance (either running in the
same process or in different processes) to listen for connections
at different ports, i.e., multiple engines can be debugged at the
same time on the same machine.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-07-06 07:08:00 +09:00
fbmrk cfa4fdd1ef target: mbedos5: unnecessary acquire and argument check bug (#1892)
When you cleanup the engine you got an `ECMA_STRING_IS_REF_EQUALS_TO_ONE (string_p)` error.
There is an unnecessary call of jerry_acquire_value which causes the problem.

Also in the InterruptIn-js.cpp file there is a wrong check of an argument.

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-07-05 23:09:10 +02:00
fbmrk d3cf335dad target: mbedos5: fix mbedignore (#1894)
Ignoring the entire jerry-port/default library causes a link error, because of the need for the defaultx-handler.c source file.

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-07-04 11:54:36 +02:00
Sanggyu Lee 0b08322a21 Fix build warning in jerry-ext/arg on tizenrt-artik05x
tizenrt-arttik05x treats warning as error for uninitialized use.
This patch fixes the error in jerry-ext/arg by initializing to zero.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-07-04 16:20:44 +09:00
Youngil Choi a823169bde Add daily measurement information to READ.md
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2017-07-04 15:09:25 +09:00
Zoltan Herczeg e6832f5f27 Rework argument parsing.
Heavily simplify the interface of CLI.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-07-04 08:56:55 +09:00
Sanggyu Lee 6b0d9e1b6a Throw SyntaxError for identifier with supplementary character
Fix assertion failure issue #1871 on github.
Don't allow supplementary character as identifier start or part.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-07-03 08:31:20 +09:00
rerobika f359eb2d1b Stack data should be freed for while statements after the expression is parsed (#1897)
Fixes #1873.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-06-30 10:29:19 +02:00
rerobika 3c992de2b8 Fix a build error (#1895)
Fixed an error when neither of libraries are found the build fails.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-06-29 12:11:18 +02:00
rerobika c31e8b8c17 Add timeout to jerry_debugger_receive (#1885)
Fixed when debug server uses a CPU core on 100%.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2017-06-28 11:26:45 +02:00
Akos Kiss 2f140e3b7f Add strtol to jerry-libc and make use of it in jerry-main (#1891)
As a side effect, refactor the variable types in
`print_unhandled_exception` to reduce the overuse of sized integer
types (generic `unsigned int` is better than `uint32_t` if there is
no actual requirement on integer width).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-06-26 17:10:07 +02:00
Zidong Jiang b153475093 add transform functions for integer in jerryx/arg (#1883)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-06-21 19:32:13 -05:00
Zidong Jiang e4eecc2019 add transform_object_properties in jerryx/arg (#1879)
Add a function in jerryx/arg.
jerryx_arg_transform_object_properties, it will validate the properties of a JS object, and convert those properties into native type.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-06-19 19:51:08 -05:00
fbmrk 7cc9d65c09 target: mbedos5: use jerry-ext (#1889)
Update target mbedos5 to use external function handlers: `assert`, `gc` and `print` from jerry-ext.

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-06-16 20:25:00 +02:00
fbmrk 70b078faa4 Update target mbedos5 README. (#1880)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-06-16 09:57:56 +02:00
Martijn Thé b947f56fd0 Add jerryscript-ext/autorelease.h with JERRYX_AR_VALUE_T (#1874)
JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2017-06-16 00:09:19 -05:00
Zidong Jiang 940f1f89c9 Check if it is object in Promise.prototype.then
Fix issue #1881

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-06-08 17:08:20 +09:00
Péter Gál d56713b9af When compiling with gcc 7 the current fallthrough comments (#1878)
are not accepted. This is a bug in gcc 7.

For now disable the fallthrough comment detection.
Disabling the check does not introduce any risk
as previously it was not enabled by default and
vera++ already check these kind of comments.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-06-08 17:07:40 +09:00
Péter Gál add60865e0 Rename files under jerry-code/debugger to avoid build fails (#1877)
Without the file renaming there are two jerry-debugger.c files.
Thus when the jerry-core archive is created there are two objects
in it with the same name. Generally this does not create any problems.
However if the archive is extracted then the second object file
will overwrite the first one which results in undefined reference
linkage error.

The jerry- prefix was removed from the file names and
fixed the include oreders where it was needed.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-06-07 08:39:30 +09:00
Akos Kiss 905cd705ef CMakeLists maintenance (#1826)
Removed various superfluous declarations, and rewrote some parts to
be nicer or more consistent.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-06-06 09:08:14 +02:00
Zidong Jiang 11d5402c35 Allow out_native_pointer_p in jerry_get_object_native_pointer to be NULL (#1876)
Support those cases when the existence of the native property is checked.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-06-05 10:44:56 +02:00
Daniel Balla 13930a1cd4 Fix exception argument check (#1875)
The If case didn't work properly when 0 was given to the --exception option.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-06-02 12:25:29 +02:00
Daniel Balla 5eb00b7ae0 Add command line option to exception and display commands (#1872)
You can now set --display and --exception parameters in the command line.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-06-02 10:40:12 +02:00
Robert Sipka ddbe067dee Set log level to JERRY_LOG_LEVEL_DEBUG when using show-opcodes on nuttx-stm32f4 target (#1869)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-06-01 08:51:15 +09:00
Zoltan Herczeg a9e7dd7b91 Check breakpoint stop condition in VM. (#1868)
Check breakpoint stop condition even after a message is processed.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-31 12:53:25 +02:00
Zoltan Herczeg efdc06996b Improve instance management in JerryScript. (#1849)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-31 15:53:53 +09:00
Daniel Balla b17a628c19 Add --color option to python debugger (#1865)
Adding --color option, highligthing the number of lines, the pointer and the actual breakpoint.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-05-31 08:53:55 +09:00
Daniel Balla 712d5ca8b7 Python debugger source & display command (#1850)
Reworked source(src) command to display a given range of the code, defaults to 3.

Added display command which does the same as the source, except it displays the source code everytime a breakpoint is hit.

Made tests for display, extended tests for src.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-05-30 10:58:34 +02:00
Sanggyu Lee ae60ff0aa3 Handle negative zero in number multiplication (#1856)
Keep sign for zero.
For example, 1 / (0 * (-1)) should be -Infinity, not +Infinity.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-05-30 10:57:32 +02:00
László Langó 631e9f9f80 Update the API examples to use print from extensions (#1846)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-05-30 09:59:49 +02:00
yichoi 783dcec6df Add license report and scan status with FOSSA (#1862)
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2017-05-30 16:11:46 +09:00
Jan Jongboom 37ed82437b target: mbedos5: Update to mbed OS 5.4.5 (#1853)
Also ignore the default jerry-port - see also #1847. Re-implement the `print()` function, as it's no longer part of core Jerry, but our programs still depend on it.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-05-30 09:09:09 +02:00
fbmrk a8a25e7f3c Update mbedos5 make (#1847)
Fix make clean and ignore jerry-port-default

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-05-30 08:58:03 +02:00
Gabriel "_|Nix|_" Schulhof 708b155f38 Clean up property existence check inconsistencies (#1860)
`jerry_has_property ()` and `jerry_has_own_property ()` are inconsistent
in that they squash their return value into a `bool` when in fact it is
a `jerry_value_t`, thereby giving the wrong impression that a property
is there when it isn't and encouraging the leaking of `jerry_value_t`s
by disguising them as `bool`s.

Fixes https://github.com/jerryscript-project/jerryscript/issues/1859

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-05-29 15:54:32 +02:00
Paul Sokolovsky b51b6824bb targets: zephyr: Reinstate "print" function and error printing. (#1851)
Re-add "print" function following resent refactors when it was moved
from jerry-core to jerry-ext. This is done in particular to keep
detailed messages on errors.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2017-05-25 09:08:34 +02:00
Robert Sipka 557fa5006c Set log level to JERRY_LOG_LEVEL_DEBUG when using mem-stats or show-opcodes (#1848)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-05-25 15:25:00 +09:00
Gabriel "_|Nix|_" Schulhof de53adbf88 Lazily create a linked list of context items (#1833)
This approach has the benefit that it does not require any *a priori*
initialization, and that each context pointer is identified by the way
in which it was created. Additionally, retrieving the context pointer
now requires that the entity responsible for creating/destroying it
(the manager) be given. Since managers are stored in global static
const structures, they should not normally be visible across source
files, and thus there should be no danger that a context item will be
retrieved by the wrong manager and thus cast into the wrong data type.

Since the items are stored in a linked list, their number will be
limited to exactly as many as are needed for a given context, with the
caveat that storing too many on a context will cause slow retrieval.

Thanks @mhdawson for the idea!

Fixes https://github.com/jerryscript-project/jerryscript/issues/1845

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-05-24 14:10:18 +02:00
Zoltan Herczeg 29f57ec58f Print exception hint in the debugger client when an exception is thrown. (#1841)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-23 16:06:25 +02:00
László Langó 7770b6237a Fix parsing of UTF-8 RegExp literals (#1840)
Fixes #1831

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-05-23 12:04:11 +02:00
Daniel Balla 8894077656 Implement memstats command in the debugger (#1838)
Implementation of memstats command in jerry-debugger, python and html client.
Shows the allocated bytes, byte code bytes, string bytes, object bytes, property bytes and heap size.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-05-23 11:19:15 +02:00
Zoltan Herczeg e58f2880df Do not allocate memory for zero length strings. (#1844)
Fixes #1821.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-22 13:17:08 +02:00
László Langó a504fd0333 Fix character escape in character class parsing of RegExp objects. (#1834)
Fixes #1830

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-05-22 13:01:22 +02:00
Robert Sipka 04f3bf62b0 Set log level to JERRY_LOG_LEVEL_DEBUG when using mem-stats. (#1843)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-05-22 12:58:40 +02:00
Zidong Jiang eb2af2d2a6 jerryx_arg: add '\0' when transforming string (#1827)
Related issue: #1824

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-05-22 08:32:20 +08:00
Zidong Jiang 5e28bfc28a Support external context, heap and lcache (#1778)
JerryScript should support external context, heap and lcache,
so that it can have multiple instances and runtime configurable heap
size.

Related issue: 1746

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-05-20 11:00:19 +08:00
Zoltan Herczeg c6d890ee13 Support functions with number identifiers in the pre-scanner. (#1837)
Fixes #1829.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-19 14:49:38 +02:00
Imre Kiss 833796a20f Fix the getBreakpoint() function in the HTML Debugger client. (#1839)
There was a problem around the offset, the function tried to use some invalid object reference.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
2017-05-19 14:38:19 +02:00
Daniel Balla ffdf151387 Fix a typo in a variable name (#1835)
There was a typo in a variable name causing the build to fail when mem-stats was turned on.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-05-19 10:03:02 +02:00
Levente Orban d48c65d258 Add pending breakpoints feature to HTML (JavaScript) Debugger client (#1828)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-05-19 09:50:17 +02:00
Zsolt Borbély 7833270ca0 Initialize an array in test-ext-arg.c (#1824)
In case of some compilers (e.g. gcc-4.9, gcc-5.4) the `TEST_ASSERT (arg3[4] == '\0')`
fails in test_validator1_handler() due to uninitialized memory fields.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-05-18 15:20:44 +02:00
Akos Kiss 23068bdf99 Move the job queue from the ports into jerry-core (#1804)
* Move the job queue from the ports into jerry-core

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu

* Remove port notification and keep `jerry_run_all_enqueued_jobs` API only

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-18 18:30:50 +09:00
Levente Orban 0806c16902 Add pending breakpoints feature to python debugger client (#1810)
- Support to add pending breakpoints
 - Add fbreak command for the prompt
 - Manage this breakpoints
 - Add tests for it

JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-05-18 09:00:38 +02:00
Akos Kiss 31cd3b8020 Rename internal lit identifiers (#1801)
We should keep the `jerry_` prefix for public API which is either
declared in jerry-core/include or implemented in jerry-core/api.
Moreover, we should also keep the convention to use short
identifiers for componentization within jerry-core, and use these
identifiers as directory names, file name prefixes, and identifier
prefixes.

Therefore, the tools/gen-unicode.py-generated arrays in
jerry-core/lit are renamed to use `lit_` prefix instead of `jerry_`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-16 10:34:41 +02:00
Akos Kiss 7837440cbb Add lightweight command line processor to jerry-main (#1809)
Eases command line option and sub-command definition, usage summary
and detailed help message printing, and argv processing.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-16 10:29:27 +02:00
Sanggyu Lee 1501699f48 Add setjmp and longjmp functions for tizenrt-artik05x (#1825)
This patch is based on nuttx-stm32f4 implementation.
However, I removed vldm and vstm since artik05x has no FPU.
It fixes the following error on running some testcases under tests/jerry/fail:

System Information:
        Versionarm_dataabort:
        Data abort. PC: 0410d9d8 DFAR: 0a00001d DFSR: 00000008
        up_assert: Assertion failed at file:armv7-r/arm_dataabort.c
        line: 111 task: appmain

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-05-16 09:57:32 +02:00
Zoltan Herczeg f4fbf0b0b5 Rework memory statistics to provide useful user information. (#1812)
Obsolote statistics is also removed.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-16 09:52:12 +09:00
Zoltan Herczeg f5b385ca6c Tracking variables to reduce the memory consumption of scope chain. (#1819)
Currently we keep all local variables in the scope chain as long as
a nested function is alive. These variables consume memory although
several of them are never used. This patch focuses on removing those
unused ones whose can be detected at parsing time.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-15 09:00:57 +02:00
Sanggyu Lee 8143a0cc10 Use external handlers in tizenrt-artik05x target (#1822)
This patch includes followings:
- Use external handlers in jerry-ext.
- Make jerry_main similar to other ports. (including options)
- Merge jerry_port.c into jerry_main.c
  jerry_port is clearly out of jerry-core.

This patch not included following:
- Use jerry-libm, instead of system libm.
  It is already included.
  We choose to use jerry-libm since the result of cube-3d sunspider was inaccurate
  when using NuttX libm.
- Correct setjmp/longjmp implementation.
  I tried to bring the source from NuttX port.
  Unfortunately it does not work in tizenrt-artik05x as it is.
  I will take a closer look the code and make sure it works.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-05-15 15:41:06 +09:00
Zsolt Borbély ca6e7881e8 Add category property to each .md file for the webpage (#1818)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-05-12 15:34:46 +02:00
Sanggyu Lee 91b06726bb Include jerry-ext/handler only in nuttx-stm32f4 target (#1816)
I included jerry-ext/handler only, rather than including all in jerry-ext.
Currently only handler is used in nuttx-stm32f4 repl.
nuttx.bin binary size is reduced from 231576 to 230456 bytes.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-05-12 15:17:11 +02:00
Levente Orban 0066e526f7 Increase verbosity when breakpoints not found in HTML client (#1817)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-05-12 11:36:56 +02:00
Zsolt Borbély e76d44a2ee Add docs about extensions to webpage-generator script (#1811)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-05-12 09:51:00 +02:00
Robert Sipka 2b152f079a Use external print handler in riot-stm32f4 target (#1814)
Extend example code with registering the `print` function in the global object.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-05-11 20:46:14 +02:00
Zoltan Herczeg 838e74df0f Remove include jerryscript.h from jrt.h. (#1803)
Fixes #1791.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-05-11 12:42:47 +02:00
Robert Sipka 7d133e55e4 Use external print, gc and assert handlers in nuttx-stm32f4 target (#1813)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-05-11 07:26:10 +02:00
fbmrk 1a7b258772 Set JERRY_JS_PARSER to 1 in mbed_app.json (#1808)
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
2017-05-10 17:14:24 +09:00
Akos Kiss a8f2d31bca Implement common external function handlers in jerry-ext (#1787)
Added `handler` module to `jerry-ext` to contain implementation of
commonly used external function handlers: `assert`, `gc`, and
`print`.

Also adapted jerry-main to use jerry-ext/handler

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-09 10:16:56 +02:00
Akos Kiss 68f9585b96 Fix jobqueue's return value handling in jerry-main's repl mode (#1807)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-09 12:40:53 +09:00
Akos Kiss 7f32abf75c Remove limitation on number of command line arguments in jerry-main (#1806)
Since JerryScript has been a C99 project for a while now, we can
use variable-length arrays. This allows the removal of the
artificial limit on command line arguments in jerry-main.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-09 12:40:37 +09:00
Akos Kiss 59c7ffe363 Shouldn't use jerry_value_t in ecma-exceptions.c (#1800)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-07 21:46:15 +02:00
Akos Kiss 91e976f8c7 Move jerry-core API implementations and headers into dedicated subdirectories (#1793)
Moved all public API headers under the `jerry-core/include`
directory. This makes installing all the public headers easier.
Also, should we have new public headers in the future, their
installation will be automatic, there will be no need to update the
build files. Moreover, this aligns better with the structure of
other libraries in the project (in those cases, public headers
always reside in `<library>/include`).

Moved all public API implementations under the `jerry-core/api`
directory. This cleans up the root directory of `jerry-core`,
moving all implementation code under "modules", i.e.,
subdirectories. This also makes the future splitting of the big and
monolithic `jerry.c` along features easier, if needed. (Debugger
and snapshot-related functions are already in separate sources.)

Notes:
* `jerryscript.h` is split up to separate header files along
  feature boundaries. These new headers are included by
  `jerryscript.h`, so this is not a breaking change but header
  modularization only.
* `jerry-snapshot.h` is still under `jerry-core/api`, keeping it as
  a non-public header.
* This commit also adapts all targets to the include path change.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-04 15:28:24 +02:00
Zidong Jiang 90efdf9c8b A tool in jerry-ext: arg transformer for binding (#1740)
It provides some APIs for binding developers, so that
they can validate the type of the js argument and convert/assign them
to the native argument.

Related Issue: #1716

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-05-04 18:00:35 +08:00
Zidong Jiang ede13835b2 Add promise C API (#1796)
Add API: jerry_create_promise, jerry_value_is_promise and jerry_resolve_or_reject_promise.

related issue: 1794

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-05-04 16:13:26 +08:00
Akos Kiss 240411771a Remove the built-in print and the jerry_port_console port API functions (#1749)
The built-in `print` is removed from jerry-core, but an external
`print` implementation is added to jerry-main. From now on, all
embedders of the engine have to implement their own `print` if they
need such a functionality.

For printing results in REPL mode of jerry-main, the external
`print` handler is called directly instead of looking up the `print`
function registered into the global object. (The two are the same,
but the indirection is not needed anymore.)

Because jerry-core does not contain `print` anymore,
`jerry_port_console` is removed from the port API. The default port
is updated, i.e., the implementation of `jerry_port_console` is
removed. Additionally, all references to `jerry_port_console` in
jerry-main are replaced by `printf`.

Speculatively, `jerry_port_console` is also removed from all
non-default targets. Most targets implemented it for the sake of the
engine only; in those targets the removal was trivial. Where the
function was called from the embedder application as well, the
calls were replaced with equivalents (e.g., `printf`, `printk`).

NOTE 1: This is a breaking change!

NOTE 2: This patch still leaves several targets without a JS `print`
implementation.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-03 11:47:56 +02:00
Akos Kiss 3705bf19d0 config.h maintenance (#1792)
The config header was full of legacy, no-longer-in-use defines. It
was also included from multiple files where it was not necessary.
This patch removes the unused defines, and cleans up headers so
that only `ecma-globals.h` includes `config.h`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-02 08:44:57 +02:00
Zoltan Herczeg 894aa6d036 Support ECMAScript stopping in JerryScript. (#1753)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-04-28 14:19:23 +02:00
Robert Sipka 0e38356e5b Update riot-stm32f4 target to use jerry-port-default-minimal (#1790)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-28 10:49:39 +02:00
Robert Sipka 56802c22a1 Remove unnecessary subfolder in tests/jerry/fail/ (#1783)
There is no need to create error code named subfolders since
every failing tests return with the same code.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-28 09:17:23 +02:00
Zidong Jiang 14c455bcd8 [native pointer] Check if freecb is NULL before calling it (#1789)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-04-28 09:01:40 +09:00
Akos Kiss 6ecee7eef4 Ensure that jerry-port is license-checked (#1788)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-28 08:59:10 +09:00
Sanggyu Lee c9dac6a720 target: tizenrt-artik05x: Add missing jerry_port.c (#1786)
Add missing jerry_port.c in previous initial port.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-04-27 10:25:29 +09:00
Robert Sipka fb432a8bd7 Eliminate pylint warnings from generate_pins.py (#1731)
It also contains small refactoring steps:

* Added a main() function - instead of just writing all the code into the
  "if name" block - to avoids creating global variables that could affect
  other functions.

* Added a `write_pins_to_files` function - which writes the generated pins
  into the output JS and C++ files - to avoid too many local variables.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-26 15:18:20 +02:00
Zidong Jiang 078f6e101d Implement other routines of Promise (#1729)
Add Promise.resolve, Promise.reject, Promise.race, Promise.all and
Promise.prototype.catch

Also it fixes the issue 1763

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-04-26 19:47:51 +08:00
Levente Orban 9d4123c3c4 Fix the exception handler bug (#1780)
If the debugger evaluate a variable out of the scope in eval mode, its get an error.

JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-04-26 20:29:16 +09:00
Akos Kiss 8aca0acaa1 Aftermath of PRs #1505 and #1755 (#1771)
PR #1505 added support for TI compiler. It explicitly added a
message to notify the user that static linking is forced. PR #1755
added a more generic approach to signal such forced settings and
adapted the TI-specific static linking notification to this
approach. However, it turned out that TI forcibly changed another
setting, too: it disabled release binary stripping, but without
notification. This patch fixes this by moving the setting override
to a consistent place and adding a notification.

PR #1505 also added some source code changes, most importantly a
complex struct initialization for a variable in
`ecma-objects-general.c`. However, that initialization was coded
as a macro to trick the style checker. This patch gets rid of that
macro and uses proper C99 struct initializer with designators.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-26 12:53:41 +02:00
Sanggyu Lee e8be1984bb target: tizenrt-artik05x: Initial porting (#1775)
Initial porting to tizenrt-artik05x.

Tizen RT is a lightweight RTOS-based platform to support low-end IoT devices.
The project is under developing in github TizenRt repo.
Artik05x is an IoT SoC solution that will be released soon.

This PR contains the minimum porting that can print Hello
world from jerryscript and a document for building and running.

I used jerry_port.c and jerry_main.c in nuttx port and default port for
porting base code. Also I used Make.defs and Makefile in working
example in tizenrt for adding jerryscript configuration.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-04-26 11:19:14 +02:00
Akos Kiss d48db1d5bd Remove jerry-internal.h (#1782)
The internal header was a legacy, declared two functions only. One
of them was not used anymore at all, the other was used at a single
call site. Moreover, their documentation was outdated. This patch
removes the header and the related function implementations -- as
well as the temptation to use such internal functions from outside
the library.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-26 08:05:33 +09:00
Akos Kiss fdbbd0e8af Turn port implementations into proper libraries (#1777)
This commit changes the concept of JerryScript port implementations
from a simple directory of C source files (which get injected among
the sources of `jerry-core`) into a proper static library (which
may be linked to an application together with `jerry-core`). As a
consequence, this commit introduces a new library to the
JerryScript component architecture: the sources of the default port
implementation form `jerry-port-default`.

Changes in more detail:

- The sources in `targets/default` are moved to `jerry-port/default`
  and are turned into a proper static library.
  - Actually, the default port implementation has two library
    variants, one that implements the bare minimum only
    (`jerry-port-default-minimal`) and one that has some extra
    functionalities specific to this implementation (the "full"
    `jerry-port-default`).
  - The new libraries have an interface header in
    `jerry-port/default/include`, which extends the common
    `jerryscript-port.h` API with functions specific to these
    libraries.
  - All non-standard port functions have now the
    `jerry_port_default_` prefix (this affects `jobqueue_init` and
    `jobqueue_run`).
  - The jobqueue implementation functions became config macro
    independent: it is now the responsibility of the linker to pick
    the needed objects from the library, and omit those (e.g.,
    jobqueue-related code) that are not referenced.
  - Build of the libraries can be controlled with the new
    `JERRY_PORT_DEFAULT` cmake option.

- The cmake option `PORT_DIR` is dropped, and `PORT_DIR/*.c` is not
  appended to `jerry-core` sources.
  - Instead, the `jerry` tool of `jerry-main` links to
    `jerry-port-default`, while `jerry-minimal` links to
    `jerry-port-default-minimal`.
  - `tests/unit-core` tests are also linked to
    `jerry-port-default-minimal`.

- Tools adapted.
  - `build.py` has `--jerry-port-default` instead of `--port-dir`.
  - `check-*.sh` have paths updated (`jerry-port/default` instead
    of `targets/default`).

- Miscellaneous.
  - Dropped `#ifndef`s from `jerryscript-port.h`. It is a public
    header of the `jerry-core` library, which means that it must
    not contain configuration-dependent parts (once the library is
    built with some config macros and the archive and the headers
    are installed, there is no way for the header to tell what
    those config macrose were).
  - Added documentation comments to the JobQueue Port API (in
    `jerryscript-port.h`) and to several default port
    implementation functions (in `jerry-port/default`).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-25 19:33:10 +02:00
Akos Kiss 49ae946644 Merge lit-unicode-*.inc.h-related generator scripts (#1767)
The `conversions` and `ranges` files had separate generators, which
shared some functionality through a 3rd python module, and were
quite similar to each other -- but also had some differences.
Moreover, as they were separate scripts, nothing forced to keep the
outputs in sync (to re-generate them at the same time from the same
inputs).

To fix these maintainability issues, this patch
- merges the two python files and part of the 3rd utility module
  into a single script while keeping the existing functionality,
- names the new file `gen-unicode.py` to align better with other
  generator script in `tools`, and
- adds some extra documentation how to retrieve the input files
  (as they are not part of the repository).

The refactoring affected the utility module as well, so this patch
also
- renames `c_source_helper.py` to `gen_c_source.py` (again, for
  naming consistency),
- reorganizes some of its functions not to export module-local
  helper functions, and
- adapts `js2c.py`, as it also uses this utility module.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-25 07:22:05 +09:00
Martijn Thé 1f6b396ebb bugfix: jerry_get_object_native_pointer: accept NULL for out_native_info_p (#1770)
With the jerry_set_object_native_pointer() the native_info_p is optional, so I think it makes sense that it is optional for the getter as well.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2017-04-24 13:52:00 +02:00
Zsolt Borbély 07c86ece54 Fix alignment in case of enabled 32bit compressed pointers (#1764)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-24 13:02:14 +02:00
Martijn Thé 849ea45cc2 Improve documentation for jerry_get_object_native_pointer API (#1769)
Based on feedback I got from people who tried using the new API, it was not immediately clear how to properly use it.
Hopefully these doc additions make it more clear how to use it and why it is designed the way it is.
Also fixed some mistakes in the example and provided more comments to explain the intent of the code.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
2017-04-24 10:40:24 +02:00
Sanggyu Lee acf88d2fe8 Fix maybe-uninitialized warning in ecma-objects.c (#1773)
During building jerryscript with arm-gcc-noneeabi 4.9.3,
maybe-uninitialized warning occurred. This patch fixed the warning.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
2017-04-24 10:08:13 +02:00
Akos Kiss 4f4f75e1a8 Update paths in check tools (#1772)
In #1761, not all unit test paths have been updated in check tools.
This triggers no errors as `check-vera` emits a warning only while
`check-cppcheck` signals nothing. Still, this means that some of
the code in the repository that has been quality-assured, is now
avoiding checks. This patch fixes this.

Moreover, `check-cppcheck` has had incorrect paths for a while: it
looked for source files in the root of the repository, but those
files have been in `jerry-main` for almost a year now. This patch
fixes this, too.

Fallout of the above: `main-unix-minimal.c` had to be improved to
make `check-cppcheck` pass.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-24 09:01:03 +09:00
Akos Kiss 0ab099b787 Add JERRY_FEATURE_DEBUGGER to API docs (#1768)
In #1738, `JERRY_FEATURE_DEBUGGER` was added to the sources, but
the docs were not updated.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-24 09:00:21 +09:00
Akos Kiss 6ca8319aea Split unit tests into separate directories (#1761)
The unit tests should follow the component structure, so this patch
moves all `jerry-core` unit tests under `tests/unit-core` and the
`jerry-libm` unit tests under `tests/unit-libm`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-22 10:57:45 +09:00
Akos Kiss 66ade0d81c Add Python wrapper for the HTML-based debugger (#1736)
The patch aims at easing the startup of the HTML-based JerryScript
debugger client by adding a python script that starts the default
browser with the HTML page implementing the debugger client.
Additionally, the pyton script encodes the host:port address
information of the debug server in the file url and the HTML client
is extended to retrieve this information. Thus, both the console
and the browser-based debugger client can be started similarly.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-22 10:55:39 +09:00
Akos Kiss 6c3a6e7be3 Rename jerry-port.h to jerryscript-port.h (#1762)
All public headers should follow the pattern `jerryscript[-*].h`.
The `jerry-api.h` to `jerryscript.h` renaming has already happened
a while ago, now it's time for the port API header to follow.

This patch
* renames the public header file,
* updates all includes to use the new file name (in `jerry-main`,
  in all the targets, and in the docs), and
* keeps `jerry-port.h` as a deprecated forwarding header to leave
  some time for external users to follow up with this change.

As a related change, the header of the default port implementation
is also changed to `jerryscript-port-default.h`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-22 10:53:12 +09:00
Zidong Jiang 63b6fd1bc9 Add the class name of promise.prototype (#1766)
Fix Issue: 1765

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-04-22 08:34:42 +08:00
Akos Kiss 67c641e567 Generate lit-magic-strings.inc.h (#1690)
Currently, `lit-magic-strings.inc.h` is manually maintained. This
has several drawbacks:

- keeping the list of magic strings sorted first by length then
  alphabetically is error prone,
- it is easy to leave unused magic strings in the list by accident
  (e.g., `LIT_MAGIC_STRING_JERRY_UL` is defined as a magic string
  but not used anywhere in the code) and,
- it is very hard to add `CONFIG_DISABLE_*_BUILTIN` guards to the
  list, even though there are several magic strings, which are used
  in some of the configurations only (e.g, "setPrototypeOf" is used
  in ES2015 only).

To ease the maintenance of magic strings, this commit moves the
definition of magic strings to a config file
(`lit-magic-strings.ini`), and adds `tools/gen-magic-strings.py` to
generate the `.inc.h` file from this config file and from the use
cases of the strings in the code.

- The magic strings in the config file can appear in any order, the
  generator will ensure that they are correctly sorted.
- The generator skips those definitions that are not used anywhere
  (and emits a warning to signal that such definitions can be
  removed).
- The generator applies the same guards to the definitions in the
  `.inc.h` file as found in the code around the use of the strings
  to optimize for size.

The commit also changes some builtin-related `.inc.h` files by
adding guards that don't affect functionality but improve the
results of the generator.

To ensure that the invocation of the generator does not get
forgotten, the commit also adds `tools/check-magic-strings.sh` and
binds it into the testing infrastructure.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-21 11:42:36 +02:00
Roland Takacs 5231829fc9 Enable dummy time zone in nuttx-stm32f4 target. (#1760)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2017-04-21 18:09:11 +09:00
Akos Kiss d93bc3a849 Make string handling in debugger more pythonic (#1757)
* `to_string` is unpythonic, let's use `__str__` instead.
* `\"%s\"` for strings is also unpythonic, let's use `%r`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-21 09:52:06 +09:00
Akos Kiss 4cff7a3f2c Fix/rewrite/darwinize test runner of jerry-debugger (#1756)
First issue was that `diff -u0` was not supported on OSX, thus got
replaced by `-U0`. Then, it turned out that test outcome was
determined based on diff's stdout, which was empty even though the
exit code was non-0 - this got changed, too.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-21 09:51:31 +09:00
Akos Kiss 84f0279289 Allow platforms/compilers to signal that user-specified settings are overridden (#1755)
Currently, the Darwin platform and the TI compiler force some of
the settings to predefined values. This patch ensures that these
overrides are highlighted during build.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-21 09:49:46 +09:00
Robert Sipka 5271214623 Support error messages on nuttx-stm32f4 target (#1754)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-21 09:48:58 +09:00
Akos Kiss 2ebb8de3ab .gitignore maintenance (#1758)
* OSX Finder leaves `.DS_Store` files around; make them ignored.
* The mbedk64f target has been renamed to mbed a long time ago;
  follow that change in .gitignore, too.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-21 09:45:09 +09:00
Akos Kiss ea44b3b44c Refactor the command line option handling of the jerry tool (#1745)
The file `main-unix.c` contained a lot of recurring patterns in the
command line option handling parts. This patch removes these code
clones with the introduction of two helper functions. The goal of
the patch is to have a smaller and maintainable `jerry` tool (mostly
source-wise).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-20 15:12:10 +02:00
Akos Kiss 2424ba71f2 OSX-related CMakeLists maintenance (#1750)
Disable release binary stripping on OSX: The linker of OSX does not
support `-s` for link-time stripping. (The option does not cause an
error but clutters build output with warnings.)

No OSX-dependent LTO flags: LTO is disabled on OSX.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-20 19:42:13 +09:00
Zsolt Borbély fda5924b06 Rename the doc of coding standard and add it to the update-webpage.sh (#1748)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-20 12:23:53 +02:00
Zsolt Borbély 2fa9ae8d64 Fix link-generation in tools/update-webpage.sh (#1747)
This change is required to fix invalid links in 'See also' sections.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-19 13:48:42 +02:00
Zsolt Borbély befa7a88fe [nuttx-stm32f4] Use jerry-libm instead of the math library in NuttX (#1744)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-19 10:22:48 +02:00
Robert Sipka 8d99e73db3 Add setjmp and longjmp functions for nuttx-stm32f4 target. (#1743)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-19 07:10:05 +09:00
Robert Sipka 9cbd5e78ad Refactor js2c.py and eliminate related pylint warnings (#1728)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-19 07:08:32 +09:00
yichoi 67d5df2735 Update mailing list information (#1742)
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2017-04-18 20:58:09 +09:00
Zsolt Borbély 5449b0f40b Always define debugger-related opcodes (#1734)
This change makes the generated snapshot independent from buildconfig.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-18 18:20:20 +09:00
Akos Kiss 0f4edbe580 Ensure that const and pure function attributes are used properly (#1739)
Some functions were incorrectly marked as const but were pure only
(or not even pure). Some functions were marked as pure but
qualified as const. Some functions were not attributed at all but
qualified either as pure or const. Some functions had attributes
at definition but not at declaration. This commit fixes these
inconsistencies.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-18 17:15:34 +09:00
Akos Kiss dc1dc093d9 Add JERRY_FEATURE_DEBUGGER (#1738)
Until now, it was not possible to query the engine whether its
build configuration contained debugging support. This commit adds
the `JERRY_FEATURE_DEBUGGER` label to `jerry_feature_t` and extends
`jerry_is_feature_enabled` to support the new feature flag.
Additionally, the command line tool `jerry` was enhanced to report
a warning when invoked with `--start-debug-server` but linked to a
non-debuggable engine.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-18 17:15:13 +09:00
Tomasz Wozniak 42206d27c8 Janitorial: add missing integer cast to remove compiler warning. (#1720)
JerryScript-DCO-1.0-Signed-off-by: Tomasz Wozniak t.wozniak@samsung.com
2017-04-17 11:30:18 +09:00
Gabriel "_|Nix|_" Schulhof b4a3985560 Support a user context void * pointer in jerry_context_t (#1717) (#1727)
This modification makes it possible to initialize a context in such a
way that a `void *` pointer is stored inside the context and is made
available via a new `jerry_get_user_context()` API.

The pointer is initialized via a new `jerry_init_with_user_context()`
API, which calls the existing `jerry_init()`, after which it sets the
value of the new `user_context` element in the `jerry_context_t`
structure using the context allocation callback provided as the second
parameter to the new `jerry_init_with_user_context()` API. The location
of the cleanup function responsible for deallocating the pointer created
by the context allocation callback is provided as the third parameter.
This location is stored in the context along with the pointer itself.

When a context is discarded via `jerry_cleanup()`, the user context
cleanup function is called to dispose of the pointer stored within the
context.

The semantics behind the API are such that it is now possible to choose
for each context an agent which manages arbitrary user data keyed to the
given context. The agent must be chosen at context instantiation time
and cannot be changed afterwards, remaining in effect for the lifetime
of the context.

Fixes #1717

JerryScript-DCO-1.0-Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
2017-04-14 08:25:29 +08:00
Akos Kiss 4b9e458f44 Add support for init/fini arrays to libc (#1725)
The arrays contain the addresses of functions annotated with
constructor or destructor attributes. The support is optional,
requires FEATURE_INIT_FINI cmake option to be set. As of now, the
option is _not_ available in tools/build.py directly, only via
`--cmake-param="-DFEATURE_INIT_FINI=ON"`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-04-13 17:18:17 +02:00
Zsolt Borbély 950a0f10cd Fix a few issues which can lead to undefined-behaviour (#1730)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-13 21:34:10 +09:00
Robert Sipka 605e9847d2 Add testing support for nuttx-stm32f4 target (#1733)
Provide the 'assert' and 'gc' implementation for the engine.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-13 14:09:31 +02:00
Robert Sipka 95809cd977 Buildfix for nuttx-stm32f4 target (#1732)
The `jerry_port_jobqueue_enqueue` function is undefined on this target.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-13 20:47:00 +09:00
Zoltan Herczeg 239ae4963c Add documentation about the Coding Guidelines (#1459)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-04-13 16:53:07 +09:00
Zidong Jiang eb8dd4602b Implement the basic Promise (#1695)
Implement the Promise Constructor and routine: 'then'

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-04-12 22:10:08 +08:00
Zoltan Herczeg 01fe5ab190 Small improvements for type property support. (#1724)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-04-12 15:05:29 +02:00
Levente Orban a83319cfa1 Fix the stlink binary path (#1726)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-04-12 14:45:58 +02:00
David Brown 5481fca060 Fix .gitignore syntax (#1721)
Change instances of **.ext in the .gitignore to just *.ext.  I think
the intent was to match these patterns in any directory, which is what
will happen with simple patterns.  The '**' construct is meant to
match zero or more full paths, but it must be the sole component of
the path.

Discovered by a warning from ripgrep.

JerryScript-DCO-1.0-Signed-off-by: David Brown david.brown@linaro.org
2017-04-11 13:28:05 +02:00
Zidong Jiang e522e740a7 Add 'type' argument to set/get native handle API (#1711)
Ecma-object have native handle type inside, and binding code could use
type info to validate native handle's type.

Related issue #1681

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-04-10 16:51:37 +08:00
Zsolt Borbély 574dff512e Remove duplicated profile-check from build.py (#1718)
This check is performed in cmake-side too.
The README.md about the profiles is also updated.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-07 18:47:22 +02:00
Zsolt Borbély 69f03475b2 Add the directory of test262 tests to .gitignore (#1719)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-07 17:03:38 +02:00
Zoltan Herczeg 13b305f716 Refactoring several array buffer and typed array functions. (#1715)
The ecma_typedarray_create_object_with_typedarray function is fully rewritten.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-04-07 11:20:03 +02:00
Robert Sipka 1886d54474 Update unicode ranges to the latest version of Unicode Standard (version 9.0.0) (#1714)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-06 10:07:17 +02:00
Zsolt Borbély 5d950ccb05 Remove unused functions (#1710)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-04 10:49:47 +02:00
Zsolt Borbély db22169293 Fix wrong condition in vm.c (#1708)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-03 15:21:34 +02:00
Zoltan Herczeg 1aec439869 Mark target_function of bound objects. (#1707)
Fixes #1621.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-04-03 13:05:29 +02:00
Levente Orban a5b90ed858 Add minor features to debugger html client (#1705)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-04-03 12:36:48 +02:00
Robert Sipka 5f24620c8a Fix helper function for rounding numbers (#1702)
Fixes #1701

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-03 08:44:46 +02:00
Robert Sipka f0a7e2456a Add coverity scan (#1700)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-03 08:44:30 +02:00
Levente Orban efa7975ce9 Fix pylint warning in debugger python client (#1704)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-31 10:48:40 +02:00
Levente Orban 5525f5241d Bug fix for the debugger python client 'quit' command (#1703)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-31 08:34:40 +02:00
Zoltan Herczeg 750e0ca9d5 Fix several style fixes for typed arrays and optimize filter a bit. (#1697)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-30 16:06:11 +02:00
Zidong Jiang 41c63e08b1 Combine ARRAYBUFFER and TYPEDARRAY macros together (#1699)
Change CONFIG_DISABLE_ES2015_ARRAYBUFFER_BUILTIN to
CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
Because typedarray depends on arraybuffer and it doesn't make sense to
enable arraybuffer only.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-30 21:22:22 +08:00
Robert Sipka 3ff9a7de8a Fix the number of copied bytes in memmove (#1698)
Fixes #1634

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-30 10:40:05 +02:00
Levente Orban 20466a7637 Add missing test for debugger (#1692)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-30 10:29:32 +02:00
Zoltan Herczeg 343bac56b2 Add C-API for the debugger. (#1688)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-29 12:46:07 +02:00
Akos Kiss 2d9484a968 Don't do duplicate builds during test runs (#1691)
The `run-tests.py` test execution harness validates the correctness
of JerryScript by building various configurations of jerry and
running various test suites and subsets against it. However, until
now, it always built jerry for each (build configuration, test suite)
pair. This commit improves `run-tests.py` by skipping duplicate
builds, sharing the same-built binaries across multiple test suite
runs.

The patch also improves on the style of how `Option`s are specified
and fixes the name of the `jerry_tests-debug-cpointer_32bit`
option.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-28 15:48:09 +02:00
Zidong Jiang 16d5d6f79d Add a simple Job queue in default port. (#1685)
Job queue (event loop) is the basis of Promise. Each port should implement their own job queue.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-28 21:15:01 +08:00
Levente Orban 21cec3eb16 Add Stop at exception feature to the debugger (#1693)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-28 12:51:10 +02:00
Akos Kiss da07252c45 Sort minimal profile (#1689)
Profiles used to be in alpha order. However, after the recent
`CONFIG_DISABLE_[ES2015_]*_BUILTIN` renamings, the minimal profile
became unsorted. This commit re-sorts the file.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-27 11:01:05 +02:00
Robert Sipka faa9655981 Add asserts to avoid the access of cbc_flags and cbc_ext_flags arrays outside of their bounds (#1686)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-24 11:30:41 +01:00
Levente Orban c09ba8cdb3 Rename 'CONFIG_DISABLE_ARRAYBUFFER_BUILTIN' to 'CONFIG_DISABLE_ES2015_ARRAYBUFFER_BUILTIN' (#1687)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-24 11:30:23 +01:00
Zidong Jiang 8571ebfae5 Implement %TypedArray%.from and fix the issue #1670 (#1679)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-24 10:37:22 +01:00
Levente Orban f50193111b Rename 'CONFIG_DISABLE_TYPEDARRAY_BUILTIN' to 'CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN' (#1683)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-24 08:06:03 +01:00
Robert Sipka 0807c97cbb Eliminate duplicated statements in re-parser.c (#1680)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-23 16:20:32 +01:00
Péter Gál 013430aafb Fix minor inconsistencies in the API documentation (#1663)
In the jerry_set_prototype part the method was described
as jerry_get_prototype. Minor typo fix.

The usage of jerry_set_property was incorrect. Each
call to the jerry_set_property returns a value which must be freed.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-03-23 15:50:24 +01:00
Akos Kiss 4a5df52aa1 Factor out common macro un/definitions used for built-in descriptions (#1678)
The default definitions and undefinitions of macros used for built-in
descriptions (SIMPLE_VALUE, NUMBER_VALUE, STRING_VALUE, OBJECT_VALUE,
ROUTINE, ACCESSOR_READ_WRITE, ACCESSOR_READ_ONLY) are heavily cloned
all over the builtin-objects directory. This commit factors them out
into two header files, which are then included in the place of the
clones. This way, maintenance becomes a lot easier: e.g., if a new
macro gets introduced, default definition and undefinition don't have
to be added to all description files (of which there are 56 right now,
and their number will most probably just grow).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-23 09:36:29 +01:00
Zsolt Borbély 852a6aef53 Minor fixes around the debugger (#1677)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-03-23 09:08:06 +09:00
László Langó fa5d5febcc Fix several pylint warnings. (#1659)
Fixed all of the remaining warnings in 'build.py', 'run-tests.py' and 'check-license.py'.

Related issue: #1600

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-22 15:37:55 +01:00
Robert Sipka 78e4dcf6c2 Build fix for 32-bit float ecma-number storage (#1669)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-22 14:18:43 +01:00
Akos Kiss 6ddf00a9fa Fix comments of ecma_lexical_environment_type_t (#1676)
The comments of `ecma_lexical_environment_type_t` document why the
values of the enum are as they are, while referring to
`ecma_object_type_t`. However, they became out of sync lately and
refer to nonexistent enum labels and/or incorrect values. This
commit gets the two enums in sync.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-22 11:36:44 +01:00
Akos Kiss 20a21a1faf Unify timeout mechanism in test runners and ensure that they work on OSX (#1672)
On OSX, the traditional GNU `timeout` command is available as
`gtimeout`. So, this commit adds some logic to the test runners to
try and find the right command name on the host.

Moreover, the commit also unifies the timeout mechanism across all
test runners by rewriting occurrences of `ulimit`-based timeouting
to use the `[g]timeout` command.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-22 10:51:37 +01:00
Robert Sipka 7e1ade3406 Remove logically dead code (#1674)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-22 10:17:12 +01:00
Levente Orban 4420401cf5 Style fix: return value comments (#1668)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-21 10:24:54 +01:00
Akos Kiss e66bb5591d Implement Object.setPrototypeOf from ES2015 specification (#1666)
`Object.prototype.__proto__` has been implemented by most JS
engines to give R/W access to prototype chains, well before it made
it into the standard. JerryScript has decided not to implement it,
exactly because it was not part of ES 5.1. The only fully
ES5.1-compatible way of accessing the prototype chain is
`Object.getPrototypeOf` for reading.

However, ES2015 defines `Object.setPrototypeOf` for rewriting the
prototype chain, and JerryScript has now an ES2015 subset profile.
So, this commit adds its implementation to JerryScript.

Note, this commit does _not_ add `Object.prototype.__proto__`,
since that is in the Annex B of ES2015 specification, which is
optional for non-web-browser hosts.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-21 10:11:07 +01:00
Levente Orban 868ba92e02 Add more tests for the remote debugger (#1667)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-20 12:38:04 +01:00
Gabor Loki dd7e20c85d The mbed ports used wrong time computations for the (#1642)
'jerry_port_get_current_time' function. Microseconds was used instead of
milliseconds.

A quick fix has been done in the Yotta-based mbed port, and an extended one
- with correction - works in the mbed OS 5 port now.

JerryScript-DCO-1.0-Signed-off-by: Gabor Loki loki@inf.u-szeged.hu
2017-03-17 08:35:14 +01:00
Robert Sipka 23ac60915f Modify the snapshot API functions to expect a 32-bit aligned buffer pointer (#1655)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-17 09:01:59 +09:00
Levente Orban 05bb5d7890 Improve the debugger python client messages (#1654)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-17 09:01:10 +09:00
Akos Kiss edadc53def Fix Date objects' YearFromTime helper for out-of-range time values (#1658)
For negative out-of-range time values, ecma_date_year_from_time
fell into an infinite loop. (Moreover, for positive out-of-range
time values, it returned an incorrect year.) This patch fixes the
helper to return NaN in these cases (and ensures that its call
sites are prepared for NaN values).

Fixes #1657.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-16 17:03:42 +01:00
Robert Sipka d77d4ae1c6 Refactor the generator scripts for unicode tables (#1623)
Extract the source code generator methods into a separated `unicode_c_source.py` script.
Fix the generator scripts to make them compatible with both Python2 and Python3.
Remove pylint warnings.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-16 09:32:18 +01:00
Robert Sipka 818c9cd0b0 Fix issue #742 (#1650)
It is a workaround fix. The problem comes from the inaccuracy of the double rounding.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-16 08:59:48 +01:00
László Langó 202a88bbeb Temporarily disable a few test262 tests in automatic testing. (#1662)
Those tests are related the actual daylight saving adjustment.
Related issue: #1661

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-14 15:26:56 +01:00
Zoltan Herczeg 1b4426fd2a Check whether match result has error flag. (#1653)
Fixes #1641.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-14 10:01:22 +01:00
Gabor Loki ed32ba148c Fix the example code of 'jerry_define_own_property' function (#1656)
JerryScript-DCO-1.0-Signed-off-by: Gabor Loki loki@inf.u-szeged.hu
2017-03-13 15:52:06 +01:00
Zoltan Herczeg 679500b327 Improve breakpoint generator of the debugger. (#1652)
Now the debugger generates a breakpoint for each function before
its first executable statement. This allows inspecting the function
arguments. Position (line and column) info is also added which
simplifies finding of anonymus functions. Several tests were
update to check more corner cases.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-13 11:36:34 +01:00
László Langó 57ea06782b Fix several pylint warnings. (#1644)
Fixed
 * 'unused-wildcard-import'
 * 'bad-whitespace'
 * 'bad-continuation'
 * 'wrong-import-order'
in 'build.py', 'run-tests.py' and 'check-license.py'.

Related issue: #1600

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-13 11:18:49 +01:00
Zoltan Herczeg b140158104 Fix various number parsing issues. (#1648)
For example Number(".") and Number("e5") should be NaN not
zero. Parsing Number("e") caused buffer overflow as well.
Infinity parsing is a bit faster now.

Fixes #1636.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-09 15:03:46 +01:00
Tilmann Scheller f8dd54abb6 Fix old-style function definitions and enable warning. (#1651)
Function definitions with no parameters should always use the void keyword to allow the compiler to catch invalid calls of those functions at compile time.

Enable -Wold-style-definition to catch this early in the future.

Fixes #1649.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2017-03-09 13:41:26 +01:00
Yanhui Shen a2a160d6f9 Improve error messages (#1577)
JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2017-03-08 10:58:25 +01:00
Zoltan Herczeg 319702cdd2 Support internal properties in GC mark. (#1646)
Some internal properties are incorrectly handled as objects and
marked as visited. This memory overwrite caused random crashes
in IoT.js.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-07 14:14:05 +01:00
Zoltan Herczeg a20b9dfa19 Introducing debugger modes (run, breakpoint). (#1645)
This makes the code more robust and error prone, since certain
messages cannot be received in certain situations, e.g. an eval
command during garbage collection.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-07 11:58:46 +01:00
Zidong Jiang c6f22a9683 Make sure the size arg of alloc will not overflow (#1618)
Also make sure the bytelength = arraylength << shift will not overflow

Fix issue #1616

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-07 08:37:19 +09:00
Zidong Jiang 71e1383d13 Check if propery is not found before delete it. (#1637)
Fix issue #1633

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-06 21:08:30 +08:00
Levente Orban 8a86c579e6 Refactor the debugger multiple command usages (#1643)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-06 20:41:22 +09:00
Zidong Jiang b13f78f19e Check options in ecma_op_object_get_own_property for typedarray. (#1627)
And add regression-case subfolder for es2015

Fix issue #1622

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-06 19:07:02 +08:00
Zoltan Herczeg b5a91069fd Fix multiple debugger issues. (#1640)
- Wait for free byte code pointers during garbage collection.
- Detect incorrect free requests in the debugger server.
- Ignore byte code blocks loaded from snapshot.
- Use memmove instead of memcpy to avoid receive buffer corruption.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-06 11:13:25 +01:00
Levente Orban b996841a65 Add feature commands for debugger python script (#1604)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-06 11:08:30 +01:00
Robert Sipka 6254748081 Require JERRY_JS_PARSER macro to be defined (#1639)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-06 09:53:09 +01:00
Zoltan Herczeg ca2b057356 Call property should handle ECMA_SIMPLE_VALUE_REGISTER_REF. (#1631)
Fixes #1624.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-03 12:23:18 +01:00
Zsolt Borbély f780f2b8dc Allow to skip certain JS-tests under tests/jerry/ and tests/jerry-test-suite/ (#1632)
Add `--skip-list` option to tools/run-tests.py.

Additional modifications:
 - The test `parser-oom.js` doesn't work when system-allocator is enabled,
   hence we skip it in these jobs.
 - The sanitizer-tasks become mandatory.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-03-02 15:58:23 +01:00
László Langó 92f74f3cf5 Fix pylint install on Travis CI (#1608)
Followup fix after #1602

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-02 10:36:21 +01:00
Renáta Hodován 918a50c66b Fix typos in parser error messages. (#1629)
JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
2017-03-02 08:47:54 +01:00
Levente Orban e993ee6cdc Add delete all breakpoints feature to debugger (javascript) (#1628)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-02-28 10:51:48 +01:00
Zoltan Herczeg b8ccdee4db Numbers found in the literal table also has LEXER_LITERAL_OBJECT_ANY type. (#1626)
Fixes #1615.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-28 10:41:41 +01:00
Zoltan Herczeg 6efe39c83c Add source code support to the debugger. (#1614)
Besides the breakpoint list the JavaScript source code is
also sent to the debugger. This feature allows debugging
eval() function calls.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-28 09:25:26 +01:00
Zsolt Borbély c6a7765690 Merge OSX-jobs on Travis (#1625)
The start of OSX-jobs takes a considerable time.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-02-27 16:29:57 +01:00
Zoltan Herczeg 3de72af712 NaN must not be passed to date getter functions. (#1620)
Fixes #1547

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-27 11:19:29 +01:00
Zidong Jiang df4064c18e Implement ecma_object_get_class_name for all ES2015 builtin object (#1617)
Fix issue #1613

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-02-27 09:12:31 +01:00
Zidong Jiang f1d43784f5 No other objects should be allocated before a typedarray is fully (#1619)
initialized.

All members of an object must be valid when the garbage collector runs,
so no allocations are allowed during typed array initialization.

Fix issue #1605
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-02-25 09:23:44 +08:00
Robert Sipka 21340e6b02 Rework address setup in WebSocket Debugger Client (#1612)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-24 13:45:33 +01:00
Zoltan Herczeg 62a581fbb8 Fix typo in vm_decode_branch_offset. (#1611)
Fixes #1597.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-22 14:38:52 +01:00
Zoltan Herczeg 8245cdef2f Stack data should be freed after the for statement is fully parsed. (#1609)
Fixes #1598.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-22 14:38:32 +01:00
Robert Sipka 2d93a24a14 Bugfix for JerryScript HTML (WebSocket) Debugger Client connection (#1610)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-22 12:36:44 +01:00
Robert Sipka 993f1ce896 Set available features from nuttx menuconfig (nuttx-stm32f4 target). (#1607)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-22 12:36:31 +01:00
Robert Sipka 39dc4a6273 Remove shadowed declarations, undefined identifiers, and specify argument types where it is required. (#1601)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-22 10:34:44 +01:00
László Langó 5ef305dfee Avoid using global statement (#1606)
Related issue: #1600

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-22 09:12:57 +01:00
Zoltan Herczeg 54544163a9 Completely remove internal property support. (#1603)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-22 10:39:48 +09:00
Levente Orban cc0f69613a Add debugger connection port setting to build script (#1599)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-02-21 15:39:22 +01:00
Robert Sipka 9043ec620d Add debugger support on nuttx-smt32f4 target (#1591)
Using jerry_parse_named_resource to parse script and construct an EcmaScript function.
The file name will also passed to this function which is used by the debugger to find
the source code.
Run the constructed EcmaScript function instead of using the simple jerry runner.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-21 15:22:48 +01:00
László Langó 92eaea2a8e Add pylint checker to the project (#1602)
* Added 'pylint' to dependencies
 * Added pylint config file
 * Added to travis CI as an allow failure job
   (until all of the warnings are fixed)
 * Added to 'run-test.py'

Related issue: #1600

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-21 12:40:33 +01:00
Zoltan Herczeg 00e3de230f Introduce debugger status flags to control the operation of the debugger. (#1596)
Two issues were fixed as well: inserting breakpoints before non-directive
prologue strings and the receive can process multiple messages.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-21 11:57:04 +01:00
Levente Orban 33138c09f5 Rework address setup (#1589)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-02-20 09:12:49 +01:00
Zoltan Herczeg b02ef67cd2 Add eval support for JerryScript debugger (#1588)
The server can accept a string, execute it with eval,
and returns with the result converted to string. In
case of exception it returns with the exception message.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-17 14:31:56 +01:00
Gabor Loki 6739463c1e Fix the missing inline specifier if compiling with -fPIC (#1590)
JerryScript-DCO-1.0-Signed-off-by: Gabor Loki loki@inf.u-szeged.hu
2017-02-17 12:41:01 +01:00
Zidong Jiang 4727202c8e Add typedarray routine:reverse (#1585)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-02-16 18:32:13 +01:00
Robert Sipka 188dc46fe0 Rewrite the generator script of unicode ranges. (#1583)
The script generates the source file instead of copy the tables and paste these manually.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-16 18:31:30 +01:00
László Langó 799726aa42 Add new input validator API functions (#1576)
Fixes #1549

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-16 18:31:04 +01:00
Zsolt Borbély 93eb35081f Add Debugger documentation to webpage-generator script (#1587)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-02-16 17:39:19 +01:00
Robert Sipka 68afd14f7c Add --start_debug_server cmdline argument to nuttx-stm32f4 target (#1586)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-16 14:19:51 +01:00
Robert Sipka fdd31f20b5 Add print_help function to nuttx-stm32f4 target (#1584)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-16 12:49:49 +01:00
Péter Gál 75d8226af3 Add jerryscript.h and mark jerry-api.h as deprecated (#1579)
Add a notification for JerryScript API users that the jerry-api.h
will be removed in the future and should use the jerryscript.h
header instead.

Also update the examples in the docs and the targets where
the jerry-api.h is used.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-02-16 08:46:08 +01:00
Zidong Jiang 64a340ffeb typedarray routine: filter (#1581)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-02-15 19:20:15 +01:00
Zsolt Borbély e09cdffc66 Add address- and undefined behavior sanitizer to Travis CI (#1580)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-02-15 19:19:42 +01:00
Robert Sipka 1b5f839db9 Improve toLowerCase and toUpperCase functions. (#1575)
Language-sensitive mappings are not processed now.

Fixes #323

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-02-15 15:57:55 +01:00
Levente Orban 025a99ccbb Initial version of JerryScript debugger (#1557)
The debugger supports setting breakpoints, execution control (step, next, continue)
and getting backtrace. The communication is WebSocket-based, so a browser can
communicate with JerryScript without any intermediate application.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-02-14 15:03:01 +01:00
Zoltan Herczeg 453066fcf1 Regexp exec should not use the empty magic string. (#1582)
This is a workaround for an ASAN issue and a small optimization as well.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-14 14:18:46 +01:00
Zoltan Herczeg 66683e5d4b The main-unix utility should free the return value to avoid leaks. (#1578)
Fixes #1545.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-14 10:09:51 +01:00
slaff 5101d932f7 Fix compilation errors when LCACHE is disabled. (#1570)
JerryScript-DCO-1.0-Signed-off-by: Slavey Karadzhov slaff@attachix.com
2017-02-13 13:14:50 +01:00
Zidong Jiang 24e6c3f062 Add typedarray routine: reduce and reduceRight (#1569)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-02-10 13:36:00 +01:00
László Langó 32674ff379 Documentation update (#1573)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-10 11:05:26 +01:00
Zoltan Herczeg bfc5bee394 Restore deleted lines. (#1574)
In a previous patch the original null count behaviour of the
property hashmap is just only partially restored. Now it is
restored fully Also another assertion was forgot to be fixed
in another patch, and we do so now.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-10 10:53:43 +01:00
Zoltan Herczeg be720b2238 Seperate NULL and unused values. (#1572)
Fixes #1552.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-10 08:10:20 +01:00
László Langó 638b753135 Fix CMakeLists.txt in jerry-main. (#1571)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-09 15:41:14 +01:00
Zidong Jiang 7b01b29ec8 Add typedarray routine: every, some, foreach, and map (#1566)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-02-09 08:49:00 +01:00
László Langó a976b0c061 Improve performance of GC sweep (#1568)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-08 14:58:54 +01:00
László Langó 348894e41f Enable 32bit compressed pointers on 64bit systems. (#1567)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-02-08 14:58:37 +01:00
Zsolt Borbély 510708ebd6 Function jmem_heap_get_region_end is unused when the system-allocator is enabled (#1565)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-02-07 11:43:31 +01:00
Zoltan Herczeg cba165f8e6 Fix invalid assertion in js-parser. (#1556) (#1563)
256 registers can be used so less equal must be used instead of less.

Fixes #1556.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-06 15:50:43 +01:00
Zoltan Herczeg caf9308288 Fix invalid assertion in vm_loop. (#1561)
Because of the fallthrough case the value of 3 is also allowed in the default case.

Fixes #1555.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-06 10:19:31 +01:00
Zoltan Herczeg 589f2dec92 String.match should return on error. (#1560)
Fixes #1546.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-03 15:16:49 +01:00
Zoltan Herczeg a43186db41 Stack data should be freed for do-while statements after the expression is parsed. (#1558)
Fixes #1550.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-03 11:43:36 +01:00
Paul Sokolovsky c9f3869a41 targets: zephyr: Follow Zephyr 1.7-pre on console refactors. (#1548)
JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2017-02-01 13:37:30 +01:00
Zsolt Borbély 77ab2c713e Append external libraries separately not as a string (#1553)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-02-01 08:47:58 +01:00
Zoltan Herczeg 32f130916f Test various spaces in JavaScript source code. (#1554)
Fixes #1551.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-02-01 08:47:26 +01:00
László Langó 107c058bb1 Add doxygen checker (#1540)
* Fixed Doxygen issues
 * Updated Doxygen config
 * Added new script to test whether doxygen generation was successful or not
 * Added to Travis CI

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-01-31 12:27:59 +01:00
László Langó 623975d19f Add testing of 'JERRY_CPOINTER_32BIT' option to Travis CI. (#1544)
Added a new 'buildoptions' option to tools/run-tests.py to add
a comma separated list of extra build options to each test.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-01-30 15:44:26 +01:00
László Langó 7b59c80e18 Use default system allocator on 32bit systems, if JERRY_SYSTEM_ALLOCATOR is defined. (#1541)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-01-30 11:04:25 +01:00
Zoltan Herczeg 0c3ef892c0 Rework property hashmap delete. (#1543)
Triggering hashmap recreate during property delete may damage the
property chain list, so recreate postponed after the delete is done.

Next attempt to fix #1533.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-01-27 15:31:27 +01:00
Zidong Jiang 0547b31c16 [ES2015][TypedArray] add other 8 types (#1532)
Add Uint8Array, Int16Array Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array and Uint8ClampedArray. Support the conversion between any pairs of those types.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-01-24 15:06:31 +01:00
Robert Sipka 124582793f Copy the characters of an UTF-8 encoded substring into a specified buffer (#1524)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-24 15:04:48 +01:00
László Langó 976c8aee80 Organize public and internal parts of memory management (#1539)
* Introduced new 'jmem.h' for public part.
 * Removed obsolete headers

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-01-24 12:36:53 +01:00
t-harvey f88d1a4863 These changes are designed to enable the TI compilers to compile (#1505)
Jerryscript.  The changes include:

CMakeLists.txt: we added conditionals around GCC-specific flags, added
support for TI flags, and removed the always-on debugging flag (-g)

/toolchain_mcu_tim4f.cmake: new toolchain file uses TI-specific parameters

jerry-api.h: the sys/types.h file was #include'd but never used, so we
removed it

jrt-types.h: ditto

jerry-port-default-date.c: the TI toolchain doesn't include
sys/time.h, so we guarded uses of the package

ecma-objects-general.c: added initialization that Travis (the
auto-checking tool) required

JerryScript-DCO-1.0-Signed-off-by: Timothy Harvey t-harvey@ti.com
2017-01-24 07:38:53 +01:00
t-harvey 94b6aae52c Added #if control around GCC built-in functions so that the code can be (#1483)
compiled using non-GCC compilers.

This included adding an initialization to a variable that looks(!)
like it can reach a use before being initialized (b/c we turned
JERRY_UNREACHABLE into a nop) -- an example:

int foo;
switch (value_can_only_be_one_or_two)
   case 1:
   case 2:
       foo = 5;
   default:
      JERRY_UNREACHABLE();
x = foo +1;

...the compiler assumes that the path can go through the default case,
which leaves the value of foo undefined.

JerryScript-DCO-1.0-Signed-off-by: Timothy Harvey t-harvey@ti.com
2017-01-23 12:19:35 +01:00
Zsolt Borbély 5d7972d053 Add missing argument of jerry_parse_and_save_snapshot in API reference (#1537)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-01-23 11:13:59 +01:00
Zoltan Herczeg 8b5d645df6 Track all NULL values in the property hashmap. (#1534)
There are two types of NULL values in the property hashmap: deleted
entries, and never used entries. The current implementation tracks
only the never used entries, and never scales back the hashmap.
After this patch property delete can also recreate the hashmap, or
remove it entirely if there are too few items in the array.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-01-19 11:34:24 +01:00
László Langó 6c708102d3 Minor fix in API reference (#1536)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-01-19 11:31:30 +01:00
Jan Jongboom ec14622cb1 target: mbedos5: Change to debug profiles (#1531)
In mbed OS 5.3 (which we target with JerryScript on mbed) we change the way debug builds are created. This patch changes the Makefile in JerryScript to reflect this.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-01-17 14:55:23 +01:00
László Langó 471ad284f6 Remove 'OBJECT_ID' from builtin headers. (#1529)
After 378d7f7 it is not used in the codebase and can be eliminated.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-01-17 08:58:46 +01:00
Zoltan Herczeg 4b5cf8ad26 HasInstance should accept the prototype of all functions. Fixes #1519. (#1520)
The regression-test-issue-736.js is also changed, since it expects
throwing an error, which does not happen anymore because the "x"
variable is undefined.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-01-16 13:43:54 +01:00
Geoff Gustafson 6e5b759319 Improve some wording in reference counting documentation (#1523)
JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
2017-01-16 09:59:30 +01:00
Paul Sokolovsky bd488e6efb targets: zephyr: Remove unused misc/shell.h header. (#1528)
It's also gone in Zephyr 1.7.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2017-01-16 09:25:39 +01:00
Paul Sokolovsky f1a80805c2 target: zephyr: Switch to MinSizeRel build type following mainline. (#1527)
Fixes #1526.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2017-01-16 09:24:31 +01:00
Zidong Jiang 4f3dc2f37c Update macro definitions in Curie-BSP target (#1525)
* add JERRY_JS_PARSER
* add CONFIG_DISABLE_ARRAYBUFFER_BUILTIN
* add CONFIG_DISABLE_TYPEDARRAY_BUILTIN
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-01-16 09:22:15 +01:00
Robert Sipka 7139f0172a Copy the characters of a cesu-8 encoded substring into a specified buffer (#1516)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-13 13:27:07 +01:00
Zidong Jiang adfe61b4ed [ES2015 profile]add TypedArray intrinsic object (#1507)
* add %TypedArray% intrinsic object
* implement Int8Array
* will implement other types and prototype functions
in the following patches.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-01-13 11:04:34 +01:00
Jan Jongboom 177c30de78 target: mbedos5: Support for building on Windows (#1522)
This patch allows users to build for the mbedos5 target on Windows (normal
Windows and Cygwin). Also needs
https://github.com/ARMmbed/mbed-js-gulp/pull/14.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-01-13 09:57:38 +01:00
Robert Sipka c9afc2259d Refactor the ecma_string_substr function (#1517)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-13 09:22:55 +01:00
Zsolt Borbély f1ed5715e3 [API] Introduce jerry_parse_and_save_literals() (#1500)
This function can be used to save literals into a specific file in a list or C format.
These literals are valid identifiers, and doesn't match to any magic-string.
The '--save-literals-list-format FILE' and '--save-literals-c-format FILE'
options are used to save into the given file, when the snapshot-save is enabled.
The saved literals are sorted by size and lexicographically.
The C-format is useful for jerry_register_magic_strings() to generate the array
of external magic strings.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-01-11 14:18:09 +01:00
Zoltan Herczeg 7d83293762 Improve date helpers. (#1499)
Rework date to string conversion, and remove nan checks from inline
functions. Furtermore some inline functions are changed to normal
functions.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-01-11 08:27:29 +01:00
Jan Jongboom 00b220bde6 target: mbedos5: Sort magic strings (#1518)
Magic strings are expected to be sorted by length, then alphabetically after https://github.com/jerryscript-project/jerryscript/pull/1506 landed. This breaks the mbedos5 target against JerryScript master as it emits the pins in the order that it finds the pins. This patch sorts the pin names.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-01-11 08:26:40 +01:00
Zsolt Borbély eef6e57a4c Skip out license-check in case of test262 tests (#1504)
Can break testruns, when the test262 folder already present.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-01-09 09:44:40 +01:00
Zsolt Borbély 1c38c12531 [API] Improve the performance of the external magic id search (#1506)
After this patch, we have to provide external strings ordered by size and lexicographically.
We can do this with jerry_parse_and_save_literals() (#1500).

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-01-09 09:42:43 +01:00
Robert Sipka ff8ff982de Change the default build type to MinSizeRel. (#1513)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-09 09:14:21 +01:00
Robert Sipka 445ca1d6de Add jerry_string_to_utf8_char_buffer API function. (#1501)
Copy the characters of a string into a specified utf-8 string buffer.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-05 09:35:31 +01:00
Jan Jongboom 8ebbfda996 target: mbedos5: mbed CLI refuses to build if no .mbed file present (#1512)
With the newest release of mbed CLI (1.0.0) it error's when no .mbed file is present in the project root. This breaks builds for JerryScript on mbed OS 5. With this patch we create this file and builds succeed again. We cannot use `mbed new` because it also creates a new git repository in targets/mbedos5 folder which is not what we want.

Fixes #1511

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2017-01-05 08:42:19 +01:00
Akos Kiss 0026519040 Fix documentation errors (#1510)
Doxygen reported a few issues, which are fixed by this patch:
* ArrayBuffer-related documentation group names and titles were
  incorrect.
* Some Date-related helper functions used incorrect parameter
  documentation syntax.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-01-03 18:03:47 +01:00
Akos Kiss 3fa89baee0 Reduce scope of variable in JS lexer (#1509)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-01-03 17:59:52 +01:00
Zsolt Borbély 212f35c1f0 Fix test-api.c (#1503)
* Add missing feature-requirement for snapshot test
 * Fix wrong multiline alignments

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-01-03 05:39:55 +01:00
Kristof Kosztyo a3e9838728 Fix urls in the example (#1508)
The urls in the docs/03.API-EXAMPLE.md was pointing to
the old samsung.github.io pages.

JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkristof@inf.u-szeged.hu
2017-01-02 11:32:58 +01:00
Robert Sipka 392f6d4a3b Modify the profile option to specify external compile definitions. (#1497)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-02 10:47:50 +01:00
Robert Sipka 080e78d7c2 Set memory heap size in the build script. (#1502)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-01-02 10:19:31 +01:00
Zoltan Herczeg 0c7d99e8e7 Reduce Math object binary size. (#1491)
Although many Math built-in functions have a similar structure
these code paths were implemented as separate C functions.
After this patch only one common dispatcher remains which shares
the common code paths of different built-in functions. This
reduces the binary size by 1 Kbyte.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-12-19 13:48:17 +01:00
Robert Sipka f2b17bca8b Warning fixes for Clang build. (#1490)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-19 09:47:42 +01:00
Tilmann Scheller 65c32f6a3b Add parameter names to function declarations. (#1498)
It's generally considered a bad programming practice to have function declarations without parameter names.

This is another legacy from the early days of the project. Fix in one go to minimize history disruption.

Used a custom clang-tidy check to create the bulk of the change.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-16 15:40:46 +01:00
Tilmann Scheller 1e99be90c3 Remove redundant extern keywords from function declarations/definitions. (#1495)
Extern keywords on function declarations/definitions provide no additional value since function declarations/definitions default to external linkage in C99, e.g. removing them won't change the semantics of the program.

The extern keywords were essentially a legacy from the early days of the project. This commit cleans this up across the whole codebase in one go to minimize history disruption.

The bulk of the changes in this commit were produced by a custom clang-tidy checker.

Note that variables declarations carrying the extern keyword are untouched by this commit since there the presence of the keyword actually has an impact on the semantics of the program.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-16 10:18:37 +01:00
Jan Jongboom defd97cc51 target: mbedos5: Update generate_pins.py to use the new Python API for querying targets, and use the new location of target PinNames.h file. Previously make source/pins.cpp just failed silently, and returned an empty file. Therefore using pin names from JS (LED1) would silently fail when building JerryScript against mbed OS 5.2.3. We missed this because it does not happen when you upgrade an existing mbed OS 5.1 project. Fixes #1493. (#1494)
JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-12-16 10:12:49 +01:00
Robert Sipka eec398181e Set PORT_DIR in the build script. (#1492)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-15 10:30:18 +01:00
Robert Sipka f3436840dd Build fix for STM32F4-Discovery board with NuttX. (#1489)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-13 15:12:55 +01:00
Zoltan Herczeg 7423226acc Reduce Date prototype binary size. (#1488)
Before this patch each built-in routine had a separate C
function. Although these functions shared a lot of common
operations compilers cannot eliminate these code duplications
in the final binary code. This patch introduces a single C
function which handles all date prototype routines. Each
shared code block has only one binary represenation.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-12-13 13:41:36 +01:00
Tilmann Scheller 58bcf12665 Add section about license headers and copyright notices to the Contribution Guidelines. (#1486)
Clarify that each contributed file needs to have a proper license header and that the addition of individual copyright notices is not permitted.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-13 11:17:47 +01:00
Robert Sipka ee93cb6320 Add JERRY_FEATURE_JS_PARSER to compile time enabled feature types. (#1487)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-13 10:05:59 +01:00
Zoltan Herczeg 6904b9bd65 Do not copy source string by JSON parser. (#1481)
The JSON parser required a zero terminated writable copy of
the original string. The requirement is eliminated from the
project to reduce peak memory consumption.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-12-13 08:36:01 +01:00
Jan Jongboom fb2818c137 target: mbedos5: Update to mbed OS 5.2.3 (#1468)
Update mbed OS target to latest version of mbed OS (5.2.3). Also rename all files in jerryscript-mbed-drivers/ to include -js.cpp, as our build tools now generate warnings for C++ files with the same name. mbed-events library is now mainlined, so no longer required to pull this library in as a separate dependency.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-12-13 08:34:38 +01:00
Jan Jongboom c079b577c8 target: mbedos5: Define JERRY_JS_PARSER macro, which is now required to be defined. Fixes build issues against mbedos5 target. (#1485)
JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-12-13 08:33:28 +01:00
Zidong Jiang 85b6e01bc2 Stop inlining the ArrayBuffer helper functions. (#1484)
Related issue #1468.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-12-12 20:07:51 +01:00
Robert Sipka e9ab1f14d3 Set js-parser feature in the build script. (#1482)
Renamed FEATURE_PARSER_DISABLE to FEATURE_JS_PARSER.
Fixed the build error that occurred in case of disabled js-parser.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-12 13:43:53 +01:00
Jan Jongboom 233b885ad8 target: mbedos5: Allow jerry_port_console and jerry_port_log to be overriden by user code (#1458)
We're building a REPL (as user-space program) on top of mbedos5 target. For this I need to override the jerry_port_console and jerry_port_log functions from the REPL. This commit wraps these functions in an ifndef, so we can define macros to not include these files.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-12-12 08:30:49 +01:00
Sergio Abraham Martinez Rodriguez db05d85a9a Add feature to remove parser. (#1476)
Remove the parser so we can save space if we are
only interested in running snapshots.

Removing the parser enables the snapshot execution.

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-12-09 15:38:40 +01:00
Zidong Jiang 551aaa58e6 Fix unchecked size number conversion in ArrayBuffer (#1479)
Free_value after ecma_op_to_number and a related test file.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-12-09 14:54:34 +01:00
Robert Sipka 3ec395ff76 Create a minimal commandline tool to run benchmarks with it. (#1478)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-09 13:30:33 +01:00
Zoltan Herczeg 9d6ca800e1 Remove INSTANTIATED_MASK_32_63 internal property type. (#1474)
Furthermore the maximum number of properties is increased to 96.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-12-09 13:28:06 +01:00
Robert Sipka 4f8b7726d7 Check the compile time enabled feature via API function instead of check the MACRO is defined. (#1471)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-09 12:39:37 +01:00
Robert Sipka 9802130c71 Fix the order in cmake build settings/options and their status messages. (#1480)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-09 11:50:59 +01:00
Zidong Jiang fb2edd8556 Add ArrayBuffer regression tests (#1477)
Add a set of tests to ensure basic coverage of the ArrayBuffer built-in. Support for ArrayBuffer was added in #1467.

Closes #1475.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-12-09 08:04:49 +01:00
Tilmann Scheller 0511091e8a Streamline copyright notices across the codebase. (#1473)
Since the project is now hosted at the JS Foundation we can move to unified copyright notices for the project.

Starting with this commit all future contributions to the project should only carry the following copyright notice (except for third-party code which requires copyright information to be preserved):

"Copyright JS Foundation and other contributors, http://js.foundation" (without the quotes)

This avoids cluttering the codebase with contributor-specific copyright notices which have a higher maintenance overhead and tend to get outdated quickly. Also dropping the year from the copyright notices helps to avoid yearly code changes just to update the copyright notices.

Note that each contributor still retains full copyright ownership of his/her contributions and the respective authorship is tracked very accurately via Git.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-08 06:39:11 +01:00
Zidong Jiang 29d058cec4 Add ES2015 feature: ArrayBuffer (#1467)
This patch implements ArrayBuffer and ArrayBuffer.prototype built-in objects.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-12-07 14:04:01 +01:00
Robert Sipka eccfc1849e Bugfix: The unittest which test the API has failed in case of disabled error-messages (#1470)
and disabled snapshot_exec options.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-05 10:33:53 +01:00
LeeHayun bed094f74f Fixes the bug of ecma_date_make_day() (#1836) & ecma_date_week_day(). (#1466)
The ecma_date_make_day() handled any date in October on leap years incorrectly,
which was mentioned in issue #1836. The ecma_date_week_day() returned minus values
when return week_day before 1970 years which was also incorrect.

This change solves these bugs. In addition, this enhances the algorithm of accessing 'the ym-mn-1'
by replacing binary search to simple computation at ecma_date_make_day().

JerryScript-DCO-1.0-Signed-off-by: Hayun Lee lhy920806@gmail.com
2016-12-05 09:58:36 +01:00
Robert Sipka 4ef3c0caa8 Add API function to check if the specified feature is enabled. (#1465)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-05 09:26:02 +01:00
Robert Sipka 4c1fc7d789 Remove the restriction that the external magic strings must be ascii strings. (#1469)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-03 10:20:46 +01:00
Robert Sipka 23cf7fd177 Add an API function to calculate the UTF-8 encoded string length from Jerry string. (#1460)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-12-01 10:51:23 +01:00
Paul Sokolovsky 958344ee16 target: zephyr: Update to Zephyr 1.6 API. (#1462)
Zephyr 1.6 switched to "unified kernel API". Old API is supported, but
deprecated and leads to warnings.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-12-01 08:24:40 +01:00
Zsolt Borbély 7b2fc4f27a Remove leftover from main-unix.c (#1464)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-11-30 15:01:19 +01:00
Robert Sipka fb3e8cf8b8 Replace // double slash comments with /* */. (#1461)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-29 15:54:35 +01:00
Jan Jongboom 4d2c22a118 target: mbedos5: Add PwmOut and AnalogIn interfaces (#1455)
mbed OS 5 target is currently missing wrappers around PwmOut and AnalogIn interface, which are part of the standard library of mbed OS. This commit adds them. Tested with mbed CI test shield. I've followed the coding style in jerryscript-mbed, rather than JerryScript coding style.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-11-29 15:46:51 +01:00
Jan Jongboom 9c803672ff target: mbedos5: Add return value to setTimeout/setInterval and implement clearTimeout/clearInterval (#1457)
In the mbedos5 target the setTimeout and setInterval functions are not on spec, as they return 'undefined' instead of an event ID. Also clearTimeout and clearInterval are not implemented, so scheduled events cannot be canceled. This patch changes the behavior of the set* functions, and implements clear* functions.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-11-29 15:43:03 +01:00
Robert Sipka 0467239d03 Add an API function to calculate the UTF-8 encoded string size from Jerry string. (#1450)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-29 12:25:18 +01:00
Jan Jongboom 6a2f54456f target: mbedos5: Add carriage return in jerry_port_console (#1427)
Serial monitors (like screen on macOS / Linux) expect both CR and LF characters for new lines. Due to jerryscript only printing a line feed after calls to `print()` this makes log messages look wrong. This patch adds a CR when it encounters a LF character in jerry_port_console or jerry_port_log for the mbedos5 target.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
2016-11-28 13:11:31 +01:00
Zsolt Borbély 415ff37a8f Introduce jerry-snapshot.c for snapshot-related code (#1452)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-11-28 13:11:06 +01:00
Zoltan Herczeg 25f58894ef Improve the performance of resolve reference. (#1453)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-11-28 13:10:49 +01:00
Zoltan Herczeg 6d67b8dff9 Reduce memory consumption of property names.
Property names were always required a string reference which consumed
a large amount of memory for arrays. This patch reduces this consumption
by directly storing the value part of certain strings.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-11-25 05:47:01 -08:00
Robert Sipka abaf4c8af8 Fix the calculation of the converted string length in ecma_new_ecma_string_from_utf8_converted_to_cesu8 function.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-25 14:15:55 +01:00
Tilmann Scheller 813a7020af Update various repository references across the project to be in sync with the new repository location. (#1448)
JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-11-25 10:34:22 +01:00
Tilmann Scheller 0d07b21d4b Update Travis CI status reference after repository move. (#1447)
Update URL to match the new repository location so the Travis CI badge will start working again.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-11-25 10:29:09 +01:00
Tilmann Scheller 83c39218f1 Update copyright notice in LICENSE and README. (#1446)
Update the LICENSE and README file to reflect that the project IP transfer from Samsung to the JS Foundation has been completed.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-11-25 09:39:16 +01:00
Robert Sipka b2e12233d0 Improve performance of search in the list of the magic strings. (#1441)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-24 09:16:16 +01:00
Robert Sipka 97303eb8e4 Add API documentation for jerry_create_string_from_utf8 and jerry_create_string_sz_from_utf8 functions. (#1444)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-24 08:12:09 +09:00
László Langó cf7b7a1090 Test 'test262' test suite on Travis CI (#1440)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-11-22 14:02:25 +01:00
László Langó 2622e938d8 Add missing error messages to 'ecma/builtin-objects' (#1443)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-11-22 14:01:59 +01:00
Zoltan Herczeg 132477f7d5 Change array length into a virtual property. (#1439)
This change allows easier access to array length which improves
the performance of inserting new items into an array and there
is no need to allocate length strings anymore. The trade-of is
that array length cannot be cached anymore.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-11-22 13:29:53 +01:00
László Langó 4a0f78bc4b Fix fopen call on non-existing files. (#1442)
The main implementation of unix platform hangs, if the engine was
built with jerry-libc. Open system call returns with a negative
error code if cannot open the file, but fopen must return NULL
when error happens.

Fixes #1437.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-11-21 11:28:07 +01:00
Kumar Gala 6ac0a39519 target: zephyr: Allow parallel build of Zephyr (#1436)
If we are building JerryScript from some other makefile that passes
down a -j option to make we should respect that when we build Zephyr.

JerryScript-DCO-1.0-Signed-off-by: Kumar Gala kumar.gala@linaro.org
2016-11-18 08:19:21 +01:00
Zoltan Herczeg 7131243dda Simplify ecma_property_types_t. (#1438)
Free a new bit in the property descriptor by combining internal
and special property types into one group. Also simplify checking
special properties since bit-and operation is not needed anymore.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-11-17 13:26:02 +01:00
László Langó b2fec888d4 Fix handling of return value of 'jerry_set_property call' in main-unix. (#1435)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-11-17 10:49:45 +01:00
László Langó 503ca7e54a Remove unused test file. (#1433)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-11-17 10:49:34 +01:00
Robert Sipka ffaca583f3 Add API functions to create string from a valid UTF-8 string. (#1430)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-16 10:34:12 +01:00
Istvan Kadar 405092e700 Prop hashmap allocation strategy based on gc pattern is implemented. (#1429)
The algorithm is the following:
* introduced a counter variable, which value can be [0-4]
* if its value is 0, property hashmap allocation is enabled
* JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW -> decrease the counter
* JMEM_FREE_UNUSED_MEMORY_SEVERITY_HIGH -> increase the number
* if JMEM_FREE_UNUSED_MEMORY_SEVERITY_HIGH happens twice in a row increase the counter to 4

According to the measurements this algorithm provides better runtime results in low memory conditions.

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-11-16 08:32:45 +01:00
Robert Sipka e443d95566 Add case insensitive argparse choices. (#1431)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-15 09:57:08 +01:00
Robert Sipka bf6cccf61c Extend the escape sequences test by verifying character codes. (#1428)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-14 13:22:38 +01:00
Robert Sipka dc5ae4638f Since glibc 2.20, the _BSD_SOURCE macro is deprecated. (#1425)
It now has the same effect as defining _DEFAULT_SOURCE, but generates a
compile-time warning (unless _DEFAULT_SOURCE is also defined). To allow
code that requires _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE
in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-11-11 12:09:51 +01:00
Zoltan Herczeg 9f556e1c38 All strings whose are valid array indicies always use the UINT32_IN_DESC format. (#1422)
This patch reduces memory consumption for strings such as "0" or "123"
by 8 bytes and "4294967295" by 16 bytes. The hash computation is changed
for using the lower 16 bits for these strings which is much faster than
converting the value to string first and compute the hash. The trade-of
is a small overhead when strings are created or concatenated.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-11-07 15:37:36 +01:00
Zsolt Borbély 4c5ff4ad27 Webpage-related fixes (#1420)
* Fix webpage-generator script
   - Generate 'site.github.url' instead of 'site.baseurl' (#1248)
   - Include 'Reference counting' documentation
 * Remove trailing whitespaces from 05.PORT-API.md

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-11-07 17:18:12 +09:00
Levente Orban 8466b04187 Add how to install the modules (#1416)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2016-11-03 10:42:10 +01:00
Akos Kiss b31074cc6b Ensure that Math.random() really covers [0,1) interval (#1417)
Legacy implementation made incorrect assumptions on how many bits
of useful information is returned by libc's `rand()`. If `RAND_MAX`
had more than 16 useful bits, it assumed that `rand()` could return
32 useful random bits. However, e.g., jerry-libc's `RAND_MAX` is
`0x7fffffff`, which denotes 31 useful bits only. The consequence
was that `Math.random()` covered only the lower half of the
standard-mandated `[0,1)` interval.

This path fixes the error and always uses the exact value of
`RAND_MAX` to compute the random value, which will thus fully cover
`[0,1)`.

Fixes #1414

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-11-01 15:43:16 +01:00
Daniel Thompson 36edae3257 target: zephyr: Cause pristine to remove entire build directory (#1418)
For a normal zephyr application the pristine target simply runs
"rm -rf outdir". However the JerryScript build overrides the output
directory [O=$(OUTPUT)] so Zephyr's implementation pristine is not able
to to a full aggressive clean up for all boards.

For this reason it is better for the JerryScript build wrapper to have
its own implementation of pristine.

JerryScript-DCO-1.0-Signed-off-by: Daniel Thompson daniel.thompson@linaro.org
2016-11-01 15:29:20 +01:00
Daniel Thompson e65a69b7c0 target: zephyr: Fix build when USE_CCACHE=1 (#1413)
Currently if USE_CCACHE=1 is set to one than the Zephyr build system
will include ccache in the CC variable. ccache cannot be passed to
cmake using EXTERNAL_CMAKE_C_COMPILER (even if we fix the quoting)
because it fails a PATH reachability test within cmake. For that
reasons we solve the build failure simply by removing ccahce from CC
before we pass it into cmake.

The problem described about is a regression due to commit ac1bf19c90
("build: Adopt outputexports") and the fix contained in this patch
restores the original behaviour (zephyr exploits ccache, jerryscript
library build does not).

JerryScript-DCO-1.0-Signed-off-by: Daniel Thompson daniel.thompson@linaro.org
2016-10-31 13:59:49 +01:00
Istvan Kadar ff6b3a9b02 Issue #1389 fixed in parser_compute_indicies by resolving local variable hiding. (#1410)
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-10-28 14:56:13 +02:00
Zoltan Herczeg ec4f4e6fdb Add an overview about reference counting. (#1412)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-28 13:25:47 +02:00
Paul Sokolovsky 5e02b7136a zephyr: Revamp jerry-port.c, add more functions. (#1411)
The file was named jerry-entry.c and not even built. Rename for clarity,
and add jerry_port_fatal(), jerry_port_get_current_time(),
jerry_port_get_time_zone() functions. User-visible result is that
if Date builtin is enabled (e.g. if building "full" config, its
Date.now() method can be used to measure relative time difference,
e.g. for benchmarking).

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-10-27 14:23:37 +02:00
Robert Sipka a02c586a51 Bugfix for string replace. (#1409)
Some test cases were failed with enabled show-opcodes build option.

Example source:
    "98765".replace(76)
    print ("\ud801\udc00".replace("\ud801", "#") === "#\udc00");

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-10-27 12:47:54 +02:00
László Langó a30b89c536 Improve Js2C converter (#1408)
* Rename 'jerry_targetjs.h' to 'jerry-targetjs.h',
   because we use dashes in filen ames instead of underscores.
 * Made destination and js souce directory configurable.
 * Updated esp8266 target to the recent changes.
 * Updated mbed and mbedos5 target to the recent changes.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-10-27 09:54:01 +02:00
Daniel Thompson ac1bf19c90 build: Adopt outputexports (#1407)
This patch simplifies the integration with the zephyr build system
whilst at the same time enriching the set of build targets to allow
zephyr to be configured using its kbuild features.

It works by exploiting "make outputexports", a feature of the zephyr
build system that makes the zephyr compiler configuration available to
other build systems in an easily accessible manner.

Whilst looking at the build we also correct the implementation of clean
so that it no longer destroys any custom zephyr configuration. Like any
other zephyr application one must use "make pristine" to remove the
config too.

JerryScript-DCO-1.0-Signed-off-by: Daniel Thompson daniel.thompson@linaro.org
2016-10-26 09:01:34 +02:00
Zoltan Herczeg 945fbef110 Rework function.bind (#1406)
The new code does not use value collections which reduces the argument array size by half.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-25 13:15:14 +02:00
László Langó dc1e26933f Print source code with a given context when a parse error happens (#1403)
Example source:
  var s = "hello";
  if (s)
    a[,] = s;

Output:
  var s = "hello";
  if (s)
    a[,] = s;
  ~~~~^
  Script Error: SyntaxError: Primary expression expected. [line: 3, column: 5]

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-10-25 13:13:20 +02:00
Zoltan Herczeg c8f2747209 Rework arguments object. (#1401)
Instead of allocating a helper object, argument names are appended right
after the arguments objects. This reduces memory consumption and improve
performance as well. In the future this could be further improved by a
bitfield, but that would require a reference to the byte code which
might increase memory consumption in a few corner cases.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-21 18:58:42 +09:00
László Langó 3e0d3e588f Add error messages to VM. (#1405)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-10-21 18:55:08 +09:00
Paul Sokolovsky fdf9e71caa target: zephyr: Make "OUTPUT" varible match Zephyr's "O" variable. (#1404)
JerryScript Zephyr port overrides standard Zephyr output location. But
components integrating Zephyr port may want to override it again. Make
sure that arbitrary overrides are possible, and just set the default
value to Zephyr port's custom preference.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-10-21 11:52:19 +02:00
Robert Sipka b9f540fc90 Change the return type of 'vm_init_loop' function to void. (#1402)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-10-20 21:03:15 +09:00
Robert Sipka 922782109b Fix for Issue #1387. (#1397)
Check the return value of 'ecma_op_put_value_lex_env_base' function.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-10-20 09:13:11 +02:00
László Langó 28b4d3cb58 Remove trash from main-unix (#1400)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-10-20 15:48:56 +09:00
Zoltan Herczeg fd98d649b6 Remove several internal property types for primitive objects. (#1399)
Class and value internal properties are always exists for primitive
types (e.g. Boolean, Regex) so they can be stored right after the
object. This improve property access (since internal properties are
searched by a slow linear algorithm) and reduces memory consumption,
since only 8 byte is allocated for these two properties instead of
16 which is the size of a property pair.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-19 15:36:15 +02:00
slaff 2ef89eafbf Added console message implementation for ESP8266. (#1398)
JerryScript-DCO-1.0-Signed-off-by: Slavey Karadzhov slaff@attachix.com
2016-10-19 12:56:09 +02:00
Zoltan Herczeg 3ce48be152 Improve array length setting. (#1393)
The new set does not allocate memory when the size of the array is reduced.
Furthermore the [[PutObject]] method directly calls the new length setter.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-19 16:45:17 +09:00
László Langó a130059c8b Add error messages to ecam/operations. (#1396)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-10-19 09:37:51 +09:00
Zoltan Herczeg 6af70e5899 Change string length into a virtual property. (#1395)
Reduces the memory consumption of String objects.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-18 11:11:00 +02:00
Robert Sipka e8428383f1 Use 'ecma_make_boolean_value' where possible. (#1394)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-10-18 09:12:05 +02:00
Robert Sipka 42be0704b9 Added target to compile JerryScript beside Particle Device Firmware on Photon board. (#1391)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-10-17 20:54:08 +09:00
Sergio Abraham Martinez Rodriguez 535743412e [zephyr] Removed factory setting deprecated on zephyr (#1390)
The new zephyr build system doesn't support the arduino_101_factory
board.

This change restores the default BOARD to arduino_101 which
is the current recommended method.

If you are in an older SDK / Zephyr you can still use.

`make -f ./targets/zephyr/Makefile.zephyr BOARD=arduino_101_factory`

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-10-10 08:40:58 +02:00
Akos Kiss 9915307bc0 Drop -gdwarf-4 from compiler flags (#1385)
`-g` is enough (most modern compilers use DWARF4 as default, at
least, e.g., GCC has switched from DWARF2 in 4.8), more future
proof (if a compiler moves to a newer version, it wont get forced
to a fixed older version), and less restrictive (some compilers
handle the "standard" `-g` only but don't understand its variants).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-10-04 11:51:03 +02:00
Akos Kiss 37c28f694a Undef VALGRIND_*_SPACE macros at the end of sources (#1382)
Defining the same macros in multiple source files can cause macro
re-definition warnings or errors in all-in-one builds.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-30 09:03:25 +02:00
Akos Kiss e16cc83ce7 Simplify the way libgcc is linked (#1380)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-30 09:02:42 +02:00
Daniel Thompson 8320a2cbc9 target: zephyr: Include toolchain headers using -isystem (#1381)
Currently the zephyr port fails to build with some cross-toolsets because
warnings from the system headers are being treated as errors. Using
-isystem for any includes in TOOLCHAIN_CFLAGS allows us to crank up the
warning levels without worrying about newlib headers breaking the build.

JerryScript-DCO-1.0-Signed-off-by: Daniel Thompson daniel.thompson@linaro.org
2016-09-30 07:45:50 +02:00
Daniel Thompson 7584ce26c2 target: zephyr: Select compile options by ARCH rather than BOARD (#1374)
Currently we need to modify the JerryScript Makefiles for every new
board we want to work with. It is better to study the zephyr configuration
and used the CONFIG_ options to determine the right compiler flags.

We expose the CONFIG_ options to make by adding machinary to the makefiles
to import the Zephyr .config file, allow us to make the decisions we
need.

JerryScript-DCO-1.0-Signed-off-by: Daniel Thompson daniel.thompson@linaro.org
2016-09-29 23:34:13 +02:00
Akos Kiss 509407bfd4 Update jerry-libc unreachable asserts (#1379)
Newer compilers (especially clang) warn (and fail) on
`assert (!"message");` constructs typically used to assert on
unreachable code paths (multiple occurrences in jerry-libc). A more
up-to-date approach is to use `assert (false && "message");`. This
patch applies the pattern to all relevant asserts in jerry-libc.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-29 16:17:46 +02:00
Akos Kiss e2aa714565 Improve the stdin handling of the command line tool (#1378)
This patch improves the command line tool in two ways:
* The tool can be instructed to read and execute a script from
  stdin by invoking it as `jerry -`.
* The tool can be instructed to suppress its prompt when in repl
  mode by invoking it as `jerry --no-prompt`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-28 14:14:05 +02:00
Akos Kiss 9b5d0cc7ec Add IRC notification to Travis CI configuration (#1376)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-26 16:07:29 +02:00
Akos Kiss e67078f5ca Revoke exec permission from non-scripts (#1377)
Several non-script files have been added with exec permission to
the repository. This patch revokes the erroneous permissions.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-26 08:27:29 +02:00
Zoltan Herczeg 0ad347b97f Improve define own property. (#1369)
This patch changes define own property to search a property only once.
Currently all existing properties are searched at least twice, sometimes
three times which is not optimal.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-23 10:06:36 +02:00
chokobole 547647af13 Type cast according to format string (#1368)
JerryScript-DCO-1.0-Signed-off-by: wonyong.kim wonyong.kim@samsung.com
2016-09-23 09:47:13 +02:00
Akos Kiss 40bed0f963 Fix compiler warnings in unit tests (#1373)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-22 15:48:14 +02:00
Akos Kiss e4f27199d7 Echo executed test commands in run-tests.py (#1372)
run-tests.py used to echo the build commands it executed, but did
not behave the same way when it executed test commands. To make its
behavior more traceable, this patch adds echo for test commands as
well.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-22 08:51:59 +02:00
Akos Kiss ee2e159ad6 Switch cppcheck to C99 mode (#1371)
From the beginning, we have been configuring cppcheck to check its
input as C++ source. However, the transition to C99 happened a
while ago. This patch switches cppcheck into C99 mode.

Some related changes:
* Progress reporting of cppcheck just clutters the output and makes
  warnings hard to discover. Thus, this patch puts cppcheck into a
  quieter mode where it prints anything only if a non-suppressed
  warning is found.
* The default warning format of cppcheck is a bit different from
  usual compiler error/warning format. This patch configures
  cppcheck to use a more familiar warning template.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-21 18:41:44 +02:00
Akos Kiss 70cd3d3184 Add license checking (#1353)
It's stated in the Guidelines that all contributions must be under
the Apache License 2.0. To avoid potential mistakes from manual
reviews, this patch adds the check-license.py script to
automatically check all source files for license headers.

Travis CI is also configured to run the check.

Fallout: it turned out that some files already in the code base
either miss a license header or have some minor typo differences.
The patch fixes up some of these deficiences.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-21 16:15:57 +02:00
Matthew Else 454d3af951 Initial support for mbed OS 5.1 (#1318)
- Wrappers for mbed I/O drivers
- Makefile for automating build process
- Script to generate pin definitions from mbed OS source tree
- Updates to js2c to enable building without a main.js file

JerryScript-DCO-1.0-Signed-off-by: Matthew Else Matthew.Else@arm.com
2016-09-21 15:48:03 +02:00
Akos Kiss 316223ebdb Fix doxygen-related documentation issues (#1357)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-21 10:43:40 +02:00
Akos Kiss 2300a68c88 Unify (and fix) the naming convention of structures (#1358)
The naming convention of the project for `struct`s is
`typedef struct x_t { } x_t`, but only if it has self-recursive
pointer members, otherwise `typedef struct { } x_t` is enough.
This patch applies this style consistently throughout the code
base.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-21 10:41:36 +02:00
Akos Kiss 513d9f4c9c Sync cmake and build.py defaults (#1360)
* Cmake had LTO OFF, build.py had LTO ON by default. ON became the
  common setting.
* Cmake had snapshot save/exec OFF, build.py had them ON by
  default. OFF became the common setting.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-20 16:20:48 +02:00
zherczeg 8b55a4ef7b Rewrite ecma_op_get_value_object_base to use ecma_op_object_find_own() call. (#1365)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-20 13:33:57 +02:00
Yanhui Shen a9d6978e4b Fixing ecma_builtin_number_prototype_helper_round. (#1362)
"ecma_builtin_number_prototype_helper_round" is used by following
functions:
* ecma_builtin_number_prototype_object_to_fixed
* ecma_builtin_number_prototype_object_to_exponential
* ecma_builtin_number_prototype_object_to_precision

The current implementation does not support currying numbers and will
produce illegal digit for some test cases. For example, the result of
"0.95.toFixed(1)" is "0.:".

This patch fixs the issue, however the implementation of "toFixed" is
still problematic, at least not meet section 15.7.4.5 8.a of the
specification. The related test case is:

* assert((0.995).toFixed(2) === "0.99");
* assert((9.995).toFixed(2) === "9.99");

Reference:
* http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.4.5

JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2016-09-20 13:13:50 +02:00
Zidong Jiang 7b7d86f5fd Remove the vm_run_with_inline. (#1363)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-09-20 13:11:53 +02:00
zherczeg 9ab72d24b7 Improve ECMA_PROPERTY_VALUE_PTR computation. (#1364)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-20 12:50:53 +02:00
Akos Kiss 971dcae669 Define __attr_hot___ for __attribute__((hot)) (#1359)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-19 15:33:54 +02:00
Zoltan Herczeg dcaec22c0c Major property rework: introducing virtual properties.
Properties are changed to a type and value pair instead of a pointer to an internal
representation. Functions such as ecma_op_object_get_[own_]property do not
return with property pointers anymore.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-19 00:32:38 -07:00
Tilmann Scheller ea96430e77 Add contribution guidelines and DCO. (#1348)
The current content in CONTRIBUTING.md is largely based on the "Patch Submission Process" Wiki page.

This commit also moves the DCO from the Wiki into the source tree.

In addition, clarify in README.md that contributions need to be licensed under the Apache License 2.0 and signed with the DCO.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-09-16 15:50:56 +02:00
Akos Kiss d38ab71140 Improve the linking of libraries (#1338)
Although both jerry-libc and jerry-libm have configuration options
that enable/disable their build, in practice, only jerry-libc can be
replaced with the system (compiler-default) libc. If jerry-libm is
disabled, the build of jerry-main fails, as there is no way to
instruct the linker to link the system libm to the binary. (The
build system does have a way to pass flags to the linker, but those
flags are listed before the linked objects. For the references to
get resolved correctly, the libraries to be linked have to be
specified _after_ the objects.)

This patch adds the EXTERNAL_LINK_LIBS configuration option to
CMakeLists, which ensures that the specified libraries get
correctly passed to the linker. (E.g, replacing jerry-libm with
system libm becomes possible with
`JERRY_LIBM=OFF EXTERNAL_LINK_LIBS='-lm'`.)

Additionally, the patch also makes the following related changes:

* Removes the COMPILER_DEFAULT_LIBC configuration option, as it is
  (almost) always the opposite of JERRY_LIBC. Moreover, its name is
  misleading: its only role is to add `-nostdlib` to the linker
  flags.

* Makes use of transitive library dependencies: if a library has
  another library as dependency, and it is linked to a binary, its
  dependency is linked as well. Thus, jerry-libc, jerry-libm, and
  any external libraries are added to jerry-core as dependency, and
  then only jerry-core is linked to executables (cmake will take
  care of the rest).

* build.py and run-tests.py follow up the changes, along with some
  minor syntax changes.

* Moves static linking option to global CMakeLists, as unit test
  binaries should be linked the same way as jerry-main.

* Adds EXTERNAL_COMPILER_FLAGS and EXTERNAL_LINKER_FLAGS as last to
  the flag list, to allow user override of (nearly) anything.

The patch speculatively follows up the build system changes in the
mbed, riot-stm32f4, and zephyr targets.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-15 13:07:01 +02:00
Zidong Jiang 86ac6445e8 Fix bug in vm call_stack_size calculation (#1345)
call_stack_size should be register_count + maximum stack depth

* We don't add in the parser to save the size of snapshot header
* jerry_snapshot_version 5 -> 6

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-09-15 09:54:01 +02:00
Akos Kiss 9c50570ca3 Install ARM QEMU and GCC toolchain on Travis CI only if needed (#1350)
(Also some reorganization of the .travis.yml file.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-14 14:44:39 +02:00
Akos Kiss 697037af3f Remove obsolete dependencies from install scripts (#1349)
The new build script does not support ninja anymore, and we haven't
been building bare-metal arm targets for long. This patch removes
now-obsolete dependencies from install scripts.

This can also help to reduce the load on Travis CI (as it keeps
installing dependencies for each build job over and over again).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-14 11:02:44 +02:00
Tilmann Scheller a507c0863c Add a full copy of the Apache License 2.0 text to the project. (#1346)
Previously only a copy of the Apache License 2.0 header (for inclusion into source files) was distributed as part of the sources.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-09-13 16:22:42 +02:00
Yanhui Shen 15c53f7363 Fix getter's this value (#1344)
JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2016-09-13 08:53:26 +02:00
Akos Kiss baeb83db8f Move Travis CI detection logic from run-tests.py to check-signed-off.sh (#1341)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-12 15:11:14 +02:00
Zoltan Herczeg d9979be2f6 Rewrite property get/put to not use ecma_op_object_get_own_property
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-12 03:33:22 -07:00
Robert Sipka 0bc7840c5f Set the number of simultaneous jobs of the build. (#1336)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-09-12 09:20:24 +02:00
Akos Kiss 2e1c180658 Enable make install (#1335)
With the new build system, the conventional `cmake && make` already
works. However, the last step, i.e., `make install` was still
missing (didn't work). This patch adds the `install()` commands to
CMakeLists that are required to generate the `install` target in
the Makefile.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-09 13:32:36 +02:00
Zoltan Herczeg da02a37a02 Remove several ecma_op_object_get_[own_]property calls.
The ecma_op_object_get_[own_]property calls should be phased out from
the project eventually and virtual properties should be introduced instead.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-09 01:49:57 -07:00
Akos Kiss 7f80b76009 Make build.py's help output less of a "wall of text" (#1331)
`tools/build.py --help` prints a lot of output, which is sometimes
hard to comprehend, especially since some described options are
useful for developers only.

This patch:
* shortens how options are displayed in the output with the help of
  the "metavar" feature of the argparse module ("--option {on, off}"
  becomes "--option X" and the choices are listed in the description
  only); and
* hides all developer-specific options from "--help", and reveals
  them only for "--devhelp".

As a result, help output becomes more readable, especially for
ordinary users, and needs less space.

Some additional changes:
* the options are ordered in a more logical way (although that's
  somewhat subjective);
* help strings start with lowercase letters (it aligns better with
  argparse's overall style); and
* rename "--cpointer_32_bit" to "--cpointer-32bit" (underscores are
  alien to command line options).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-09 10:44:08 +02:00
Akos Kiss 2eb0c5ba1b Print warning at the correct log level in jerry-main (#1334)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-09 09:00:28 +02:00
robertsipka dc83e995d2 Fix for Issue #744
Don't increment the current position in case of a continuation byte.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-09-08 14:05:14 +02:00
Sergio Abraham Martinez Rodriguez c61e822a45 Specify profile and be able to add extra parameters to configuration (#1333)
Also added jerryscript errors to default compilation

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-09-08 13:04:35 +02:00
László Langó 5c330d7f8e Improve error messages
* Print location on parser errors.
 * Do not print messages on parse error if FEATURE_ERROR_MESSAGES is not set.
 * Minor style fixes

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-09-08 10:20:13 +02:00
László Langó cf94a25753 Change JERRY_ASSERT to TEST_ASSERT in unittests
JERRY_ASSERT does not check the condition in release builds.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-09-08 08:16:16 +02:00
Akos Kiss 7872f8145a Make jerry-main's link options configurable (#1328)
Until now,
* the link map of jerry-main has always been generated, even though
  it is not used that often;
* static linking has always been forced except for the OSX target.

This patch adds configuration options for these features.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-07 15:54:06 +02:00
Akos Kiss 8d478c142b Add tolerant mode to Signed-off-by check (#1322)
In tolerant mode, only the existence of the Signed-off-by line is
checked but the name and address is not matched against the author
of the commit.

The tools/run-tests.py script is extended to allow calling the
check script in tolerant mode and also to detect whether it is
being run by Travis CI.

The Travis CI config has been modified to check PRs in strict mode
but use tolerant mode for merges to master. This should enable the
use of the Merge button on the GitHub web interface. (The PR is
strictly checked when a contributor opens it but when a committer
merges it via the web interface and GitHub rewrites author details
from the contributor's profile, master will not turn red either.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-07 12:28:29 +02:00
Akos Kiss 714e8d261b Add git commit hash to jerry version info
Previously, jerry-core was built with various build identification
info (build date, git commit hash, git branch name), which was both
available from string constants of the library and also exposed by
jerry-main via the `--version` command line option. As of late,
jerry-core identifies itself only with API version number macros,
but sometimes it could be helpful to get access to the git commit
hash as well, even if that info does not become part of the API.

This patch moves the git commit hash retrieval logic from the build
scripts of jerry-core to jerry-main, and changes `--version` handler
to print the hash as well.

Resolves #1295

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-07 11:14:40 +02:00
Akos Kiss ebbacfc319 Make tools/settings.py lighter (#1327)
It should not import things it does not use and it should define
settings data only (i.e., definition of functions should not happen
there).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-07 08:29:06 +02:00
Robert Sipka caee6f738e Fix -Wsign-conversion Clang warning.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-09-06 15:56:41 +02:00
Zidong Jiang 27deda5712 remove the alloca.h because of #1294
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-09-06 12:07:31 +08:00
Robert Sipka 2314bc2770 Add the 'jerry-libm/include' path to specified include directories to jerry-core target
in case of enabled jerry-libm build.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-09-02 09:40:12 +02:00
Zsolt Borbély 6f262aea49 Include Port API documentation to webpage-generator script
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-09-01 16:08:53 +02:00
Akos Kiss 228f6f75f0 Fix warnings reported on OS X (#1307)
OS X build regularly reports some 39 warnings falling in 3 major
categories:

* "static function '...' is used in an inline function with
  external linkage [-Wstatic-in-inline]": Some semantics around
  `inline` have changed between C89 and C99, and gcc and clang seem
  to disagree on how strict they should be about them. Solution
  chosen is to use `-Wnostatic-in-inline` command line option for
  clang.

* "implicit conversion turns floating-point number into integer:
  'double' to 'bool' [-Wfloat-conversion]": `if (fmod (..., ...))`
  was used at different places, which is not nice anyway, thus the
  return value is compared explicitly against `ECMA_NUMBER_ZERO`.

* "format string is not a string literal [-Wformat-nonliteral]":
  Console and log port I/O functions have a printf-like interface,
  and the default implementations actually pass both format string
  and the remaining arguments to a vfprintf. However, clang is
  strict about the format string parameter of vfprintf and expects
  a literal there. By annotating the port I/O functions with
  `__attribute__ ((format (printf, ..., ...)))`, clang will check
  the format string being a literal string earlier, when the port
  functions are called, and will not complain within them when
  vfprintf is called.
  (Actually, this has revealed an incorrect format string, which
  has been fixed as well.)

(There were also some single conversion errors not listed above.)

The patch was tested on OS X (where all warnings disappeared), but
it should help clang compilation on other OS's as well.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-09-01 15:16:02 +02:00
László Langó 2a354b25a8 Add documentation to port API
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-09-01 14:32:31 +02:00
Zoltan Herczeg da47dedaed Add 32 bit compressed pointer support.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-01 04:16:54 -07:00
Zsolt Borbély 9ca78d380f [nuttx-stm32f4] Fix jerry_port_log function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-09-01 12:51:27 +02:00
Youngil Choi 2c78ee7f54 FunctionExpression name binding should be immutable
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-09-01 14:50:26 +09:00
Youngil Choi 260b967853 SplitMatch operation should not set its return array element with [[Put]]
Related issue: #1076

JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-09-01 11:05:07 +09:00
Sergio Martinez 1ab45a1a2f Remove problems with gettimeofday, newlibc and zephyr SDK
Fix Zephyr build

With the changes to the zephyr sdk, gettimeofday is being guarded
by XOPEN_SOURCE_EXTENDED which requires at least 700 on XOPEN_SOURCE to be active

This little patch also helps on removing most of the warnings we had before
related to that issue.

More info on this feature:
http://man7.org/linux/man-pages/man7/feature_test_macros.7.html

Another option was to enable _GNU_SOURCE for this port.

There are still some harmless warnings related to __sputc_r for which we still require
the convertion warning.

Tested on qemu_cortex_m3, qemu_x86, arduino_101 and frdm_k64f.
Zephyr Sdk 0.8.2, Zephyr 1.5.0-rc4 & Zephyr ec39b216

Closes #1311.

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-08-31 17:13:45 +02:00
István Kádár 6666927799 All-in-one build friendly jerry-libm.
Define constants are undefined at the end of the corresponding files of jerry-libm supporting all-in-one build.

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-08-31 16:28:54 +02:00
Zoltan Herczeg 548b3b98c2 Change return value to ecma_value_t for getting internal properties.
Removing a lot of ECMA_PROPERTY_VALUE_PTR macro calls. The only drawback
is free callbacks for native objects cannot be deleted anymore. Redefining
a free callback is a rare case, so this trade-of is acceptable.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-31 06:13:00 -07:00
Youngil Choi bfbe1821b5 vm_op_set_value should be able to throw error when ecma_op_to_string throws
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-31 21:06:54 +09:00
Peter Gal 17d1d37cca Improve the Curie build file generator a bit
Works with python 2 and 3.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2016-08-31 11:35:21 +02:00
Zsolt Borbély 18f9308cd6 Minor stylefix for targets/nuttx-stm32f4/README.md
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-08-31 09:47:30 +02:00
Akos Kiss da7abc55f9 Disallow failures of Travis CI jobs on OS X
Related issue: #1296

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-30 16:36:04 +02:00
Akos Kiss 7f6911103f Update the prerequisites documentation
* Split list into two: what is needed for building and what is
  needed for development only.
* Remove g++ from install list.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-30 10:19:14 +02:00
Youngil Choi 9f65b76013 Fix bug in for-in bytecode replacement
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-30 16:57:49 +09:00
Akos Kiss a6d2e792f8 Improve the build system
* Remove JERRY_CORE CMake option: the building of the core
  JerryScript library should not be optional.
* Fix wording of comments, status and error messages.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-30 09:10:30 +02:00
Yanhui Shen ba2b7dd13f Use C99's variable length array instead of alloca
JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2016-08-30 14:29:19 +08:00
Akos Kiss 8edab96162 Fix JMEM_HEAP_END_OF_LIST for pointers larger than 32 bits
For 64 bit pointers, 0xffffffff as end-of-list marker pointer does
not work, as the marker is expected to be greater than the start
address of the heap area (and also max 0xffffffff away), but on 64
bit systems, the heap can start on higher addresses, i.e., above
0x100000000.

This patch changes JMEM_HEAP_END_OF_LIST from pointer to offset.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-29 12:23:48 +02:00
Geoff Gustafson 7c50dc1691 Assert that pointer passed to jmem_pools_free is not NULL
If a NULL pointer is passed here, the list of free chunks gets lost.

JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
2016-08-29 12:20:13 +02:00
Robert Sipka 8ea60072b3 Remove unused JERRY_ENABLE_PRETTY_PRINTER from the build system.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-29 10:24:01 +02:00
Zidong Jiang 04e597a6a4 add target port: curie_bsp
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-08-27 19:02:38 +08:00
Zsolt Borbély 1e82ae1eb5 Update the nuttx-stm32f4 target
Related issue: #1202

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-08-26 15:38:14 +02:00
Zsolt Borbély e93e32635f Correct the documentation
- Fix some style issue, typos, and examples
- Follow the variable naming conventions
- Fix tables both in the project and on the webpage

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-08-26 13:20:07 +02:00
Youngil Choi 48d5eee920 Make jerry shell more intuitive
- REPL mode also prints each error messages, not only each return values.
- If read_file fails, execution stops right away.

JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-26 19:41:08 +09:00
Youngil Choi c6e68ce167 Eval called as a bound function should be indirect eval
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-26 17:48:39 +09:00
Youngil Choi 98cec9afb8 [[DefaultValue]] should be called twice when setting object as Array length
In section 15.4.5.1, both step 3.c and 3.d should call [[DefaultValue]].

JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-26 16:03:36 +09:00
Youngil Choi db176aa01d Numbers are permitted as property name in object literal
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-26 14:10:11 +09:00
Youngil Choi f2bae401af Remove unnecessary empty value check code
Related PR: #1276
Since RegExp.protytype.exec doesn't change the ret_value any more when
filling the result array, its empty value check code can be removed.

JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-24 23:08:00 +09:00
Zidong Jiang be1029d1d1 fix bug: move jerry_make_api_unavailable into the end of jerry_cleanup
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-08-24 14:08:59 +08:00
Zoltan Herczeg cfcb4c707c Add long string support.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-23 03:53:13 -07:00
Youngil Choi efdf91a0d6 Regexp.prototype.exec should not generate return array with [[Put]]
Releated issue: #1078

JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-23 15:56:28 +09:00
Paul Sokolovsky 314e74f8ce targets/zephyr/Makefile.zephyr: Use zephyr_getline module for line input.
The original implementation used shell facility, but it was designed for
a unix shell like input, and automatically tokenized it into
space-separated "words", with limit of 10 (i.e. 9 spaces per line). For
JavaScript input, it is quite easy to have more than 9 spaces per line,
and get error:

Too many parameters (max 10)

After consultation with upstream
(https://jira.zephyrproject.org/browse/ZEP-532) it was decided that the
best approach is to skip using shell facility and use Zephyr console
facility. That however requires some Zephyr-specific boilerplate code.
This code was implemented as reusable modules in
https://github.com/pfalcon/zephyr_console_helpers repository, to be
usable for other console-based projects too. zephyr_getline.h/c in this
commits are direct imports from this repository.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-08-20 22:19:33 +03:00
Zoltan Herczeg 27253112c2 Remove allocator functions which stores size.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-19 22:39:12 -07:00
Zsolt Borbély 823e4d030c Force to use SSE in 32-bit environment instead of the 387 unit
This patch fixes the failing unittests, which fails in 32-bit mode.
These compiler-options adjusted through the default toolchain file.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-08-17 09:24:11 +02:00
Paul Sokolovsky 63d14458a0 targets/zephyr/Makefile.zephyr: frdm_k64f: Optimize for Cortex-M4F.
This is now required, as Zephyr for frdm_k64f is built with hard float ABI.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-08-16 13:58:28 +03:00
Zoltan Herczeg a0e256e867 Reorganize the fields of the global context.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-16 00:56:28 -07:00
Paul Sokolovsky dc87ce0930 targets/zephyr/Makefile.zephyr: Work around issue with newlib 2.4.0.
Zephyr SDK 0.8.2 contains newlib 2.4.0 which doesn't provide gettimeofday()
declaration by default, but needs _XOPEN_SOURCE defined for this. While
this is definitely an issue with newlib 2.4.0 (to be fixed in one of the
next releases), defining _XOPEN_SOURCE is quite a harmless workaround.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-08-15 21:22:26 +03:00
Akos Kiss d39c4187fb Fix the OSX build
Apple does not support staticaly built applications on OSX, and all
dynamically built apps have to be linked against the System lib
(i.e., `-static` should not be used and `-lSystem` is a must).
As System contains all libc and libm functions, building (and
linking) the minimal jerry-libc and jerry-libm libs makes no sense.
Moreover, if JERRY_LIBC is ON, the compiler will use the jerry-libc
headers but will link the libc functions from System, which causes
heavy confusion and segfaults at run time.

Thus, this patch changes the build system to disable the building
of jerry-libc and jerry-libm, and enables the use of system
libraries when building on OSX.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-15 12:39:09 +03:00
Zoltan Herczeg ae1118293f Add two new API functions: jerry_create_number_infinity and jerry_create_number_nan
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-14 23:20:50 -07:00
Zoltan Herczeg b6f174cce7 Gracefully throw an error when parser runs out of memory.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-14 23:08:26 -07:00
Zsolt Borbély 405bccf4d6 Fix run-tests.py: should evaluate the conditions correctly
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-08-14 23:39:19 +02:00
Akos Kiss b4ab97581b Cleanup jerry-libc CMakeLists
Remove "-I/home/.../jerryscript/jerry-libc/__TARGET_HOST" and
"-D__TARGET_HOST" from compiler command line, they don't add
anything useful.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-14 22:35:31 +02:00
Robert Sipka 2e28542e9c Remove unused 'ecma_string_get_heap_number_size' and 'ecma_set_property_list' functions.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-12 18:48:56 +02:00
Akos Kiss 9d4f7c917f Fixing Math.pow
The Math.pow implementation relies on libm's pow. However, the ISO C
and ES5.1 standards differ on pow:
  * `x ** NAN` is NAN in ES but `+1 ** y` is 1 in C
  * `+-1 ** +-INF` is NAN in ES but 1 in C

This patch:
  * Modifies the Math.pow implementation to handle the special cases
    instead calling pow.
  * Adds a test case to jerry-test-suite as it did not test
    `Math.pow(1,NaN)`.
  * Fixes jerry-libm's pow, as it was not standard conforming, which
    helped hiding the error in Math.pow.
  * Updates the unit test for libm.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-11 22:49:36 +02:00
Akos Kiss 8f76bab92e Fix the use of mktemp in tool scripts
The manual of `mktemp` states that "TEMPLATE must contain at least
3 consecutive 'X's in last component." Linux implementation seems
to be relaxed about this and accepts and rewrites X's even inside
the template, but mktemp of OSX is more strict and handles trailing
X's only. This patch makes sure that mktemp templates work on both
OS's.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-11 22:20:43 +02:00
Akos Kiss a2d5acb43c Follow-up refactoring of logging-related parts
This patch:
* Ensures that all calls to `jerry_port_log` in jerry-core happen
  via macros defined in jrt.h. Also, it unifies the names of those
  macros: as `JERRY_ERROR_MSG` and `JERRY_WARNING_MSG` gave a good
  pattern that was well aligned with the naming scheme of the log
  level enum, `JERRY_DLOG` and `JERRY_DDLOG` were rewritten to
  `JERRY_DEBUG_MSG` and `JERRY_TRACE_MSG`.
* Ensures that all debug logging code parts of jerry-core (i.e.,
  memory statistics, JS byte-code dumps, and RegExp byte-code
  dumps) are guarded by macros: `JMEM_STATS`,
  `PARSER_DUMP_BYTE_CODE`, and `REGEXP_DUMP_BYTE_CODE`, which in
  turn are controled by cmake build system feature flags
  `FEATURE_MEM_STATS`, `FEATURE_PARSER_DUMP`, and
  `FEATURE_REGEXP_DUMP`.
* Ensures that all debug logging functionalities can be controled
  during run time (provided that they were enabled during build
  time): the engine has `JERRY_INIT_MEM_STATS[_SEPARATE]`,
  `JERRY_INIT_SHOW_OPCODES`, `JERRY_INIT_SHOW_REGEXP_OPCODES` init
  flags, and the default unix/linux command line app has
  corresponding command line switches.`
* Drops `FEATURE_LOG`, `JERRY_ENABLE_LOG`, and
  `JERRY_INIT_ENABLE_LOG`, as their name was misleadingly general,
  even though they mostly controled the regexp engine only. The
  above-mentioned `*REGEXP*` things mostly act as their
  replacements.
* Updates build, test, and measurement tool scripts, and
  documentation.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-11 22:00:12 +02:00
Robert Sipka 1b996a9a56 Remove needless toolchain files and variable settings.
Unnecessary to set CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR, these values
are set by default. It also allows to use any C99-compliant compiler by using
the default CC enviroment variable or by setting the CMAKE_C_COMPILER value
using the build script's --cmake-param argument.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-11 16:59:26 +02:00
Levente Orban 91e29120d2 Follow the API & build system update in mbed targets
- Update the API changes in mbed targets
- Build fix for mbed target after the build system patch.

JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2016-08-11 14:32:49 +02:00
Akos Kiss d5eb2f0be1 Let the build script use a default for toolchain
The `cmake` directory already contains several toolchain files for
various platforms (operating system + architecture). However,
`tools/build.py` does not define a toolchain file for cmake unless
explicitly specified. This patch changes the script to look into
the `cmake` directory for a file named
`toolchain_$(os)_$(arch).cmake` and, if found, pass that to cmake
by default.

OS and arch are determined by `os.uname()`. As Linux on Raspberry
Pi identifies itself as "armv7l", the legacy "armv7l-hf" arch name
is shortened to "armv7l". This way, building jerry on RPi
(natively, not cross) becomes possible by simply running
`tools/build.py` without any extra options.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-08 13:42:59 +02:00
Zsolt Borbély 2836f49eec Fix run-tests.py: don't override the return value of a testrun
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-08-08 12:56:48 +02:00
Akos Kiss 2eb2b22c49 Rewrite parser_boolean_t to bool
And `PARSER_{TRUE,FALSE}` to `{true,false}`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-08 10:53:20 +02:00
Akos Kiss ff21777950 Integrate JS parser module better with JRT
The fact that the JS parser had been developed as a separate
component for a while is still visible from some macros that mirror
things from JRT. This patch removes those duplicates and makes the
JS parser rely on jrt.h. (The removed macros are: `PARSER_DEBUG`,
`PARSER_INLINE`, `PARSER_NOINLINE`.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-08 10:38:22 +02:00
Zoltan Herczeg 48812b4a61 Reduce memory consumption of ecma_property_hashmap_steps.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-05 06:00:01 -07:00
Sergio Martinez 67b494dcff Adapted the makefiles to the new build system
- Zephyr now requires two passes to create the configuration for the cross compiling
- Added the missing bits required to build a valid new jerryscript minimal configuration

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-08-05 13:11:57 +01:00
Akos Kiss db36e942fb Avoid (void) and use JERRY_UNUSED
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-05 13:16:53 +02:00
Akos Kiss cad9ba1f01 Refactor flag additions in CMakeLists
CMakeLists already contains macros to ease adding compilation and
warning flags. This patch:
* Ensures that they are used whereever possible.
* Adds more macros to help with other flags as well.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-05 11:49:29 +02:00
Akos Kiss e9a23c4235 Refactor jrt buffer operations
`jrt_read_from_buffer_by_offset` is not used anywhere in the code
while `jrt_write_to_buffer_by_offset` is only used by snapshot
saving functions. Thus, this patch removes the read variant
completely and moves the write variant as a static function to
jerry.c. This empties out jrt.c, thus deleting.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-05 11:28:15 +02:00
Akos Kiss 697442434d Cleanup jerry's assert-like routines and macros
Until now, jerry had 3 different assert-like routines:
`jerry_assert_fail`, `jerry_unreachable`, and `jerry_unimplemented`,
and 3 corresponding macros (`JERRY_ASSERT`, `JERRY_UNREACHABLE`,
and `JERRY_UNIMPLEMENTED`). They had some irregularities, namely:

* All of them had a string parameter, although `jerry_unreachable`
  never got anything there but NULL.
* Both `jerry_unreachable` and `jerry_unimplemented` checked its
  string parameter for NULL, although it was always NULL for the
  first one and never NULL for the second.
* `jerry_unreachable` is just a regular assert with a fixed error
  message (i.e., control should not have got here), however, the
  expansion of its corresponding macro in debug and release modes
  differs from the behaviour of `JERRY_ASSERT`: `JERRY_ASSERT` is
  a no-op in release, however, `JERRY_UNREACHABLE` was triggering
  a crash even there.
* Moreover, `JERRY_UNIMPLEMENTED` was almost never used anymore but
  in a few places (where often an `#ifdef` selected between
  `JERRY_UNIMPLEMENTED` and `JERRY_UNREACHABLE`).

Because of the above, this patch makes the following changes:

* Drops `JERRY_UNIMPLEMENTED` completely and whereever it was still
  used, replaces it with `JERRY_UNREACHABLE`. As a consequence, the
  `jerry_unimplemented` function and the `ERR_UNIMPLEMENTED_CASE`
  fatal error code are also removed.
* Makes `JERRY_UNREACHABLE` expand to no-op in release builds.
  (Actually, to `__builtin_unreachable ()` to avoid warnings.) As
  a consequence, makes both `jerry_assert_fail` and
  `jerry_unreachable` be guarded by `#ifndef JERRY_NDEBUG`. Also,
  changes `jerry_unreachable` not to expect a string parameter.
* Rewrites `TEST_ASSERT` not to rely on `jerry_assert_fail` as
  `TEST_ASSERT` has to work in release builds as well. This also
  allows changing the error message not to mention "ICE", which
  would misleadingly suggest an assert within the engine, but
  "TEST" instead.

As a side-effect of the cleanup, some refactorings happened in
jrt.h:

* Removed the definition of the unnecessary `__extension__` macro.
* Re-used `JERRY_UNUSED` and `unlikely` where possible.
* Moved some parts of the file around.
* Fixed some comments (`/**` should only be used for the docstring
  of a single entity, for groups header comments, the regular `/*`
  should be used).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-05 10:09:32 +02:00
Robert Sipka f15e7beadc Remove compact profile.
The standard doesn't defines ECMAScript Compact Profile as a subset of Ecma-262 Edition 5.1.
Profile modes can be added easily like the minimal profile if required.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-05 09:11:33 +02:00
István Kádár 79bc5d0220 Bugfixes related to low memory conditions.
- Bugfix for removing property hashmap in ecma_gc_run.
 - Fixed bug in ecma_create_property() caused by the new property pair allocation.

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-08-04 14:08:48 +02:00
Akos Kiss 7f14a280b2 Fix logging of error message in jerry_fatal
As the comment of syscall error mentions, we should not try to log
(or print) anything in that case.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-03 18:17:40 +02:00
Slavey Karadzhov ce8abfb636 Initial RAM optimization for ESP8266
by putting big constants into ROM, instead of residing in RAM.
Related to https://github.com/Samsung/jerryscript/issues/1224.

JerryScript-DCO-1.0-Signed-off-by: Slavey Karadzhov slaff@attachix.com
2016-08-03 11:54:43 +02:00
Zoltan Herczeg d1b0b58729 Move all remaining globals to the global context.
Zero out all globals (and remove unnecessary init() functions).
Move snapshot globals to a temporary stack variable.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-01 04:25:32 -07:00
Robert Sipka b14ca4e248 Complete the getting-started documentation after the build-system update.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-01 13:01:22 +02:00
Robert Sipka e70c89e39e Comment fixes which are left behind after the API update.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-01 12:57:00 +02:00
Robert Sipka e6fefd42bd Build fix for RIOT target after the modifications of the build system (commit ddab1d8).
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-01 12:42:34 +02:00
László Langó 37f9b475c0 Fix API examples after the IO Port update
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-08-01 09:27:41 +02:00
Robert Sipka 15ba287b9e Change the CONFIG_ECMA_NUMBER_TYPE default value to FLOAT64 to ensure compliance with ECMAScript 5.1
which requires numbers to be represented in double precision floating-point format.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-07-29 09:51:18 +02:00
Robert Sipka ddab1d8152 Re-thinking the build system to bring it more into line with the conventions.
We removed that implementation where the build directory isn't set up to build with exactly one
configuration of the project but potentially several variants: the same build directory
can/must be used for debug and release builds, for full or compact profile versions, etc.
So we reworked the CMakeLists, and now one build dir deal with exactly one configuration
of the project's libraries and tools.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-07-28 12:29:55 +02:00
Tilmann Scheller 778f3c001e Remove CNAME file from the master branch.
Turns out that you need to add the CNAME file to the gh-pages branch rather than the master branch, thus removing it with this commit.

Related to #1218.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-07-28 08:01:28 +02:00
Slavey Karadzhov 23db8b5544 Refactoring of the ESP8266 target code to match the latest API.
Fixes issue #1211.

JerryScript-DCO-1.0-Signed-off-by: Slavey Karadzhov slaff@attachix.com
2016-07-27 13:35:30 +02:00
Zoltan Herczeg 76d42b5e8e Move GC, lcache, literal storage, lexical env global variables to jerry context.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-21 01:36:58 -07:00
István Kádár e7ec053362 More gc-friendly property hashmap allocation.
- New allocator is added that returns null on out of memory, property hasmap create uses this allocator for now.
- Property hashmaps of objects are removed durring a high severity gc.

Follow up patch is in progress.

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-07-20 17:31:24 +02:00
Paul Sokolovsky 80dc523ad3 targets/zephyr: REPL: Print expression result, or exception value.
With this change, REPL works almost the same as a standard JS REPL does
(browser console, Node.js, etc.). A result of each expression is
printed, e.g. "2+2" will print "4". Result is printed even if its
value is "undefined", e.g. "print(1)" will print "1", and on the next
line "undefined" (which is again how "normal" JS console work, except
a normal JS way to print to console is console.log()).

If an exception occured, a message "Error executing statement:", followed
by external representation of exception object, is printed. Note that
distinctive exception objects are supported only in "cp" (compact profile),
not in "cp_minimal". In the latter case, there's only exception hierarchy
top-level prototype, so any error message will look like:

    Error executing statement: [object Function]

(That's the reason why there's error message prefix - so it weren't too
confusing even if used in cp_minimal config. Unfortunately, compile-time
JerryScript configuration isn't available to Zephyr's main.c, so there's
no easy way to implement cp vs cp_minimal distinction).

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-07-20 17:39:20 +03:00
László Langó 1cdc66060f Fix RIOT port after API update
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-20 13:00:47 +02:00
László Langó a004375e1d Remove printf calls from jerry core
Related issue: #964

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-20 12:43:14 +02:00
Zoltan Herczeg 12916c6c55 Fix minor implementation issues found in the JerryScript API.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-20 01:54:00 -07:00
Tilmann Scheller 8d69e26e75 Enable custom domain.
This enables the jerryscript.net domain for the GitHub project. This configuration file is necessary to enable the redirection from http://jerryscript.net to http://samsung.github.io/jerryscript.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-07-19 17:16:37 +02:00
István Kádár 9fcf6597f6 Memory leak is fixed in ecma_builtin_regexp_prototype_exec.
Issue fixed: #1079

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-07-19 15:07:38 +02:00
Zoltan Herczeg 3a78d30897 Introducing global context.
Currently the static variables of the allocator are moved into a
global structure.

The future plan is supporting multiple context models with different
advantages and disadvantages. Users can select the most appropriate
context model for their own use case. This context model must be
selected at compile time using compiler defines.

Currently only one model is implemented, which will be the default
context model: the context is stored in global variables, so only
a single context is available which always exists.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-19 05:25:34 -07:00
Zidong Jiang ca39875690 fix bug of "deref bytecode twice" in jerry_exec_snapshot
Enable the snapshot related test code in test-api.c

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-07-19 18:56:06 +08:00
Zsolt Borbély dd3f801ae0 Update a link in README.md
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-07-18 09:57:32 +02:00
Zoltan Herczeg 3828f08796 Remove arbitrary case conversion tests.
Since upper/lower case conversions are unspecified by the standard,
we convert ASCII characters only, and a few other characters for
testing purposes. Because these are just random cases, it is better
to remove them before the release. At some point we could add a
unicode compatible case conversion which can be enabled at compile
time.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-15 06:38:13 -07:00
Zidong Jiang 6084f0845c Fix bug in jerry_string_to_char_buffer.
str_len can smaller than buffer_size.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-07-15 21:06:47 +08:00
Dániel Bátyai 3354da3021 Optimize ecma_string_get_array_index
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2016-07-15 10:53:20 +02:00
László Langó f0fd939d87 Move log level to default port
Setting the log level should be specified by the actual port.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-15 09:13:16 +02:00
László Langó fa94c67ee7 Implement IO port API
Related issue: #964

Implemented the IO API of Jerry ports. Removed log file from API level.
The port implementation should define the destination of log messages.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-14 13:15:30 +02:00
Zoltan Herczeg 35c0869ef5 Improve resolve reference.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-14 02:24:00 -07:00
László Langó 1e4531c7b5 Minor fixes in API reference
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-14 09:01:27 +02:00
Zoltan Herczeg 6f1ce8d6bb Improve the construction of "length" built-in strings.
The "length" property name is the most frequently used built-in string
and also frequently created by various hot-paths. New functions are
added to improve the speed of the "length" string creation.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-13 23:36:27 -07:00
László Langó b4bba2ef70 Update API reference to the new API
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-12 14:08:59 +02:00
Paul Sokolovsky 6b60e22e30 targets/zephyr: Update to new Jerry API and improve REPL interaction.
Various calls updated to use API from jerry-api.h (to-be JerryScript 1.0
API).

Use jerry_eval() instead of jerry_run_simple(), as it allow to store (and
then access) variables in a global environment. E.g. following now works
(entered and executed as two separate lines):

    a = 1
    print(a)

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-07-12 14:33:07 +03:00
Dave Methvin 1ac1c09b25 Fix links to docs in README.md
JerryScript-DCO-1.0-Signed-off-by: Dave Methvin dave.methvin@gmail.com
2016-07-11 15:23:15 -04:00
László Langó 9bce5b09a9 Update Jerry API
* Removed jerry_string_t and jerry_object_t
* Updated function names
* Updated return values
* Updated function descriptions
* Added new functions
* Added new unittests

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-07-11 09:01:29 +02:00
István Kádár cea3a142ac Regression tests are added for the recently closed fuzzer bugs.
Related issues: #380, #1065, #1073, #1074, #1075, #1080, #1081, #1082, #1083

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-07-08 14:50:09 +02:00
Zoltan Herczeg 97be8bfbc8 Simplify string management.
Allocate a single memory block for strings, rather than a separate string header
and string characters block. In the past strings were split into 8 byte chunks,
and large amount of legacy code is designed for that representation. However the
current allocator allows block allocation so we don't need those complicated
algorithms anymore. This patch is a cleanup rather than an optimization.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-06 03:47:48 -07:00
Zoltan Herczeg 41337dbd59 Small performance optimizations of the interpreter.
Short summary of the changes:
 - The ecma_reference_t is removed, and its helper functions are deleted.
 - The delete operation does not depend on ecma_reference_t anymore.
 - A new resolve function is added which returns the current value
   of a named binding in the context chain.
 - The vm_op_set_value does not perform type conversions when its arguments
   has the appropriate types.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-06 00:00:03 -07:00
Tilmann Scheller fb9b4dd807 Fix signed left shift in vm_loop().
Signed left shift operations are undefined in C. Add constants for the minimum/maximum integer value which are already shifted. Technically, the constant for the shifted maximum value is not required, adding it for consistency/increased readability.

The bug was detected by -Wshift-negative-value both with GCC 6.x and Clang.

This fixes #1174.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-07-05 22:01:00 +02:00
István Kádár 5f7997d2d0 Documentation converter script.
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-07-05 13:58:04 +02:00
Paul Sokolovsky 0898bf4835 targets/zephyr: Add support for NXP FRDM-K64F board.
Tested to boot and run "test" one-liner.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-07-04 17:38:13 +03:00
Zoltan Herczeg 5ed6582141 Optimize comparison in VM.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-04 00:01:09 -07:00
Zoltan Herczeg d882709ed2 Optimize arithmetic in VM.
Add, substract, mul, mod, and increment/decrement operators are optimized.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-03 23:52:27 -07:00
István Kádár a81c7c83d7 ecma_make_boolean_value(bool) function is added in order to make ecma_value form a raw bool.
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-07-01 16:00:56 +02:00
Sergio Martinez c8db27c4af Fix issue when you don't flash the ARC and the x86 waits
- Fixed problem when the x86 hangs waiting for the ARC to
be initialized. If you flash as arduino_101 instead of
arduino_101_factory this will happen and you will not get
a command line.

- Changed default build to arduino_101_factory which is
the current recommended method of flashing the arduino_101

- Updated documentation to explain a few bits on how to flash
the board and conform to the v1.4.0 way of flashing the device.

- Added a helper to run the dfu-util command directly on make.

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-07-01 13:40:22 +01:00
Tilmann Scheller 4921a030b3 Update README with the current binary size.
JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-07-01 10:52:19 +02:00
István Kádár 1b40af729b Documentation is moved to docs.
- DEVELOPMENT.md is extended with bash utilites.
 - Internals doc added and DEVELOPMENT is renamed to GETTING-STARTED.
 - modified image links in Internals
 - links are fixed in README.md

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-06-30 14:35:23 +02:00
Sakari Poussa 88db00ae4b [zephyr] rename SOURCE_DIR to ZEPHYR_TARGET_SRC_DIR in Makefile.zephyr
In Makefile.zephyr the SOURCE_DIR variable was introduced recently.

However, the SOURCE_DIR variable is heavily used in zephyr. If you try to build
the jerryscript zephyr port from a zephyr project using the makefiles, the
SOURCE_DIR gets set by the zephyr build system and points to wrong place here.

This patch creates unique name to avoid the name clash.

JerryScript-DCO-1.0-Signed-off-by: Sakari Poussa sakari.poussa@intel.com
2016-06-30 14:48:47 +03:00
László Langó c3541c3ab7 Check error values in API functions
Internal functions cannot handle error values, so it must be avoided to
pass error values to the engine.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-29 14:26:55 +02:00
Sakari Poussa 130be84ad1 [zephyr] Makefile tuning
Read the zephyr crosscompile settings earlier so correct values are used.

Currently, the crosscompilation does not work on OSX. With this fix it does.

JerryScript-DCO-1.0-Signed-off-by: Sakari Poussa sakari.poussa@intel.com
2016-06-28 14:28:20 +03:00
Zoltan Herczeg e9a47aff95 Sixteen bit hash for strings.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-27 03:04:50 -07:00
Zoltan Herczeg 0a32c97755 Rework literal storage.
The new literal storage keeps ecma strings rather than having a
custom string implementation which duplicates the string management
routines. Conversions between string implementations are eliminated
which improved the performance by 4%.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-27 00:25:09 -07:00
Zoltan Herczeg 0940be57f6 Fix memcpy return value.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-26 23:45:58 -07:00
László Langó 388b442d10 Update API reference
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-24 13:54:23 +02:00
Zoltan Herczeg ea0176764e Remove ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION to free an object type.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-24 02:14:35 -07:00
László Langó cfa0c94697 Add new API function
Implemented 'jerry_is_array' and 'jerry_get_array_length' API functions.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-24 10:08:17 +02:00
Paul Sokolovsky 4091444016 targets/zephyr: Rename from arduino_101, with more targets supported.
- Add preliminary support for ARC architecture.

Using "em_starterkit" board supported by Zephyr. Only build for this board
is tested, not booted on a real device due to lack of access. There's no
QEMU emulation support for ARC in Zephyr (yet) either.

- Update README to cover different Zephyr architectures/boards.

- Changed the arduino_101 paths to something more generic and adaptable
- Made sure it compiles and runs on Arduino 101

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-06-23 13:02:20 +03:00
Zoltan Herczeg 64f49385ae Four byte optimized memcpy.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-22 03:15:04 -07:00
Zoltan Herczeg 1726bba184 Create extended objects instead of internal properties.
Several internal properties are removed and directly stored as
part of the object. Faster built-in and JS function processing.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-21 06:12:17 -07:00
László Langó 7f153c799a Improve empty checks of ecma strings
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-21 13:40:12 +02:00
Zsolt Borbély 2324617928 Guard assert-related functions
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-06-21 12:58:24 +02:00
László Langó 87b6df21c6 Update API examples
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-21 11:21:39 +02:00
Tilmann Scheller 04ab949126 Enforce pure C99 build.
Building with -std=c99 is not sufficient to enforce a pure C99 build as it still allows GNU extensions which don't conflict with C99 to be used. Add -pedantic to the build options to ensure that the codebase is only using C99 constructs and the build will fail whenever any compiler extension is used. This helps to ensure that JerryScript remains portable and can be built with any C99-compatible C compiler.

Removing -Wpedantic, as any warnings of that type will already trigger an error when building with -pedantic.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-06-21 08:26:16 +02:00
Robert Sipka c0665da299 Build fix for ALL_IN_ONE and COMPILER_DEFAULT_LIBC
The build fails with enabled ALL_ON_ONE and enabled COMPILER_DEFAULT_LIBC options,
because the _BSD_SOURCE doesn't defined before including the sys/time.h.

In case of glibc, the 'timezone' is not part of C99 but part of POSIX, so we need
to define the _BSD_SOURCE feature test macro before including sys/time.h to get
the prototype for this struct.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-06-19 07:39:48 +02:00
Zoltan Herczeg 37ebd20a72 Remove LIST_LAZY_PROPERTY_NAMES_ROUTINE_NAME macro function.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-17 06:20:06 -07:00
Zsolt Borbély bb07151a39 Pack assert-related code
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-06-17 14:00:21 +02:00
Tilmann Scheller 5caf00606c Remove GCC 4.7 build requirement.
The GCC 4.7 check is a leftover from the times when JerryScript was a C++11 codebase, it was there to ensure that JerryScript is compiled with a GCC version which has sufficient support for C++11.

Today JerryScript is a pure C99 codebase (enforced by building all the sources with -std=c99) and this check is no longer necessary. JerryScript should now build just fine even with rather old versions of GCC.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-06-17 13:29:20 +02:00
Akos Kiss edc695e108 Remove const array and scalar variables from ecma_utf8_string_to_number
There is no need for putting `LIT_CHAR_*` constants in const
scalars or arrays, they can be used directly. (There is especially
no need for arrays of 10 elements if only 2 of them are used.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-06-17 03:38:22 -07:00
Akos Kiss 30fd549e7f Optimize number-to-string conversion
* Make constants static in `ecma_number_to_utf8_string`.
* Make `ecma_number_to_utf8_string` use early returns, and rewrite
  its self-recursion in case of negative numbers.
* Make the stringification of decimal exponent in
  `ecma_number_to_utf8_string` use `ecma_uint32_to_utf8_string`.

* Changed ERROL0 dtoa implementation to use the `double` type
  instead of `ecma_number_t`. Thus, even is `ecma_number_t` is 32
  bit wide, the algorithm works the same.
* Changed `ecma_number_to_decimal` to use the ERROL0 dtoa algorithm
  for 32-bit floats as well.
* Changed `ecma_number_to_decimal` to generate the decimal string
  representation of the mantissa instead of an `uint64_t` number.

* Changed `ecma_number_to_utf8_string` to make use of the already
  available string representation of the mantissa, generated now by
  `ecma_number_to_decimal`.
* Changed `ecma_number_to_utf8_string` not to use static arrays and
  variables for digit, "e", etc. generation.

* Changed all `Number.prototype.toXXX` implementations and the
  `ecma_builtin_number_prototype_helper_round` helper to make use
  of the already available string representation of the mantissa,
  generated now by `ecma_number_to_decimal`.
* Factored out the common stringification parts of all
  `Number.prototype.toXXX` implementations into a new helper
  `ecma_builtin_number_prototype_helper_to_string`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-06-17 03:36:35 -07:00
László Langó 65542549af Add conversion API functions
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-16 14:13:06 +02:00
László Langó 8e8504244b Update jerry API
* Fix error handling (related issue: #1141)
 * Move output paramters to the end of the arguments lists

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-16 13:43:33 +02:00
László Langó 8453a9ade8 Change return value of 'ecma_ref_ecma_string' to void
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-16 12:44:27 +02:00
László Langó 0daeb2f942 Remove string copy
Changed 'ecma_copy_or_ref_ecma_string' to 'ecma_ref_ecma_string'. It does
not copy the string if the maximum number of reference counter is reached,
but bails out with an error like the 'ecma_ref_object' function does.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-16 12:44:27 +02:00
Hanjoung Lee 7a3ed2650d Fix errol0_dtoa for DBL_MAX
When `val` is DBL_MAX, we get +inf from `ECMA_NEXT_FLOAT (val)`.
It is necessary to handle this case specially.

Related issue: #1054

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2016-06-16 18:40:06 +09:00
Zoltan Herczeg 378d7f78ca Improve builtin-property construction.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-16 01:42:55 -07:00
Paul Sokolovsky 78186445a4 targets/arduino_101: Refactor to better support other Zephyr targets.
This adds support for ARM/Thumb2 (Cortex-M) architecture, tested with
BOARD=qemu_cortex_m3 (i.e. QEMU with Cortex-M emulation). Should also
ease porting to other architectures supported by Zephyr.

This uses method of passing external libraries and link options into a
Zephyr application using ALL_LIBS and LDFLAGS_zephyr make variables, as
suggested by the Zephyr developers:
https://gerrit.zephyrproject.org/r/#/c/2476/ , and makes sure to append
to them, instead of assigning, to not overwrite important target-specific
options set by the Zephyr core.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2016-06-16 11:22:21 +03:00
Hanjoung Lee 1c43e5b02b Fix Date construct helper
Correct behaviour of step 8, 15.9.3.1, ECMA-262 v5.1.
 - Change ToInt32(y) to ToInteger(y).
 - If ToInteger(y) is not between 0 and 99 then yr = y

Related issue: #1071

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2016-06-16 11:05:57 +09:00
Tilmann Scheller 372a2bb40b Cleanup README and add official IRC channel and mailing list.
JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-06-15 12:15:20 +02:00
László Langó a816ab8bb0 Use 'ecma_value_t' in API too
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-14 14:44:02 +02:00
Zoltan Herczeg b828d4a463 Rename ecma_is_value_error to ECMA_IS_VALUE_ERROR.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-14 02:31:34 -07:00
Zoltan Herczeg 1eeed7e07e Improve get-value.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-14 01:58:52 -07:00
Zsolt Borbély ce905487a0 Introduce JERRY_UNUSED() instead of __attr_unused___
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-06-14 08:45:14 +02:00
Jimmy Huang 4afd76d932 Updated Zephyr command line shell after API changes
JerryScript-DCO-1.0-Signed-off-by: Jimmy Huang jimmy.huang@intel.com
2016-06-13 10:06:39 -07:00
Zsolt Borbély c557a0a047 Modify the usage of ecma_string_to_utf8_string()
Parts:
 * Rename ecma_string_to_utf8_string() to ecma_string_copy_to_utf8_buffer.

 * Introduce ecma_string_to_utf8_bytes(), which wraps the usual 'function call-assertion' pair,
   and check strict equality of size of the string and the buffer.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-06-13 15:21:30 +02:00
Zoltan Herczeg eac736ffa4 Rename try_give_memory_back to a better free_unused_memory.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-13 05:35:53 -07:00
Zoltan Herczeg 495b24eebc Optimize put result phase in the interpreter.
Skip put result phase for opcodes which put their
result onto the stack or they don't have result at all.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-10 01:26:42 -07:00
Zoltan Herczeg eed84a7dd9 Parser improvements.
The number of delete opcodes is reduced to two from six. The
range of numbers which can be included in the byte code is
doubled from (-127,127) to (-256,256).

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-10 01:18:17 -07:00
Robert Sipka 3c83af9f23 Rename 'jerry_api_' prefix to 'jerry_' in the main-riotos.c file
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-06-09 17:03:01 +02:00
Robert Sipka 0dd1082d6f Added target to compile RIOT-OS against jerryscript
This patch contains an example in which you can run a small js on RIOT-OS with STM32F4-Discovery.
Check the README.md for a more detailed explanation of how to compile and run it.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-06-09 14:53:12 +02:00
Zoltan Herczeg d953fbb7be Branch opcodes have no result and either they have a stack argument
or no arguments at all. To improve the performance, the branch argument
flag is changed into a get argument type which eliminates a flag check
for all executed opcodes. Furthermore branch opcodes skip the put result
phase by changing the "break" to "continue" statements.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-09 01:20:36 -07:00
Zsolt Borbély 2834423fd2 Remove surplus attribute-defines from jrt.h
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-06-08 15:44:01 +02:00
László Langó b5efa2ea03 Updated API examples, after API changes
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-08 12:48:47 +02:00
László Langó 824d39c2a2 Update API functions
* Rename 'jerry_api_' prefix to 'jerry_'
 * Fix minor style issues
 * Group the API functions and add comment to each group
 * Move engine behaviour related funtions to 'jerry.h'

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-08 12:48:47 +02:00
Zoltan Herczeg 3e0572e433 Optimize add operation.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-08 03:07:18 -07:00
Sergio Martinez 7583b63a6e Added target to compile zephyr against jerryscript.
This patch contains a project in which you can run
a small js test inside the Arduino101.

Follows the Nuttx implementation to replicate a command
line in the Quark SE Lakemont architecture.

Everything is self contained in the targets/arduino_101 folder.
It has only been tested with the arduino 101 at the moment.

Check the README.md for a more detailed explanation of
how to compile and run it.

- Command line javascript run test.

Use test to get a default test.

Write any valid javascript in the shell and get it resolved and executed

- Support for qemu
- Added extra verbose mode on the demo function
- Support to build factory images that can be flashed with dfu-util
- Added a few extra examples on the README about commands that work.

Small fixes to readme and libc_support.c (#1)

- Added a few more instructions to the README.md for arduino_101
- Added the stdint.h include in libc_support.c
- Added parameter to check-vera.sh to check a specific folder
- Cleared the libc function duplication

JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez sergio.martinez.rodriguez@intel.com
2016-06-06 17:47:43 +01:00
Zoltan Herczeg 308bb3c8e1 Remove last_completion_value.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-03 04:12:10 -07:00
Zoltan Herczeg 98d2b66e40 Reduce the default LCache size by half. From 4Kbyte to 2Kbyte.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-03 02:17:43 -07:00
Zoltan Herczeg 6f33ab3e8f Improve equal operations.
The implementation is simplified and optimized
resulting the removal a large amount of code.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-03 02:10:44 -07:00
Zoltan Herczeg 5c852ab6fb Optimize LCache operation.
The cache stores only real properties now, because storing NULLs has
little benefit according to tests. Since only real properties are
stored now, there is no need to create real references to objects
and property names, which reduces the keeping of dead objects after
garbage collection.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-02 03:56:36 -07:00
Akos Kiss d7f95434e2 Improve the output of test runner
* Improve the name of the temporary snapshot files in test runner:
  Until now, test runner used a completely random filename for the
  temporary snapshot file when testing (saving to and executing from)
  snapshots. This patch makes the temp file contain part of the name
  of the original test file in order to make reading the logs (and
  thus, identifying failing tests) easier.

* Add `--snapshot` to summary info of test runner if testing snapshot
  support:
  This helps reading the logs, especially when multiple tests run in
  parallel and get their output mixed. E.g., on the CI, all tests
  write the console at the same time and messages get interleaved.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-06-01 15:43:29 +02:00
Robert Sipka 331bdddea9 Insert parameters between the pair of parentheses in the JERRY_MIN and JERRY_MAX macro definitions
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-06-01 15:18:32 +02:00
Robert Sipka 8a911bb6cb Use 'ecma_get_float_from_value' instead of 'ecma_get_number_from_value' in the ToString operation.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-06-01 15:03:06 +02:00
Zoltan Herczeg a5d9701f60 Optimize uint32 hash computation.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-01 05:09:58 -07:00
István Kádár 71c32a1d96 API documentation update under docs.
Links to JerryScript API reference page (https://samsung.github.io/jerryscript/API/) are inserted.

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-06-01 12:58:17 +02:00
László Langó ed08518bd7 Code simplification
Move the enclosed condition forward and combine the two if statements.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-01 09:58:29 +02:00
SaeHie Park ed2a3602f4 Fix ESP8266 build
This change is to fix build for ESP8266 board with jerry_api_value_t changes.

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-06-01 08:05:17 +09:00
Zsolt Borbély 36c7440c40 Restore the previous way to convert strings in ecma_builtin_json_parse()
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-05-31 15:52:28 +02:00
Zoltan Herczeg f24be95f89 Optimize conditional jumps.
The ecma_op_to_boolean return value is changed to bool for faster
evaluation, and no need to swap operandos of relational compare.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-30 05:56:22 -07:00
Zoltan Herczeg 08c312bc55 Remove ECMA_STRING_CONTAINER_HEAP_NUMBER.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-30 05:09:51 -07:00
Zoltan Herczeg 8c92972b2f Passing less number of arguments to a function is generally faster. So
the three boolean arguments of ecma_create_named_data_property and the
two boolean arguments of ecma_create_named_accessor_property are combined
into one uint8_t argument. On ARM-32 it is preferred to have less than
four arguments, since these arguments can be passed in registers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-29 23:47:46 -07:00
Robert Sipka 379698733a Optimising the ToString operation
Create new ecma-string from positive integers without cast it to ecma_number

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-26 10:33:38 +02:00
Zoltan Herczeg fec6944a2a When array literals are created, there is no need to check whether
the property already exists. This improves the performance.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-25 06:51:14 -07:00
Zoltan Herczeg 48b01d0f74 Improve the performance of ecma_op_general_object_put. The ecma_op_object_can_put
function is removed and incorporated into ecma_op_general_object_put. Also most
properties are directly created / updated instead of using ecma_builtin_helper_def_prop.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-25 06:41:32 -07:00
Zoltan Herczeg ac3aa30c82 Micro optimizations of the virtual machine:
- Branch argument information is encoded in the vm byte
   code data, so CBC flags are not loaded anymore
 - The free_flags variable is removed from the vm_loop
 - Two cases are removed from "get arguments", argument
   processing is simplified
 - The two opcode tables are merged to one
 - The VM_OC_POP opcode has no result, so the break is changed to continue.
 - The VM_OC_PUSH_NUMBER can use ecma_make_integer_value.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-24 02:29:49 -07:00
Zoltan Herczeg be273d874f When the same value is assigned to a property, and its reference
counter is one, dereferencing the value frees its allocated memory.
In this case we return early.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-24 02:17:05 -07:00
Akos Kiss e4b0d81fbf Print each output line with one command in test runners
When running multiple test suites in parallel -- e.g., as it
happens on the CI --, the names of the executed commands and the
results of the executions can/do get printed far from each other,
interrupted by other prints. This can make the reading of the
output hard. This patch prints each line with one echo command,
which makes the interruption of the line less likely.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-05-23 14:46:17 +02:00
Zoltan Herczeg 76ae2001a1 Complete reworking of ecma_op_general_object_define_own_property.
Unnecessary checks are removed, new checks are added to skip
unneeded code paths.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-23 03:19:20 -07:00
Zoltan Herczeg 53414b2c88 Add ecma_fast_copy_value and ecma_fast_free_value to improve performance of hot paths.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-23 02:53:43 -07:00
Zsolt Borbély 9f29cc168d Update memory-related defines
Set the correct defines in CMakeLists.txt and update another occurrences in scripts.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-05-22 23:19:10 +02:00
Zsolt Borbély 6b18710bc1 Get rid of the remains of heavy debug
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-05-20 16:32:29 +02:00
László Langó 92bb551d45 Change 'mem' namspace to 'jmem'
The 'mem_' prefix is too general, so it might clash with
symbols in other libraries. Renamed the directory, file,
funtion and type names.

Related issue: #1052

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-20 16:01:33 +02:00
Zoltan Herczeg aaa3d22677 Remove unused collection based argument passing to the vm interpreter.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-20 05:51:41 -07:00
Zoltan Herczeg 5ecf83ee8a Change internal property values of built-in primitive objects (namely Number,
String, Boolean) to use ecma-values. When the value of a Number object is
a small integer number, this change reduces the memory consumption, since no
double is allocated.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-20 03:15:11 -07:00
Robert Sipka 1c028d96d6 Unify the condition form within the asserts
This modificiation affects those conditions which check that
a value can be represented with a smaller type.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-20 11:18:07 +02:00
Akos Kiss c7d33e9887 Don't concatenate multiple JS scripts in jerry
Jerry (the command line tool) has been supporting the execution of
multiple script files for long. However, until now, it simply
concatenated all sources into a single source buffer and
parsed/executed them as one unit. Other JS execution tools (e.g.,
jsc, v8) load and execute separate files as separate units -- but
still in the same execution environment. The most significant
effect of this approach is that the `"use strict;"` directive (or
the absence of it) at the beginning of each JS script file takes
effect as expected (i.e., as if the script was executed alone).
Contrarily, the concatenation-based approach forces the strictness
of the first script on all the rest (i.e., if the first script
starts with `"use strict";` the rest is also executed in a strict
environment even if they did not contain the directive, and vice
versa).

This patch makes the jerry command line tool to load/parse/run one
unit at a time.

Side effects:
- As there is no need for separate file read routines that load one
  file (a snapshot) or concat multiple (JS sources) anymore, those
  routines got merged.
- Both previous read routines used multiple stdio functions
  (`fseek`, `ftell`, and `rewind`). This has been simplified to
  rely on `fread` only to find out the length of the input.
- This simplification made the above mentioned functions
  superfluous in jerry-libc.
- As some error messages had to be touched in this patch, several
  more have been beautified to make them more consistent.
- One small change was needed in `jerry_parse` in jerry-core to
  allow subsequent parsing of multiple sources (without that, an
  assertion was triggered).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-05-19 12:07:54 +02:00
László Langó e1c8a2ec96 Run JS regression tests in snapshot mode too
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-18 17:05:13 +02:00
Akos Kiss de5b77d135 Shrink test logs by not printing full paths
Both JS test suite and unit test logs can grow large as Makefile
invokes run-test-suite.sh and run-unittests.sh with absolute paths
to engines and test directories, which get then printed quite
often. This patch adds code to the runner scripts to determine the
longest directory path common to the current working directory, the
invoked script, the test directory, and the engine (in case of JS
tests). Then, when a path is to be printed, this common path
component is skipped.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-05-18 14:08:25 +02:00
Zoltan Herczeg 12a58e6fc6 Byte code related symbolic constants and macros in vm.h get better names
and comments. Space consumed by opcode triplets are reduced to 16 bits
down from 32 bits. This reduces the opcode triplet tables by 220 bytes.
New symbolic constants and defines were also added to describe common
operations.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-18 05:00:33 -07:00
Zoltan Herczeg 7b9e6a873f Integer acceleration for basic arithmetic and comparison.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-18 04:51:58 -07:00
László Langó 07dabff1ab Update API reference
* Fixed code style issues
 * Updated the documentation of 'jerry_parse' and 'jerry_run'
 * Fixed broken anchor formats
 * Fixed 'jerry_api_value_t' usage
 * Updated fuction parameters

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-18 11:22:29 +02:00
László Langó 0ff35311ca Add new API examples
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-17 16:22:33 +02:00
László Langó 1938415b0d Remove 'test-js-precommit' target from Makefile
When performing `make precommit`, instead of running only a subset of
the Jerry Test Suite on full profile builds, run the whole suite, and
also run the compact subset of the suite on compact builds. Also, make
CI perform the same tests.

Related issue: #879
Related PR: #912

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-17 15:42:27 +02:00
Zoltan Herczeg 00f759e275 Introduce integer ecma-value representation to reduce the double allocations.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-17 00:11:19 -07:00
Zoltan Herczeg 7cf8b79429 Argument literal names were not stored in the snapshot, because the
names were replaced by empty strings before that. The snapshot form
of tests/jerry/arguments.js fails because of this issue.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-16 23:49:41 -07:00
László Langó 2d7f1d1070 Warning fixes for jerry-libm
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-13 15:52:56 +02:00
László Langó 953e45f266 Remove 'ecma_assert_object_type_is_valid' from release
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-13 15:29:49 +02:00
László Langó 210ba6dc85 Update API-EXAMPLE.md
Fix Jerry style and update to the current API.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-10 12:44:18 +02:00
Akos Kiss 7e0cd850a7 Fix check-signed-off.sh: remove CR from git show output
When merging PRs via the GitHub web interface, CR characters can
sporadically appear in the commit message. This can also cause
signed-off-by message mismatch in check-signed-off.sh (even if
everything else is OK). To be on the safe side, this patch removes
any CR characters from the output of git show when performing the
check.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-05-09 11:35:39 +02:00
Robert Sipka de1912f6f8 Improve the string descriptor.
Separate the utf-8 and ascii strings.
In case of ascii strings the size is equal to the length, so we able to store this information
in the string descriptor instead of using the string header to store it.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-09 09:58:11 +02:00
Rob Moran 54d6e1f44f Updated readme.md to reflect new folder structure.
JerryScript-DCO-1.0-Signed-off-by: Rob Moran github@thegecko.org
2016-05-07 17:42:03 +01:00
László Langó fe3c269e99 Fix return value of 'jerry_api_get_object_field_value'
Fixed the return value to return false when the field does
not exist as the documentation says.

Related issue: #1041

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-06 21:07:19 +02:00
László Langó 2a5468a2ac Improve double to string conversion
Added errol implementation. Fixed '3d-raytrace.js', because
the new algorithm has better precision and also reduce the
code size.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-06 14:53:50 +02:00
Imre Kiss 5369fd4515 Merged target for mbed boards.
Merged the mbed releated targets into one source.
Available targets: FRDM-K64f, Discovery-STM32F4, Discovery-STM32F429ZI, NUCLEO-STM32F4

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi@inf.u-szeged.hu
2016-05-06 13:33:26 +02:00
Robert Sipka 94161d350a Check the return value of the gettimeofday() in 'jerry_port_get_time_zone' and 'jerry_port_get_current_time' functions.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-06 10:50:39 +02:00
Robert Sipka 3de4170c15 Unified the commenting form of the internal properties and removed the unused types.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-05 15:06:25 +02:00
Zsolt Borbély 7813801cd3 Fix wrong indentations of function parameters
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-05-02 13:38:28 +02:00
Robert Sipka 19b972b8eb Check whether the aligned pointers value of the internal properties can be stored directly in ecma_value_t.
Those internal properties which have a primitive value field or where the property value type
is an ecma_object_t ptr were checked earlier.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-02 10:54:48 +02:00
Robert Sipka af65a9e912 Store aligned pointers directly in ecma_value_t if it is possible.
This change affects only those internal properties which have a primitive value field.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-02 10:20:56 +02:00
Akos Kiss 33a1203d6b Drop jerry_port_putchar
Recent changes eliminate the need for `jerry_port_putchar`. As port
API discussions don't make it likely that it will ever be needed
again, this patch removes its declaration from jerry-port.h and its
implementations from the port(s).

The related code in jerry-libc is not needed either: whatever `putc`
(and `puts`) can do, `printf` can do as well.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-23 22:50:50 +02:00
Akos Kiss 0c7d3fb705 Factor out common error dispatch call functionality into helper
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-22 16:16:05 +02:00
Akos Kiss 27682017e9 Remove unused internal functions
The internals have surprisingly large number of unused functions at
surprising places. This patch cleans them out to make maintenance
easier and to prevent dead code having effect on future decisions.

The patch intentionally does not try to clean up public API but
focuses on internal modules only that are/should not be reachable
from "outside".

However, unit tests do access private API, thus tests of literal
storage had to be adjusted.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-22 14:39:43 +02:00
robertsipka a87aca4d84 Don't use pointer compression where the ecma_value can store pointer value directly
This changes affects those internal properties where the property value type is an ecma_object_t ptr.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-04-22 14:30:53 +02:00
Dániel Bátyai 3203613b07 Add some asserts to check heap structure consistency
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2016-04-22 13:59:34 +02:00
Akos Kiss 68f3465eb5 Change current time from uint64_t to double in Date Port API
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-21 14:51:31 +02:00
László Langó 80bfb61b13 Remove unnecessary error bit negation
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-04-21 09:36:42 +02:00
Akos Kiss b523cf3cd1 Introduce the Date Port API
Replaced `gettimeofday`-related code with `jerry_port_get_current_time`
and `jerry_port_get_time_zone` function calls. Moved old code to
default port implementation.

Removed `ENABLE_DATE_SYS_CALLS` as date syscalls should "just work".

Fix DST adjustments: even if `gettimeofday` returns meaningful data in
`tz_dsttime`, the value is just a flag (or, according to some sources,
a tri-state value: >0 if DST applies, ==0 if DST does not apply, <0 if
unknown). Hitherto, the field was simply added to/subtracted from a
time value in milliseconds. To use it approximately correctly, the
field's value should be multiplied by "millisecs/hour".

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-20 17:56:30 +02:00
Zoltan Herczeg a3b1db3638 Add property name hashing support.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-04-20 03:38:43 -07:00
Akos Kiss 02ba19f24d Introduce the Termination Port API
* Moved the error codes to jerry-port.h and declared port function
  `jerry_port_fatal`.

* Moved "exit or abort on fail" functionality to the newly added
  jerry-port-default-fatal.c.

* This implied that a default port-specific API had to be introduced:
  functions `jerry_port_default_set_abort_on_fail` and
  `jerry_port_default_is_abort_on_fail` declared in jerry-port-default.h
  control the fatal exit behaviour.

* For the sake of clarity, renamed jerry-port.c to
  jerry-port-default-io.c.

* Adapted CMakeLists to deal with port implementations consisting of
  more then one source file and exposing headers. This also required
  the renaming of `EXTERNAL_PORT_FILE` cmake option to
  `EXTERNAL_PORT_DIR`.

* Adapted main sources to use the default port header for the
  abort-on-fail functionality, as that is not part of the core jerry
  API anymore.

* Added default port implementation to the static source code checker
  tools.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-19 14:10:18 +02:00
Robert Sipka 9ee4379ede Use 'ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY' instead of comparison with 'sizeof'
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-04-19 13:49:03 +02:00
Akos Kiss 3a8d3b3bcc Unifiy the comments of preprocessor conditionals
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-18 19:20:49 +02:00
Akos Kiss df1e428c71 Update existing and add missing copyright & license notices
* LICENSE needed year update.

* The asm component of the posix target of jerry-libc had no
  copyright & license notice since it has been introduced in 2015.
  Traced back history and added missing header with correct years.

* Three tests in jerry/fail/1 also missed header. Added.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-16 00:06:44 +02:00
Zoltan Herczeg e92ecd44e7 Refactor ecma value to store pointers directly in ecma values rather than compressing them.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-04-15 11:35:51 -07:00
Akos Kiss bb665336d4 Fix layering violation in applications
Apps that use jerry should not (must not!) include and rely on its
internal headers. Typical issue is the use of "jrt/jrt.h". Fixing
`main-{unix,mcu}.c`, and speculatively the apps under the `targets`
directory as well.

(Note: a fix can be either including "jerry-port.h" and using
functions declared there, e.g., `jerry_port_errormsg`, or simply
using standard libc function like `printf`. Both approaches occur
in this patch.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-15 17:16:28 +02:00
Zsolt Borbély 40e4d2638b After #984 we can increase the heap size to 512K
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-04-15 12:44:22 +02:00
Akos Kiss 4b0b8f3d4f Merge darwin and linux jerry-libc targets into a single posix target
The two target implementations are very close clones of each other.
The only known differences are the following:

* The asm component of the linux target has `.type` and `.size`
  declarations for the functions defined therein, while the darwin
  target doesn't support those.

* Linux uses `__NR_xxx` mnemonics for syscall numbers, while darwin
  uses `SYS_xxx` format.

* Darwin does not have `exit_group` syscall but `exit` only.

* The linux target has a commented out `jrt_set_mem_limits` fuction
  declaration at the end of the C source. (Based on its name, this
  function does not really belong here.)

Simple preprocessor macros can unify the first three differences.
While for the sake of legacy, we can keep the fourth commented-out
code in the code base; it might turn out to be useful elsewhere in
the future. Since it remains commented out it wont cause any
problems on any OSs.

So, this patch gets rid of a lot of duplication.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-15 10:20:27 +02:00
Robert Sipka 7a88ddec08 Remove the unused LIT_STRING_HASH_LAST_BYTES_COUNT define macro
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-04-14 15:54:11 +02:00
Dániel Bátyai e191794118 Print unhandled errors in REPL mode
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2016-04-14 14:01:47 +02:00
Akos Kiss ff185dc57e Turn assert functionality standard-conforming in jerry-libc
Introducing the `assert.h` public header with the `assert(x)` macro
and already making use of it in jerry-libc sources. These newly
introduced ISO C-conforming features replace the non-conforming
`LIBC_ASSERT` and `LIBC_NDEBUG` at no cost, and they also have the
benefit that we can expose `assert` in a public header and make it
useful to jerry-libc users.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-14 11:22:53 +02:00
Istvan Kadar ecfd478df0 Improvements related to lexer
Improvements related to lexer:

* duplicated clone elimination
* magic numbers are replaced with constants
* functions are moved form util to lit-char-helpers

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-04-14 10:26:36 +02:00
Zoltan Herczeg c7dcce4fc7 Refactor object property chain to use property pairs. The patch
itself seems a step back, but the primary aim is opening future
optimization opportunities. The list of changes follows:

 - Property is changed to be an abstract type, which has type, flags,
   and a value. It does not have a name anymore and property pointers
   cannot be compressed.
 - Full (32 bit) ecma values can be property values. This allows
   using non-compressed pointers for ecma values in the future.
 - The property chain is not restricted to the same item anymore,
   it can contain hash maps, arrays in the future.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-04-13 23:25:16 -07:00
Akos Kiss 9aca0086b9 Doc comment maintenance
Fixed doc comments issues:

* Fixed mistyped param doc comments (`/**<` is OK, `/** <` is not).

* Put special characters (e.g., pipe, backslash, etc.) in quotes, as they can
  confuse doxygen and it will print lots of various warnings. For the sake of
  completeness and consistent style, also quote some special characters in
  re-bytecode.h

* Added missing `@{`s, removed extra `@}`s.

* Turned `/*` comments to `/**<` doc comments.

Ensured same style for doc groups everywhere:

* Where `\addtogroup`, `@{`, and `@}` doxygen commands are used, the order to be
  followed is: license, `#ifndef` guards (in headers), includes, `\addtogroup`
  and `@{`, main code content, `@}`, `#endif` guards (in headers).

* Multiple `\addtogroup`s or multiple `@}`s should be in the same doc comment.

* First `\addtogroup` should be on the very first line of a doc comment, i.e.,
  `/** \addtogroup`.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-13 21:47:28 +02:00
Akos Kiss a7f015ef47 Implement raise () in libc
The core functionality (i.e., the equivalent of `kill (getpid (), sig);`)
was already there in the implementation of `abort ()`. Now, it got
factored out to `raise ()` so that others (most importantly,
`__aeabi_ldiv0`) can call and link to it as well.

Also, removed `LIBC_UNREACHABLE_STUB_FOR` macro, as it is not used anymore.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-12 22:45:01 +02:00
Zsolt Borbély 7b10f912a9 Buildfix for MCUs
The MCU-targets depend on some platform-related resources.
When these files are missing the build cannot be performed.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-04-12 13:09:29 +02:00
László Langó c98cb65373 Use 'const' in string iterations.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-04-12 12:52:59 +02:00
László Langó 9dad7dbfba Introduce ECMA_STRING_TO_UTF8_STRING and ECMA_FINALIZE_UTF8_STRING
Benefits:
 * Better readability and maintenance
 * Better heap consumption on 'date-format-xparb.js' test of SunSpider

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-04-12 12:52:59 +02:00
Akos Kiss 9ab0998ae6 Remove syscall trampolines from jerry-libc
After recent changes to jerry-libc, `syscall_N` C functions became
pure trampolines to their appropriate `syscall_N_asm` counterparts
written in assembly. Removing the C functions and renaming the
assembly functions to take their place simplifies the code.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-12 00:54:42 +02:00
Dániel Bátyai 1ae05eda64 Add help flag and usage to UNIX Jerry standalone.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2016-04-11 15:30:57 +02:00
Dániel Bátyai 764229b262 Fix syscall assertion when input file does not exist
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2016-04-11 14:34:08 +02:00
László Langó b78f5a55bb Fix assertion on unhandled exceptions
Follow up fix after #815 ('a187e6d'). Fixed the following
assertion on unhandled exceptions:
  * ICE: Assertion 'ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT'
    failed at ecma-helpers-value.c(ecma_get_object_from_value):375.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-04-11 10:53:15 +02:00
Akos Kiss 920a9ee244 Remove jerry_reg_err_callback API function
Discussions on Termination Port API point in a different direction
than what's already in the API. Moreover, since the function has
been throwing unimplemented assert error since its introduction,
we should remove it from the code base.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-08 16:54:07 +02:00
Akos Kiss 3ba286f3e1 Turn modified fdlibm into Jerry's own libm
* Rename modified fdlibm to jerry-libm
  * Move third-party/fdlibm to jerry-libm
  * Rename original fdlibm.h to jerry-libm-internal.h
    * And remove it from the public headers.
  * Rename jerry-libm's public header to math.h
    * This also makes jerry-core sources include `<math.h>`. Therefore,
      should anyone want to use a different libm implementation with
      jerry, it becomes possible. (The same way as we provide a minimal
      libc with standard headers, but should it be insufficient or
      conflicting for someone, it can be replaced.)
  * Drop `s_` prefix from jerry-libm sources
    * The original fdlibm implementation had various prefixes (e.g., `k_`
      for sources of kernel routines, and `w_` for wrapper routines), but
      after the specialization of fdlibm to jerry, only `s_` remained.
      Since it does not encode anything anymore, it can be dropped.
  * Stylistic edits to jerry-libm's CMakeLists
    * Align project name with other CMakeLists in the code base
  * Move Jerry-LibM under Apache License
    * Using the same approach as was used by linux-wireless when ath5k
      driver license needed clarification. Solution was proposed by SFLC.
      External mail for future reference: http://lwn.net/Articles/247806/

* Tests & checks
  * Remove FD from the name of libm unit test-related files
  * Make vera++ and cppcheck check jerry-libm

* Targets
  * Speculative update of targets to use jerry-libm

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-08 15:38:47 +02:00
Akos Kiss 45c89fef28 Add AArch64 support to fdlibm
Endianness was not properly set/detected for AArch64. Once that is
fixed, the platform is well-supported.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 13:10:50 +00:00
Akos Kiss d501c92f96 Eliminate TODO and FIXME macros
Those macros are legacy and are not used consitently throughout the
code base. This patch eliminates their definitions and rewrites
their remaining occurrences to TODO comments.

All occurrences have been checked and made sure that the comments
used a consistent style.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 14:40:43 +02:00
Akos Kiss 3127b9d34d Fix asin
Re-styling of the sources revealed that the false branch of an
if-else construct in `asin` did not contain all the statements
that it should. (This was an issue -- a bad smell at least --
that's been around since 1995, according to the legacy SCCS ID.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 13:45:22 +02:00
Akos Kiss 8dd5186a0d Re-style fdlibm to conform to jerry guidelines
* First re-style was done automatically by indent to minimize the
  chance of errors during rewrite.

* Manual changes were applied to non-critical places only (comments
  and spaces):
  * Replaced all tabs with spaces.
  * Fixed tab stops in formulae in function comments.
    (Note: ASCII art for math formulae (especially for super- and
    subscripts) is a terrible idea.)
  * Unified the style of function comments.
  * Moved some in-code comments to their right places, which indent
    couldn't handle.
  * Added spaces to formulae of in-code comments to make them more
    readable.
  * Added braces mandated by jerry style guidelines.
  * Added parentheses to multiline #ifdef.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 13:45:22 +02:00
Akos Kiss b39474c746 Merge sin/cos/tan and all helper functinos in a single source
* Made helper functions static.
* Changed the signature of __kernel_rem_pio2 not to require the
  ipio2 argument

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 13:45:22 +02:00
Akos Kiss a72caf1301 Turn simple constants to preprocessor macros
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 13:45:22 +02:00
Akos Kiss 397dff81ee Specialize fdlibm to jerry
Keep IEEE code paths only:
* removed SVID, XOPEN, POSIX code paths from everywhere.
* deleted s_lib_version.c, as version is only useful if multiple
  standards are supported.
* deleted k_standard.c, as it handles non-IEEE exception cases only.
* renamed the e_{acos,asin,atan2,exp,fmod,log,pow,sqrt}.c sources as
  s_.*, dropped the __ieee754_ prefix from the names of the
  appropriate functions therein, and deleted the
  w_{acos,asin,atan2,exp,fmod,log,pow,sqrt}.c wrapper code.

Keep C99 declaration variants only:
* removed old C-style function declaration variants.
* removed data declaration variants where const qualifier was not
  used.

Clean unused sources/functions:
* removed s_{rint,significand,tanh}.c and the appropriate functions
  defined therein.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-06 13:45:22 +02:00
Zoltan Herczeg d674b92f26 Refactor object properties to become real fields.
The positive side effect is that the maximum Jerry memory is increased to 512K.
Furthermore a slight (1.3%) performance improvement was measured on RPi2 with
SunSpider.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-04-06 03:36:44 -07:00
Zsolt Borbély 2f661f9509 Modify the buildoption-test and add to Travis CI as a job
MCU-targets were removed from buildoption-test temporarily.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-03-30 15:25:36 +02:00
Zsolt Borbély 21f8f06c51 Test the build options
Add new build target: test-buildoptions
Now every build option is tested on the proper targets. These are the native
and the MCU targets in release mode and unittests.
Therefore the USE_COMPILER_DEFAULT_LIBC build option is refactored.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-03-25 10:19:00 +01:00
Geoff Gustafson f0db5c9754 Fix compile warnings about always_inline functions in GCC 5.2.0
The warning is "always_inline function might not be inlinable", fixed by
adding inline keyword. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55830

JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
2016-03-24 08:40:11 -07:00
Zoltan Herczeg cc23c225ea Fix snapshot saving issue.
Snapshot save algorithm should not resolve uninitialized literals.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-24 02:57:31 -07:00
Akos Kiss 6290b2d236 Remove MEM_HEAP_PTR_64 macro
MEM_HEAP_PTR_64 is duplicating existing information: stdint.h, which
header is already used by the project, defines various _MAX macros
for upper limits of integer types. The comparison of UINTPTR_MAX and
UINT32_MAX can give the same info as encoded in MEM_HEAP_PTR_64.
The stdint.h-based approach has the benefit that jerry can support
any 64-bit architecture without the need for editing the build
system. (With the existing approach, CMakeLists has to know about
every 64-bit architecture to work properly.)

Thus, removing the extraneous macro from the code.

The patch also changes the mem_pools_chunk_t struct, as it turned
out that the struct does not have to be padded to MEM_POOL_CHUNK_SIZE.
(The padding also depended on MEM_HEAP_PTR_64.) It is enough if the
size of the struct is smaller than (or equal to) MEM_POOL_CHUNK_SIZE.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-22 22:14:47 +00:00
László Langó 2027caeda5 Performance optimizations
* inline some hot function
 * add 'ecma_copy_value_if_not_object' similer to 'ecma_value_free_if_not_object'
 * remove unnecessary helpers
 * improve 'do_number_bitwise_logic'

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-22 08:05:00 +01:00
François Baldassari 94f887919e Make target provide jerry-port.c
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
2016-03-21 13:08:11 -07:00
Zoltan Herczeg af246943f2 Optimize string character access for ascii strings and refactor type store
to allow two byte hashes in the future.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-21 02:24:35 -07:00
Akos Kiss 91b1547fa5 Add unit testing of fdlibm
The project is relying on a variant of fdlibm, which has aleady
been edited but never verified for correctness. This patch adds
unit testing of fdlibm by:

* introducing a test generator that uses a trusted libm
  implementation to calculate correct and expected results of math
  functions
  (tools/gen-test-fdlibm.sh and tools/unit-tests/gen-test-fdlibm.c),
* adding tests created with the generator that stress all publicly
  exported functions of jerry's fdlibm
  (tests/unit/test-fdlibm.inc.h), and
* adding a unit test file to drive the generated tests
  (tests/unit/test-fdlibm.c).

Note: The test generator is not expected to be executed often, thus
it is not wired into the build system. If it gets edited, it must
be used locally to re-generate the .inc.h file.

During development, it turned out that tests/unit/test-common.h
included the system header math.h, which was only a bad smell until
now but became a real header conflict issue with the introduction
of the fdlibm unit test. Thus, this patch also changes the include
to fdlibm-math.h.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-21 09:21:48 +01:00
Akos Kiss 48dca0af35 Fix: code-related vera++ rules should not be enforced in comments
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-21 08:51:26 +01:00
Akos Kiss 57db5ca918 Fix regexp character classes with \uNNNN and \xNN code points
Currently, if a regexp contains a character class and that
character class contains a hex-specified code point -- either
\uNNNN or \xNN --, then the character 'u' or 'x' is added to the
character class as well. This patch fixes the error and also adds
a regression test covering the issue.

Fixes #962

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-20 13:52:14 +01:00
Akos Kiss 69291e2dc4 Remove exec mode from non-executable files
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-20 12:24:05 +01:00
François Baldassari b59af40e91 Fix precommit scripts on OSX
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
2016-03-18 10:06:09 -07:00
László Langó e1f20ad474 Use code unit instead of code point
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-18 09:59:04 +01:00
Zsolt Borbély 005f73a6f0 Fix build with enabled LOG option
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-03-17 09:11:54 +01:00
Akos Kiss ea2f0e44fb Fix terminology of snapshot saving in literals and main
In case of literals and in main, snapshot saving is incorrectly
named dumping. Elsewhere in the code, 'dump' functions output debug
data (even literals have a `lit_dump_literals` debug function). To
help distinction and to align terminologies, snapshot saving
functions of literals and command line options of main are also
re-named 'save'.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-16 11:26:46 +01:00
Zoltan Herczeg d190ca44ae Storing byte code size in the byte code header. This reduces the
memory consumption, because the new allocator uses less memory if
the size as available when a block is freed. Snapshot generation
is also simplified.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-16 02:58:10 -07:00
Akos Kiss 2a5d17e736 Fix SCCS IDs in fdlibm
Most of the legacy version control IDs in fdlibm are already simple
comments at the beginning of the source files. However, in some
files, there are leftover global variables and pragmas. (The global
variable in e_pow.c even increases the .data section in both debug
and release builds.) This patch turns all legacy IDs to comments of
unified style.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-16 09:32:50 +01:00
Akos Kiss 3e02e792b6 Fix .size longjmp in the linux port of jerry-libc
Fixing a typo, which resulted in an undefined (but harmless) symbol
in jerry-asm.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-12 00:34:34 +01:00
François Baldassari 05e7a837c4 Allow external builds to use non-gnu compilers
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
2016-03-11 10:13:26 -08:00
François Baldassari 7b047d4b20 Add acquire_value API to simplify caller code
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
2016-03-11 09:57:40 -08:00
Akos Kiss 66c94b7d9b Refactor the printing of memory usage statistics
Make the internal heap and pools memory usage statistics APIs more
similar: how the print functions are named, where they are
implemented, and which parts of them are guarded by `MEM_STATS`.
Also, adapt unit tests to the changes.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-11 10:51:40 +01:00
Akos Kiss 011dacd1a7 Fix initialization from incompatible pointer type error in re_dump_bytecode
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-11 09:02:06 +01:00
Akos Kiss a9c77b49ee Improve the dumping of literals
* Guard `lit_dump_literals` with `JERRY_ENABLE_LOG` (both in source
  and in header).
* Change `printf`s to `JERRY_DLOG`.
* Make `lit_dump_literals` be called in `lit_finalize` (it was dead
  code).
* Remove its duplicate declaration from lit-literal.h

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-11 08:48:29 +01:00
François Baldassari c82caa7f3c Initlialize ecma gc state on jerry init
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
2016-03-10 15:35:47 -08:00
Akos Kiss 6e687fa6b7 Remove support for per-instruction memory statistics
The new CBC interpreter does not support it anymore, thus removing
related code.

(As a side-effect, `jerry_flag_t` has been refactored from
`uint32_t` and associated defines to an enum.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-10 13:19:36 +01:00
László Langó 6f536c7942 Few improvements for RegExp
Added eviction mechanism to RegExp cache and small
refactoring. Fixed a bug when logging is enabled.

Related issue: #927

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-10 13:09:08 +01:00
Akos Kiss 7a07e55411 Unify the naming scheme of all header defines
There have been several renamings of header files but the
ifndef/define/endif preprocessor directives did not always follow
the file name changes (or perhaps never followed a unified naming
scheme). This patch gets all headers aligned with the style of the
majority.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-10 11:26:14 +01:00
Akos Kiss a19f63f4a5 Check unit tests with vera++ & fix reported issues
Cppcheck has already been used for checking unit test sources
statically but vera++ style-checking of unit tests was left out,
most probably only by mistake. This patch adds unit tests to the
set of style-checked sources and also fixes the stlye issues that
were present in the test code.

(Extra: since the project is pure C now, not trying to collect
*.cpp files anymore.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-10 11:13:47 +01:00
László Langó 21e2951a44 Use '-Werror' instead of '-Werror=...' for Jerry libc
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-09 15:39:56 +01:00
Robert Sipka 073ab05366 Build fix for mbedk64f target
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-03-09 14:36:45 +01:00
László Langó ab26d57841 Don't use messages for errors by default
Use empty string for message property of builtin error objects
by default. Add ERROR_MESSAGES build option.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-09 11:44:32 +01:00
Akos Kiss 81d4c97a3a Add ARM cross build and QEMU user space emulated tests to the CI
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-09 10:07:00 +01:00
Robert Sipka 0b5a49f98b Warning fixes.
Passing argument 1 of ‘strncmp’ from incompatible pointer type.
Assignments from incompatible pointer types.
Passing argument or initialization discards ‘const’ qualifier from pointer target type.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-03-09 09:41:23 +01:00
Akos Kiss 25b0750756 Fix problems arising from incorrect use of various size types
E.g.,
* `ssize_t` was used where `lit_utf8_size_t` or `jerry_api_size_t`
  would have been correct,
* `lit_utf8_size_t` was used where `ecma_length_t` would have been
  correct.

Note, the patch also includes internal and public API changes:
* `ecma_string_to_utf8_string` does not return negative value if
   output buffer is not large enough to contain the string; the
   buffer is expected to be large enough. (`ecma_string_get_size`
   can be used to retrieve the required size.)
* `jerry_api_string_to_char_buffer` adapts the same logic (and
  `jerry_api_get_string_size` can be used to determine the
  required size of the buffer).

Related issue: #942

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-08 15:22:07 +01:00
Zsolt Borbély ce2fc3ccfd Remove the duplicated declaration of parser_set_show_instrs()
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-03-08 13:03:14 +01:00
Zsolt Borbély c141f766ee Use basename in a more generic form
Not all versions of basename supports the suffix option.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-03-08 12:49:10 +01:00
László Langó 9bf1ecc677 Disable date object related system calls by default
Use DATE_SYS_CALLS=ON for make target to enable the
date related system calls. Also fix some minor issues.
Related issue: #923

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-08 12:13:55 +01:00
Akos Kiss e926aa7d69 Remove dead macros from memory management code
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-07 14:05:35 +01:00
Akos Kiss d4650bc75c Change pool-based allocation to heap-based allocation in jerry.c
There was an abuse of memory pools in jerry.c: `compiled_code_map_entry_t`
is not an ECMA data model object but was still alocated/freed via
mem pool functions. Changed the appropriate calls to heap-related
functions.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-07 13:31:42 +01:00
László Langó a187e6d60c Print error messages to be more informative
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-07 12:02:05 +01:00
Akos Kiss 212aa34331 Remove memory management-related dead code
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-07 11:00:59 +01:00
Akos Kiss c0f3a9f7fb Add STRIP_RELEASE_BINARY option to Makefile
It is already supported by CMakeLists, might be useful to allow it
to be passed through Makefile.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-04 15:19:59 +01:00
Akos Kiss b6af308d3f Add full profile to MCU build targets
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-04 15:05:27 +01:00
Zoltan Herczeg 73dcf689d2 Fix warning when returning from vm_loop.
Related issue: #930

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-04 03:15:10 -08:00
István Kádár afa7b78b45 New unicode character handling using array data structure.
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-03-03 15:21:43 +01:00
Zoltan Herczeg b8b587f76c Rearrange fields of ecma_property_t to be naturally aligned. Packed attribute and __extension__ keywords are removed. The standard approach reduced the binary size by 2K.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-03 05:18:28 -08:00
Akos Kiss 86cdc4b482 Remove the prerequisites installation and MCU build steps from Travis CI
The repeated downloads of the STM packages cause a huge slow-down
of Travis, especially when the source site becomes irresponsive
(which even causes Travis to report errors when the build would
work fine otherwise). Unfortunately, the license of the STM
packages does not allow their inclusion in the repository. (Note:
locally executed `make precommit` still builds MCU targets.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-02 16:54:45 +01:00
Akos Kiss f2bdf08511 Remove default handling of build options from Makefile
The handling of option defaults is already done in CMakeLists, it
is no good practice to duplicate the logic in the Makefile.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-02 12:12:40 +01:00
Zoltan Herczeg 1200be42b4 Non-recursive vm_loop to reduce stack usage.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-02 01:52:55 -08:00
László Langó 2c72bb1139 RegExp refactoring and improvements
Move RegExp bytecode functions to a separate file.
Optimize bytecode lenght on character matching.
Implement a basic RegExp cache to optimize memory
usage on duplicated RegExp in JS files. Also fix
minor style issues and add missing comments. Improve
existing comments.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-01 13:54:14 +01:00
Zsolt Borbély 3f377692d9 Small refactorings
Modifications:
* eliminate unnecessary variables, functions
* use ECMA_NUMBER macros where it is possible
* simplify code
* minor style fix (comments, increase-decrease operators)

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-03-01 13:11:43 +01:00
László Langó e14d0b8942 Fix the format of doxygen comments of output arguments
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-01 12:37:33 +01:00
Dániel Bátyai d47c36f1b4 New Allocator and improved String handling.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2016-03-01 10:44:35 +01:00
Akos Kiss 3d6339bbf4 Remove unused EXTERNAL_ variables from Makefile
They have been kept when the build system was refactored but it
turns out that they are not used at all (they are not passed on to
cmake).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-29 23:31:40 +01:00
Akos Kiss c9f5950e15 Replace bit field manipulation functions with macros
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-29 12:21:23 +01:00
Robert Sipka 5d3aa98b3b Warning fix for ALL_IN_ONE.
Passing argument 2 of ‘lexer_same_identifiers’ discards ‘const’ qualifier from pointer target type.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-25 15:05:18 +01:00
Robert Sipka af715d4ad6 Build fix for ALL_IN_ONE.
Add another argument for the JERRY_STATIC_ASSERT with the description of the assert statement.
The release.linux build fails with enabled ALL_IN_ONE option.
There is no redefinition of typedef in C99.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-25 13:57:55 +01:00
Szilard Ledan 3543d0c184 Fix the ARM linux native build for RPi2
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2016-02-24 17:11:00 +01:00
László Langó 76b37f34d0 Build fix
Fix build error on darwin and build with default libc.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-23 12:31:05 +01:00
László Langó 9d7978074f Fix 'jerry-test-suite/13/13-011.js' fail in compact profile
Arguments object is not supported in compact profile, so remove
the test from 'compact-profile-list'. Do not create arguments
object on function calls in compact profile. Remove unnecessary
arguments check.
Related issue: #879

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-22 14:35:37 +01:00
Akos Kiss 235a5b1329 Refactor ECMA builtin template
Avoid sorting the array of property magic string IDs and make it
const, thus ensuring that it gets placed in .rodata. Replace the
binary search in the array (which would not work anymore because
of unsortendness) with function that returns the index of the
looked-after magic string ID using a switch-based logic (we rely
on compiler optimization to generate optimal code from that
switch).

Extras:
* Getting rid of the superfluous macro argument from routine names.
* Fixing the list of undef'd macros
* Fixing related comments

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 13:47:45 +01:00
Akos Kiss 866ef5bcf3 Add some more consts to get data moved from .data to .rodata
We already had some `const`s but it was still not enough.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 13:04:34 +01:00
Akos Kiss d857fe095f Improve the usability of test runner scripts
* First of all, remove the counter-intuitive "OUT_DIR" second
  argument of run-test-suite.sh. This, way, the invocation of the
  script becomes easier to remember:
  `tools/runners/run-test-suite.sh <engine> <testsuite>`
  However, this also means that all output files (lists of
  executed, passed, and failed tests) are generated in the current
  working directory.

* Align the behaviour of run-unittests.sh with the above, i.e.,
  don't try to guess where to put output files but write them in
  the CWD.

* Adapt Makefile to the change in the use of the test runner
  scripts: create and change to "check" directories before invoking
  test runner scripts.

Extras:
* tools/runners/run-test-suite.sh collected fail tests from
  directories twice. This does no harm but is inefficient, thus
  removing.
* tools/runners/run-test-suite.sh was too permissive on the
  contents of test suite list files. Better to accept those lines
  only which really contain paths to JS test files.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 12:04:07 +01:00
Akos Kiss aa0b6215fa Replace the EXTERN_C macro with extern "C" { block in fdlibm
Jerry-libc and jerry-core already uses the block-based approach.
Now, removing the last remnant of the macro approach from fdlibm as
well.

Closes issue #900

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 09:33:10 +01:00
Akos Kiss f088e8c147 Drop unimplemented run context stubs
Run context stubs have been lingering in the code base for almost a
year but they have never been more than unimplemented ideas.
Moreover, they are guarded by a macro that's nowhere defined, thus
the code is never compiled or tested.

Should contexts be implemented in the future, they may or may not
be implemented the way they are sketched now. Thus, it's safe to
remove this dead code from the sources.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-20 21:03:32 +01:00
László Langó a0bedaa43d Remove EXTERN_C macros and use block based solution
Related issue: #900

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-19 15:45:14 +01:00
Akos Kiss b2edaafaa1 Move cppcheck logic from Makefile and CMakeLists.txt to tools/check-cppcheck.sh
The legacy approach executed cppcheck for every build target, which
resulted in a huge number of re-checks of the sources if more than
one targets were built. The main reason behind that was to get the
right macro-guarded code paths analyzed. However, cppcheck can
analyze every configuration of the sources in one go.

(The patch also contains some aesthetic changes around the way
vera++ is called and how errors are reported.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-19 13:33:15 +01:00
Akos Kiss be1920dc46 Fix tools/check-signed-off.sh to handle PRs not based on HEAD
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-19 09:36:05 +01:00
Akos Kiss 5afc0600b4 Add merge commit support to tools/check-signed-off.sh and re-introduce signed-off check to Travis CI
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-18 17:06:05 +01:00
Akos Kiss 6107f3599e Change the layout of the doxygen-generated documentation
* Move from index-based layout to treeview-based one.
* Automatically take the first sentence of the documentation as the
  brief doc.
* Always generate both brief and detailed description sections, and
  always sort them alpabetically.
* Disable the generation of huge and overly complex call and caller
  graphs.
* Make the project title title-cased.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-18 16:22:37 +01:00
Akos Kiss 3608f8df86 Refactoring and fixing jerry-libc
Refactor memory and string handling routines
* Potential code size improvements:
  * Most loops don't really need a new incrementing index variable
    running between 0..n-1 but can just loop `while (n--)`, and the
    bodies don't need array indexing but can just use the `*p++`
    idiom.
  * Compare routines are not required to return -1, 0, and +1, but
    any negative, zero, or positive result will do.
  * `strncmp` may follow the other routines and does not have to have
    defined behaviour if any of its args is NULL.
* Fix:
  * `strncmp` did not work correctly if the strings were equal but
    `n` was greater than their length (did not stop at the
    terminating zero character).

Refactor printf
* Merging code duplications, removing dead initialization.

Refactor rand and srand
* Making sure that the type of the state variables is OK
  (`uint32_t` instead of `unsigned int`).
* Getting type conversions OK.
* Fixing `srand` to write all state variables and thus indeed
  generate the same random sequence.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-18 15:40:56 +01:00
László Langó 684ed7268c Fix system call related date builtin functions
Related issues: #213, #691
 * Fixed 'ecma_date_local_tza' and 'ecma_date_daylight_saving_ta' date builtin helper functions
 * Added syscall of gettimeofday function to get the current system time and timezone.
 * Fixed related regression test files.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-18 14:05:36 +00:00
László Langó a7715a5d78 Fix style issues and improve vera++ rules.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-18 13:27:54 +00:00
László Langó db26cb2b79 Optimize 'lit_get_magic_string_size' calls
Calculate magic string length sizes in compile time.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-18 07:38:35 +00:00
Zoltan Herczeg b2426a7a94 Remove 'ecma_completion_value_t'
Remove ecma_completion_value_t, and add an extra bit to
ecma_value_t to represent errors. From the long list of
completion types only normal and error remained.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-17 13:52:51 +00:00
Akos Kiss c25d8617a5 Add Travis CI badge to readme
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-17 13:48:11 +01:00
Akos Kiss 85365dacfe Quick fix for Travis CI: remove signed-off check
Pull requests creating merge commits don't work well with
tools/check-signed-off.sh.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-17 12:59:32 +01:00
Akos Kiss ad6107b32b Turn some global variables static const
Generally, it helps the optimizing passes of the compiler if global
varibles are `static`, and it is good for RAM usage to have data
marked read-only `const`. Found some globals, which could benefit
from these qualifiers.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-17 10:55:09 +01:00
Akos Kiss b2f3ec225e Get the alpha order of lexer keywords right
Two keywords violate the ordering. Should someone depend on the
alpha order in the future (because the `keyword_length_*` arrays
seem to be ordered)` then this issue will be a nightmare to debug.
Better get this right now.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-17 10:38:47 +01:00
Akos Kiss b18591eb25 Add support for travis integration
Fully fledged checks, builds, and tests on Linux, non-voting native
builds and unit tests on OS X.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-17 10:10:45 +01:00
Akos Kiss 0d7ea70b41 Eliminating doxygen warnings by fixing the documentation
* Fix "end of file while inside a group" doxygen warnings.

* Fix "unknown command" doxygen warnings caused by incorrect
  argument references. Instead of `@foo`, `@a foo` is the proper
  format.

* Fix "unknown command" doxygen warnings caused by incorrect
  parameter direction specifications. Instead of `@in`, `@out`,
  and `@in-out`, `[in]`, `[out]`, and `[in,out]` are the proper
  formats.

* Wrapping special characters in quotes to avoid doxygen
  confusion. Raw pipe, semicolon, dot, backslash, etc. characters
  can drive doxygen into various misinterpretations and warnings.
  E.g.:
  ```
  End of list marker found without any preceding list items
  Found unknown command
  ```
  Putting quotes around such text snipets eliminates the errors.

* Fix the documentation of `ecma_builtin_global_object_print`. Raw
  <> and \ sequences confused doxygen in various ways (it tried to
  interpret them as XML tags and doxygen commands).

* Fix "ignoring title that does not match old title" doxygen
  warnings. At some places, the group titles were out of sync, at
  others, the group names were incorrect.

* Fix "parameters are not documented" doxygen warnings. Fixing
  various typos in the inline parameter documentations (`/*`,
  `/**`, `/** <`, and `/**>` are all considered incorrect, the
  right format is `/**<`).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-16 21:05:58 +01:00
László Langó ed12df5c8d Improve 'tools/run-perf-test.sh'
Always write results on stdout and save markdown file optionally.
Use "Peak allocated" if binaries were built with MEM_STATS.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-16 14:50:54 +01:00
László Langó 7a7b15c23a Remove unnecessary assertion
Fix for:
  * ICE: Assertion '!is_equal' failed at jerry-core/ecma/operations/ecma-lex-env.cpp(ecma_op_set_mutable_binding):219
Related issue: #879

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-16 14:38:36 +01:00
László Langó 1dde538224 Check reference count of objects
Throw an error if the object reference count reached the limit.
Related issue: #118

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-16 14:30:41 +01:00
Robert Sipka 80811c8332 Warning fixes.
ISO C99 doesn’t support unnamed structs/unions.
Comparison of distinct pointer types lacks a cast.
Dereferencing type-punned pointer will break strict-aliasing rules.
Type of bit-field ‘ext’ is a GCC extension.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-16 13:56:07 +01:00
Akos Kiss 7dc065842b Remove jerry_port_ functions from test-common.h
They are identical to the functions with the same name in
jerry-port.cpp and cause duplicate symbol link errors on OS X.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-16 10:39:21 +01:00
Akos Kiss 7f3a10a29d Move Doxyfile to the root directory of the project
Config files are better located in the root of the project tree,
no questions will raise then what the relative paths are relative
to. (E.g., `INPUT` and `OUTPUT_DIRECTORY` in the current case.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-16 01:28:35 +01:00
Akos Kiss f959ba95a4 Refactoring the build system
* Removed unused or unnecessary parts from various make files
* Eliminated lots of duplications from Makefile with the help of
  macros.
* Split tools/precommit.sh to its independent components:
  * the part that checks the existence of the "signed off" text in
    commit messages
    (this on got factored out to tools/check-signed-off.sh),
  * the part that uses vera++ for style checking (this one got
    factored out to tools/check-vera.sh),
  * the part that invokes targets in the cmake-generated build
    directory, and
  * the part that performs various tests (these latter two got
    moved into the Makefile).
* Moved the functionality of precommit-full-testing.sh into the
  Makefile, too.
* Added ninja build system support (e.g., `make NINJA=1`).
* Updated leading documentation comments (they were somewhat
  stale).
* Tried to keep the target names exactly the same as they were --
  almost succeeded... (some changes are intentional, and are
  subject to personal preferences).
* Simplified console output of `make precommit`
* Unified test runner scripts and their output format
  * Eliminated nothing-to-stdout everything-to-log-file policy:
    info is printed to stdout and it is the caller's
    responsibility to redirect it to a file if needed.
  * Also applied some renaming and coding style unification to
    the scripts.
* Merged the functionality of tools/runners/run-test-suite-jerry*.sh
  into the Makefile
* Merged everything related to a test suite execution in a single
  script.
  * The new script also allows to specify pass and xfail tests in
    a single list file, which was not possible hitherto.
  * Also, the paths of the test cases given in a file are
    interpreted relative to their container files.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-15 18:05:01 +01:00
Robert Sipka 977bfa5d2c Remove g++ support from the [C]Make files.
Move all '.cpp' files to '.c'.
Rename comments from 'cpp' to 'c'.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-15 12:49:12 +01:00
Robert Sipka ec5859f4e8 Add some fixes required by the C99 standard.
Use c-style cast instead of reinterpret_cast.
Use identifiers for function parameters.
Use type cast to avoid conversion error.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-15 12:48:47 +01:00
László Langó bc82654029 Fix build with -O3
Related issue: #657

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-12 11:30:15 +01:00
Zsolt Borbély d35bc4114b Remove unused functions from ecma-helpers-number.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-02-11 13:31:01 +01:00
Robert Sipka 6fd1f780e1 Move out 'jrt_read_from_buffer_by_offset' and 'jrt_write_to_buffer_by_offset' function definitions from header.
It's also required by the C99 standard.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-11 13:14:57 +01:00
Akos Kiss 20bec3d73f Remove cppcheck and vera++ from prerequisites
Rely on platform-provided versions. Thus, no need to download and
build them, neither to wrap them with shell scripts. CMake and
precommit updated to call the new tools. Development documentation
also updated/simplified.

PS: On my Ubuntu 14.04.3, cppcheck has version 1.61, while prereq
version was 1.69. The older version reports and fails on a strange
style issue in ecma/builtin-objects/ecma-builtin-helpers.cpp, for
which the only solution found was to suppress the cppcheck errors
with `variableScope` id for that file.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-11 09:58:41 +01:00
Akos Kiss dc84775207 Remove references to non-existent parser/js/bc and parser/js/collections directories
With the merge of the CBC parser, these directories got removed.
The update of the jerry-core/CMakeLists.txt must have been
forgotten, probably because the kept references caused no errors.
Cleaning up now.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-11 09:29:40 +01:00
Akos Kiss 0a83b317c7 Rename docs/Doxygen to docs/Doxyfile
This is a really minuscule change, but it is more idiomatic to name
the config file of doxygen as Doxyfile.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-11 09:13:01 +01:00
Zsolt Borbély 3e1e0dc733 Move the logic of Valgrind-support check to the CMake part.
Related pull request: #866

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-02-10 16:46:56 +01:00
Zoltan Herczeg cadc81d583 ECMAScript Parameters cannot be passed in collections anymore, only as arrays.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-10 16:01:52 +01:00
Robert Sipka cc6fced17a Use value types instead of reference types.
The C99 standard does not support reference types.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-10 15:55:02 +01:00
Robert Sipka b0bdf0ebf4 Merge the js-parser and parser files
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-10 12:35:55 +01:00
Zsolt Borbély 41f2f910e8 Abort the build-process when the build-configuration is unsupported
The MCU targets doesn't support Valgrind.
Related issue: #762

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-02-10 11:28:59 +01:00
Robert Sipka 88d7f2fc7b Move 'nums_with_ascending_length' to be a global, non variable length array.
VLAs cannot be initialized by any form of initialization syntax with C99 standard.
Also did some refactor around 'ecma_string_get_length' and 'ecma_string_get_size'.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-10 11:03:49 +01:00
Robert Sipka 207f6da504 Use type cast to avoid conversation error with C99 standard.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-10 09:23:17 +01:00
László Langó 9a6bdef228 Fix assertion in RegExp compile
Related issue: #641

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-10 09:09:11 +01:00
SaeHie Park ef1252e29e targets: add nuttx interpreter build
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-02-10 08:50:12 +01:00
Robert Sipka abc95d3db8 Add forward declaration for mem_pool_chunk struct.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-09 16:01:01 +01:00
László Langó 094b182e96 Fix assertions in RegExp builtin
Related issue: #783, #784

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 15:31:16 +01:00
László Langó 6b8332e631 Fix 'Segmentation fault on String.Replace'
Related issue: #747

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 15:26:38 +01:00
László Langó d420be3fdf Fix 'Segmentation fault in re_get_value'
Related issue: #782

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 15:17:28 +01:00
István Kádár 433f0705f7 Add missing doxygen group endings
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-02-09 14:37:49 +01:00
István Kádár e9a72ae1e9 Eliminate 'is_stack_var' field of ecma_string_t
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-02-09 14:26:24 +01:00
Akos Kiss 196e8196fc Eliminate code duplication in memory statistics printing
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-09 14:19:28 +01:00
Robert Sipka 2221c00ad9 Fix the correct number of command line arguments check.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-09 14:12:04 +01:00
Akos Kiss 9c124e2634 Revive mem_stats.sh
The tool became bitrotten. Bringing it up-to-date to handle the
output of jerry and rss-measure.sh properly.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-09 14:03:16 +01:00
László Langó ca01412848 Add regression tests for recently closed issues
Related issues: #123, #354, #358, #384, #447, #680, #738, #739, #743, #781, #785, #786

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 13:54:56 +01:00
László Langó 0f378281ba Fix memory leak in RegExp builtin.
Related issue: #787

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 13:48:09 +01:00
Akos Kiss 4a5a8cbf72 Add generated documentation to gitignore
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-09 13:42:01 +01:00
Roland Takacs f8e97c6c02 Use concrete types instead of 'auto'.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-09 13:37:12 +01:00
Roland Takacs cd6ff690d0 Add missing parentheses for bit operations where type cast is used.
Fix for #853. These modifications are required by gcc 4.9 or above.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-09 13:29:41 +01:00
László Langó 02b001e479 Remove leftover from ecma_simple_value_t
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 13:25:35 +01:00
László Langó d132c37f0a Optimize number literals.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 13:20:22 +01:00
László Langó e763280761 Fix Vera++ rule for switch statements.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 13:13:40 +01:00
Roland Takacs 6608cc4b7d Move jerry_port functions into jerry-core.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-09 13:07:29 +01:00
Hanjoung Lee 0e88e819eb Support REPL for Linux
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2016-02-09 13:00:26 +01:00
Ruben Ayrapetyan 91a0514fab Estimate performance measurement inaccuracy in tools/perf.sh and tools/run-perf-test.sh
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-02-08 09:26:26 +01:00
Roland Takacs 0219f37dcc Remove template expression from jerry_ref_unused_variables.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 14:00:44 +01:00
László Langó d038284bff Style fix: fix comments at the end of function definitions.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-05 13:46:51 +01:00
Sung-Jae Lee 41f6cbb3ac Add JerryScript logo.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2016-02-05 13:37:16 +01:00
Roland Takacs a45976bca6 Use packed attribute for enums to modify their type.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 13:22:42 +01:00
László Langó b1acf1a562 Style fix: align pointer dereference operator to right
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-05 13:06:34 +01:00
Roland Takacs efc994b112 Use C type casting instead of static_cast.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 12:59:14 +01:00
Roland Takacs 764d74561d Remove the placement 'new' operator.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 12:50:38 +01:00
Roland Takacs 3f5451423c Add lit_storage prefix for functions in lit-literal-storage.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 12:43:30 +01:00
Zidong Jiang 9ab24b3241 remove the c++ syntax, struct::xxx
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-02-05 12:33:27 +01:00
Xin Hu 87a7887a81 Replace uint32_t magic string lengths with uint8_t
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-02-05 11:31:54 +01:00
Xin Hu 4062694059 ecma_string_get_size performance improvemen
- replace if with switch

JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-02-05 11:23:53 +01:00
Xin Hu 1466a5b317 ecma_compare_ecma_strings_longpath performance improvement
- use switch to replace if

JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-02-05 11:17:34 +01:00
Zidong Jiang dfb22c3441 refactor rcs_chunked_list and remove its c++ features
issue #806

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-02-05 11:11:36 +01:00
Roland Takacs d60bd93da3 Use 'const' instead of 'constexpr'.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 11:00:25 +01:00
Zoltan Herczeg 4d2dd22ced Compact Byte Code parser and executor for Jerry.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Gergely tgergely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-05 01:15:49 -08:00
qdk0901 db6caf3c48 add openwrt support
JerryScript-DCO-1.0-Signed-off-by: qdk0901 qdk0901@qq.com
2016-02-04 20:36:54 +08:00
Sung-Jae Lee eda775a8ca Fix build break on OSX: Invalid type comparision.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2016-01-29 22:40:55 +09:00
Sung-Jae Lee 3703b1b681 Merge main-linux.cpp and main-darwin.cpp to main-unix.cpp for easy maintenance.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2016-01-29 22:22:11 +09:00
László Langó fec49f5f9a Update precommit test file list to run all test files.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-01-22 13:26:37 +01:00
Roland Takacs 70a67797d2 Refactor opcodes-dumper to not use C++ features.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-20 10:58:06 +01:00
Ruben Ayrapetyan 18d0d8c376 Add microbenchmark on filling an array with 5000 numbers (3 times).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-18 15:51:11 +03:00
Ruben Ayrapetyan b0d6107410 Improve algorithm of collecting empty pools.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-18 15:51:09 +03:00
Xin Hu 73a5fd78a7 Remove redundant code in lit_charset_literal_get_length
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-15 13:07:05 +03:00
Xin Hu ba95cb010a Update strcmp implementation, to improve performance
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-14 19:55:13 +03:00
Hanjoung Lee f6bd5afa42 Fix linked-list removal of last element
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2016-01-14 19:47:16 +09:00
SaeHie Park 25b8351774 targets: merge js2c.py into targets/tools folder
* also add .PHONY to target makefiles

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-01-14 18:49:57 +09:00
SaeHie Park feb27a5fc6 Add target build for ESP8266 board.
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-01-14 07:27:18 +09:00
SaeHie Park f574597a06 Workaround fix for Xtensa (ESP8266) memory alignment exception error
Related issue: https://github.com/Samsung/jerryscript/issues/675

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-01-14 07:26:28 +09:00
SaeHie Park fe24452460 Add target build for mbed / FRDM-K64F board.
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-01-14 07:24:57 +09:00
SaeHie Park 02daf04da6 Add external compile flags and entry file for target board builds
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-01-14 07:23:37 +09:00
Xin Hu 7255d648d7 lit_get_unicode_char_size_by_utf8_first_byte performance improvement
- inline

JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-13 19:09:49 +03:00
István Kádár 636ded489f JerryScript api improvemts accordign to jerry_api_value_t struct.
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-01-13 18:45:52 +03:00
Xin Hu 3b3bc98bec Add ecma_get_chars_collection_length unit test
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-13 18:40:34 +03:00
Xin Hu b31b79c333 ecma_get_chars_collection_length optimization
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-13 18:35:44 +03:00
Ruben Ayrapetyan 6d1bf13948 Fix incorrect assertion in bc_load_bytecode_data.
Related issue: #797

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-13 18:30:33 +03:00
pius lee 7868b0ae68 Fix Failed JSON stringify with NaN
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
Depending to Note4, NaN is reprensented as the String null

JerryScript-DCO-1.0-Signed-off-by: pius lee idkiller@gmail.com
2016-01-13 18:16:02 +03:00
pius.lee cc60b0b3a2 Fix eval fail with empty string
Fixes #278

JerryScript-DCO-1.0-Signed-off-by: pius.lee pius.lee@samsung.com
2016-01-13 18:07:32 +03:00
Roland Takacs 21f561f8ef Refactor literal-storage to not use C++ features
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-13 15:19:07 +01:00
Ruben Ayrapetyan f932b7d48c Fix handling of property accessors in loop condition expressions and in argument of with statement.
Related issue: #798

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-11 13:42:12 +03:00
Andrey Shitov 50d124bfc3 Parser optimizations.
- parser is now non-recursive (i.e. parse function is not called recursively in any case);
 - byte-code is now more compact:
    - constants are now not immediately dumped upon occurence, but later - where necessary;
    - assignments are combined with unary / binary operations;
    - binary operations are encoded more compactly in many cases;
 - byte-code arrays are now allocated separately for each scope (so, GC of the scopes now becomes possible);
 - byte-code is dumped directly into corresponding byte-code arrays:
   - linked lists of op_meta are not now used for main code of a scope.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-12-23 14:21:10 +03:00
Ruben Ayrapetyan b1de93abd6 Fix incorrect assertion in lit_utf8_iterator_seek.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-12-23 14:21:08 +03:00
Sung-Jae Lee 4f4407121b Disable LTO, Enable ALL_IN_ONE by default in Mac OS X build.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-12-19 16:08:50 +09:00
Evgeny Gavrin 2c3c952fc9 Add initial version of documentation to source tree.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-12-11 16:44:15 +03:00
Hanjoung Lee 3606350a48 Add a regression test for #280
Releated issue: #280

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-12-11 15:52:37 +03:00
Laszlo Vidacs 54ade8b29e Unicode string builtin tests added.
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-12-11 15:39:36 +03:00
Tamas Czene f8f7eb4251 allow_to_customize_address_for_jerry_mem_heap
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-12-11 10:09:17 +03:00
SaeHie Park fe2a76fced Fix Unittests build fails when LTO is disabled
Related issue: #774

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-12-10 10:28:16 +09:00
Zsolt Borbély ab6d777220 Fix unittests build, when all-in-one is enabled.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-12-08 14:06:17 +01:00
SaeHie Park 8fbde244e9 Move log message output(fprintf, puthcar) to target code
Related issue #752

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-12-08 07:48:16 +09:00
Evgeny Gavrin 9cb711ad80 Add script to sort and categorize fails in directory.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-12-07 14:40:29 +03:00
Sung-Jae Lee 2378b0cf3d Merge pull request #767 from lemmaa/add-generate-map-file-option
Generate `jerry.map` file on build

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-12-07 20:34:05 +09:00
Sung-Jae Lee b3e5322c4e Generate jerry.map file on build.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-12-07 19:08:06 +09:00
Laszlo Vidacs b8b3b1f275 Test and fix CESU-8 handling in String builtins.
Fixes #757
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-12-02 12:38:06 +03:00
chunseok lee cb0087b517 remove 15.07.04.02-002.js from jerry-test-suites
Number.prototype.toString([radix]) is implementation-dependant.

JerryScript-DCO-1.0-Signed-off-by: chunseok lee chunseok.lee@samsung.com
2015-12-02 12:31:59 +03:00
Ilyong Cho 1c21e16c7b Adding Jerry api for triggering gc.
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-12-02 12:26:07 +03:00
pius.lee ece246ef9e Add foreach function for inquiry properties into obj
JerryScript-DCO-1.0-Signed-off-by: pius.lee pius.lee@samsung.com
2015-12-02 12:20:12 +03:00
Zidong Jiang 3d286b46d0 Fix bug in linked_list_block_size().
and Ruben Ayrapetyan fix a bug in linked_list_switch_to_next_elem

Related issue: #720

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2015-12-02 12:12:03 +03:00
Hanjoung Lee ce3b785c83 Fix lexing number literal
Related issue: #745

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-12-02 11:36:30 +09:00
Akos Kiss ab68d093e8 Whitespace cleanup: tab removal in tests directory
Also changed space-based indentation in touched files if they used
4 spaces for indentation (instead of the most-often-used 2).

Also added new line to end of touched files if they did not end
that way.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-28 21:47:37 +01:00
Akos Kiss 133fc6adfd Whitespace cleanup: tab removal in tools directory
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-28 21:47:37 +01:00
Akos Kiss 5ffc9abb59 Whitespace cleanup: tab removal in CMakeLists.txt
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-28 21:47:37 +01:00
Laszlo Vidacs cd7cf53ecb Rearrange String.prototype.indexOf, lastIndexOf and Replace helpers
Fixes issue #515
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-11-27 14:09:11 +01:00
Hanjoung Lee f20db76dfb Fix parse error of parse_switch_statement
Related issue: #725

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:19:09 +09:00
Hanjoung Lee 17f7bad242 Fix [[HasInstance]] operation for external functions
Related issue: #736

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:02:09 +09:00
Zsolt Borbély fe157301a2 Add option to enable all-in-one build mode
Related issue: #626

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-25 14:01:07 +01:00
Zsolt Borbély aa74c3e2e0 Remove duplcation of ecma_reject function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-25 14:01:07 +01:00
SaeHie Park d11a9e1c0d Change processor name from x86 to i686 for 32bit host
* to make it same as 'uname -p' result

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-11-24 18:48:23 +09:00
Evgeny Gavrin 17a5dd27bb Add support of afl-fuzzer.
Related issue: #333, #454

Works only with default libc:
```
$ make debug.linux -j TOOLCHAIN="./build/configs/toolchain_afl.cmake" USE_COMPILER_DEFAULT_LIBC=YES
```

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-11-23 17:59:22 +03:00
Evgeny Gavrin e80cc3592c Add several regression tests from closed issues.
Related issues: #274, #276, #281, #340, #359, #429, #453, #541, #613, #639, #640

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-11-19 14:36:59 +03:00
Zsolt Borbély f17f785b6e Make tools/perf.sh executable
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-18 09:49:01 +01:00
Akos Kiss 8006635636 Pass -Wno-error to linker in case of LTO builds
When linking a release-built command line shell on Linux against
default glibc with LTO enabled, a long-open gcc bug causes spurious
warning to be emitted around a call to fread. The `-Werror` flag
turns this into an error and the build process fails.
Unfortunately, there is no way to selectively disable the warning
with pragmas or `-Wno-error=xxx` flags.

Thus, this patch introduces some helper macros and lists all
warnings explicitly with `-Werror=xxx` instead of covering all
warnings with the `-Werror` flag. This way, warnings enabled by
command line flags do cause errors, but those raised by warning
attributes (which cannot be suppressed by any `-Wno-error=xxx`
flags) don't.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-17 22:20:23 +01:00
Hanjoung Lee 140982e900 Fix PropertyName not to be resolved as a local variable
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-13 13:29:38 +09:00
Akos Kiss 7022aa26b0 Add a "Hello JerryScript!" program to the tests
The current code base does not contain any "first JavaScript
program" for those who build JerryScript for Linux console. It
does contain a LED-blinking example -- blinky.js -- but that's
only useful on an developer board where LEDs-to-be-blinked are
available. And the rest of the tests are just that: tests, giving
passed/failed information but nothing eye candy.

This patch adds a simple JS script that can act as a warm welcome
to anyone after the first successful build trying to run something
proving that Jerry works.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-11 11:32:08 +00:00
Szilard Ledan 36e90d952f Global object unescape routine
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-11-11 10:48:35 +01:00
Ruben Ayrapetyan 90122d9f33 Fix configuration of recordset's and literal storage's parameters according to MEM_ALIGNMENT_LOG and MEM_CP_WIDTH changes.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-09 21:24:03 +03:00
Ilyong Cho 94cb6aec26 Fix prop_getters stack manipulation for assignment expression.
Related issue: #614

JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-11-09 11:02:57 +09:00
Zsolt Borbély eaca37c4c9 Simplify severity mechanism in mem allocator.
Related issue: #63

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-04 17:06:43 +01:00
Ruben Ayrapetyan 8af87206c9 Fix ecma_builtin_global_object_decode_uri_helper.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 18:42:01 +03:00
Seo-Young Isabelle Hwang b3c27e5635 Update README.md
Add link of project page
2015-11-03 23:10:55 +09:00
Seo-Young Isabelle Hwang ed2eafba54 Update README.md
add gitter badge
2015-11-03 23:08:29 +09:00
Seo-Young Isabelle Hwang 5702eaab83 Merge pull request #701 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-11-03 23:05:43 +09:00
The Gitter Badger eaa4be04b0 Add Gitter badge 2015-11-03 13:59:31 +00:00
Ruben Ayrapetyan 4aaf829320 Fix handling of non-zero status code in tools/perf.sh.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 16:51:30 +03:00
Ruben Ayrapetyan 9194240ada Fix memory leak in jerry_api_set_object_native_handle.
Related issue: #683

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 16:41:19 +03:00
Zoltan Herczeg c81c730129 Add support for reporting mallocs / frees to valgrind through client requests.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-11-03 03:57:49 -08:00
Ruben Ayrapetyan 911163e787 Optimize object literal byte-code - store property names as literal arguments, instead passing them through register variables.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:47:18 +03:00
Ruben Ayrapetyan 1fe2817457 Introduce parser-time optimization that moves function's argument values to registers.
For functions with the optimization applied:
 - vm puts arguments values immediately to registers without putting them to variables in lexical environment;
 - number of arguments is extracted from corresponding 'reg_var_decl' instruction's argument;
 - for functions that also don't have local variables, lexical environments are not created.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:15:13 +03:00
Ruben Ayrapetyan 46c65985e5 Create [[FormalParameters]] function object's internal property only if corresponding function has non-zero number of formal parameters.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:12:42 +03:00
Ruben Ayrapetyan f24effa629 Read function's scope flags only in ecma_op_create_function_object instead of call sites of the routine.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:12:42 +03:00
Ruben Ayrapetyan 4d2ad40475 Remove var_decls_count field from scopes_tree header; getting "var_decl"s count using linked_list_get_length instead.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:10:45 +03:00
Ruben Ayrapetyan 0ef9c486c1 Introduce linked_list_chunk_header (header of a linked_list's chunk), add list's length field into linked_list's header; support removal of elements in linked_list.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:10:45 +03:00
Ruben Ayrapetyan da47c671e7 List of lazy instantiated properties' names in ecma_op_object_get_property_names.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 16:32:31 +03:00
Ruben Ayrapetyan 9c3aa4a003 Improve performance of item 3.l of arrays' [[DefineOwnProperty]] (ecma_op_array_object_define_own_property).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 16:32:09 +03:00
Ruben Ayrapetyan 09b4d20718 Use ecma_op_object_get_property_names for property enumeration in built-ins implementation.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 16:06:44 +03:00
Ruben Ayrapetyan 72208a61ee Remove vm_helper_for_in_enumerate_properties_names helper; introduce ecma_op_object_get_property_names interface for building list of an object's properties.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 15:22:55 +03:00
Ruben Ayrapetyan 841c1ed61c Fix usage of array_list in parse_switch_statement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-01 16:51:43 +03:00
Ruben Ayrapetyan f2ced3d91c Fix check for 'eval' and 'arguments' functions' names / argument names in strict mode.
Related issue: #686

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 17:31:04 +03:00
Ruben Ayrapetyan 3025bd1750 Fix handling of SyntaxError in FormalParameterList during 'new Function' constructor operation.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 17:26:17 +03:00
Ruben Ayrapetyan 2bfd754ef3 Fix handling of 1.797693134862315808e+308 floating point value.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:17 +03:00
Ruben Ayrapetyan 04ca231fa4 Fix jsp_early_error_check_for_duplication_of_prop_names.
Related issue: #689

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Ruben Ayrapetyan f2c54fbe39 Fix serializer_remove_bytecode_data.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Ruben Ayrapetyan a88608a1c0 Fix parseFloat built-in function of the Global object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Ruben Ayrapetyan 4500965316 Fix handling of non-reference operands in prefix operations.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Hanjoung Lee 906558b8e9 Fix: switch statement jumps to incorrect case body
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 19:16:12 +09:00
Hanjoung Lee 3e31931537 Fix: parse error when no expression follows after 'return', 'break', 'continue'
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 18:06:28 +09:00
Zsolt Borbély 4aaa0ace17 Simplify [[DefineOwnProperty]] usage, use the helper function where possible.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-10-29 09:26:55 +01:00
Hanjoung Lee fcebf654cc Fix: parser bug in parse_switch_statement
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 11:09:48 +09:00
Ruben Ayrapetyan 1e2dfc73f5 Remove of 'this_binding' opcode.
- introduce 'const' register type;
 - adding constant register for reading ThisBinding value of active interpreter context.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-23 15:45:28 +03:00
Ruben Ayrapetyan f2c3e59bbe Change reg_var_decl instruction arguments to [number of registers for temporaries; number of register for local variables].
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-23 15:45:28 +03:00
Ilyong Cho 31ae0977f6 Fix lexing of illegal exponential.
Related issue: #339

JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-10-23 13:52:56 +09:00
Hanjoung Lee 448984dd74 Fix: parsing regex and div operator correctly
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-22 14:15:18 +09:00
SaeHie Park 86480f6168 Rename gcc-ar, gcc-ranlib only when LTO is enabled in CMakefile.txt
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-10-21 08:46:15 +09:00
Zsolt Borbély 947dc4cab2 Make the Function.prototype.length property non-writable.
Fixes #642

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-10-20 16:29:12 +02:00
Dániel Bátyai 579b1edaa5 Refactor builtins to handle CESU-8 encoded strings.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 16:01:10 +02:00
Dániel Bátyai dcd610b305 Change internal encoding of strings to CESU-8
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 13:39:00 +02:00
Peter Gal 08c618e8c5 Add check for setTime implementation to see if the this argument is really a Date object.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-10-07 10:35:02 +02:00
Roland Takacs 6f77460509 Replace recursions with iterations in the linked_list data structure
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-10-05 14:30:29 +02:00
Sung-Jae Lee d34c8fb6c1 Merge pull request #638 from lemmaa/benchmark-on-mac-os-x
Fix benchmark scripts to run on Mac OS X

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-10-05 10:22:58 +09:00
Sung-Jae Lee 8f594d7606 Merge pull request #632 from lemmaa/build-mac-os-x-with-gcc
Support `gcc` in Mac OS X build

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-10-05 09:59:32 +09:00
Peter Gal 98fc4098e8 Check if there is really an old bytecode when recompiling a regexp
Fixes #612

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-10-01 15:05:01 +02:00
Peter Gal 0d6568db18 Fix tr arguments in the Makefile
On Linux the original tr call did nothing and thus the Makefile
tried to load the toolchain_Linux_x86_64.cmake file, which doesn't exists.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-10-01 14:47:10 +02:00
Ruben Ayrapetyan b7c93f170d Remove argument names in function prototypes, declared in headers; fix '*' alignment in headers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-28 18:27:10 +03:00
Sung-Jae Lee a007b6800c Fix benchmark scripts to run on Mac OS X
- perf: bypass the regex interpreting error of 'sed'.
- rss-measure: use alternative way to measure approx. RSS.

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-21 11:48:14 +09:00
Kristof Kosztyo 3b0f61ac52 Remove ECMA_STRING_CONTAINER_CONCATENATION type from ecma_string
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-09-18 12:00:36 +02:00
Sung-Jae Lee cc7501309a Support gcc in Mac OS X build
- if `gcc` exist, use `gcc` for build, otherwise use `cc(=clang)` for build.

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-17 01:06:11 +09:00
Zsolt Borbély 66975236bc Function.prototype.bind: incorrect behaviour of ecma_gc_mark()
Related issue: #531

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-09-16 14:54:58 +02:00
Dániel Bátyai 91f0c9d625 Parse integer numbers from back to front.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-09-16 14:30:45 +02:00
Sung-Jae Lee 034ecf78f8 Merge pull request #628 from lemmaa/lemmaa-build-for-osx-with-clang-new
Enable build on Mac OS X with clang - resolve merge conflicts
2015-09-16 19:39:16 +09:00
Sung-Jae Lee da8ae6523b Merge pull request #625 from lemmaa/master
Fix MEM_STATS build configuration.
2015-09-16 19:38:35 +09:00
Sung-Jae Lee 01f66f7b04 Enable build on Mac OS X with clang
* Add build target 'darwin'
* Modify compiler options to work with clang
* Support 'jerry-libc' on Mac OS X

For MPU target build, install `gcc-arm-none-eabi` tool chain using `Homebrew` as following.
````
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi
````
https://pixhawk.org/dev/toolchain_installation_mac

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-15 10:31:57 +09:00
Sung-Jae Lee 86e690ce72 Fix preprocess claus style.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-14 21:17:23 +09:00
Sung-Jae Lee b6fcf44873 Fix dependency of memory statistics options.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-10 12:25:55 +03:00
Sung-Jae Lee 84ff4de385 Fix MEM_STATS build configuration.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-09 19:21:56 +03:00
Andrey Shitov 311cc65b33 Implement snapshot functionality.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:24 +03:00
Ruben Ayrapetyan 7481fb606f Use static_cast in MEM_CP_GET_NON_NULL_POINTER.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 18:07:24 +03:00
Andrey Shitov 443673fc5d Update bytecode header structure so that bytecode could be stored independently from hash table and bytecode header.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:20 +03:00
Ruben Ayrapetyan 6a6fb3fdfa Extract vm_run_eval from ecma_op_eval_chars_buffer.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:58:52 +03:00
Ruben Ayrapetyan 9da91d0834 Remove inside_eval from limitations on var-to-reg optimization.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:58:52 +03:00
Ruben Ayrapetyan fdf38ab2eb Introduce GC stress testing mode (-mem_stress_test prefix; for example: debug.linux-mem_stress_test).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:28:28 +03:00
Ruben Ayrapetyan b318de46a6 Remove 'mfp' (minimal footprint build configuration).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:28:28 +03:00
Ruben Ayrapetyan bf5deffdb9 Fix valgrind false-positive warning in mem_pools_collect_empty.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 15:54:54 +03:00
Sung-Jae Lee 0cbbddcf48 Merge pull request #624 from lemmaa/master
Remove garbage file.
2015-09-09 14:40:24 +03:00
Sung-Jae Lee 62b3aa8c84 Remove garbage file.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-09 11:20:46 +03:00
Sung-Jae Lee c86bf1425d Merge pull request #608 from lemmaa/build-for-osx-new
Fix prerequisites setup error on Mac OS X
2015-09-08 19:07:48 +03:00
Ruben Ayrapetyan 50fdccc8c9 Lazy instantiation of built-in function object's 'length' properties.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-08 15:19:51 +03:00
Ruben Ayrapetyan bcf3396f26 Lazy instantiation of a function object's 'length' and 'prototype' properties.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-08 15:19:51 +03:00
Ruben Ayrapetyan ed321da8c1 Fix buffer overflow in 'new Function ()' (ecma_builtin_function_dispatch_construct).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-07 20:58:43 +03:00
Kristof Kosztyo 5a09ff2d36 Implement the AnnexB Date part
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-09-02 17:20:50 +02:00
Ruben Ayrapetyan a26c454219 Add warn_unused_result attribute to ecma_string_to_utf8_string. Add assertions that specified buffer size is sufficient in places, where return value of ecma_string_to_utf8_string wasn't checked prior to the changes.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-31 12:59:43 +03:00
Ruben Ayrapetyan 6ee561e821 Fix calculation of concatenation hash.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-31 12:59:43 +03:00
Sung-Jae Lee e2bbd6f9de Fix prerequisites setup error on Mac OS X
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-08-31 11:20:02 +09:00
Ruben Ayrapetyan a00079e8ff Reduce number of operand type handling conditional blocks in byte-code dumper, by extracting them to several separate routines that can be used for most cases, remove getop_* routines from vm.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:19:49 +03:00
Ruben Ayrapetyan cbdc48a1fc Remove raw_instr.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:19:19 +03:00
Ruben Ayrapetyan 173becc3ac Rename idx_t -> vm_idx_t, opcode_special_reg_t -> vm_reg_t, INVALID_VALUE -> VM_IDX_EMPTY / VM_IDX_REWRITE_GENERAL_CASE, LITERAL_TO_REWRITE -> VM_IDX_REWRITE_LITERAL_UID.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:18:58 +03:00
Ruben Ayrapetyan 0111a73702 Convert parser operand structure to jsp_operand_t class, move operand types to enum defined in the class.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 15:35:06 +03:00
Ruben Ayrapetyan b0276b3e46 Fix print of a 'number' literal.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 15:35:06 +03:00
Ruben Ayrapetyan 10e5f3530d Remove heap allocator's block headers, replacing them with bitmap at start of heap.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 21:42:26 +03:00
Ruben Ayrapetyan 4c67403f15 Fix collection of memory statistics in pool allocator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 18:51:30 +03:00
Ruben Ayrapetyan 589ebb1802 Remove comparison of unused instruction operands fields (the fields could be uninitialized).
Related issue: #585

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 18:41:04 +03:00
Ruben Ayrapetyan 5b9ce05491 Introduce parser-time optimization that replaces a function's local variables with registers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +03:00
Ruben Ayrapetyan 91aecc3bd0 Introduce parser scope types, add scope flags, indicating whether scope contains a function declaration, a 'try' statement, 'with' statement or 'delete' operator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +03:00
Ruben Ayrapetyan c3d8cfd73c Add suppression of 'duplicateExpression' cppcheck rule, as it leads to false positives in expressions like static_assert (ENUM_VALUE == 0, "");.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +03:00
Ruben Ayrapetyan 2e13c29331 Switch to cppcheck v1.69.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:08:10 +03:00
Ruben Ayrapetyan 264a832cc4 Implement prerequisites auto-update.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:08:10 +03:00
Ruben Ayrapetyan 2ed18491df Fix JERRY_UNIMPLEMENTED_REF_UNUSED_VARS so that call to jerry_unimplemented is placed after if (false) { ... } block.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:03:56 +03:00
Ruben Ayrapetyan 845b0d5006 Clarify calculation precedence for & and ?.
(a & b ? c : d)-like expressions are changed to ((a & b) ? c : d).

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 16:32:08 +03:00
Zoltan Herczeg bf780ad3dc Global object escape routine.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-26 01:44:18 -07:00
SaeHie Park 8f239d0b90 Add external libs include path for jerry-core
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-08-26 14:00:36 +09:00
SaeHie Park f7b370ba42 Disable warning messages of fdlibm for mips
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-08-26 14:00:36 +09:00
Szilard Ledan bafc9551a9 Implement substr function in String object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-08-25 13:52:40 +02:00
Andrey Shitov e4843ece76 Fix processing of elision in array literal.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-24 14:51:24 +03:00
Andrey Shitov 01604974e3 Free eval's code and literal hash-table after its execution if it does not contain functions.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-24 14:44:16 +03:00
Dániel Bátyai 13941df8dd Implement RegExp.prototype.compile()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-24 10:10:09 +02:00
SaeHie Park 63d3e02b59 Fix 'control reaches end of non-void function' compile error for 'noreturn'
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-08-24 16:43:28 +09:00
Andrey Shitov b3b87add02 Fix parsing of string literals which contain zero character.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-20 22:23:57 +03:00
Evgeny Gavrin e0dee65a36 Improve performance of lit_utf8_string_calc_hash_last_bytes.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-08-19 22:38:29 +03:00
Evgeny Gavrin ccfe1f1cd6 Remove 'if engine is executable' check.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-08-19 15:41:33 +03:00
Evgeny Gavrin 59ce413df5 Enable ./tools/perf.sh to accept arguments with quotes.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-08-19 15:41:33 +03:00
Andrey Shitov 0938211f63 Fix parsing of comments which contain zero character.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-19 14:34:31 +03:00
Andrey Shitov a870a07972 Remove preparser lexer pass and pass for searching of "eval" and "arguments" literals.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-19 14:16:04 +03:00
Roland Takacs cc4283b945 Fix assertion 'mem_pools == NULL' fail in JSON.stringify
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-19 08:32:25 +02:00
Ruben Ayrapetyan ab47365b71 Switch heap GC start limit check to consider number of allocated heap chunks instead of bytes.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-17 20:33:41 +03:00
Ruben Ayrapetyan 4667d3078b Introduce GC start heuristics on low-severity try-give-memory-back requests.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-17 20:10:26 +03:00
Zoltan Herczeg 4dcbdb44ff Cross-build fix after 5e301a1d71
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-17 09:53:24 -07:00
Zoltan Herczeg 5e301a1d71 Refactor the remaining date string conversion helpers.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-17 00:21:50 -07:00
Hanjoung Lee 99ff8018bd Fix show-opcodes not showing last argument
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-08-17 12:10:55 +09:00
Ruben Ayrapetyan 38fa391cd8 Replace ecma_create_object with high-level Object and Array construction interfaces in JSON built-in implementation.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-14 12:29:31 +03:00
Kristof Kosztyo 9ffa6a39d3 Fix undefined initialValue handling in Array.prototype.reduce and reduceRight function.
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-08-14 10:51:44 +02:00
Dániel Bátyai 5bb56643aa Fix undefined fromIndex in Array.prototype.lastIndexOf()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-14 10:15:27 +02:00
Kristof Kosztyo c8884a4561 Fix assert in the Date prototype
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-08-13 22:09:07 +02:00
Ruben Ayrapetyan 8f594aebfa Improvement of pool allocator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-13 19:06:53 +03:00
Zoltan Herczeg 5be41b44bb Date toString methods follow the date format used by other JS engines:
new Date(0).toString () == "Thu Jan 01 1970 00:00:00 GMT+0000"
new Date(0).toUTCString () == "Thu, 01 Jan 1970 00:00:00 GMT"
new Date(0).toISOString () == "1970-01-01T00:00:00.000Z"

Fixes S15.5.4.7_A1_T11.js test case.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-13 06:25:17 -07:00
Dániel Bátyai 4ee30cba5d Fix RegExp literal parsing
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-12 11:49:05 +02:00
Dániel Bátyai d2ac7c320d Fix invalid control escapes during RegExp parsing.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-12 11:33:15 +02:00
Roland Takacs c4b1f02947 Fix assertion 'ret_value == ecma_make_empty_completion_value ()' fail in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-11 18:29:11 +02:00
Zoltan Herczeg f2c846d960 Fix the this argument passed to string replace callbacks.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-11 06:23:43 -07:00
Evgeny Gavrin c6b4510c9a Add script for performance testing.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-08-11 16:14:35 +03:00
Andrey Shitov 0d855e898d Fix hoisting of function declaration from function expressions.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-11 15:01:45 +03:00
Andrey Shitov 531a9d3352 Fix invalid preparsing of variable declarations which are not splitted by comma.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-11 14:39:02 +03:00
Andrey Shitov d6ad1c467e Fix semicolon check after variable declaration list.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-11 14:23:11 +03:00
Andrey Shitov 95c1c223e8 Add checking for invalid operand in perfix operation.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-11 13:51:37 +03:00
Zoltan Herczeg a751478a19 Although the standard does not specify the effect of $nn in String.replace when nn is bigger than the max, the test-262 test suite expects a certain behaviour. This behaviour is mimiced by this patch.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-10 23:22:19 -07:00
chunseok lee d31eb3c4cb Jerry API for array creation and manipulation
1. jerry_api_create_array_object : create array object of given size
2. jerry_api_set_array_index_value : set value at given index
3. jerry_api_get_array_index_value : get value at given index

JerryScript-DCO-1.0-Signed-off-by: chunseok lee chunseok.lee@samsung.com
2015-08-11 15:02:56 +09:00
Ruben Ayrapetyan 1cafff32b5 Pass function arguments through ecma-collections.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:07 +03:00
Ruben Ayrapetyan 7daabb1974 Change fill_params_list to append formal parameter names to ecma-values collection, instead of array; rename it to vm_fill_params_list.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:07 +03:00
Ruben Ayrapetyan 72ce13a63a Change type of MEM_CP_NULL to mem_cpointer_t.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:06 +03:00
Szilard Ledan e22a085fc1 Implement RegExp octal support
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-08-10 15:13:21 +02:00
Dániel Bátyai cf1eda0981 Fix assertion fails in parseInt()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-10 15:04:14 +02:00
Zoltan Herczeg 8df6cdd1e9 Refactor fromCharCode including support for surrogate pairs.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-10 04:34:31 -07:00
Roland Takacs f10a48df96 Fix assertion 'mem_pools == NULL' failed in Function.constructor
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-10 11:29:51 +02:00
Dániel Bátyai b7d3189ac3 Trim whitespace from argument names in Function constructor
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-10 10:28:42 +02:00
Dániel Bátyai 58851bc7cc Fix bound function length
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-10 10:13:35 +02:00
Zsolt Borbély 640370da43 Implement String.prototype.split function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-08-07 16:07:27 +02:00
Roland Takacs ff580ca33e Use ecma-collection in JSON.
The simple list data structure has been replaced with ecma-collection in the JSON object.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-07 13:35:52 +02:00
László Langó a19dd0523e Fix 'property_p != NULL' assertion fail in RegExp
Related issue: #312

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-07 08:02:02 +02:00
László Langó 2d80456eb7 Fix Assertion 'ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT' in RegExp.
Related issue: 316

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-06 15:00:38 +02:00
Ruben Ayrapetyan 97aed75a46 Introduce interface for removal of a ecma-collection's last value.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-06 15:52:41 +03:00
László Langó ab846f6fba Fix invalid control escape in RegExp.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-06 14:45:52 +02:00
Kristof Kosztyo 2eb8f76089 Fix ecma_get_property_descriptor_from_property for accessor properties with [[Get]] / [[Set]] set to undefined value
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-08-06 14:23:36 +02:00
Peter Gal fe0ec9d7fa Object constructor prototype should be set to Function.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-08-06 13:38:24 +02:00
Roland Takacs 5888401318 Fix assertion 'bytes_copied > 0 || !string_len' in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-06 13:15:54 +02:00
Zsolt Borbély e61f41a0bc Fix of memory leak in Function.prototype.bind function.
Related issue: #511

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-08-06 13:05:33 +02:00
Zoltan Herczeg 2630048ecc Fixes for URI decoding.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-06 03:52:16 -07:00
Szilard Ledan caeae0f621 Fix undefined result in RegExp engine
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-08-06 10:49:59 +02:00
Dániel Bátyai c17197dcab Handle Unicode characters in parseFloat()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-06 10:38:03 +02:00
László Langó 7aacb8fc01 Remove recursion limit from RegExp engine.
Related issue: #388

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-06 09:58:50 +02:00
Zsolt Borbély 9cc706d21d Enable tests after #435.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-08-06 09:12:57 +02:00
Laszlo Vidacs 554305d88c Implement String.prototype.lastIndexOf()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-08-06 08:52:09 +02:00
Ruben Ayrapetyan 7aa1b16184 Change fill_varg_list to append arguments values to ecma-values collection, instead of array; rename it to vm_fill_varg_list.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-05 16:55:17 +03:00
Ruben Ayrapetyan b08e8a3173 Make ecma-values collection extendable (by introducing ecma_append_to_values_collection interface).
Related issue: #311

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-05 16:55:17 +03:00
Andrey Shitov 1aa04a287d Optimize lit_get_magic_string_utf8.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-05 16:22:04 +03:00
Ruben Ayrapetyan 55ffb0cdd1 Fix pass of USE_COMPILER_DEFAULT_LIBC from make (Makefile) to cmake (CMakeLists.txt).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-05 14:49:36 +03:00
Andrey Shitov 24e307481e Optimize block size calculation in functions working with linked list.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-05 14:29:51 +03:00
Peter Gal af56cd8465 Make the string trim method unicode tolerant.
Fixes issue #426

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-08-04 17:09:45 +02:00
László Langó 57336909cb Fix RegExp matching on right brackets and braces.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-04 16:52:08 +02:00
László Langó 7a3636b5ce Remove executor steps/match limit from RegExp.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-04 16:51:13 +02:00
Szilard Ledan 9ab0f23e48 Fix IgnoreCase in RegExp engine
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-08-04 16:29:47 +02:00
László Langó f48ed52209 Implement IgnoreCase in RegExp engine
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-04 16:29:47 +02:00
Roland Takacs 1b05cc47ff Add throwing of missing range error to Date.prototype.toISOString()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-04 16:13:51 +02:00
Roland Takacs 6082c32d45 Refactor to{,UTC,ISO}String methods of the Date object.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-04 16:13:51 +02:00
Roland Takacs 833a5d1a55 Eliminate the year calculation from an infinity value.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-04 15:38:00 +02:00
Roland Takacs 722fd2a989 Remove unneccesary UTC time conversion in the parser of the Date object.
We don't need to convert time to UTC time when the argument is suffixed with 'Z'.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-04 15:10:24 +02:00
Roland Takacs 3151a460fc Support local time output for the Date object.
Convert the primitive time to local time if it is required.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-04 15:10:24 +02:00
Dániel Bátyai 156510e174 Fix array index normalize in case index is negative zero
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-04 14:53:59 +02:00
Szilard Ledan 6ec05ff07f Refactor and cleanup the RegExp parser
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-08-04 14:45:37 +02:00
Zoltan Herczeg 0a1b6eb4c7 Implement String.prototype.search, and some minor regexp refactors.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-04 05:14:11 -07:00
Ruben Ayrapetyan f39a294bc6 Remove dependency on prerequisites for linux build.
Precommit still depends on prerequisites, as it depends on vera++, etc.

Related issue: #516

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-04 13:59:24 +03:00
Ruben Ayrapetyan c41f76aba2 Support up to 65535 items in object / array literals.
Related issue: #276

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-03 15:54:53 +03:00
Roland Takacs b5923ccd9d Fix [[Construct]] call for Date()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-03 09:06:16 +02:00
Ruben Ayrapetyan f7781bb7bc Remove intrinsics (native_call opcode).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-31 17:59:03 +03:00
Ruben Ayrapetyan 72d4c07bdc Remove 'print' instrinsic, add 'print' implementation-defined built-in routine to the Global object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-31 17:57:59 +03:00
Ruben Ayrapetyan c715a7cd1d Change 'assert' handle to pass only upon exactly 1 argument is received, and the argument is boolean true; update internal test suite correspondingly.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-30 17:05:26 +03:00
László Langó 5d385b1144 Fix properties of RegExp prototype
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-30 15:25:53 +02:00
Roland Takacs 144c3ba874 Fix assertion 'mem_pools == NULL' in the Date constructor.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-30 13:35:06 +02:00
Dániel Bátyai fe475eace7 Use ToNumber when checking lastIndex during RegExp exec()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-30 13:03:05 +02:00
Zoltan Herczeg 048e20925e Implement String.prototype.replace function.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-30 03:55:50 -07:00
Dániel Bátyai 39cf5aaa7c Fix RegExp constructor when called with undefined arguments
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-30 09:47:37 +02:00
Dániel Bátyai 1193de88cc Use [[DefineOwnProperty]] in Array builtins where necessary.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-30 09:31:49 +02:00
Kristof Kosztyo 8cd1ade515 Fix primitive value handling in Date constructor
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-07-29 15:08:55 +02:00
Peter Gal 801e8e34cd Test lastIndex calculation for exec calls
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-29 11:20:13 +02:00
Zoltan Herczeg 41aef56cba Rename isalpha, isdigit and replace characters with their corresponding constant.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-28 23:38:45 -07:00
Peter Gal 3fbe54393f Make parseInt unicode tolerant.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-28 18:36:39 +02:00
Andrey Shitov 382b2b48b7 Optimize lit_find_literal_by_utf8_string by adding hash comparison.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-28 16:04:00 +03:00
Andrey Shitov 9766feda2e Change jerry_api_string_to_char_buffer so it doesn't add '\0' to the end of output buffer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-28 15:54:55 +03:00
Andrey Shitov 656908ecaf Optimize lit_char_is_unicode_letter.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-28 14:48:45 +03:00
Ruben Ayrapetyan 502f4c4623 Split opcode and instruction entities and perform related renamings: opcode_t is now vm_instr_t, opcode position is instruction position, etc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-28 13:43:43 +03:00
Ruben Ayrapetyan 1990762cf0 Add opcode description table containing an opcode's name, name and possible type of the opcode's arguments.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-28 13:43:43 +03:00
Peter Gal 25450d8a12 Error constructor prototypes should be Function
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-28 12:16:38 +02:00
Dániel Bátyai f1248b9780 Fix Number.prototype.toString() when radix is undefined.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-28 12:04:41 +02:00
Szilard Ledan b5da46f2aa Fix segmentation fault in Date helper functions
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-28 10:19:56 +02:00
Peter Gal e34ab90e61 RegExp: treat undefined argument as empty.
new RegExp() and new RegExp(undefined) calls now results in the
same 'source' pattern.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-27 15:58:38 +02:00
Roland Takacs 336db40ed0 Segmentation fault in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-27 15:29:55 +02:00
Dániel Bátyai 2e0334ccb2 Returned array of Array.prototype.map() should have same length as original.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-27 10:41:50 +02:00
Dániel Bátyai fc45b80579 Fix Array.prototype.toLocaleString() when toLocaleString returns non-string.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 17:43:16 +02:00
Dániel Bátyai b11007055d Fix buffer size calculation in Number.prototype.toString()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 17:21:04 +02:00
Dániel Bátyai fec5933a3d Fix Array.prototype.push() and unshift() in case result length is larger than UINT_MAX
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 17:16:34 +02:00
Peter Gal b5de03a808 Improve Infinity handling in Math.min/max methods.
In Math.max case: if we already found an infinity value update the result
only when the previous value was a negative infinity.

In Math.min case: if we already found an infinity value update the result
only when the previous value was a positive infinity.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-24 16:22:50 +02:00
László Langó 3c71daaf84 Use unicode iterators in RegExp engine and implement \d, \D, \w, \W, \s, \S, \x, \u matching in RegExp.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-24 16:07:25 +02:00
Dániel Bátyai 6567651b6c Fix Array index normalize helper when index is large.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 15:01:12 +02:00
Peter Gal ee8d65063f Fix parseInt when passing empty string.
Before allocating buffer for the string first
we check that the length of it is greater then 0.
If not then the result is a NaN.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-24 14:39:12 +02:00
Zsolt Borbély 33be4883a2 Fix Array.prototype.splice() deletecount calculation
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-24 13:55:56 +02:00
Laszlo Vidacs 64c81cc44d Implement String.prototype.indexOf()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-24 13:35:26 +02:00
Roland Takacs ed16f09019 Implement Date.prototype.toJSON()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-24 12:50:02 +02:00
Peter Gal 021fc62652 Fix endian detection on 32bit
When using the -std=c99 the gcc does not defines the i386 macro
just the __i386 and __ i386 __.

Fixes issue #355

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-24 11:00:24 +02:00
Dániel Bátyai 9513808647 Fix Array.prototype.concat() when 'this' is not an array.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 10:12:02 +02:00
Dániel Bátyai 27161d31df Fix leak in Array.prototype.indexOf() when 'fromIndex' can't coerce to primitive value.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 10:31:37 +03:00
Peter Gal 11c310322b Implement String.prototype.match
Added implementation for the String.prototype.match method.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-23 10:42:13 +03:00
Roland Takacs 63083b3b51 Implement date.prototype.toISOString() and date.prototype.toUTCString()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-22 15:42:49 +03:00
Ruben Ayrapetyan d11dfc5703 Fix syntax check of literal duplication in FormalParameterList (strict mode).
Related issue: #381

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 15:22:40 +03:00
Zsolt Borbély 352e8f5c04 Minor stylefixes for the Array builtin
Related issue: #110

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-22 15:01:11 +03:00
Zsolt Borbély cdf361c2bd Reorder Array builtin functions
Sort the functions according by the chapters of the standard.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-22 15:01:11 +03:00
Ruben Ayrapetyan 6ade8dfebb Fix preparse_scope - consider nesting level during search for identifier tokens.
Related issue: #440

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:50:57 +03:00
Ruben Ayrapetyan 31894da098 Move ecma-stack to vm component, renaming it to vm-stack.
ECMA-stack is related to VM and is not related to ECMA component, except for GC.
Dependency between vm-stack and GC would be solved after GC would be extracted to a separate compoment.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:36:23 +03:00
Ruben Ayrapetyan 7dcaf06793 Rename int_data_t -> vm_frame_ctx_t, vm_frame_ctx_t* variables from int_data / int_data_p -> frame_ctx_p.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:36:23 +03:00
Dániel Bátyai a2c6663d43 Array.prototype.sort() now handles defined properties only.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-22 14:18:24 +03:00
Dániel Bátyai 9d6e7bf336 Array.prototype.sort() should sort in place.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-22 14:18:24 +03:00
Szilard Ledan 7c1622855d Fix the infinite loop in ecma_date_year_from_time
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-21 14:04:44 +02:00
Szilard Ledan 9edae36b00 Fix assertion fail in ecma_date_make_day
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-21 14:04:44 +02:00
Laszlo Vidacs c7a47c1791 Implement String.prototype.charCodeAt()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-20 16:10:45 +02:00
Ruben Ayrapetyan 7b3042fdc9 Remove usage of isalpha, isdigit, isxdigit, isspace in the whole engine except implementation of JSON built-in, moving the functions to JSON built-in's module.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-20 15:47:19 +03:00
Zoltan Herczeg bcedc901cd Add \u parse support for the JSON object. Buffer overrun issues were fixed as well.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-20 01:09:13 -07:00
Szilard Ledan bbfddea032 Fix Date(Number.POSITIVE_INFINITY) assertion fail in the Date constructor
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-17 17:38:00 +02:00
Akos Kiss 6038173e76 Rename make target build_all to $(BUILD_ALL)
The current `Makefile` works "as is" since `$(BUILD_ALL)` is
`build_all`. However, the target `build` depends on `$(BUILD_ALL)`,
so should that variable ever be changed, it will break.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:49 +02:00
Akos Kiss 8d9658913b Get all phony targets declared
It is generally a good practice to have the `.PHONY` declarations
close to the affected targets themselves (instead of declaring them
phony in one group at the end of the `Makefile`) so as not to miss
any. (As it already happened to the `log`, `precommit`,
`build_all`, etc., targets.) Thus, removed the one big declaration
from the end of the file and prepended all phony targets with a
declaration separately.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Akos Kiss f8ee565016 Split independent commands in make recipes
Mostly, there is no need for joining commands with `&&` in recipes
since make already applies the exit-on-error functionality to each
executed line, unless there is a shell interdependency between them
(like setting environment variables in one command and using it in
another, or changing the working directory, which would not work
because of the new-subshell-per-line behaviour of make). Thus, some
independent commands can be split in the `Makefile` to improve
readability.

(Some space/tab inconsistensies are also fixed.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Akos Kiss 1a4e66a013 Extend non-quiet make mode with log echo
If `VERBOSE` is defined, cmake, sub-make, and tool logs are also
echoed on stdout. Default behaviour is still quiet mode, however.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Akos Kiss f4c24f063d Enable non-quiet make
Replace most of echo-suppressing `@`s with `$(Q)`. `$(Q)` defaults
to `@` to preserve current behaviour, however, should anyone need
or prefer echoed lines, defining `VERBOSE` on the command line for
make makes it possible.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Ruben Ayrapetyan 68b9fb54d5 Turn off Date and RegExp built-in objects in compact profile.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-16 20:24:10 +03:00
Szilard Ledan 351df6184c Add locale part of the toString in the Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-16 13:04:41 +02:00
Dániel Bátyai b414329ce8 Fix Array.prototype.concat() argument array length.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-16 10:22:52 +03:00
Peter Gal db9b74a114 Fix buffer size calculation in parseInt.
Fixes issue #279.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-16 10:14:22 +03:00
Szilard Ledan d2457b1fc6 Add missing RegExp case in the token_type_to_string
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-16 10:04:03 +03:00
Andrey Shitov 4fdb5249b9 Restore "Fix preparsing of variable declaration lists, which are not divided by a semicolon." 06d0c1806d) that was incorrectly removed in abc2b55297.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 20:20:26 +03:00
Ruben Ayrapetyan abc2b55297 Fix dump of arguments / eval usage hint in preparse_scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:24:54 +03:00
Szilard Ledan 005eb044a9 Implement builtin setters for Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-15 17:16:59 +03:00
Ruben Ayrapetyan 7bc2c69147 Temporary workaround (until parser is refactored) for fixing parse of expressions like '1 = 1'.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:00:45 +03:00
Ruben Ayrapetyan 44b7b95781 Add support of ReferenceError early error to parser.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:00:45 +03:00
Andrey Shitov 06d0c1806d Fix preparsing of variable declaration lists, which are not divided by a semicolon.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 16:53:41 +03:00
László Langó 051c7b6786 Implement Date.prototype.toDateString and Date.prototype.toTimeString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 16:25:14 +03:00
László Langó 84f09ffcd9 Follow up fix for Date.prototype.toString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 16:25:14 +03:00
Roland Takacs dcc704d1e8 Add missing case for backspace control character in JSON.parse()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 16:17:56 +03:00
Roland Takacs 8aeb2a055e Fix underflow in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 16:09:51 +03:00
Zsolt Borbély f625473f9a Implement String.prototype.localeCompare function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-15 15:50:38 +03:00
Dániel Bátyai e5b2e1e389 Number.prototype functions should throw TypeError if 'this' is not number.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-15 15:41:19 +03:00
Peter Gal c8a16f2107 Improve Function constructor argument handling.
For the Function constructor it is possible to pass the
name of the function arguments in one or more strings, and
each argument name should be separated with a comma.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-15 15:33:10 +03:00
Roland Takacs 292d99ba4e Fix assertion 'bytes_copied > 0' in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 13:48:11 +03:00
Ruben Ayrapetyan 7ccec19c26 Fix strict mode in an object initializer's getters / setters definition.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 13:32:02 +03:00
Andrey Shitov 4f58104981 Fix checking of semicolons in expression statements.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 13:15:25 +03:00
Ruben Ayrapetyan 0e8cb596d7 Fix parse of preincrement / predecrement, applied to 'obj.prop'-like expressions.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 13:04:02 +03:00
Ruben Ayrapetyan 6fe78cc994 Temporary workaround (until parser is refactored) for fixing evaluation of simple 'identifier'-like expressions.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:52:42 +03:00
Ruben Ayrapetyan 5e329c815c Fix syntax checking of large object literals.
Related issue: #354

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:41:56 +03:00
Ruben Ayrapetyan 73d082aa55 Fix parse of delete operator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:34:51 +03:00
Ruben Ayrapetyan c120433158 Fix handling of EOF in insert_semicolon.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:31:47 +03:00
László Langó cf9d54545f Style fixes for RegExp engine.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 11:02:11 +02:00
Zsolt Borbély 1e90f833f7 Implement Function.prototype.bind function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-15 08:39:35 +02:00
Ruben Ayrapetyan 92bf7859af Put lexer_init after setjmp in parser_parse_program, as lexer_init could raise an early error.
Related issues: #341

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-14 18:42:49 +03:00
Andrey Shitov 1195c197e8 Fix syntax checking for line terminators inside regular expressions.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-14 17:58:24 +03:00
Andrey Shitov f3ef9afb91 Fix handling of invalid HexIntegerLiterals in lexer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-14 17:58:24 +03:00
Zoltan Herczeg 69655f4456 Implement toLowerCase and toUpperCase built-in functions.
Related issue: #323

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-14 07:01:47 -07:00
SaeHie Park bc0ca7be5d Add heap size limit
to solve #342

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-07-14 07:44:37 +09:00
SaeHie Park 0927888b44 External build fix
Added generic build for none linux platforms, as nuttx has be removed by #330

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-07-14 07:44:37 +09:00
Ruben Ayrapetyan aa415c670e Fix initialization of 'this' argument in 'call_n' opcode handler.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:31:07 +03:00
Ruben Ayrapetyan c84d31ce9e Fix sign of number remainder (ecma_op_number_remainder).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:21:46 +03:00
Ruben Ayrapetyan f8770020f7 Update RegExp.prototype.exec so that it returns 'null' instead of 'undefined' in case argument doesn't match corresponding regular expression.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:05:37 +03:00
Ruben Ayrapetyan 8aa2571699 Fix NaN handling in ecma_op_same_value.
Related issue: #130

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 18:57:38 +03:00
Ruben Ayrapetyan 710a18d6af Add 'length' property of String.prototype built-in object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 18:49:45 +03:00
Andrey Shitov cf2bc459bb Support unicode whitespaces in string-to-number conversion.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-13 18:33:05 +03:00
Andrey Shitov b3fa7d9765 Fix function skipping in preparse_scope: properly detect usage of 'function' keyword as property name.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-13 18:01:18 +03:00
Andrey Shitov 7f1a7981b9 Support true, false, null as property names.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-13 18:01:17 +03:00
Andrey Shitov 60bd718fb5 Fix assertion !lit_utf8_iterator_is_eos (iter_p) in lexer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-13 18:01:17 +03:00
Andrey Shitov 64bbf2752e Fix printing of the source line with syntax error.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-13 18:01:17 +03:00
SaeHie Park 13cf31413f Fix EXTERNAL_LIBC_INTERFACE check with USE_COMPILER_DEFAULT_LIBC
Related with #331

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-07-12 17:18:52 +09:00
László Langó 9c559216b7 Primitive value of Date.prototype should be NaN
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-10 13:31:31 +02:00
László Langó 122e5c47c9 Fix assertion in RegExp bytecode realloc.
Assertion '!bc_ctx_p->current_p && !bc_ctx_p->block_end_p && !bc_ctx_p->block_start_p' failed in realloc_regexp_bytecode_block

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-10 10:23:09 +02:00
László Langó 9b24d8fd7a Implement Date.prototype.toString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-10 09:43:19 +02:00
László Langó 6e8f7b6e59 Assertion fix in RegExp.
Assertion 'mem_pools == NULL' failed in mem_pools_finalize

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-10 09:33:23 +02:00
Andrey Shitov dbf3708255 Fix concatenating of surrogates.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-10 10:23:20 +03:00
Kristof Kosztyo 9fc1958903 Fix the builtin Math.min and Math.max function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-07-10 09:11:43 +02:00
Szilard Ledan 8d7cdebee0 Implement builtin getters for Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-09 17:04:54 +02:00
Ilya Lopatin 6547cf3b2d JerryScript-DCO-1.0-Signed-off-by: Ilya Lopatin lopic19@gmail.com 2015-07-09 17:55:50 +03:00
Evgeny Gavrin 9c18648b6c Fix build for GCC 4.7.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-09 15:38:27 +03:00
Evgeny Gavrin a26832f3c9 Fix strip handling for cross build configurations.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-09 15:38:27 +03:00
Andrey Shitov d5fd0b09b1 Properly process Use Strict which contains EscapeSeqence or LineContinuation.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-09 12:43:13 +03:00
Andrey Shitov 17cdc35d6d Fix detection of Use Strict directive not in the start of Directive Prologue.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-09 12:43:03 +03:00
Andrey Shitov 146ac15b5f Change locus type from size_t to lit_utf8_iterator_pos_t.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-08 15:53:33 +03:00
Ruben Ayrapetyan 7dd1d01541 Replace character constants with corresponding LIT_CHAR_* definitions in lexer_parse_token (renamed from lexer_next_token_private); replace remaining character constants in lexer with corresponding LIT_CHAR_* definitions.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:53:23 +03:00
Ruben Ayrapetyan e45f6dc61b Replace punctuator character constants with corresponding LIT_CHAR_* definitions in lexer_next_token_private.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:53:12 +03:00
Ruben Ayrapetyan 23b847015c Support unicode whitespace and line terminators in lexer, fix parse of comments.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:53:02 +03:00
Ruben Ayrapetyan 32094622ec Replace character constants with corresponding LIT_CHAR_* definitions in lexer_parse_regexp (renamed from parse_regexp).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:52:52 +03:00
Ruben Ayrapetyan 7664bc161b Replace character constants with corresponding LIT_CHAR_* defines in lexer_parse_string (renamed from parse_string).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:52:42 +03:00
Ruben Ayrapetyan 1711416e2e Simplify lexer_parse_number (parse_number) and add unicode support to the function.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:52:31 +03:00
Ruben Ayrapetyan baf3748d1b Support unicode in lexer_parse_identifier_name_or_keyword (renamed from parse_name).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:52:21 +03:00
Ruben Ayrapetyan 6432e4d7cf Replace convert_string_to_token_transform_escape_seq with lexer_transform_escape_sequences that outputs transformed charset to specified buffer, instead of creating token from the charset.
Also the commit introduces lexer_convert_escape_sequence_digits_to_char, adds 'lexer' prefix to convert_single_escape_character and replaces character constants with corresponding LIT_CHAR_* definitions in the function.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:52:10 +03:00
Ruben Ayrapetyan b5d30de4d7 Rename decode_keyword to lexer_parse_reserved_word and change it so that it doesn't return TOK_NAME, but empty token instead.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:51:59 +03:00
Andrey Shitov 32318137c3 Switch lexer to utf8 iterators.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-08 15:51:24 +03:00
Andrey Shitov d248d0944c Add helper functions for implementing unicode support in lexer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-08 15:51:02 +03:00
Ruben Ayrapetyan c21399cd58 Fix ecma_date_parse_date_chars: lit_char_is_unicode_digit -> lit_char_is_decimal_digit.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:20:45 +03:00
Ruben Ayrapetyan afe58e90ae Add lit_char_is_octal_digit, lit_char_is_decimal_digit, lit_char_is_hex_digit helpers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:17:41 +03:00
Ruben Ayrapetyan 393d693e23 Introduce 'USE_COMPILER_DEFAULT_LIBC' for switching from jerry-libc to a libc, provided by compiler.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:02:40 +03:00
Laszlo Vidacs 6d86c4b2e1 Implement String.prototype.substring()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-08 12:57:17 +02:00
Evgeny Gavrin ddc3f0d6e8 Remove nuttx from prerequisites.
Related issue: #313

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-08 13:17:14 +03:00
Dániel Bátyai 5e0a355ab9 Implement printing in the specified radix for Number.prototype.toString().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-08 11:25:00 +02:00
László Langó c12914c71a Implement Date constructor.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-08 11:07:23 +02:00
Evgeny Gavrin bf6fa9cfca Add JERRY_DISABLE_HEAVY_DEBUG region to mem_heap_get_chunked_block_start.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-08 11:51:27 +03:00
Laszlo Vidacs 632618da99 Implement String.prototype.charAt()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-08 10:26:28 +02:00
Evgeny Gavrin 01c4325588 Remove empty unneeded file.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-08 10:15:48 +03:00
Evgeny Gavrin 6a4565c891 Fix resource leak at main-linux.cpp:read_sources.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-07 20:40:36 +03:00
Zsolt Borbély 69bfcea697 Move of built-in implementation helpers to jerry-core/ecma/builtin-objects
Related issue: #145

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-07 17:16:10 +02:00
Dániel Bátyai 3c4c5452dd Add length property to Array constructor
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-07 17:14:07 +02:00
Dániel Bátyai 9402e3d59c Fix [[Class]] property of builtin constructors
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-07 16:59:27 +02:00
László Langó 4f108ab401 Implement Date.UTC and add a dummy implementation for Date.now
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-07 15:43:33 +02:00
Zoltan Herczeg 06b4490ea1 Optimize encode/decode URI for valid UTF-8 input.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-07 04:50:01 -07:00
Zoltan Herczeg d1a5f7fc87 Implement JSON built-in object
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-07 04:39:39 -07:00
László Langó cadc8f40d4 Implement Date.parse
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-07 08:25:29 +02:00
Kristof Kosztyo 2bfb9b9ae4 Fix ecma_op_array_object_define_own_property
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-07-06 16:29:42 +02:00
László Langó e9a5b34d1d Assertion fix for missing class names.
Assertion 'builtin_id == ECMA_BUILTIN_ID_TYPE_ERROR_THROWER' failed in ecma_object_get_class_name.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-06 15:29:28 +02:00
Dániel Bátyai 47cd42ecc5 Fix Number.prototype.toFixed if argument is outside int32 range
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-06 15:17:27 +02:00
Peter Gal 4e5e7bb4c8 Set global object's prototype
The global object should have the same prototype
as a simple object.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-06 11:01:02 +02:00
Peter Gal e154156cf4 Fix element indexing for Object.keys/Object.getOwnPropertyNames
Previously the index was incremented even if an internal property
or a non enumerable property was found.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-06 10:43:15 +02:00
Peter Gal c9bbec7683 Fix assert in ecma_op_function_declaration
Minor code rework as the ecma_op_object_define_own_property
call returns a 'true' simple value on success.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-06 10:25:12 +02:00
SaeHie Park 93e3cb13dd Fix jmp_buf size to fix assert in arm-linux
Related issue: #296

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-07-06 06:52:04 +09:00
Andrey Shitov ae3eea8ae8 Add functions for iterating utf-8 strings.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-03 13:24:27 +03:00
Evgeny Gavrin 0787d76b62 Fix generation of empty completion value in ecma_reject_put.
Related issue: #114

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-02 19:31:38 +03:00
Evgeny Gavrin 69fe6199c0 Add syntax check for return from global scope/eval.
Related issue: #129

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-02 19:12:41 +03:00
Ruben Ayrapetyan e8659f373c Rename ECMA_CHAR_NULL to LIT_CHAR_NULL, move it to jerry-core/lit/lit-char-helpers.h.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:38:34 +03:00
Ruben Ayrapetyan 2a78d24fce Add preprocessor definitions for various character codes, referenced in ECMA-262, and helpers for checking if a character falls into a ECMA-defined character category; remove lit_char_is_carriage_return and lit_char_is_new_line helpers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:38:32 +03:00
Ruben Ayrapetyan 7d53133fcb Add unicode characters ranges, listed per category.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:37:21 +03:00
Ruben Ayrapetyan c37964f7a9 Move helpers from ecma-helpers-char.cpp to lit-char-helpers.cpp, rename them correspondingly.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:36:48 +03:00
Szilard Ledan 017aa6b684 Change Date helpers to handle NaN
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-02 09:15:03 +02:00
Evgeny Gavrin 56e7ead9f9 Fix build for GCC 4.7.
Related issue: #1

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-01 20:52:37 +03:00
Evgeny Gavrin 1b55630b2a Add parallel test262 runner.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-01 15:20:11 +03:00
Ruben Ayrapetyan 0c7801b996 Fix setup of argument variables in case parameter names are duplicated.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 15:07:00 +03:00
Ruben Ayrapetyan 134491453b Fix ecma_op_get_value_object_base (GetValue, 8.7.1) for case HasPrimitiveBase (ref) is true.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:57:06 +03:00
Ruben Ayrapetyan b45302ee07 Fix propagation of strict mode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:44:12 +03:00
Ruben Ayrapetyan 438d2c2930 Fix ecma-property construction: perform operations that could invoke GC before linking property into an object's property list to avoid start of GC in the middle of property construction.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:23:48 +03:00
Dániel Bátyai 713b433c42 Implement Number.prototype.toPrecision()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 11:15:18 +02:00
Dániel Bátyai 53cbb55f25 Implement Number.prototype.toExponential()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 10:51:55 +02:00
Evgeny Gavrin 505beadfeb Fix failing prerequisites script.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-30 20:17:01 +03:00
Ruben Ayrapetyan 71bac03d51 Fix construction of Arguments object: add handler for 'caller' property that throws TypeError upon read or write access.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 19:18:53 +03:00
Ruben Ayrapetyan ec02ace0e9 Fix syntax check for duplicate parameter names in a strict mode function.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 15:22:21 +03:00
Evgeny Gavrin 444bd32d50 Add support of cross-compilation for linux-based targets.
Usage:
- Cross compile:
make debug.linux TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake
- Build unittests
make unittests TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake
- Run unittests on target board
./tools/runners/run-unittests-remote.sh <ip> <login> <pass>
- Run JavaScript test on target board
./tools/runners/run-tests-remote.sh debug.linux <ip> <login> <pass>

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-30 15:03:36 +03:00
Evgeny Gavrin be2de16a4e Fix build error using GCC 4.7.4
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-30 15:03:36 +03:00
Ruben Ayrapetyan 4870550c8a Fix false-positive unexpected EOF in preparse_scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:52:20 +03:00
Ruben Ayrapetyan 0422e2230d Fix syntax check for case 'eval' or 'arguments' identifiers are used for name of function in strict mode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:36:18 +03:00
Ruben Ayrapetyan 7b90d54490 Fix raise of several nested jumpable borders at one label.
Related issue: #164

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:25:51 +03:00
Ruben Ayrapetyan 2aa04859ef Fix handling of an exception raised during arguments list evaluation.
Related issues: #260, #261, #262, #263, #264, #265, #266, #267

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 10:11:01 +03:00
Andrey Shitov fd9ff8e3bd Add core unicode functionality.
Add utf-8 processing routines.
Change ecma_char_t from char/uint16_t to uint16_t.
Apply all utf-8 processing routines.
Change char to jerry_api_char in API functions' declarations.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov c4b0cd2196 Change ecma_length_t and jerry_api_length_t from uint16_t to uint32_t.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov a0c5974ab8 Move char type definitions and magic string processing functions to literal component.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Szilard Ledan 07148d319b Implement Date object helper functions
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-06-29 18:09:39 +02:00
Ruben Ayrapetyan a56693e00c Fix syntax error check for assignment of 'eval' and 'arguments' in strict mode code.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 18:11:24 +03:00
Ruben Ayrapetyan 984e269db6 Fix direct call to eval from strict mode code.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 18:04:42 +03:00
Ruben Ayrapetyan 6573ffd632 Fix several issues in parse of variable declarations.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:56:42 +03:00
Ruben Ayrapetyan 9e3f123cd5 Fix character code values for "<LF>" and "<CR>" characters in ecma-char helpers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:49:57 +03:00
Ruben Ayrapetyan 3d31bfec92 Fix parse of nested switch statements.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:42:37 +03:00
Ruben Ayrapetyan 6e2733dbfd Reduce register pressure by reusing registers, allocated for argument preparation instruction sequence.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:23:51 +03:00
Ruben Ayrapetyan dc095bb902 Enhancement of argument list parsing loop: removing break / continue operators, so that every iteration passes start and end of loop body.
The change makes possible simple notification of byte-code generator about start / end of byte-code generation for an argument.
As register values are not passed between byte-code sequences that prepare different arguments, the change would make possible for byte-code generator to reuse registers allocated for the code sequences.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:23:51 +03:00
Ruben Ayrapetyan 1dc7ed64d6 Fix get_variable_value invocation in opfunc_call_n; enhancement of exception handling in opfunc_obj_decl.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:23:51 +03:00
Ruben Ayrapetyan 06dffdec8f Remove exit completion value type.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 10:24:18 +03:00
Ruben Ayrapetyan 447358cd4a Remove intrinsics support from parser.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 10:24:18 +03:00
Evgeny Gavrin 3e86875333 Fix incorrect assertion ecma_op_from_property_descriptor.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-28 19:53:29 +03:00
Ruben Ayrapetyan 507411f0a0 Implement parse of for-in statement.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:21:59 +03:00
Ruben Ayrapetyan b988fe2fce Introduce for-in opcode; implement handler for the opcode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
Ruben Ayrapetyan 6c6e740c7a Fix check of run scope bounds in vm_loop.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
Ruben Ayrapetyan 9b414deb8d Introduce explicit description of registers (temporary variables) ranges.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
László Langó e027b4d65d Enable regular expressions.
- add regular expressions support to JS parser and interpreter;
- add tests for regular expressions.

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:10 +02:00
László Langó f992f5d92e Add RegExp object constructor, regular expression matching procedures, RegExp and RegExp.prototype built-in objects.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:06 +02:00
László Langó 4ffcb4d464 Add parser and compiler of regular expressions.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:03 +02:00
László Langó 1f9add4735 Add ecma_char_is_word_char helper (part of IsWordChar abstract operation, ECMA-262 v5, 15.10.2.6); move hex_to_int from lexer to jerry-core/ecma/base/ecma-helpers-char.cpp, renaming it to ecma_char_hex_to_int.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:00 +02:00
László Langó 50b64bfad2 Add ecma_new_ecma_string version that takes buffer with specified number of characters, instead of zero-terminated string.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:30:57 +02:00
László Langó d0e9edc16d Fix comments in jerry-core/ecma/base/ecma-helpers.h.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:30:53 +02:00
László Langó 6511f0e1ba Add ecma_raise_* helpers for raising ECMA exceptions.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:30:23 +02:00
Ruben Ayrapetyan f849cc6283 Fix parse of simple for statement.
Related issue: #156

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00
Ruben Ayrapetyan 601f1eea58 Introduce jsp_skip_braces function for skiping blocks, surrounded with braces.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00
Ruben Ayrapetyan 5f174cf8bf Remove 'process_keyword_names' stage, as keyword literals now can be registered during main parse stage.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00
Zsolt Borbély 1c19e5c8ab Fix the Object.getPrototypeOf function.
Related issue: #208

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-25 16:32:53 +02:00
Ruben Ayrapetyan d7ecd4a467 Fix raise of syntax errors for unmatched braces.
Related issue: #43, #183

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 16:47:45 +03:00
Ruben Ayrapetyan 4ff9e79b02 Generate anonymous function expressions for getters / setters of an object literal.
Related issue: #234

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-24 15:37:42 +03:00
SaeHie Park c603d10360 Adjust nuttx heap size to 80K
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-24 07:05:56 +09:00
Peter Gal 77b01a6473 Provide assert as an external method.
Removed the internal assert implementation from the engine
and provide externally an assert function via api calls.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-23 18:08:51 +02:00
Kristof Kosztyo 61ab205130 Implement Object.create function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-23 17:46:59 +02:00
Zsolt Borbély 3f28cb3bf8 Fix the indexing of Array builtin functions.
The index-dependant builtins didn't handle correctly the positive Infinity value.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-23 17:29:46 +02:00
Laszlo Vidacs caa1617ea2 Implement String.prototype.trim()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-23 16:54:42 +02:00
Ruben Ayrapetyan 913519dd5c Fix of ToUInt32 (ecma_number_to_uint32) and ToInt32 (ecma_number_to_int32) conversion routines.
Related issue: #160

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 15:33:03 +03:00
Ruben Ayrapetyan 1efaefaabe Extract part of ecma_op_number_remainder (ECMA-262 v5, 11.5.3), corresponding to item 6 (actual remainder calculation, without handling of NaN. Infinity and zero values), as ecma_number_calc_remainder.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 15:33:03 +03:00
Dániel Bátyai 7d3bb85ccb Fix buffer size in Number.prototype.toFixed()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-23 14:14:39 +02:00
Evgeny Gavrin 216dc251ec Remove support of plug-in mechanism.
This API is obsolete and can be fully replaced with existing `api.h`.

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-23 13:56:46 +03:00
Ruben Ayrapetyan ab2abfa8b3 Fix receiving of byte-code instructions from serializer.
Related issue: #203

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:49:46 +03:00
Ruben Ayrapetyan d1055f98e5 Add set_variable_value to opfunc_native_call.
Related issue: #117

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:16:42 +03:00
Ruben Ayrapetyan 611811678e Remove invalid assertion in ecma_builtin_global_object_eval.
The removed assertion checked that `this` argument can't be equal to `undefined` in direct call to eval.
Actually, `this` can be not equal to `undefined` in case direct call to eval is performed from `with` block.

Related issue: #212

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:09:55 +03:00
Ruben Ayrapetyan a536073da4 Add literal registration in parse_member_expression (TOK_KEYWORD case).
Related issue: #116

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:39:45 +03:00
Ruben Ayrapetyan 89a7449913 Fix invalid assertion condition in jump opcode handlers.
Related issue: #120

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:31:45 +03:00
Ruben Ayrapetyan 0db82a56d2 Fix exception handling in opfunc_native_call (OPCODE_NATIVE_CALL_PRINT case).
Related issue: #122

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:09:18 +03:00
Ruben Ayrapetyan 81d13b0676 Fix incorrect interchange of interfaces taking to ecma values and ecma completion values.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 11:38:13 +03:00
Szilard Ledan bac7908448 Add fmod function to the fdlibm
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-06-22 12:55:26 +02:00
Kristof Kosztyo e3861d7cd1 Implement Object.freeze and Object.isFrozen function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 10:03:18 +02:00
Kristof Kosztyo 2ee469ee65 Implement Object.seal and Object.isSealed function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 09:25:10 +02:00
Tamas Czene 4836d3b615 Implemented Number.prototype.toFixed()
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-06-19 17:34:48 +02:00
Ruben Ayrapetyan 7d4569a6ff Fix valgrind false-positive warning in mem_heap_get_chunked_block_start.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 18:00:37 +03:00
Ruben Ayrapetyan a4e54e736e Support syntax error feedback in parser.
Now, parser correctly finishes parse procedure if syntax of source code is incorrect (syntax correctness is indicated using return value):
 - parser-internal memory management is performed using jsp_mm_alloc / jsp_mm_free;
 - upon detection of incorrect syntax, all parser-allocated memory regions are deallocated using jsp_mm_free_all and parse finishes with corresponding return value.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 17:05:15 +03:00
Ruben Ayrapetyan 85f12de139 Introduce parser-specific managed memory allocator with interface jsp_mm_free_all that, upon call, frees all memory allocated with the allocator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan 9b0f5d439d Introduce jsp_label_remove_all_labels interface that removes all jump labels registered at the moment of call for usage upon raise of SyntaxError during parse.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan bd9d1d4afd Improve allocation of memory for byte-code array and literal identifiers hash table.
- literal identifiers hash table and byte-code array are now allocated in one heap block instead of four blocks;
 - memory regions with the hash tables and arrays are now linked into linked list using headers at start of the regions instead of using array_list.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan 4e563932f1 Remove parser_init / parser_free interfaces (corresponding actions are now performed in parser_parse_program); introduce boolean return value in parser invocation interfaces that would indicate whether SyntaxError was raised during parse.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan 2bf25f10eb Move jerry-core/parser/collections to jerry-core/parser/js/collections.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Zoltan Herczeg 6027906f96 Add support for URI encoding / decoding.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-06-18 19:05:45 +02:00
Ruben Ayrapetyan 53156771dc Update API for invocation of functions and constructors.
With the change, if exception is thrown in `jerry_api_function_call` and `jerry_api_construct_object`, the exception object is returned to the caller.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 19:14:34 +03:00
Peter Gal 5dc44b1362 Fix MCU script transformation logic.
The old script behaved incorrectly as it replaced all '*' occurrences
with the list of files in the given directory.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-17 17:55:56 +02:00
Dániel Bátyai 7508b803cf Implement parseFloat()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-17 16:42:07 +02:00
Dániel Bátyai 35840a4b6d Implement parseInt()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-17 16:41:57 +02:00
Ruben Ayrapetyan de7b72d726 Add configuration for ARMv7 softfloat build; update setjmp / longjmp ARMv7 implementation to handle the softfloat-mode properly.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan b008867d81 Implement setjmp / longjmp in jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan f115f731c3 Switch unit tests to jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan 6d6c913bdc Move random number generator from Math.random to jerry-libc, replace the logic with call to rand in Math.random.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:02:50 +03:00
Ruben Ayrapetyan 30277153b9 Fix strncmp, fread and fwrite in jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:02:50 +03:00
Ruben Ayrapetyan 630a1e8eba Move architecture-depedendent libc internal headers to jerry-libc/arch folder.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:02:49 +03:00
Andrey Shitov a293e21147 Introduce JERRY_DISABLE_HEAVY_DEBUG preprocessor definiton to speed up debug version of the engine.
Heavy debug is enabled only for unit tests.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-17 11:29:35 +03:00
László Langó d803c3bc82 Init commit for Date object.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-16 18:05:31 +02:00
Ruben Ayrapetyan 8a9633dba0 Fix style in jerry-core/jerry.cpp, and doxygen titles in jerry-core/jerry.cpp and jerry-core/jerry-extension.h.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-15 16:13:56 +03:00
Evgeny Gavrin bd9a00d254 Rename tests in ./tests/jerry/* directory to match the style of filenames in the project.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-15 14:44:45 +03:00
Ruben Ayrapetyan 5d5e75fad6 Implementing 'eval' routine of built-in Global object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan b310d76dec Introducing interpreter context flag, indicating if there is call of 'Direct call to eval' form in process, and interfaces for accessing the flag and 'strict mode' flag.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan 446e8bf989 Replacing 'this_arg' meta opcode with more general 'call site additional information' meta opcode with flags describing the call site features, and, optionally, 'this' argument.
Introducing opcode_call_flags_t for argument of the new meta opcode, currently with two flags: 'have this argument' and '"direct call to eval" form'.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan 6fadcd3f84 Implementing [[Construct]] of built-in Function object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan d18de24e1e Adding interpreter invocation to ecma_op_eval_chars_buffer.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:17:20 +03:00
Ruben Ayrapetyan 534ee426ee Extracting part of ecma_op_eval to ecma_op_eval_chars_buffer that with 'code' argument represented as array of characters instead of ecma-string.
Updating jerry_api_eval to use ecma_op_eval_chars_buffer, so removing redundant conversion of character array to ecma-string.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:01:31 +03:00
Ruben Ayrapetyan 8ea0e23ea3 Support of multiple bytecode arrays in interpreter and ecma-runtime.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:01:31 +03:00
Andrey Shitov 3577261261 Add support for eval in parser.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-13 18:01:30 +03:00
Ruben Ayrapetyan 57c6c377af Small enhancements of unit tests implementation style and fix of the tests' modules naming style.
- introducing TEST_RANDOMIZE macro for randomization of source data used in unit tests;
 - replacing assert with JERRY_ASSERT;
 - renaming test_* to test-*.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 16:10:36 +03:00
Kristof Kosztyo 013bce85fc Fix ecma_get_property_descriptor_from_property function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-12 16:51:57 +02:00
Peter Gal 62cb842434 Implement Function.prototype.toString.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-12 14:54:03 +02:00
Zsolt Borbély 7952b1cae7 Implement Function.prototype.apply()
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-12 13:02:21 +02:00
Laszlo Vidacs 72eb14f741 String.prototype.concat()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-12 12:46:36 +02:00
Peter Gal 36c80f2cf5 Remove nullptr usages and use NULL instead
Related issue: #119

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-11 18:38:48 +02:00
Andrey Shitov 53801e3b41 Replace array of literals with literal storage.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
Andrey Shitov 340a9ef002 Add literal storage, literal_t type and functions for its processing.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
Andrey Shitov 528a333e17 Implement recordset iterators
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:00 +03:00
Kristof Kosztyo 6ebb32452e Refactor the Object.defineProperties function
Fix assert and corner cases in Object.defineProperties function.

JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-10 15:36:11 +02:00
Peter Gal f6b875c36c Use __func__ instead of __FUNCTION__
The __FUNCTION__ is not part of the C99/C++11 standard.
So replace all occurrences with the standard __func__.

Side note: GCC 5.1 warns when using -Wpedantic -std=c99
and __FUNCTION__.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-09 18:03:42 +02:00
Ruben Ayrapetyan d988da8edf Fix precommit on x86_64 machine with g++ 4.8.2 compiler (issue appeared because pre-commit testing was not performed in the combination).
Related issue: #161

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-09 15:17:38 +03:00
SaeHie Park 43ec3a33cf Enable pretty-printer for unittests also
* dump string literals with test_api to see jerry_register_external_magic_strings is working ok

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
SaeHie Park 723924f36f New External Magic String API to save heap memory
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
SaeHie Park 603fa56acf Add vm_finalize() to clean program pointer for embed systems
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
Andrey Shitov 55b43071d1 Add indentation checks for code inside classes and fix appeared issues.
Fix asserts in test_recordset.cpp.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-09 00:30:20 +03:00
Zsolt Borbély cefeea06f6 Implement Object.getPrototypeOf()
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-08 16:43:30 +02:00
Ruben Ayrapetyan 385b988e69 Fix of memory leak in ecma_op_function_construct_simple_or_external.
Related issue: #121

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-08 16:23:22 +03:00
Ruben Ayrapetyan 64522db972 Fix of checksum check in tools/prerequisites.sh.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-08 16:15:46 +03:00
Ruben Ayrapetyan 2270db9414 Removing 'nestings' from parser.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 20:18:29 +03:00
Ruben Ayrapetyan d99d779486 Support labelled statements.
Related issue: #52

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 19:02:08 +03:00
Ruben Ayrapetyan 2de49cdba7 Fix of 'case' / 'default' statements skip during parse of SwitchStatement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 18:52:09 +03:00
Zsolt Borbély 0b1b102cfa Implement String.prototype.slice()
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-05 10:48:47 +02:00
Ruben Ayrapetyan ac87616f05 Fixing break / continue, nested into 'try', 'with' blocks.
Related issue: #128

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan 8433df3097 Introducing interpreter run scopes.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan 712f8b0c9a Introducing 'try' and 'with' nestings in parser.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan 3ec6948bae Fix parsing of 'default' switch-case label in 'parse_switch_statement'.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:34:44 +03:00
Laszlo Vidacs 4547b0fdac Array.prototype.map()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-04 14:31:26 +02:00
Akos Kiss 9d423d9901 Make exit behaviour of jerry_fatal flag-dependent
* Added new flag `JERRY_FLAG_ABORT_ON_FAIL`.
* Added new internal api function `jerry_is_abort_on_fail` to
  check the status of the flag.
* Changed `jerry_fatal` bail-out function to call `abort` when the
  flag is set and exit code is non-zero (i.e., not only for
  assertion failures).
* Added `--abort-on-fail` command line option to linux and nuttx
  apps to set the flag.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-06-03 17:09:51 +02:00
Ruben Ayrapetyan 4c10a6d057 Restoring lost review fixes for pull request #102 (instantiation of Arguments object).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-03 15:58:07 +03:00
Ruben Ayrapetyan 67161c890b Adding missing copyright notices to tests, prepared by Szeged.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-03 15:48:43 +03:00
Akos Kiss 6a607751bf Terminate with signal in case of an assert
Automated debugging is easier if the process terminates with a
signal instead of a regular `exit (code);` call, since in this
latter case the cause of error cannot be automatically backtraced.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-06-03 12:07:55 +02:00
Kristof Kosztyo a838461649 Implement Object.isExtensible and Object.preventExtensions function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-03 11:22:34 +02:00
Laszlo Vidacs 2a8c928395 Implement Array.prototype.reduceRight()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-03 11:03:45 +02:00
Peter Gal e4db5aa539 Improvements for ecma_op_general_object_define_own_property.
List of improvements:
 - Get the [[Enumerable]] and [[Configurable]] attributes before removing a property.
 - Directly check the type of the property in asserts.

Related issues: #115 and #132

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-03 10:47:00 +02:00
Akos Kiss d6fb76416a Add abort () to jerry-libc
Added declaration and implementations of `void abort (void)` to
jerry-libc. As the linux implementation relies on the `getpid`
syscall - which has no arguments - `syscall_0` implementations
have been added as well.

`libc_fatal` has been adapted to use the new `abort` function
instead of `exit`. This also made the definition of
`LIBC_FATAL_ERROR_EXIT_CODE` unnecessary.

Finally, the syscall fatal error message was fixed.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-06-02 18:12:29 +02:00
Peter Gal 5c012a1183 Implement Object.getOwnPropertyNames and Object.keys.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-01 16:01:02 +02:00
Laszlo Vidacs 89e5444438 Array.prototype.reduce() fixes.
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs 95adf0e21f Array.prototype.reduce() fixes.
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs f22f3c50e7 Array.prototype.reduce() tests, minor fixes.
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs 71059fe346 Array.prototype.reduce() minor fixes.
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs d6e4e19852 Implement Array.prototype.reduce()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:17:57 +02:00
Szilard Ledan 6b8e34a9cd Implemented Array.prototype.sort()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-05-29 15:22:58 +02:00
Ruben Ayrapetyan 8b28cac99e Implementing escape sequences support with the exception of "\0" ("<NUL>") character and cases that depend on Unicode support.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 14:03:11 +03:00
Ruben Ayrapetyan 7025f97fdd Adding routine for conversion of any character sequence (not only strings contained in source code buffer) to lexer token.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 13:46:07 +03:00
Ruben Ayrapetyan da7e9d9871 Fixing retrieval of [[Class]] properties for built-in function objects, optimizing memory related to [[Class]] property.
- introduced ecma_object_get_class_name interface;
 - removed creation of [[Class]] internal property for types of objects that unambiguously determine the [[Class]] value.

Related issue: #112

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 12:52:24 +03:00
Ruben Ayrapetyan bc7c28ce12 Changing ecma_new_ecma_string_from_number to check if the string to create is equal to a magic string, and, if so, to invoke corresponding magic string construction.
Related issue: #113

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 12:31:33 +03:00
Ruben Ayrapetyan 77df022468 Adding jerry-test-suite tests on Arguments object to precommit testing and removing them from unsupported list.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan d4537eb0d1 Instantiation of Arguments object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan ed4ff8e5bb Introducing a function object's flag indicating whether Arguments object should be instantiated upon call of the function.
The Arguments object is supposed to be unnecessary if function's code:
  - doesn't reference 'arguments' identifier;
  - doesn't reference 'eval' identifier (so, it doesn't perform direct call to eval).

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan b1a31c8144 Adding scope's code flags indicating whether the scope's code reference 'arguments' and 'eval' identifiers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan cb600da269 Introducing 'scope flags' opcode containing set of flags that indicate various properties of a scope; replacing 'strict mode' meta opcode with a flag in the flags set.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan e984bc30ea Fix of 'strict mode' meta type handling in opfunc_meta.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan 3a9bf24001 Update of several 'vm' component interfaces naming.
init_int -> vm_init;
 run_int -> vm_run_global;
 run_int_loop -> vm_loop;
 run_int_from_pos -> vm_run_from_pos;
 read_opcode -> vm_get_opcode.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Peter Gal c3f9169eb7 Fix property lookup in Object.getOwnPropertyDescriptor.
The ecma_op_general_object_get_own_property call does not find all
properties, we need to use the ecma_op_object_get_own_property method
for correct property lookup.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-28 15:44:03 +02:00
Dániel Bátyai 3329583435 Implemented Array.prototype.filter()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-28 15:36:28 +02:00
Peter Gal aaeec7fb09 Implement Array.prototoype.toLocaleString()
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-27 15:18:43 +02:00
Szilard Ledan cf70fc2500 Implemented Array.prototype.concat()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-05-27 14:58:57 +02:00
Zsolt Borbély dd94064a8e Implement Array.prototype.splice().
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-05-27 14:27:25 +02:00
Zsolt Borbély b0d4acd026 Implement Object.prototype.propertyIsEnumerable().
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-05-27 12:55:25 +02:00
Peter Gal e5e876cf95 Fix test search in run-test-pass.sh
Using the find program with an argument "*" could lead to problems.
If there are ".js" files in the executing directory then the
shell replaces the asterisk with that filenames.

The fix is simple: quote the argument which has the asterisk.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-27 11:44:28 +02:00
Dániel Bátyai 0ef0b0d595 Implemented Array.prototype.reverse()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-27 11:25:04 +02:00
Dániel Bátyai b049998606 Implemented Array.prototype.every()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-27 11:13:06 +02:00
Tamas Czene 677a0a45d0 Fixed nuttx build with fdlibm
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-05-26 14:03:07 +02:00
Dániel Bátyai d144cbfe90 Implemented Array.prototype.some()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-22 15:03:15 +02:00
Peter Gal b614c0bd9a Implement Array.prototype.join
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-21 16:22:48 +02:00
Dániel Bátyai 36b8fa5452 Implemented Array.prototype.lastIndexOf().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-21 14:39:43 +02:00
Peter Gal c16e065263 Implement Array.prototype.toString
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-20 16:18:47 +02:00
Zsolt Borbély 137c5f3b25 Implemented Array.prototype.slice().
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-05-20 15:46:56 +02:00
Kristof Kosztyo fc309cae92 Implement Object.getOwnPropertyDescriptor function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-05-20 15:05:27 +02:00
Andrey Shitov d6c9c5911e Add logging support for linux.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-05-20 15:28:36 +03:00
Ilyong Cho 0c058747f1 Implemented jerry_api_create_error()
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-05-20 19:59:46 +09:00
Tamas Czene 7dfbc88cc0 Added Math functions
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-05-19 18:09:12 +02:00
Peter Gal 7d703040d0 Implement Object.prototype.isPrototypeOf
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-19 16:02:39 +02:00
Peter Gal eac7372f41 Improve compiler detection for x86_64 target
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-19 15:45:51 +02:00
Peter Gal 7954df3e82 Implement Object.prototype.toLocaleString
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-19 10:31:03 +02:00
Kristof Kosztyo 6b09e53060 Fix implementation of the Object.defineProperties according to the review.
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-05-18 14:05:36 +02:00
Kristof Kosztyo 8058a42e3d Implement Object.defineProperties function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-05-18 14:05:21 +02:00
Dániel Bátyai a750317766 Implemented Array.prototype.forEach().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-18 10:46:22 +02:00
Dániel Bátyai 3c1563a3c0 Implemented Array.prototype.unshift().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-18 10:36:20 +02:00
Dániel Bátyai 1f8772d35f Implemented Array.prototype.shift().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-18 10:20:32 +02:00
Ruben Ayrapetyan ecbc2850ff Support 'make push' for non-master branches.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 20:55:26 +03:00
Ruben Ayrapetyan 5c76b3f558 Fixing ecma_op_from_property_descriptor semantics (type check for input property descriptor was implemented incorrectly).
Related issue: https://github.com/Samsung/jerryscript/issues/70

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 19:18:19 +03:00
Ruben Ayrapetyan 584149112d Recordset dynamic storage.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 18:31:18 +03:00
Dániel Bátyai fd0c943feb Implemented Array.prototype.indexOf().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-15 16:03:57 +02:00
Peter Gal 6c4e988a06 Implement Object.property.hasOwnProperty
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-15 15:43:10 +02:00
Ruben Ayrapetyan b5d8444c2c Introducing chunked lists (list of nodes that exactly fit the heap chunk size).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 14:52:13 +03:00
Ruben Ayrapetyan 82f9afcde9 Speeding up procedure for getting start of a heap block's data space for one-chunked blocks, removing general blocks support from the procedure.
- heap area is aligned on heap chunk size;
 - mem_heap_get_block_start is renamed to mem_heap_get_chunked_block_start,
   now this interface is applicable only to one-chunked blocks,
   and is significantly faster - instead of iterating list of heap blocks
   to find block header, it just aligns value of pointer to heap chunk size.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 14:45:19 +03:00
Evgeny Gavrin 253e172127 Fix failed build using gcc-4.9.2
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-05-15 11:55:25 +03:00
Ruben Ayrapetyan 99ecdd4a44 Introducing one-chunked heap blocks - special type for heap blocks that are guaranteed to fit into one heap chunk.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-14 21:29:43 +03:00
Andrey Shitov 9763a93df3 Add new coding style rules and fix appeared issues.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-05-14 14:44:57 +03:00
Dániel Bátyai ca12c16607 Implemented Array.prototype.pop().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-14 11:11:25 +02:00
Ruben Ayrapetyan 198afd0072 Signed-off-by checker in precommit testing script.
Related issue: #15 (https://github.com/Samsung/jerryscript/issues/15).

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-13 23:22:26 +03:00
Ruben Ayrapetyan 51ddb25344 Adding missing long-term allocation requests to heap unit test.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-13 22:38:51 +03:00
Ruben Ayrapetyan 593b1d793f Removing magic number from mem_block_header_t.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-13 22:21:18 +03:00
Ruben Ayrapetyan c4e7f56562 Introducing MEM_CP_{GET_[NON_NULL_]POINTER, SET_[NON_NULL_]POINTER} getters / setters for compressed pointers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-13 22:05:21 +03:00
SaeHie Park da86a52fe9 Fix object free callback.
- remove jerry_set_object_free_callback()
- change jerry_api_set_object_native_handle() with object_free_callback
- related issue: https://github.com/Samsung/jerryscript/issues/17

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-05-10 17:55:26 +09:00
Ruben Ayrapetyan b8e43286cc Increasing per-test timeout from 5s to 30s in precommit testing.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-09 22:41:20 +03:00
Ruben Ayrapetyan b05d239cf7 Supplementing ECMA_TRY_CATCH with assertion that 'return_value' contains empty completion value prior to execution of ECMA_TRY_CATCH statement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-08 22:34:57 +03:00
Ruben Ayrapetyan 2852d93af6 Fixing toolchain_external.cmake build configuration: generalizing it from Nuttx OS.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-08 21:02:33 +03:00
Ruben Ayrapetyan 290eb2f9b0 Adding support to specify interfaces for external libraries other than libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-08 21:02:31 +03:00
SaeHie Park d0f30f5753 Prerequisites preparation fix for behind firewall.
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-05-08 08:58:11 +09:00
Ilyong Cho 8276255975 Implemented Array.prototype.push()
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-05-07 00:56:32 +09:00
László Langó 7c99170f54 Fix assertion in print method.
ICE: Assertion 'args_number == 1' failed at Jerry/jerry-core/vm/opcodes-native-call.cpp(opfunc_native_call):55.
Error: ERR_FAILED_INTERNAL_ASSERTION

Test case:
  print('a', 'a');

Print all of the arguments separated by space.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-05-06 09:07:10 +02:00
Ruben Ayrapetyan 1f5a4f2690 Adding missing API availability assertion.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-05 17:37:31 +03:00
SaeHie Park 5ec3e2f59a Native callback in embedding jerry when object is to be freed.
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-05-04 19:59:58 +09:00
SaeHie Park 17036c854e new jerry_assert_api_available for APIs that need to disable re-enter jerry_api
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-04-30 22:28:21 +03:00
Andrey Shitov b496e68d27 Fix missing var_decl.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-04-30 20:49:25 +03:00
Ruben Ayrapetyan 9b9e537d35 Printing memory consumption notes in tools/log.sh (make log).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan ee77c4269d Fixing RSS measurement in tools/mem_stats.sh: using mem_stats build for heap usage statistics and non-mem_stats build for RSS measurement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan f3983be337 Fixing heap usage limit condition of starting GC.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan f6b3943ffd Introducing dynamically adjustable heap usage limit, so that GC tries to free heap space, when heap usage reached the limit.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan 9a7a644f50 Removing mem_heap_try_to_resize_block interface.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan 8c4765892f Memory consumption measurement script.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan 9b256b9bc9 Renaming --mem-stats-at-exit option to --mem-stats; adding --mem-stats-separate option for dumping memory statistics and resetting memory usage peak values after parse.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan 9b0125086f Introducing minimal footprint build modifier (mfp).
The modifier disables lookup cache and adds GC invocation after each opcode execution.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan 7d90d8caba Adding configuration option for disabling ECMA lookup cache.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan 4c77cddec3 Adding configuration option to execute GC after each opcode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan a057b77e26 Removing measurements of metrics other than maximum RSS of non-executable areas from tools/rss_measure.sh.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan d14c9f6b85 Making data and stack non-executable.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan d8adf0de2c Splitting --mem-stats option to --mem-stats-at-exit and --mem-stats-per-opcode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan bb258ad1e2 Supporting build with gcc/g++ version 4.7.
Build was tested on arm-linux-gnueabi-gcc/g++ 4.7.3.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan 6d9bea824d Fixing tools/push.sh (removing commented code for adding / removing notes, restoring unintentionally removed variable with message text).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:53:00 +03:00
Ruben Ayrapetyan c2ec0414db Fixing tools/push.sh (removing collection of build environment information and commented performance measurement code).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:47:03 +03:00
Ruben Ayrapetyan ef461e383a Fixing scripts and configuration of cppcheck and vera++, adding some vera++ rules.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 15:16:35 +03:00
Ruben Ayrapetyan 1669c3ed3d Fixing STM32 and Nuttx build.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 15:16:35 +03:00
Ruben Ayrapetyan 5e3c9b59ef Adding script for automatic download of prerequisites.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 15:16:31 +03:00
Ruben Ayrapetyan b867822908 Fixing tools/generator.sh: escaping '"' character.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-29 20:38:44 +03:00
Ruben Ayrapetyan 19aea7a502 Fixing bash scripts: moving '#!/bin/bash' to top.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-29 20:36:41 +03:00
Seo-Young Isabelle Hwang 09073afb3a Update README.md 2015-04-27 19:01:35 +09:00
Seo-Young Isabelle Hwang ee183851a2 Update README.md 2015-04-27 19:01:22 +09:00
Seo-Young Isabelle Hwang 12ac86dc0c Create README.md 2015-04-27 19:00:53 +09:00
Ruben Ayrapetyan cde7805356 Interface jerry_api_eval for performing eval operation. 2015-04-18 21:48:57 +03:00
Ruben Ayrapetyan 3899fe9096 Stub for eval operation with partial implementation. 2015-04-18 21:48:54 +03:00
Ruben Ayrapetyan b451cb3312 Introducing vm_get_this_binding and vm_get_lex_env interfaces for retrieving information about current execution context. 2015-04-18 21:46:13 +03:00
Ruben Ayrapetyan 175f8912b2 Passing ecma_value_t by value instead of by reference. 2015-04-18 21:46:13 +03:00
Ruben Ayrapetyan b81e535e1c Providing interface for getting reference to Global lexical environment. 2015-04-18 21:46:13 +03:00
Andrey Shitov 0c7d358157 Fix invalid processing of keyword literals. 2015-04-14 14:28:39 +03:00
Ruben Ayrapetyan 3218a87a7f Replacing 'uname -p' with 'uname -m' in Makefile. 2015-04-13 20:38:02 +03:00
Ruben Ayrapetyan 259e871681 Fix of uninitialized value warning in ecma_builtin_jerry_dispatch_routine (converting switch-case to if chain). 2015-04-13 16:20:48 +03:00
Ruben Ayrapetyan 8ee3ee5e4c Fix of exit completion value handling in ECMA_TRY_CATCH. 2015-04-10 11:36:01 +03:00
Ruben Ayrapetyan 9262a08835 Printing names of branches in 'make log'. 2015-04-10 11:35:36 +03:00
Ruben Ayrapetyan 810e3c7ae8 Implementation of Function.prototype.call. 2015-04-10 10:24:27 +03:00
Ruben Ayrapetyan 18079fb4d3 Implementing API for invocation of a function object as a constructor. 2015-04-10 09:55:04 +03:00
Ruben Ayrapetyan 36424c0fd2 Removing contexts arguments from Jerry API; introducing jerry_push_ctx and jerry_pop_ctx interfaces; putting context-related API part under #ifdef CONFIG_JERRY_ENABLE_CONTEXTS (supposed to be implemented later, when becomes necessary). 2015-04-08 15:37:23 +03:00
Andrey Shitov 7c67606b00 Parser refactoring. Remove deserializer notion. 2015-04-07 13:05:19 +03:00
Ruben Ayrapetyan 469ef4e622 Implementing API for associating native handle (uintptr_t) values with JS objects. 2015-04-07 13:01:01 +03:00
Ruben Ayrapetyan fc2dbf3b0b Introducing mem_heap_get_block_start routine for determining beginning of data space in a heap-allocated block. 2015-04-07 12:58:15 +03:00
Ruben Ayrapetyan 6594a7359b Supporting return values in functions of plugins. 2015-04-07 12:42:55 +03:00
Ruben Ayrapetyan c350a2bade Fixing jerry_api_set_object_field_value and jerry_api_call_function descriptions. 2015-04-06 16:27:47 +03:00
Saehie Park 1fbbcbd64f to make compiler happy with 'its scope is only this definition or declaration' 2015-04-06 20:21:07 +09:00
Ruben Ayrapetyan 4dbc6a9d1a Implementing [[Construct]] for external function objects. 2015-04-06 12:31:29 +03:00
Ilyong Cho 72d8c38d77 Reimplementation of jerry_api_is_funciton and jerry_api_is_constructor 2015-04-06 11:41:22 +03:00
Ruben Ayrapetyan 8e4bcca568 Jerry API for creating external function objects bound to native code. 2015-04-03 23:42:49 +03:00
Ruben Ayrapetyan 83730cd6bb Implementing dispatcher for calling native handlers associated with external function objects; implementing interface for unified storage of native pointers in ecma objects. 2015-04-03 23:38:52 +03:00
Ruben Ayrapetyan 5611c16117 Fixing assertion in jrt_set_bit_field_value. 2015-04-03 23:14:23 +03:00
Ilyong Cho 23ade8f4ff wip: Implementing external function api 2015-04-03 18:11:21 +09:00
Ilyong Cho 7b5764c445 Storing global envorinment on global object's SCOPE internal property 2015-04-03 16:11:03 +09:00
Ruben Ayrapetyan c81651dbe9 Introducing mem_cpointer_t type for compressed pointers. 2015-04-02 16:56:36 +03:00
Ruben Ayrapetyan 3da56908aa Fixing ecma_builtin_jerry_dispatch_routine: returning 'undefined' instead of 'empty' completion value. 2015-04-02 16:27:16 +03:00
Ruben Ayrapetyan a32b149a1a Fixing handling of 'undefined' value in jerry_api_convert_ecma_value_to_api_value. 2015-04-02 15:52:25 +03:00
Ruben Ayrapetyan 28f6741358 Jerry API development.
Details:
  - support of this binding in function calls;
  - jerry_api_is_function and jerry_api_is_constructor interfaces.
2015-04-02 13:18:59 +03:00
e.gavrin 9886c163cc Fix extension API issue with <=gcc4.8 2015-04-02 11:00:54 +03:00
Ruben Ayrapetyan bfb23ee967 Changing tools/runners/run-test-suite-test262.sh to produce combined report and output ok / fail statistics. 2015-04-01 18:12:15 +03:00
Ruben Ayrapetyan 9ef65ef45a Fixing missing initializer warning for unused fields in extension declarations. 2015-04-01 17:27:49 +03:00
Ruben Ayrapetyan 90f017d000 Adding --graph and --branches options to git log invocation in tools/log.sh ('make log'). 2015-04-01 13:45:29 +03:00
Ruben Ayrapetyan eb3686a49d Adding jerry_api_is_constructor interface that check if specified object is a function object that implement [[Construct]] method; changing jerry_api_is_function to recognize bound and built-in functions; optimizing jerry_api_call_function. 2015-04-01 12:39:29 +03:00
Andrey Shitov e459ab7d64 Optimize parser memory consumption. Remove 'prev' and 'block_size' fields form the linked list structure. Remove 'magic' field from structures used in parser. 2015-04-01 11:48:23 +03:00
Ilyong Cho 3c2009d331 Adding Jerry api for calling function with specific this binding. 2015-04-01 11:06:20 +09:00
Ruben Ayrapetyan ef2265ee41 Jerry API implementation. 2015-03-31 13:56:59 +03:00
Ruben Ayrapetyan 33cfaa73b3 Implementation of unimplemented Jerry API parts; adding Jerry API unit test based on test prepared by Ilyong. 2015-03-30 20:54:55 +03:00
Ruben Ayrapetyan eb7dce272a Update of --mem-stats flag fix: leaving MEM_STATS definition only in jerry-core. 2015-03-30 20:00:55 +03:00
Andrey Shitov ac7edde72e Fixed --mem-stats flag. 2015-03-30 11:31:09 +03:00
Ilyong Cho cf5e158510 Implement some Jerry API / jerry_api_call_function() and jerry_api_get_object_field_value() 2015-03-30 16:04:49 +09:00
Ruben Ayrapetyan 9746b2fd76 Jerry API for calling functions C -> Jerry, creating objects, reading / writing object's properties (currently, only interface declaration, without implementation). 2015-03-27 18:05:27 +03:00
Ruben Ayrapetyan 80d9328c1f Providing option for disabling LTO build mode. 2015-03-27 14:19:33 +03:00
Ruben Ayrapetyan 34cf1b8e8f Fixing Jerry interface declaration: making routines to be exported in C-linkage mode (i.e., adding 'extern "C"'). 2015-03-27 12:05:08 +03:00
Ruben Ayrapetyan 3d2374acd5 Check that the only .gitignore file in repository is the ./.gitignore during precommit testing. 2015-03-26 21:43:23 +03:00
Ruben Ayrapetyan 4cf575c40c Adding missing Nuttx headers, removing .gitignore files from ./third-party/nuttx, fixing default Nuttx include path in Makefile. 2015-03-26 21:36:55 +03:00
Ruben Ayrapetyan 9bcf734bd1 Adding build directory targets to .PHONY list in Makefile. 2015-03-26 17:46:42 +03:00
Ruben Ayrapetyan cf1960dbbd Support for 32-bit Linux in Jerry's libc. 2015-03-26 15:53:28 +03:00
Ruben Ayrapetyan 6b0b669c14 Support passing of string and object arguments to plugins' bound functions. 2015-03-25 18:35:37 +03:00
Ruben Ayrapetyan c8f78c5d28 Nuttx build support. 2015-03-23 12:10:27 +03:00
Ruben Ayrapetyan 5e125187e5 Introducing jerry-libc's interface include directory. 2015-03-19 20:55:00 +03:00
Ruben Ayrapetyan 1ec7ffcbab Turning on flto for all builds to produce target-independent core library. 2015-03-19 19:08:16 +03:00
Ruben Ayrapetyan d83d8e0b36 Removing build of multiple identical jerry-libc and plugins libraries copies. Fixing parallel build / precommit invocation without using the workaround. 2015-03-19 19:06:02 +03:00
Ruben Ayrapetyan 79695bf3cd Extension description syntax; extension instantiation, field values and calls with arguments (except strings); example of a simple extension.
String arguments support is supposed to be added in a subsequent commit.
2015-02-25 16:51:21 +03:00
Ruben Ayrapetyan 3d9635300b Moving ecma initialization/finalization from run_int to jerry_init/jerry_cleanup. 2015-02-24 15:12:47 +03:00
Ruben Ayrapetyan c12ec35b2d Extension API: description of structures used for describing extension object; jerry_extend_with - stub for extension interface routine. 2015-02-20 20:37:07 +03:00
Ruben Ayrapetyan d4af5702a4 Increasing heap size to 256K. 2015-02-19 17:51:24 +03:00
Ruben Ayrapetyan 4e93ef421d Support of ecma-value with compressed pointer of more than 14-bit size. 2015-02-19 17:44:51 +03:00
Ruben Ayrapetyan d0c62bb507 Storing named accessor property's pointer to getter and setter objects in separate pool chunk. 2015-02-19 17:26:10 +03:00
Ruben Ayrapetyan bb18970151 Changing GC mark phase to be non-recursive. It is noticeably slower on some test cases, but doesn't cause stack overflow. 2015-02-19 14:34:34 +03:00
Ruben Ayrapetyan a751ab4f9d Changing garbage collector to non-generational. 2015-02-18 20:22:38 +03:00
Ruben Ayrapetyan d1f6760f01 Accessing getter and setter fields of named data accessor property descriptor through ecma_{get,set}_named_accessor_property_{getter,setter}. 2015-02-18 17:38:46 +03:00
Ruben Ayrapetyan 8b38cd036b Enabling vera++ run during precommit testing. 2015-02-17 19:56:41 +03:00
Ruben Ayrapetyan ef004ef843 Revert "Enabling vera++ run during precommit testing."
This reverts commit 4c71200344dbebff7df2d9497ebdc7e02bd87eab.
2015-02-17 19:56:07 +03:00
Ruben Ayrapetyan 6379d8f4ad Enabling vera++ run during precommit testing. 2015-02-17 19:49:53 +03:00
Ruben Ayrapetyan f42faabe89 Fixing style according to rules defined in vera++ scripts. 2015-02-17 19:47:00 +03:00
Ruben Ayrapetyan 88353e93cf Renaming core -> jerry-core. 2015-02-17 19:08:55 +03:00
Ruben Ayrapetyan b6d018d019 Enable cppcheck run during precommit testing 2015-02-17 18:43:54 +03:00
Ruben Ayrapetyan a4155f7be8 Fixing cppcheck warnings. 2015-02-17 18:43:48 +03:00
Ruben Ayrapetyan 92a9d6db45 Moving precommit testing scripts from Makefile[.mk] to tools/runners/run-precommit-check-for-target.sh and tools/precommit.sh; deleting Makefile.mk. 2015-02-17 15:28:13 +03:00
Ruben Ayrapetyan 51088ff2cb Enable LTO for unit tests. 2015-02-16 19:35:15 +03:00
Ruben Ayrapetyan 03c81e96e9 Turning on unit tests build and run during precommit. 2015-02-16 19:35:15 +03:00
e.gavrin d50cff78ac Rename jrt_types.h to jrt-types.h 2015-02-16 19:32:55 +03:00
Ruben Ayrapetyan 86a5cc63c6 Turn off print of script source in release build (in --show-opcodes mode). 2015-02-16 14:55:04 +03:00
Ruben Ayrapetyan 2667281745 Adding VALGRIND={ON,OFF} make option. 2015-02-16 14:02:32 +03:00
e.gavrin 26288b6b1b Rename main_* to main-* 2015-02-13 22:33:30 +03:00
Ruben Ayrapetyan 8dc4950590 Renaming src directory to core; moving main modules to top-level directory. 2015-02-13 22:19:05 +03:00
Ruben Ayrapetyan b3cfd40478 Fix parse of "-v" option. 2015-02-13 22:12:07 +03:00
Ruben Ayrapetyan 32dc41e795 Remove stripping of debug binaries. 2015-02-13 22:11:38 +03:00
Ruben Ayrapetyan 43ea53b1d7 Jerry is now split to several components: core, libc, plugins.
The components are build independently and then are linked with main module corresponding to target platform.
Core is supposed to be platform-independent, while libc and plugins are dependent on specific architecture / platform.

The commit disables unit tests building and running during precommit.
That is supposed to be fixed in a subsequent commit.

Also, the commit disables building and running valgrind targets during precommit.
Build is supposed to be turned on by an option that should be introduced later.
Valgrind-checked runs are supposed to be performed in asynchronous mode.
2015-02-13 21:54:27 +03:00
Ruben Ayrapetyan 62a3ac93d9 Fix invocation of memcpy in add_current_token_to_string_cache (NULL pointer shouldn't be passed to memcpy). 2015-02-13 16:38:59 +03:00
Ruben Ayrapetyan 3755db04d2 Remove references to __TARGET_* defines from Jerry core. 2015-02-12 20:16:35 +03:00
Ruben Ayrapetyan 7e4c16e4e6 Rename Jerry's libc functions: __function_name -> function_name. 2015-02-12 20:15:56 +03:00
Ruben Ayrapetyan af77eac8e4 Move Jerry's libc to jerry-libc directory. 2015-02-11 21:33:45 +03:00
Ruben Ayrapetyan 6dfade808f Fix search of libc and libgcc in CMakeLists.txt 2015-02-11 21:27:03 +03:00
Ruben Ayrapetyan 17f51e0ba6 Refinement of completion status codes and fatal error handlers. 2015-02-11 20:53:14 +03:00
Ruben Ayrapetyan 398501afeb Remove CONFIG_ECMA_EXCEPTION_SUPPORT configuration flag. 2015-02-11 18:57:03 +03:00
Ruben Ayrapetyan 35fa39ceb8 Initial version of Embedded API. 2015-02-11 17:47:58 +03:00
Ruben Ayrapetyan ccc0453f34 Splitting main.cpp into jerry.cpp, main_linux.cpp and main_mcu.cpp; leaving __TARGET* defines usage only in jrt and plugins. 2015-02-11 14:10:14 +03:00
e.gavrin 145fba4109 Remove optimizer. Move literal to JS folder. 2015-02-11 12:49:09 +03:00
Ruben Ayrapetyan f3ff78b81b Refinement of tools directory. 2015-02-10 20:21:01 +03:00
Ruben Ayrapetyan d2459398f5 Refinement of build output structure. 2015-02-10 19:34:30 +03:00
Ruben Ayrapetyan 718bbe26f9 Refinement of project structure.
- components renaming and moving:
   - liballocator -> mem;
   - libcoreint -> vm;
   - libecmaobjects -> ecma/base;
   - libecmaoperations -> ecma/operations;
   - libecmabuiltins -> ecma/builtins;
   - libjsparser -> parser/js;
   - libintstructs -> parser/collections;
   - liboptimizer -> parser/js;
   - libperipherals -> ../plugins/lib_device_stm;
   - libruntime -> jrt;
 - generated.h now is created as intermediate during build;
 - benchmarks -> tests/benchmarks;
 - docs -> documentation;
 - demo-applications removed (loop_demo.js -> tests/blinky.js).
2015-02-10 19:00:32 +03:00
Jerry Deferred Test Account (ARM Linux Host) c104a58008 CMake: fixing search of gcc-ar and gcc-ranlib tools, linkage of libgcc; Makefile: replacing path to out with $(OUT_DIR). 2015-02-10 10:53:18 +00:00
Ruben Ayrapetyan b7e374fedc Switching to CMake for build. 2015-02-09 20:56:01 +03:00
Ruben Ayrapetyan fa6402334f Renaming sources *.c -> *.cpp. 2015-02-09 18:21:44 +03:00
Ruben Ayrapetyan ba348831ca Reverting changes related to on-stack GC-root introduction (except of passing ecma_value_t by const reference).
This reverts commits:
     31e1405f39d72f8b885e92256b0dc29ecab1a99,
     7cb43840b59c539d9b043990ed658ae15a9defc3,
     1ab57a4493689806035a9853b0030cc6fea65590,
     c24b511ca60587e0db12d46a7e7567c86c3649bc,
     b2caf3e8b31b4b6b16499108ee3aabdcb94f0717,
     44f9c307fb6204bfd2181b19a9d94cabddf04de9.
2015-02-09 17:43:29 +03:00
Ruben Ayrapetyan 35aa8238c2 Updating 'may reference younger object' in ecma_create_ for outer lexical environment / prototype objects; setting provideThis to false for declarative lexical environments.
Although provideThis is not used for declarative lexical environments, setting it to false to prevent valgrind's false positive about uninitialized flag value.
2015-02-09 17:41:25 +03:00
Ruben Ayrapetyan 5a2d6f4308 Replacing JERRY_NVALGRIND with the opposite JERRY_VALGRIND. 2015-02-05 17:58:55 +03:00
Ruben Ayrapetyan fb6e205d0d Moving to replacement of on-stack ecma_object_t* with managed ecma_object_ptr_t. 2015-02-04 18:14:04 +03:00
Ruben Ayrapetyan e3f081ee84 Forbidding implicit template instantiation. 2015-02-04 17:33:24 +03:00
Ruben Ayrapetyan d627307010 Adding valgrind memory annotations for pool allocator. 2015-02-04 17:32:39 +03:00
Ruben Ayrapetyan be4567860c Turning on Wmissing-declaration warnings. 2015-02-04 15:31:43 +03:00
Ruben Ayrapetyan 34bff56d8a Removing pre-initialization of object container with zero. 2015-02-04 15:13:22 +03:00
Ruben Ayrapetyan c12659ba51 Introducing managed pointer class ecma_pointer_t, using it to store pointer in ecma_value_t. 2015-02-03 18:25:38 +03:00
Ruben Ayrapetyan 9cdc50c3ec Disabling Wattributes warnings (because always_inline is considered incorrect without inline specifier even in LTO mode); removing used attribute from always_inline functions; removing inline specifier from ecma_lcache_lookup and ecma_stack_top_value. 2015-02-03 18:05:17 +03:00
Ruben Ayrapetyan 3cb0b0a379 Revert "Introducing managed pointers classes (ecma_generic_ptr_t, ecma_pointer_t<T>); using ecma_generic_ptr_t to store pointer in ecma_value_t."
This reverts commit f88c0d665b4ff7e2add495bc2980adf7a1622f31.
2015-02-03 16:50:21 +03:00
Ruben Ayrapetyan b0e4d2ece1 Introducing managed pointers classes (ecma_generic_ptr_t, ecma_pointer_t<T>); using ecma_generic_ptr_t to store pointer in ecma_value_t. 2015-02-03 15:11:44 +03:00
Ruben Ayrapetyan 55caaf7a88 Storing values in ecma_value_t in unpacked form (type + simple value / pointer to the heap). 2015-02-03 14:52:37 +03:00
Ruben Ayrapetyan f37a5085f6 Converting ecma_completion_value_t to class derived from ecma_value_t with additional field with for completion type and related operations.
Completion value are now returned through ecma_completion_value_t &ret_value argument.
2015-01-30 23:16:45 +03:00
Ruben Ayrapetyan a1f95048ae Removing label completion values. 2015-01-30 23:00:42 +03:00
Ruben Ayrapetyan 00afd4e0e2 Converting ecma_value_t to class that is used for on-stack storage of ecma-values.
Original ecma_value_t is renamed to ecma_value_packed_t and is used for on-heap storage.
Copy and move constructors, move assignment operator of ecma_value_t are not created.
New ecma-value return convention is introduced: ecma-values are now returned through ecma_value_t &ret_val argument.
2015-01-30 22:53:06 +03:00
Ruben Ayrapetyan 4cd7f96acc Suppressing 'member variable is not assigned in operator =' cppcheck warning, because of false positives. 2015-01-29 14:40:31 +03:00
Ruben Ayrapetyan 94cb1c0e67 Changing jerry_ref_unused_variables signature to take values by const reference. 2015-01-28 19:58:20 +03:00
Ruben Ayrapetyan 8b31156b5a Forbidding use of rbp for register allocation on x86-64 platform.
It is necessary because of bug in gcc / g++:
 Pointers allocated on rbp can be (are?) supposed to be aligned indepedently of what they actually contain.

Turning off allocation on rbp is not critical for now, because, currently, x86-64 is just development platform.
2015-01-28 17:43:04 +03:00
Ruben Ayrapetyan 0f487a0bb7 Returning ecma_value_t instead of ecma_completion_value_t from ECMA_TRY_CATCH for case when completion value is normal. 2015-01-27 22:07:26 +03:00
Ruben Ayrapetyan f231b9a0d2 Moving ecma_reference_t declaration to ecma-reference.h. 2015-01-27 17:18:53 +03:00
Ruben Ayrapetyan d1925ab882 Using static_cast instead of C-style cast in MEM_DEFINE_LOCAL_ARRAY. 2015-01-27 15:40:46 +03:00
Ruben Ayrapetyan 57f645c18c Passing ecma_value_t arguments by const reference instead of by value. 2015-01-23 20:22:21 +03:00
Ruben Ayrapetyan 11e37ad7f3 Switching cppcheck to c++11-compatible mode. 2015-01-22 18:07:56 +03:00
Ruben Ayrapetyan 005b5370fc Switching to g++ and corresponding changes according to C++ requirements. 2015-01-16 17:27:02 +03:00
Ruben Ayrapetyan 557df54f9d Registering temporary variables arrays in ecma-stack frames, starting mark traverse from them during GC. 2015-01-15 18:45:37 +03:00
Ruben Ayrapetyan eef966869a Revert "Switching get_variable_value to returning value through ecma-stack (stack convention)."
This reverts commit 6415130925187a877b83b14db40cade0c336ea44.
2015-01-15 17:26:08 +03:00
Ruben Ayrapetyan e570d18936 Switching get_variable_value to returning value through ecma-stack (stack convention). 2015-01-14 20:09:24 +03:00
Ruben Ayrapetyan e70626f92d Removing free of throw completion value in ECMA_TRY_CATCH macro, instead just copying it to the return value variable. 2015-01-14 18:14:28 +03:00
Ruben Ayrapetyan 917ebe4a83 Creating ecma-stack frames in run_int_from_pos. 2015-01-12 20:52:04 +03:00
Ruben Ayrapetyan b843167b91 Introducing ecma-stack structures and routines. 2015-01-12 19:33:04 +03:00
Ruben Ayrapetyan d03b2dafba Upon receiving 'give some memory back' request check if any corresponding callback set instead of asserting that. 2015-01-12 19:07:35 +03:00
Ruben Ayrapetyan f96770a811 Adding '-min' option to tools/perf.sh: the option switches to output of minimum instead of average of performance measurements. 2014-12-19 21:37:26 +03:00
Ruben Ayrapetyan 42c44830ce Removing trailing whitespace from sources. 2014-12-19 14:35:17 +03:00
Ruben Ayrapetyan 6bb39bb8ea Introducing 'try to give memory back' callback for heap allocator to use upon allocation request that can not be satisfied by the allocator. 2014-12-18 22:25:22 +03:00
Ruben Ayrapetyan 8febd2bae8 Increasing heap size from 8K to 16K for MCU targets. 2014-12-18 17:17:08 +03:00
Ruben Ayrapetyan 5539afc60e Adding #pragma GCC optimize "O0" to libperipherals' modules. 2014-12-18 17:16:33 +03:00
Ruben Ayrapetyan 5c4c47514a Fixing new line marks output in tools/generator.sh. 2014-12-18 16:14:31 +03:00
Ruben Ayrapetyan 84294018a3 Replacing dynamically sized on-stack arrays with heap allocated arrays defined through MEM_DEFINE_LOCAL_ARRAY. 2014-12-18 13:56:45 +03:00
Ruben Ayrapetyan 1e0eea3d73 Returning NULL from mem_heap_alloc_block if requested block size is zero. 2014-12-18 13:26:42 +03:00
Ruben Ayrapetyan 9b1fff1d8b Introducing MEM_DEFINE_LOCAL_ARRAY and MEM_FINALIZE_LOCAL_ARRAY to replace on-stack allocation of dynamic sized arrays. 2014-12-17 22:18:32 +03:00
Ruben Ayrapetyan 005fcb008e Changing dynamic sized (syntactically) array to constant-sized array in ecma_op_general_object_default_value. 2014-12-17 22:14:33 +03:00
Ruben Ayrapetyan 14620e30a6 Defining constant limit on magic string length instead of runtime calculation of maximum among magic strings' lengths. 2014-12-17 22:14:04 +03:00
Ruben Ayrapetyan c9b73da82d Changing dynamic sized (syntactically) array to constant-sized array in ecma_gc_run. 2014-12-17 21:29:45 +03:00
Ruben Ayrapetyan 001f262590 Limiting maximum command line arguments by CONFIG_JERRY_MAX_COMMAND_LINE_ARGS configuration option. 2014-12-17 21:29:17 +03:00
Ruben Ayrapetyan dd3271e35d Changing uint8_t* to void* in arguments and return values of mem_heap_alloc_block, mem_heap_free_block and mem_heap_try_resize_block operations. 2014-12-17 21:27:02 +03:00
Ruben Ayrapetyan 8349ad8ecf Inter-commit performance comparison script. 2014-12-17 19:16:16 +03:00
Ruben Ayrapetyan d836dc32af Introducing ECMA_OP_TO_NUMBER_TRY_CATCH and ECMA_OP_TO_NUMBER_FINALIZE macroses.
- the ECMA_OP_TO_NUMBER_TRY_CATCH macro gets number from given value,
    converting the value to number if it's type is different,
    and catching possible conversion exceptions;

  - using the macroses instead of ecma_op_to_number to reduce allocator invocations
    in several routines with arguments that are likely to be numbers.
2014-12-15 23:08:34 +03:00
Ruben Ayrapetyan 386a530d4d Upon assignment of a number to a register variable reusing the variable's space if it already contains a number. 2014-12-15 23:08:34 +03:00
Ruben Ayrapetyan eb80e817d8 Removing trailing whitespace in src/libcoreint/opcodes.c. 2014-12-15 23:08:34 +03:00
Ilmir Usmanov 7e7bdc2aac Rework literal indexes hash table to simple array in order to improve performance 2014-12-15 22:56:22 +03:00
Ilmir Usmanov 864bd3de06 Fix comment. 2014-12-15 22:47:41 +03:00
Ilmir Usmanov ddac13f944 Fix parsing of empty file 2014-12-15 17:10:04 +03:00
Ilmir Usmanov c1ebb8db50 Fix expression statement parsing in case of statement starts with keyword 2014-12-12 16:36:18 +03:00
Ilmir Usmanov 6aee69d6df Fix native_call opcode dumping 2014-12-12 16:34:59 +03:00
Ilmir Usmanov 4b7871bdde Fix 'op=' assignment bytecode dumping in case of arrays 2014-12-10 19:20:33 +03:00
Ilmir Usmanov dc8ab27900 Split parser into parser itself, opcodes dumper and syntax errors checker.
Add internal hash map of literal indexes:
  In this hash map key is pair of block number and literal's unique identifier in the block, and the value is a literal index that unique in the whole program.
  Block is a continues array of opcodes. So, bytecode is splitted into blocks.
  Each block has its own uid counter. To get literal index the interpreter looks up it in the hash map.
  Thus, now JS program is able to have more than 255 identifiers/string literals.
  The first 128 (0-127) uids are reserved for block's uid counter, the other 128 (128-255) are reserved for tmp variables.
2014-12-10 18:31:59 +03:00
Ilmir Usmanov fc9e83d290 Remove obsolete unit tests. 2014-12-10 18:29:43 +03:00
Ilmir Usmanov a251bf5d6f Add array list structure.
Change hash table to use array lists instead of linked lists.
2014-12-10 18:27:36 +03:00
Ruben Ayrapetyan 2c86712e21 Introducing number chunk for storage of temporary (stack-only) number operands. 2014-12-09 18:24:16 +03:00
Ruben Ayrapetyan 1182f7bbfe Removing JERRY_UNREACHABLE from lexical environment related routines. 2014-12-05 13:25:41 +03:00
Ruben Ayrapetyan 5bb90fb8ca Initializing object / lexical environment descriptors with zeroes before field initialization. 2014-12-05 13:24:39 +03:00
Ruben Ayrapetyan ee7ac6602b Fixing insertion to lookup cache: removing possibility of invalidation of entry during it's initialization, skipping empty entries during search for entry containing specified property. 2014-12-04 17:03:14 +03:00
Ruben Ayrapetyan 2b9b729c37 Invoking jerry_exit (ERR_OUT_OF_MEMORY) instead of JERRY_UNREACHABLE in in ecma_alloc_*. 2014-12-04 15:10:39 +03:00
Ruben Ayrapetyan f7f0681698 Invoking tools/perf.sh in tools/run_benchmarks.sh. 2014-12-04 12:52:55 +03:00
Ruben Ayrapetyan 3b1c6b5c37 Fixing an issue in garbage collection module: correctly updating 'may reference younger objects' flag. 2014-12-04 12:38:06 +03:00
Ruben Ayrapetyan d2f6b36cf7 Implementing Math.sin and Math.cos built-in routines. 2014-12-04 11:39:23 +03:00
Ruben Ayrapetyan 557a4b6460 Removing ecma_op_object_has_property and ecma_op_general_object_has_property routines. 2014-12-03 22:48:37 +03:00
Ruben Ayrapetyan 90fccc04ba Passing property descriptors by const ref instead of by value. 2014-12-03 21:57:11 +03:00
Ruben Ayrapetyan b7daa16b99 Implementing number comparisons through simple comparison operators, checking under !JERRY_NDEBUG that behaviour is equivalent to ECMA-defined comparisons. 2014-12-03 20:22:29 +03:00
Ruben Ayrapetyan 8998860c7b Extract non-inlineable long path from ecma_op_object_get_own_property. 2014-12-03 19:25:16 +03:00
Ruben Ayrapetyan 98a11c13d5 Padding ecma_lcache_entry_t to 8 bytes size. 2014-12-03 19:25:01 +03:00
Ruben Ayrapetyan e955d8f742 Assigning numbers to named data properties' values without reallocating pool chunk if the value already contains a number. 2014-12-03 16:03:13 +03:00
Ruben Ayrapetyan 3190089818 Introducing getter and setter for named data property's value field, ecma_named_data_property_assign_value interface; using boolean flags for 'Writable', 'Enumerable' and 'Configurable' attributes values while passing them in routine arguments. 2014-12-03 15:45:58 +03:00
Ruben Ayrapetyan 668eef73c8 Implementing system call sequences in plain assembler routines; removing -fomit-frame-pointer for non-optimized builds. 2014-12-02 15:42:09 +03:00
Ruben Ayrapetyan ef012d9cd4 Adding lcache lookup and insert to ecma_find_named_property; removing lcache insert from ecma_op_object_get_own_property. 2014-11-28 21:27:52 +03:00
Ruben Ayrapetyan 3b29280b79 Using hash value stored in ecma-string for lcache search; comparing string faster but with possible false negatives while performing lcache lookup. 2014-11-28 21:27:48 +03:00
Ruben Ayrapetyan fe7e34d93e Adding ecma-string's hash to ecma_string_t. 2014-11-28 21:12:44 +03:00
Ruben Ayrapetyan 6c65c48772 Removing 'length' field from ecma-string descriptor (calculating length upon request). 2014-11-28 16:26:22 +03:00
Ruben Ayrapetyan 7b75dcf0c9 Removing assertion checks with possible side effects. 2014-11-27 21:04:14 +03:00
Ruben Ayrapetyan f6e7621d3f Adding __always_inline attribute to some value handling helpers. 2014-11-27 19:40:14 +03:00
Ruben Ayrapetyan 1f3d96cffa Representing ecma_completion_value_t as integer instead of structure with bit-fields, adding corresponding field accessors; adding __attribute_const__ to some value handling helpers. 2014-11-27 18:20:12 +03:00
Ruben Ayrapetyan 0d870a1e74 Representing ecma_value_t as integer instead of structure with bit-fields, adding corresponding field accessors. 2014-11-27 17:34:03 +03:00
Ruben Ayrapetyan 815309c7e9 Introducing ecma_get_[type]_from_value, ecma_get_[type]_from_completion_value and ecma_get_completion_value_value interfaces. 2014-11-27 14:19:53 +03:00
Ruben Ayrapetyan 22e1941050 Moving pools that received request on allocation / free to beginning of pools' list; extracting long path from mem_pools_alloc. 2014-11-26 20:22:44 +03:00
Ruben Ayrapetyan c21e186f2c Static definition of pool's area size and number of chunks in a pool; alignment of mem_block_header_t and mem_pool_state_t to MEM_ALIGNMENT. 2014-11-26 19:23:26 +03:00
Ruben Ayrapetyan 9a0081b856 Splitting free block from end if block search direction is backward (currently, for short-term blocks). 2014-11-24 18:52:47 +03:00
Ruben Ayrapetyan 5b8077b976 Storing provideThis flag and pointer to binding object immediately in descriptor of object-bound lexical environment. 2014-11-21 20:37:04 +03:00
Ruben Ayrapetyan 958126f5c8 Adding debug assertion about incoming state of formal parameters collection to ecma_create_arguments_object. 2014-11-21 17:08:40 +03:00
Ruben Ayrapetyan 103e1b1c8a Running cppcheck only for sources affected by local changes. 2014-11-21 16:28:52 +03:00
Ruben Ayrapetyan 036521627e Introducing "on-stack" ecma-string descriptors and using them in get_variable_value / set_variable_value. 2014-11-21 13:06:30 +03:00
Ruben Ayrapetyan 14ab1b3355 Removing construction of ecma_reference_t in get_variable_value and set_variable_value. 2014-11-20 22:09:14 +03:00
Ruben Ayrapetyan f5ffae0fec Removing runtime checks for reading / writing 'arguments' variable in CompactProfile mode (the checks should be performed during parsing). 2014-11-20 18:24:31 +03:00
Ruben Ayrapetyan d7764dfc6e Implementation of ecma_make_simple_value and ecma_make_completion_value through bitwise operations (instead of through bit-fields). 2014-11-20 15:34:46 +03:00
Ruben Ayrapetyan 76aab95aac Implementation of ecma_is_value_* for simple values through comparison with integer constants (instead of bit-fields). 2014-11-20 15:33:27 +03:00
Ruben Ayrapetyan 6dd357a554 Using ecma_is_value_* instead of switches for determining of ecma-value's type. 2014-11-20 15:33:04 +03:00
Ruben Ayrapetyan 7b3eaf146b Introducing ecma_is_value_{number,string,object} for checking type of ecma-value. 2014-11-20 14:21:33 +03:00
Ruben Ayrapetyan 30ff59fca3 Reverting c2933d9e44eb5346161964c7c52f1ca793c4c7b4 changes of ecma_number_{is,make}_infinity routines. 2014-11-19 17:55:15 +03:00
Ruben Ayrapetyan 27827e607c Reducing cases in which full static source analysis is performed.
- starting vera++ only on changed sources;
 - starting cppcheck only on changed sources, if no header file was changed,
   and on all sources, if at least one header file was changed.
2014-11-19 16:54:52 +03:00
Ruben Ayrapetyan 24c9b12ce5 Compacting some ecma_number_* helpers, allowing NaN in argument of ecma_number_negate, using ecma_number_negate instead of immediate unary minus in ecma_number_substract. 2014-11-19 16:11:05 +03:00
Ruben Ayrapetyan 9f7e17e9fd Removing musl libc usage. Linking to libgcc (for __aeabi_* routines on ARM target). 2014-11-18 21:17:31 +03:00
Ruben Ayrapetyan 988288c9e4 Fixing _start routine for ARM Linux targets (non-musl builds). 2014-11-18 20:12:25 +03:00
Ruben Ayrapetyan fb6bdd151a Moving part of ecma_compare_ecma_strings to ecma_compare_ecma_strings_longpath. 2014-11-18 17:28:03 +03:00
Ruben Ayrapetyan e7f96336f8 Fixing ecma_lcache_init. 2014-11-17 21:26:36 +03:00
Ruben Ayrapetyan fd155d4699 Fixing calculation of ecma-string's hash in ecma_string_try_hash. 2014-11-17 20:19:38 +03:00
Ruben Ayrapetyan 76ed780895 Introducing cache for property by name lookup (LCache). 2014-11-17 18:52:48 +03:00
Ruben Ayrapetyan 8a6eae0ca5 Reordering comparisons in ecma_compare_ecma_strings to improve performance for frequent cases. 2014-11-17 18:52:38 +03:00
Ruben Ayrapetyan 34430f0831 Passing object to named property free routines.
Adding argument, pointing to object that contains the property to be freed, to ecma_free_property, ecma_free_named_data_property and ecma_free_named_accessor_property.
Also, adding static qualifier to ecma_free_named_data_property, ecma_free_named_accessor_property and ecma_free_internal_property.
2014-11-17 17:06:06 +03:00
Ruben Ayrapetyan 7bb6c6bc84 Removing debug_release.* build targets. 2014-11-17 13:52:22 +03:00
Ruben Ayrapetyan 44eca8e207 Fixing JERRY_ASSERT macro for JERRY_NDEBUG build mode.
The macro under !JERRY_NDEBUG was evaluting it's argument and called jerry_assert_fail
if the argument was evaluated to false. Under JERRY_NDEBUG the macro still
was evaluating it's argument but jerry_assert_fail wasn't called anyway.

Now macro doesn't evaluate it's argument under JERRY_NDEBUG build.
2014-11-17 12:52:43 +03:00
Ruben Ayrapetyan 857e66fb98 Revert "Calling routine for instantiating built-ins' properties only if property name is a magic string."
Reverting commit 1dd7d626967110c3a0f14c40479bc054baf04b3f because of performance degradation on ARM Linux.

The degradation requires further investigation.
2014-11-14 18:04:45 +03:00
Ruben Ayrapetyan 82fe067fc9 Calling routine for instantiating built-ins' properties only if property name is a magic string. 2014-11-14 14:40:36 +03:00
Ruben Ayrapetyan dd1e9ca3e4 Improving performance of ecma_is_string_magic. 2014-11-14 14:40:30 +03:00
Ruben Ayrapetyan 2e94dc1341 Fixing an issue introduced in commit 4b3385fb920a60c9d7db66f9798355430ca4036a (restoring a check for NULL pointer). 2014-11-13 20:57:11 +03:00
Ruben Ayrapetyan 477a694622 Introducing ECMA_GET_NON_NULL_POINTER macro that is ECMA_GET_POINTER without NULL pointer check.
Replacing invocations of ECMA_GET_POINTER passing non-NULL argument with introduced ECMA_GET_NON_NULL_POINTER.
2014-11-13 19:09:13 +03:00
Ruben Ayrapetyan 0e10e97120 Returning bool value instead of simple boolean completion value from ecma_op_has_binding. 2014-11-13 18:08:23 +03:00
Ruben Ayrapetyan 1fae7645af Splitting ecma_op_get_value and ecma_op_put_value.
Splitting each of ecma_op_get_value and ecma_op_put_value to two routines:
 - for lexical environment or undefined bases (lex_env_base suffix);
 - for object bases (object_base suffix).
2014-11-13 15:45:47 +03:00
Ruben Ayrapetyan 11f0cf9a2d Performing do_strict_eval_or_arguments_check check only under !JERRY_NDEBUG. 2014-11-13 14:28:45 +03:00
Ruben Ayrapetyan 83c8007437 Compacting ecma_reference_t. 2014-11-12 21:35:21 +03:00
Ruben Ayrapetyan 44ade941b1 Showing STM32F4 binary size notes in tools/log.sh. 2014-11-12 20:42:20 +03:00
Ruben Ayrapetyan c5cc82d793 Adding mem_stats build modifier. 2014-11-12 15:46:15 +03:00
Ruben Ayrapetyan 804af937d8 Fixing !MEM_STATS build. 2014-11-12 15:41:13 +03:00
Ruben Ayrapetyan d93a4ec36c Replacing switches with pointer tables in some ecma_op_object_* routines. 2014-11-12 15:17:20 +03:00
Ruben Ayrapetyan afe242e7a3 Adding __attribute_pure__ and __attribute_const__ to some routines that operate on bit-fields. 2014-11-11 19:25:49 +03:00
Ruben Ayrapetyan bd60d1874b Implementing resize of heap blocks.
- adding mem_heap_try_resize_block routine that tries to resize
   block using free space that is located right after the resized block;
 - placing long-term blocks from start of heap space and short-term - from end
   of the space to increase probability of success of resizing just allocated
   long-term block;
 - adding mem_heap_try_resize_block invocation to 'test_heap' unit test.
2014-11-11 15:44:31 +03:00
Ruben Ayrapetyan 4875762cfc Showing ARM Linux binary size notes in tools/log.sh. 2014-11-10 18:25:21 +03:00
Ruben Ayrapetyan 7c488ea11a Fixing tests of internal test suite. 2014-11-06 17:47:36 +03:00
Ruben Ayrapetyan e33e6a77cb Adding tests that depend on number precision to tests/jerry-test-suite/precommit_test_list. 2014-10-31 21:29:30 +03:00
Ruben Ayrapetyan 8a5b1148bc Storing magic string identifier in ecma-string descriptor instead of copying magic string's characters to the descriptor or to the heap. 2014-10-31 21:16:21 +03:00
Ruben Ayrapetyan 4d04cb4658 Removing tests that depend on features, which are unsupported in Compact Profile minimal build, from tests/jerry-test-suite/compact_profile_list list. 2014-10-31 21:05:41 +03:00
Ruben Ayrapetyan 843305fb48 Fixing some assertions in src/libecmaobjects/ecma-helpers-string.c. 2014-10-31 20:51:02 +03:00
Ruben Ayrapetyan c0a6ae3eff - Smaller but not precise conversion between strings and numbers under
CONFIG_ECMA_NUMBER_TYPE==CONFIG_ECMA_NUMBER_FLOAT32 (float32 mode);
- float64 mode by default if not CompactProfile-mode;
- CompactProfile-mode for MCU builds.
2014-10-31 20:44:27 +03:00
Ilmir Usmanov 8c7dc08d93 Add literals - replacements of strings and numbers in parser. 2014-10-31 21:22:52 +04:00
Ruben Ayrapetyan 05cf2dbe04 Providing cp_minimal build mode.
In the mode built-in objects except Global, Object, Object.prototype, Function,
Function.prototype, [[ThrowTypeError]] and CompactProfileError are disabled.

Making default builds (without cp cp_minimal modes set) to not define CONFIG_ECMA_COMPACT_PROFILE.
Removing some tests that depend on 'eval'-like functionality or CompactProfileError built-in from pre-commit testing.
2014-10-31 18:37:55 +03:00
Ruben Ayrapetyan 73084cb976 Fixing GetBindingValue operation for immutable bindings. 2014-10-31 16:03:32 +03:00
Ruben Ayrapetyan 5c4d2085a1 Fixing build without CONFIG_ECMA_COMPACT_PROFILE. 2014-10-31 16:02:30 +03:00
Ruben Ayrapetyan 5c4d73f4a3 Fixing Ctrl-C handling in tools/push.sh. 2014-10-30 21:25:48 +03:00
Ruben Ayrapetyan bc484e2048 Parallel tests run in tools/run_test_suite_test262.sh. 2014-10-30 21:25:48 +03:00
Ruben Ayrapetyan 290f6a7551 Passing file with test at first and sta-jerry.js as second in test262 runner.
This is necessary, because 'use strict' directive in test, if any, should appear at beginning of the code.
2014-10-30 21:25:47 +03:00
Ruben Ayrapetyan b4bd0bfb4c Correctly setting [[Extensible]] property of built-in objects. 2014-10-30 19:39:54 +03:00
Ilmir Usmanov d8acb0b6e2 'undefined' is not literal, so dump it as identifier. 2014-10-30 19:48:06 +04:00
Ruben Ayrapetyan bd5f4c0c69 Adding test for some limitations that take effect in strict mode. 2014-10-30 18:22:52 +03:00
Ruben Ayrapetyan bb6583faa7 Fixing do_strict_eval_arguments_check helper. 2014-10-30 17:25:30 +03:00
Ruben Ayrapetyan ac710dd0b5 Implementing [[ThrowTypeError]] built-in Function object. 2014-10-30 17:22:33 +03:00
Ruben Ayrapetyan 4625d5b90a Changing value of CompactProfileError built-in's 'length' property to 0. 2014-10-30 17:22:33 +03:00
Ilmir Usmanov d5878132cc Dump 'use strict' prior to reg_var_decl. 2014-10-30 18:17:41 +04:00
Ruben Ayrapetyan 90dfee3cdb Updating tools/run_test_suite_test262.sh to handle tests marked '@negative'. 2014-10-30 16:06:57 +03:00
Ruben Ayrapetyan 4160262ce8 Implementing EvalError, RangeError, SyntaxError, URIError built-ins and corresponding prototype built-in objects. 2014-10-30 14:28:44 +03:00
Ruben Ayrapetyan 66cb7e316d Implementing ReferenceError and ReferenceError.prototype built-ins. 2014-10-29 21:28:56 +03:00
Ruben Ayrapetyan 6991b26e04 Implementing TypeError and TypeError.prototype built-ins. Fixing Error.prototype.toString implementation. 2014-10-29 21:15:36 +03:00
Ruben Ayrapetyan 4e6f5c7716 Implementing Error and Error.prototype built-in objects. 2014-10-29 18:49:31 +03:00
Ruben Ayrapetyan ed08fe9983 Full names of magic string identifiers in src/libecmaobjects/ecma-magic-strings.inc.h 2014-10-29 17:23:43 +03:00
Ruben Ayrapetyan a74c77a1d5 Arrangement of built-in objects implementation (description of built-ins with *.inc.h headers, reducing code duplication). 2014-10-29 15:46:31 +03:00
Ruben Ayrapetyan 6078a4c854 Describing Boolean.prototype with src/libecmabuiltins/ecma-builtin-boolean-prototype.inc.h header. 2014-10-28 20:38:26 +03:00
Ruben Ayrapetyan f9e809e2e8 Removing ecma_builtin_*_get_routine_parameters_number routines. 2014-10-28 20:12:03 +03:00
Ruben Ayrapetyan 87310e43c6 On-demand built-ins instantiation. 2014-10-28 17:52:07 +03:00
Ruben Ayrapetyan e35ec87209 Making built-ins' property numbers to be stored as static const instead of extern const. 2014-10-28 17:32:31 +03:00
Ruben Ayrapetyan 26012e098f Moving magic strings definitions to ecma-magic-strings.inc.h. 2014-10-28 16:30:42 +03:00
Ruben Ayrapetyan 459750b1d0 Implementing routine for copying ecma-string and using it to duplicate ecma-string upon it's reference counter overflow. 2014-10-28 14:52:40 +03:00
Ilmir Usmanov 4735570b31 Add SyntaxErrors on parsing ObjectDeclarations. 2014-10-28 13:39:25 +04:00
Ruben Ayrapetyan fc751b0f15 Arranging JERRY_UNIMPLEMENTED macro usages and adding comments to each invocation of the macro. 2014-10-27 19:48:03 +03:00
Ilmir Usmanov cd8ab6594b Fix test262 runner script 2014-10-27 18:08:22 +04:00
Ruben Ayrapetyan 69624e4de2 Fixing search of shortest representation in ecma_number_to_zt_string.
Fixing right shift operation for big integers.
2014-10-27 15:34:33 +03:00
Ilmir Usmanov 7d13970e95 Fix compiling several input files 2014-10-27 15:27:25 +04:00
Ilmir Usmanov a55517f57a Remove 'logical_or' and 'logical_and' opcodes 2014-10-27 14:55:02 +04:00
Ruben Ayrapetyan f0ab69b01a Replacing 96-bit integer with 128-bit integer in ecma_number_to_zt_string and ecma_zt_string_to_number conversion routines. 2014-10-24 23:06:25 +04:00
Ruben Ayrapetyan b773ef074c Fixing exception handling in ecma_op_to_number. 2014-10-24 21:58:53 +04:00
Ruben Ayrapetyan e11f73df64 Improving precision in ecma_number_to_zt_string. 2014-10-24 20:39:59 +04:00
Ruben Ayrapetyan 82e8895b4c Fixing ToInt32 conversion routine. 2014-10-24 20:39:59 +04:00
Ruben Ayrapetyan 904be9ece6 Fixing ecma_zt_string_to_number for '-0' string. 2014-10-24 20:39:59 +04:00
Ruben Ayrapetyan bf9ef27e2f Removing two tests that fail because of float32 precision limitations from tests/jerry-test-suite/precommit_test_list. 2014-10-24 20:39:41 +04:00
Ruben Ayrapetyan 0016adf957 Revert "Removing three tests that fail because of float32 precision limitations from tests/jerry-test-suite/precommit_test_list."
This reverts commit 7761650a96460ab39381d3b8983132b05364a489.
2014-10-24 20:38:41 +04:00
Ruben Ayrapetyan ed32abb011 Removing three tests that fail because of float32 precision limitations from tests/jerry-test-suite/precommit_test_list. 2014-10-24 20:29:29 +04:00
Ruben Ayrapetyan e4629cca51 Improving precision of number to zt-string conversion, adding search for the shortest representation of number during the conversion. 2014-10-24 19:15:31 +04:00
Ruben Ayrapetyan 4f68e43b7d Adding debug.linux-float64 to pre-commit testing. 2014-10-23 20:34:58 +04:00
Ruben Ayrapetyan 1a6ca3108b Turning some strict comparisons in tests/jerry/math_log.js and tests/jerry/sqrt.js into range check comparisons. 2014-10-23 20:34:43 +04:00
Ruben Ayrapetyan 81ae0010ac Introducing float64 mod for host build targets that configures ecma-number to be float64 instead of default float32. 2014-10-23 19:27:43 +04:00
Ruben Ayrapetyan 2f16000949 Accessing ecma-number components with new ecma_number_pack / ecma_number_unpack helpers instead of ecma_number_fields_t structure that used GCC extension in CONFIG_ECMA_NUMBER_FLOAT64 mode. 2014-10-23 18:41:49 +04:00
Ruben Ayrapetyan feedb37b20 Replacing way to specify ecma-char encoding and ecma-number type: instead of defining it like CONFIG_ECMA_NUMBER_FLOAT32 now it should be defined like CONFIG_ECMA_NUMBER_TYPE=CONFIG_ECMA_NUMBER_FLOAT32. 2014-10-23 18:33:10 +04:00
Ilmir Usmanov f163f9f5da Allocate memory for string literals and identifiers dinamically. 2014-10-23 17:04:36 +04:00
Ruben Ayrapetyan e4a7d1c8ac Introducing nostaticcheck=1 build option for disabling cppcheck and vera++ checks during the build. 2014-10-23 16:55:59 +04:00
Ruben Ayrapetyan 33aeac458a Removing tests/jerry-test-suite/15/15.07/15.07.03/15.07.03.02/15.07.03.02-002.js and tests/jerry-test-suite/15/15.07/15.07.03/15.07.03.02/15.07.03.02-003.js from tests/jerry-test-suite/float_precision_exceptions_list. 2014-10-23 15:46:46 +04:00
Ruben Ayrapetyan 7f4a70ccb5 Improving precision of zt-string to ecma-number conversion. 2014-10-23 15:46:42 +04:00
Ilmir Usmanov 6b06cef1c8 Property getters and setters also create scope 2014-10-22 14:26:14 +04:00
Ilmir Usmanov ec6572d501 Add support of function expressions scopes. Uncomment tests. 2014-10-21 22:22:04 +04:00
Ilmir Usmanov 62a42fa087 Add fail tests. Fix parser. 2014-10-21 20:35:07 +04:00
Ruben Ayrapetyan ae048a7630 Running internal test suite during precommit testing. 2014-10-20 21:45:21 +04:00
Ruben Ayrapetyan 2d032a30dc Extracting ecma_number_trunc helper from ecma_op_number_remainder. 2014-10-20 20:48:36 +04:00
Ruben Ayrapetyan 42abd7d63a Moving ecma-number mathematical constants to src/libecmaobjects/ecma-globals.h. 2014-10-20 20:48:36 +04:00
Ruben Ayrapetyan 491893efb9 Fixing ecma_number_substract. 2014-10-20 20:44:58 +04:00
Ruben Ayrapetyan 3eed2d0d4c Renaming ecma_op_number_{add,subtract,multiply,divide} -> ecma_number_{add,subtract,multiply,divide}.
Moving ecma_number_{add,subtract,multiply,divide} to src/libecmaobjects/ecma-helpers-number.c.
Moving abs, sqrt, ln, exp, calculation helpers from src/libecmabuiltins/ecma-builtin-math-object.c to src/libecmaobjects/ecma-helpers-number.c.
2014-10-20 18:48:10 +04:00
Ruben Ayrapetyan a8ed76591a Removing tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-002.js that depends on
TypeErro built-in support from CompactProfile-compatible test list (tests/jerry-test-suite/compact_profile_list)
and adding it to tests/jerry-test-suite/unsupported_list.
2014-10-20 17:31:41 +04:00
Ruben Ayrapetyan 1796138a27 Fixing some tests from internal test suite. 2014-10-20 17:31:41 +04:00
Ruben Ayrapetyan 512d816568 Fixing Number.MIN_VALUE and Number.MAX_VALUE values for CONFIG_ECMA_NUMBER_FLOAT64 mode. 2014-10-20 17:31:41 +04:00
Ruben Ayrapetyan 3f54dc16e0 Removing tests/jerry-test-suite/15/15.05/15.05.04/15.05.04.07/15.05.04.07-003.js that depends on String.prototype.indexOf support from
CompactProfile-compatible test list (tests/jerry-test-suite/compact_profile_list)
and adding it to tests/jerry-test-suite/unsupported_list.
2014-10-20 17:31:40 +04:00
Ruben Ayrapetyan 9c20969cfc Fixing some tests from internal test suite. 2014-10-20 17:31:40 +04:00
Ruben Ayrapetyan c7f1e6b007 Adding three tests that depend on Number.prototype.toString support to tests/jerry-test-suite/unsupported_list and removing them from CompactProfile compatible tests list (tests/jerry-test-suite/compact_profile_list). 2014-10-20 17:31:40 +04:00
Ruben Ayrapetyan b52ca8cca5 Fixing Number.prototype.toString. 2014-10-20 17:27:51 +04:00
Ilmir Usmanov 3f7fca4d39 Implement full support of strict mode in parser. 2014-10-20 16:54:40 +04:00
Ruben Ayrapetyan 8f5160d6bf Implementing ToObject for number arguments. 2014-10-20 15:39:09 +04:00
Ruben Ayrapetyan 1b74687989 Implementing ToObject for boolean arguments. 2014-10-20 15:26:24 +04:00
Ruben Ayrapetyan f666750ce7 List of internal tests suite's tests that are not excluded by Compact Profile. 2014-10-20 14:38:41 +04:00
Ruben Ayrapetyan ba4dca2e98 Fixing some tests from internal test suite. 2014-10-20 14:15:01 +04:00
Ruben Ayrapetyan 69a1cab26b Update unsupported_list: removed 'float32 precision' block and added 'other built-ins' block. 2014-10-20 13:55:49 +04:00
Ruben Ayrapetyan 2d5a5c37b0 Fixing number bitwise operations. 2014-10-20 13:47:21 +04:00
Ruben Ayrapetyan 9e890827f7 Fixing build in CONFIG_ECMA_NUMBER_FLOAT64 mode. 2014-10-20 13:46:41 +04:00
Ruben Ayrapetyan 6ebd96f903 Improving precision of string to number conversion in ecma_zt_string_to_number. 2014-10-20 13:46:13 +04:00
Ruben Ayrapetyan 8e1156bd9e Support of STM32F3 board. 2014-10-17 21:48:09 +04:00
Ruben Ayrapetyan 9c1428de29 Implementing instantiation of prototype property Object built-in object. 2014-10-16 21:47:25 +04:00
Ruben Ayrapetyan 03df80efe0 Fixing a test from internal test suite. 2014-10-16 21:46:37 +04:00
Ruben Ayrapetyan e54023caf2 Throwing CompactProfileError in cases required by Compact Profile. 2014-10-16 21:26:23 +04:00
Ilmir Usmanov bd7fd40a32 Fix 'function' declaration parsing 2014-10-16 21:12:03 +04:00
Ilmir Usmanov 99d21743b0 Fix tests from test-suite 2014-10-16 20:42:24 +04:00
Ilmir Usmanov b1e6656fb4 Fix property increment 2014-10-16 20:32:19 +04:00
Ruben Ayrapetyan dce3e5db59 Removing assertions about fitting of uint32_t and int32_t to ecma_number_t as they are incorrect under CONFIG_ECMA_NUMBER_FLOAT32. 2014-10-16 20:24:05 +04:00
Ruben Ayrapetyan 6520779f46 Initialization of [[PrimitiveValue]] properties of built-in String.prototype, Number.prototype and Boolean.prototype objects. 2014-10-16 20:17:29 +04:00
Ruben Ayrapetyan ed960b78db Introducing CompactProfileError built-in object. 2014-10-16 19:49:47 +04:00
Ruben Ayrapetyan fce52b42c5 Fixing incorrect comments in src/libecmabuiltins/ecma-builtin-boolean-object.c. 2014-10-16 19:46:07 +04:00
Ruben Ayrapetyan 18f442b09d Disabling output of file name, function name and line on abnormal engine termination under JERRY_NDEBUG. 2014-10-16 18:47:59 +04:00
Ruben Ayrapetyan 9c3c835a7e Implementing syscall invocation sequence for ARMv7 architecture.
Removing dependencies to third-party libc routine implementations.
Introducing __TARGET_HOST define for host (non-MCU) builds.
2014-10-16 18:39:56 +04:00
Ilmir Usmanov 90789453ba Fix 'prototype' property. 2014-10-16 18:07:56 +04:00
Ilmir Usmanov 2a5cbe5975 Fix tests from jerry-test-suite. 2014-10-16 18:03:35 +04:00
Ilmir Usmanov 2637911b3e Fix 'this_arg' 2014-10-16 16:05:48 +04:00
Ilmir Usmanov 16556eb830 Fix 'switch' bytecode generation. Remove __strtof. Fix opcodes pretty-printing. 2014-10-16 15:33:54 +04:00
Ruben Ayrapetyan 8a58e0b9d5 Implementation of Boolean and Boolean.prototype built-in objects. 2014-10-16 14:45:55 +04:00
Ruben Ayrapetyan c231893b28 Implementation of Number built-in object and partial implementation of Number.prototype built-in object.
Fixing [[Prototype]] and [[Class]] properties of Array and String built-in objects.
2014-10-16 13:25:47 +04:00
Ruben Ayrapetyan e25f1297ff Adding a test that is not working due to insufficient float32 precision to corresponding section of tests/jerry-test-suite/unsupported_list. 2014-10-16 11:37:24 +04:00
Ruben Ayrapetyan b98363ce05 Adding rest tests with for-in loops to tests/jerry-test-suite/unsupported_list. 2014-10-16 11:27:28 +04:00
Ruben Ayrapetyan 5b242d6cc5 Fixing some tests from internal test suite. 2014-10-16 11:23:34 +04:00
Ruben Ayrapetyan 2eedfdc334 Fixing some tests from internal test suite. 2014-10-16 11:01:39 +04:00
Ruben Ayrapetyan 1de6eb8707 Fixing paths in tests/jerry-test-suite/unsupported_list. 2014-10-16 10:46:53 +04:00
Ruben Ayrapetyan a975e53f49 List of test with features, which are now unsupported and will not be supported before next release. 2014-10-15 21:15:51 +04:00
Ilmir Usmanov 6b733b8cd2 Fix 'continue' bytecode generation. Fix tests. 2014-10-15 21:04:00 +04:00
Ruben Ayrapetyan a66c175d98 Fixing 'delete_var' opcode handler. 2014-10-15 20:39:56 +04:00
Ruben Ayrapetyan b7ad84c76a Fixing a test from internal test suite. 2014-10-15 20:32:19 +04:00
Ruben Ayrapetyan 8088163d04 Fixing some tests in internal test suite. 2014-10-15 20:22:05 +04:00
Ilmir Usmanov e1e7752a62 Fix bytecode generation of binary expressions. Fix bytecode generation of query operator. Fix tests. 2014-10-15 20:08:43 +04:00
Ruben Ayrapetyan aaadfec530 Fixing assertion checks in 'try' opcode handler. 2014-10-15 19:40:46 +04:00
Ruben Ayrapetyan c7eec63e28 Fixing array instance construction routine: setting prototype to Array.prototype built-in object. 2014-10-15 19:31:30 +04:00
Ruben Ayrapetyan 9b178f5ab0 Implementing 'length' property of String instances. 2014-10-15 19:02:41 +04:00
Ruben Ayrapetyan 5d874596ec Fixing 'instanceof' opcode handler. 2014-10-15 18:46:40 +04:00
Ruben Ayrapetyan 9bafe2a2ae Fixing a test from internal test suite. 2014-10-15 18:44:35 +04:00
Ruben Ayrapetyan b7df625666 Fixing a test from internal test suite. 2014-10-15 18:12:46 +04:00
Ruben Ayrapetyan 11252394a5 Fixing 'delete_prop' opcode handler. 2014-10-15 18:11:45 +04:00
Ruben Ayrapetyan 0c9f03c313 Fixing opfunc_delete_var. 2014-10-15 18:02:29 +04:00
Ruben Ayrapetyan e8d728f8ce Fixing typeof for boolean arguments. 2014-10-15 18:02:10 +04:00
Ilmir Usmanov 49d990ad32 Allow some of FutureReservedWords in non-strict mode 2014-10-15 17:53:19 +04:00
Ruben Ayrapetyan 41b7ca2faa Fixing 'in' opcode handler. 2014-10-15 17:41:48 +04:00
Ruben Ayrapetyan 47ed774232 Fixing obj_decl opcode handler to handle property name argument as index of register variable containing a declared property's name. 2014-10-15 17:33:58 +04:00
Ilmir Usmanov 77d56c5f93 Fix function end meta in property setter and getter 2014-10-15 17:15:43 +04:00
Ruben Ayrapetyan b3f45c5c82 Fixing ecma_op_abstract_equality_compare. 2014-10-15 16:56:58 +04:00
Ruben Ayrapetyan f4ff85e861 Fixing test 11/11.02/11.02.02/11.02.02-008.js from internal test suite. 2014-10-15 16:56:58 +04:00
Ruben Ayrapetyan e5b0bb1a0d Fixing ecma_op_abstract_equality_compare. 2014-10-15 16:56:58 +04:00
Ruben Ayrapetyan 4e9958edb5 Fixing mistype in 12.06.02-005.js. 2014-10-15 16:56:58 +04:00
Ilmir Usmanov af5cf79d3c Use tmps as property names 2014-10-15 16:40:56 +04:00
Ruben Ayrapetyan 2d9a8da5c2 Fixing some tests from internal test suite. 2014-10-15 16:11:05 +04:00
Ruben Ayrapetyan efe713f2a9 Fixing memory leak in ecma_op_function_construct. 2014-10-15 16:11:04 +04:00
Ruben Ayrapetyan 2a8adf7698 Fixing memory leak in ecma_op_string_object_get_own_property. 2014-10-15 16:11:04 +04:00
Ruben Ayrapetyan 7dcbeec487 Fixing typeof with null argument. 2014-10-15 16:11:04 +04:00
Ilmir Usmanov a9856dcf9a Add support of NaN in opfunc_unary_minus 2014-10-15 15:33:00 +04:00
Ilmir Usmanov 032031a861 Add unary_plus and unary_minus opcodes 2014-10-15 15:20:49 +04:00
Ilmir Usmanov 819361c234 Fix postfix expression parsing 2014-10-15 14:33:39 +04:00
Ruben Ayrapetyan 391b6caebe Fixing this_arg handling in opfunc_call_n. 2014-10-15 13:57:26 +04:00
Ilmir Usmanov a49b52105e Fix generation of this_arg. Fix pretty-printing of retval, prop_setter, prop_getter and string assignments 2014-10-15 12:57:11 +04:00
Ilmir Usmanov c8686d9d9b Fix test 2014-10-15 10:53:40 +04:00
Ilmir Usmanov 7a156334bb Fix vargs pretty-printing 2014-10-15 10:53:40 +04:00
Ilmir Usmanov 948c74b4b9 Os by default. 2014-10-14 22:06:04 +04:00
Ilmir Usmanov 562f877328 Remove end-of-file marker and fix lsr's operands. 2014-10-14 22:02:02 +04:00
Ruben Ayrapetyan e9a632ea4e Fixing sign of converted number in ecma_zt_string_to_number. 2014-10-14 19:11:11 +04:00
Ruben Ayrapetyan 427dd83d99 Fixing postfix increment and postfix decrement opcodes handlers. 2014-10-14 18:52:06 +04:00
Ruben Ayrapetyan ab5a66cebe Implementing __aeabi_llsr (ARM Runtime ABI: long long right shift). 2014-10-14 18:09:11 +04:00
Ruben Ayrapetyan 4689f6c3c5 Handling elements bigger than 8 bytes in linked_list_set_element. 2014-10-14 17:35:07 +04:00
Ruben Ayrapetyan 004541fdc4 loop_demo.js in 'generated_source' as modifiable characters array. 2014-10-14 17:23:11 +04:00
Ruben Ayrapetyan 05103b1ecc Reducing waitTime in loop_demo.js 2014-10-14 17:23:11 +04:00
Ruben Ayrapetyan 7d27375860 Representing script as modifiable characters array for MCU. 2014-10-14 17:23:11 +04:00
Ilmir Usmanov 9be0a85c1c Fix 'while' bytecode generation 2014-10-14 16:55:09 +04:00
Ruben Ayrapetyan 78367993db Replacing -O3 optimization option with -Os. 2014-10-14 15:13:16 +04:00
Ruben Ayrapetyan d49dfd3956 Implementing __aeabi_llsl (ARM Runtime ABI: long long left shift). 2014-10-14 15:13:16 +04:00
Ilmir Usmanov 64e286f766 Enable pretty-printer only on host and debug 2014-10-14 15:06:21 +04:00
Ilmir Usmanov 053cbc769f Fix alignment: part 2 2014-10-14 15:06:21 +04:00
Ruben Ayrapetyan c4ba033970 Renaming ERR_MEMORY -> ERR_OUT_OF_MEMORY. 2014-10-14 14:08:38 +04:00
Ilmir Usmanov 85ad5f8350 Fix alignment 2014-10-13 21:42:25 +04:00
Ruben Ayrapetyan 38b47eaba7 Reducing number of iterations in nested_function.js: 1000 -> 100. 2014-10-13 19:34:16 +04:00
Ruben Ayrapetyan d2ceca87d2 Enabling jerry/sunspider/controlflow-recursive and jerry/sunspider/math-spectral-norm benchmarks. 2014-10-13 19:09:09 +04:00
Ruben Ayrapetyan 6430a104b3 ecma_ref_ecma_string -> ecma_copy_or_ref_ecma_string: copying ecma-string when the string's reference counter reaches maximum value. 2014-10-13 18:59:07 +04:00
Ruben Ayrapetyan 9a15286aad Fixing ecma_gc_is_object_may_ref_younger_objects. 2014-10-13 18:35:27 +04:00
Ilmir Usmanov 8a517ab03e Add support of octal integer literals 2014-10-13 17:45:20 +04:00
Ilmir Usmanov c33afca360 Add support of 'default' clause in 'switch' statement 2014-10-13 16:32:17 +04:00
Ruben Ayrapetyan 9f6ebb310b Removing test suite for Compact Profile. 2014-10-13 16:27:16 +04:00
Ruben Ayrapetyan 211ea32dbf Fixing jrt_set_mem_limits. 2014-10-13 15:53:04 +04:00
Ruben Ayrapetyan ee0d800b82 Copying and reducing test suite for Compact profile. 2014-10-13 14:59:33 +04:00
Ruben Ayrapetyan db6b12f958 Fixing two tests in Jerry test suite. 2014-10-13 14:58:46 +04:00
Ruben Ayrapetyan 7819adcf99 Implementing ToObject routine for case argument is string literal. 2014-10-13 13:29:29 +04:00
Ruben Ayrapetyan fc69e52ca3 Fixing memory leak in ecma_op_string_object_get_own_property. 2014-10-13 13:29:29 +04:00
Ruben Ayrapetyan 76bebfc532 Fixing GetValue / PutValue routines for primitive base values (access after ToObject). 2014-10-13 13:29:29 +04:00
Ilmir Usmanov 18618c6501 Freaking FINALLY: postparser 2014-10-12 20:34:23 +04:00
Ilmir Usmanov 63662dfb35 Postparser landing patch: add tree of scopes 2014-10-12 20:34:23 +04:00
Ilmir Usmanov cb7e54fe22 Preparser landing patch: refactor linked-list 2014-10-12 20:34:22 +04:00
e.gavrin ff935ea417 Add support scripts for testing and becnmarking 2014-10-11 19:09:21 +04:00
Ilmir Usmanov cd67b69bf9 Fix integer overflow while parsing numbers 2014-10-10 20:22:08 +04:00
Ilmir Usmanov 5c6dbd1466 Allow absent of semicolon before '}' token 2014-10-10 19:05:37 +04:00
Ilmir Usmanov 19d0690586 Support properties named 'get' and 'set' 2014-10-10 18:27:28 +04:00
Ilmir Usmanov e91cb75dcc Fix locus of strings 2014-10-10 17:14:48 +04:00
Ilmir Usmanov 64a0d8a8b0 Fix error message on for-in loops 2014-10-10 14:57:56 +04:00
Ilmir Usmanov 2c90f8a7f1 Fix break and continue generation 2014-10-09 20:55:16 +04:00
Ilmir Usmanov 9cd4344c4e Fix for loop parsing 2014-10-09 19:58:13 +04:00
Ilmir Usmanov eeb497b84b Fix if-else without braces 2014-10-09 19:41:42 +04:00
Ilmir Usmanov 29c734d95d Reuse tmps in vargs 2014-10-09 18:28:28 +04:00
e.gavrin 1590fe6180 Add benchmarks 2014-10-09 18:18:26 +04:00
Ilmir Usmanov a902a97025 Add another 'out of memory' error message 2014-10-09 17:49:02 +04:00
e.gavrin d272a36acc Fix benchmarks 2014-10-09 16:24:51 +04:00
e.gavrin 130238b01c Add tests for chapter 11 2014-10-09 15:41:15 +04:00
Ilmir Usmanov bfa186d43a Generate only one var_decl opcodes for each variable declared in a scope 2014-10-09 15:30:30 +04:00
Ilmir Usmanov 29ffa6f777 Pretty-printer refactoring. Add pretty-printing of metas. 2014-10-09 13:19:36 +04:00
Ilmir Usmanov 1dd94c12b2 Fix insert_semicolon 2014-10-08 19:15:25 +04:00
Ilmir Usmanov 24920cba57 Fix property names parsing 2014-10-08 17:09:02 +04:00
Ilmir Usmanov c3f493c693 Some minor fixes in parser: Do not warn on escape sequences. Allow 'new' operator without parens. Fix 'var' parsing in preparser. Fix a test. 2014-10-08 16:32:36 +04:00
e.gavrin f2760fdac6 Add test from chapter 11. Part2. 2014-10-08 15:06:17 +04:00
e.gavrin 3c815cc68a Add test from chapter 11. Part1. 2014-10-08 15:06:17 +04:00
Ilmir Usmanov 9775d23274 Support 'delete' and 'void' operators in parser. 2014-10-08 14:52:38 +04:00
e.gavrin 2ebc8ef6fd Fix tests 2014-10-07 22:28:15 +04:00
Ilmir Usmanov 3d3da5d481 Preparser: new pass to order var_decls prior to parser 2014-10-07 20:14:41 +04:00
e.gavrin 7f8f03ad20 Add test on chapter 15 2014-10-07 17:43:18 +04:00
Ilmir Usmanov 62cc3cc604 Fix && and || parsing 2014-10-06 14:35:26 +04:00
Ilmir Usmanov 17ee2eca50 Warn on escape sequences 2014-10-06 14:35:26 +04:00
Ilmir Usmanov 3d5fd214f3 Add switch-case 2014-10-06 14:35:26 +04:00
Ilmir Usmanov 8c7daf4850 Print ERR_MEMORY on stack 2014-10-06 14:35:26 +04:00
Ilmir Usmanov d3dc64ca53 Pretty-print native_calls 2014-10-06 14:35:26 +04:00
e.gavrin a79c816553 Add jerry-test-suite for chapters 7,8,10,12,13 2014-10-05 20:34:47 +04:00
Ilmir Usmanov 3819883f80 Add human-readable syntax errors 2014-10-03 19:01:45 +04:00
Ilmir Usmanov c4c713535e Fix insert_semicolon 2014-10-02 21:35:39 +04:00
Ilmir Usmanov af00691d1d Add this_arg dumping in parser 2014-10-02 19:31:29 +04:00
Ilmir Usmanov eff5e1a80b Fix stack operations in parser 2014-10-02 15:04:00 +04:00
Ilmir Usmanov c8b97214fe Parse undefined as simple 2014-10-01 14:30:04 +04:00
Ilmir Usmanov 6561c3fe6c Add support of array initialization like [1,,,'4'] 2014-09-30 19:44:45 +04:00
Ilmir Usmanov 9d129e15dc Allocate stack memory by chunks 2014-09-30 18:40:24 +04:00
e.gavrin 1c3bf4951d Add working benchmark tests 2014-09-29 14:27:38 +04:00
Ruben Ayrapetyan 47d384c565 Partial implementation of the Array.prototype built-in object. 2014-09-26 20:07:45 +04:00
Ruben Ayrapetyan 0e22967653 Fixing Arguments object construction routine. 2014-09-26 19:36:14 +04:00
Ruben Ayrapetyan add24b93fe Fixing various FIXMEs that depend on Function.prototype built-in. 2014-09-26 19:36:14 +04:00
Ruben Ayrapetyan bef5289cb6 Adding stubs for Function and Function.prototype built-ins. 2014-09-26 19:26:17 +04:00
Ruben Ayrapetyan 2d332bc98b Implementing 'Object.prototype.toString' and 'Object.prototype.valueOf' built-ins. 2014-09-26 18:50:46 +04:00
Ruben Ayrapetyan f82ae90040 Fixing various FIXMEs that depend on built-in Object constructor and Object.prototype. 2014-09-26 18:33:50 +04:00
Ruben Ayrapetyan a0a2ec2cea Replacing items of ecma_object_class_t with corresponding ecma magic strings. 2014-09-26 18:04:42 +04:00
Ruben Ayrapetyan 897ed2d5c2 Adding stubs for Object.prototype routines. 2014-09-26 17:47:53 +04:00
Ruben Ayrapetyan 508573b398 Compacting declaration of dispatch routines for built-in objects. 2014-09-26 17:07:04 +04:00
Ruben Ayrapetyan 6b02835547 Refactoring 'call_n' opcode handler so that it looks for meta 'this_arg' at start of argument list. 2014-09-26 15:13:43 +04:00
e.gavrin 24c75a5707 Add config for doxygen. 2014-09-26 08:01:43 +04:00
Ruben Ayrapetyan ba2eeb84af Implementing String.prototype.toString and String.prototype.valueOf built-in routines. 2014-09-25 21:04:24 +04:00
Ruben Ayrapetyan 5bee6cad0f Adding stubs for String.prototype routines. 2014-09-25 20:39:00 +04:00
Ruben Ayrapetyan caa2663b28 Adding magic strings for property names of built-in prototype objects. 2014-09-25 19:23:22 +04:00
Ruben Ayrapetyan c235021147 Implementing [[DefaultValue]] general objects' method. 2014-09-25 18:37:38 +04:00
Ilmir Usmanov cde880b1cf Fix 'break' parsing 2014-09-25 18:06:21 +04:00
Ruben Ayrapetyan f380b30e75 Fixing 'print' native call. 2014-09-25 16:08:48 +04:00
Ilmir Usmanov 42876bdc8f Add support of native calls 2014-09-25 15:57:57 +04:00
Ruben Ayrapetyan c2ca158d19 Implementing Array built-in. 2014-09-25 14:58:45 +04:00
Ruben Ayrapetyan 448b67f6dd Fixing memory leak and type of completion value in implementation of Object.defineProperty built-in. 2014-09-25 14:21:57 +04:00
Ruben Ayrapetyan c06c6a5ed8 Introducing ecma_free_property_descriptor. 2014-09-25 14:19:09 +04:00
Ruben Ayrapetyan 4c5c48eef2 Magic strings for Array built-in. 2014-09-25 14:18:07 +04:00
Ruben Ayrapetyan 679d86dc8f Passing 'this' argument to built-in routines. 2014-09-24 23:19:32 +04:00
Ruben Ayrapetyan 3efdcfa2ea Implementing String built-in object. 2014-09-24 21:40:11 +04:00
Ruben Ayrapetyan c4ec42635b Implementing String's constructor and [[GetOwnProperty]]. 2014-09-24 21:31:24 +04:00
Ruben Ayrapetyan 10ee3c4fb1 Implementing Math.pow built-in. 2014-09-24 18:49:41 +04:00
Ruben Ayrapetyan 44a2f7ba39 Implementing Math.log built-in. 2014-09-24 17:10:42 +04:00
Ilmir Usmanov 05a2224faa Fix parsing of assignment expressions without assignment operator. 2014-09-24 16:53:58 +04:00
Ilmir Usmanov 0a4616b65f Remove call_0, call_1, func_decl_0, func_decl_1, func_decl_2 opcodes. 2014-09-24 16:33:28 +04:00
Ruben Ayrapetyan 85a3a9a690 Implementing Math.exp built-in. 2014-09-24 16:01:57 +04:00
Ilmir Usmanov 0738ec6a54 Add generation of prop_setter. 2014-09-24 15:30:37 +04:00
Ruben Ayrapetyan 25ec2bea17 Refactoring function call operations to return 'normal' completion values instead of 'return' completion values. Removing ECMA_FUNCTION_CALL macro. 2014-09-24 14:27:27 +04:00
Ruben Ayrapetyan 3a31bf6eb1 Adding 'print' native call. 2014-09-24 14:22:57 +04:00
Ilmir Usmanov 8bcc37d0f8 Fix prop_getter, construct_n, array_n generation. 2014-09-23 22:53:35 +04:00
Ruben Ayrapetyan 9b69ea4d6d Implementing Math.sqrt. 2014-09-23 21:56:44 +04:00
Ilmir Usmanov f17ca4c455 Fix post_* opcodes generation 2014-09-23 20:32:22 +04:00
Ruben Ayrapetyan 34a5e00b7f Implementing Math.random. 2014-09-23 20:25:59 +04:00
Ilmir Usmanov d26b7f9f4e Fix reg_var_decl generation. 2014-09-23 20:05:10 +04:00
Ruben Ayrapetyan 6c422fec2e Implementing Math.min and Math.max built-ins. 2014-09-23 18:44:27 +04:00
Ruben Ayrapetyan c5fd835931 Implementing Math.abs and Math.round built-ins. 2014-09-23 17:22:01 +04:00
Ruben Ayrapetyan 4798807451 Fixing remainder calculation operation (ecma_op_number_remainder). 2014-09-23 17:22:01 +04:00
Ilmir Usmanov 8a5b956e38 Simplify serializer/deserializer. Reduce memory usage in lexer. Create HashTable data structure. Finish preparations for introducing new strings addressation. 2014-09-23 16:45:10 +04:00
Ruben Ayrapetyan f237a8d5e1 Adding stubs for Math object's routines. 2014-09-23 16:23:36 +04:00
Ruben Ayrapetyan 288478926e Implementing Math object's value properties. 2014-09-23 15:32:32 +04:00
Ruben Ayrapetyan ae244f0148 Common built-in object's constructor. 2014-09-23 15:29:08 +04:00
Ruben Ayrapetyan fd7f153747 Additional assertions in jrt_{get/set}_bit_field_value. 2014-09-23 15:23:50 +04:00
Ruben Ayrapetyan 1fed738217 Replacing ecma_builtin_is_*_object interfaces with ecma_builtin_is (object, builtin_id), and ecma_builtin_get_*_object with ecma_builtin_get (builtin_id). 2014-09-22 21:46:26 +04:00
Ruben Ayrapetyan 5f9a068a61 Adding magic strings for the Math object's properties names. 2014-09-22 21:34:11 +04:00
Ilmir Usmanov 615903dbf5 Fix call expression without args bytecode generation 2014-09-22 20:21:44 +04:00
Ruben Ayrapetyan 49486757ca Implementing 'Object.defineProperty' built-in routine. 2014-09-22 20:07:29 +04:00
Ruben Ayrapetyan 1e642fd527 Implementing ToPropertyDescriptor and FromPropertyDescriptor ECMA operations. 2014-09-22 19:31:35 +04:00
Ruben Ayrapetyan a287406e1f Implementing 'new Object(...)' built-in constructor. 2014-09-22 18:19:34 +04:00
Ruben Ayrapetyan d7314a7300 Adding stubs for the Object object. 2014-09-22 15:56:50 +04:00
Ruben Ayrapetyan a3ca61fe0e Setting Function's [[Get]] method to default [[Get]] method as they're behaviours for Function objects are equivalent. 2014-09-22 15:49:49 +04:00
Ruben Ayrapetyan 94f7f710a6 Fixing attributes of several properties of the Global object. 2014-09-22 15:35:35 +04:00
Ruben Ayrapetyan e55ceb22f5 Implementing [[HasInstance]] for non-bound functions. 2014-09-19 21:14:14 +04:00
Ruben Ayrapetyan 34984d31de Adding comment to parameter of ecma_number_make_infinity. 2014-09-19 18:13:39 +04:00
Ruben Ayrapetyan f46853bdd8 Introducing interfaces for invoking built-in functions and constructors.
Implementing property instantiation routine dispatcher for Global object.
Adding instantiation for 'undefined', 'NaN', 'Infinity' and built-in routine
properties of the Global Object. Implementing isNaN and isFinite built-in routines.
2014-09-19 18:10:49 +04:00
Ruben Ayrapetyan 1dd631178f Renaming ecma_get_object_has_non_instantiated_builtins -> ecma_get_object_is_builtin, ecma_set_object_has_non_instantiated_builtins -> ecma_set_object_is_builtin. 2014-09-19 17:51:40 +04:00
Ruben Ayrapetyan d44b13e0cd Adding magic strings for the Global object's properties names. 2014-09-19 17:45:52 +04:00
Ruben Ayrapetyan f478e161e6 Fixing ecma_string_to_zt_string and ecma_copy_zt_string_to_buffer routines. 2014-09-19 16:15:42 +04:00
Ruben Ayrapetyan 7fc3b178d8 Introducing ecma_is_string_magic, ecma_init and ecma_finalize interfaces, 'magic-string' container type for ecma-strings. Renaming ecma_is_magic_string to ecma_is_zt_string_magic. Moving magic-string related routines to ecma-helpers-string.c. 2014-09-19 12:08:19 +04:00
Ruben Ayrapetyan 9a667596de Implementing constructor of Function object for built-in routines. 2014-09-18 19:48:43 +04:00
Ruben Ayrapetyan d9e0f2936d Adding jerry_unreachable and jerry_unimplemented routines that print file name and line for corresponding unreachable, unimplemented marks. 2014-09-18 17:08:32 +04:00
Ruben Ayrapetyan 55d9b12176 Introducing built-in routines dispatcher and stubs for the Global object's routines. 2014-09-18 16:25:33 +04:00
Ruben Ayrapetyan 30008f8dc5 Splitting ERR_GENERAL error code in ERR_FAILED_INTERNAL_ASSERTION and ERR_UNIMPLEMENTED_CASE; introducing ERR_FAILED_ASSERTION_IN_SCRIPT error code for handling non-zero script's exit values. 2014-09-18 14:02:34 +04:00
Ruben Ayrapetyan f402e42d2f Moving Global object related routines to libecmabuiltins component. Introducing ecma_init_builtins and ecma_finalize_builtins routines. 2014-09-18 13:55:56 +04:00
Ruben Ayrapetyan 11cf22f06c Introducing 'ecmabuiltins' component and interface for instantiating built-in properties. 2014-09-17 21:12:05 +04:00
Ilmir Usmanov 56e6d2a380 Add if_else.js test. Fix bytecode generation. 2014-09-17 20:21:30 +04:00
Ruben Ayrapetyan 2edc921be7 Introducing has_non_instantiated_built_in_properties flag in ecma_object_t and 'built-in function' object type. 2014-09-17 20:05:15 +04:00
Ilmir Usmanov 70cc5128cc Add test try_catch_finally.js. Fix parser and interpreter 2014-09-17 18:58:16 +04:00
Ruben Ayrapetyan 51b7dc0d69 Turning off performance measurement during pre-commit testing. 2014-09-17 18:04:53 +04:00
Ruben Ayrapetyan 24fc505440 Introducing ecma_is_magic_string routine. 2014-09-17 18:00:11 +04:00
Ruben Ayrapetyan 70d76efc98 Adding cppcheck utility to repository. 2014-09-17 15:50:55 +04:00
Ruben Ayrapetyan b5a579cc41 Pulling before pre-push testing instead of just before pushing in ./tools/push.sh. 2014-09-17 15:38:06 +04:00
Ruben Ayrapetyan aa6a45962d Reducing scope of variable in deserialize_num_by_id to satisfy cppcheck's requirements. 2014-09-17 15:37:39 +04:00
Ruben Ayrapetyan 59ef3bf074 Little refactoring of control paths in general objects' [[DefineOwnProperty]] to satisfy cppcheck's requirements. 2014-09-17 15:37:12 +04:00
Ruben Ayrapetyan 5df12d2e04 Fixing NULL pointer dereference in PutValue routine. 2014-09-17 15:24:48 +04:00
Ruben Ayrapetyan 318a62e9b3 Adding debug.linux-valgrind.check and release.linux-musl-valgrind.check to precommit testing. 2014-09-17 12:56:48 +04:00
Ruben Ayrapetyan 6f23dd879d Increasing test timeout for valgrind runs. 2014-09-17 12:56:16 +04:00
Ruben Ayrapetyan 64613b5513 Reducing number of iterations in tests/jerry/nested_function.js 10000 -> 1000. 2014-09-17 12:55:22 +04:00
Ilmir Usmanov d4cd8be349 Fix asserts in opfunc_*jmp_down functions. 2014-09-16 22:36:26 +04:00
Ilmir Usmanov e77bd4f4e5 Add try-catch-finally support: parse and generate opcodes for this construct
Fix varg generation: generate *_n opcodes with parameters in following meta opcodes
Add stack internal structure: dimanically allocated stack.
Use dynamically allocated memory in parser: every local and global variables are stored in dinamically allocated stacks.
Use dynamically allocated memory in serializer: opcodes are also stored in stack.
Change is_true_jmp and is_false_jmp opcodes to relative.
Change *jmp* opcodes to be able to store opcode_counter_t instead of idx_t.
2014-09-16 21:32:59 +04:00
Ruben Ayrapetyan cd41b236d9 Statistics of memory usage during interpretation. 2014-09-16 21:19:07 +04:00
Ruben Ayrapetyan e8991abadb Fixing __printf for format strings with '+' specifier like '%+5d'. 2014-09-16 20:53:02 +04:00
Ruben Ayrapetyan fbcd393962 Adding configuration flag indicating whether Global Environment is bound to Global Object or it is simple declarative lexical environment. 2014-09-08 19:16:30 +04:00
Ruben Ayrapetyan dafbaa742e Adding configuration option for ECMA exception support. 2014-09-08 19:09:34 +04:00
Ruben Ayrapetyan 4d34bab9a0 Adding memory leak checks to unit tests. 2014-09-05 20:35:33 +04:00
Ruben Ayrapetyan c5dd81cf76 Fixing memory leak in opfunc_throw. 2014-09-05 20:28:02 +04:00
Ruben Ayrapetyan 5a9d4563ec Fixing performance degradation that occured in commit 9b040f31d2a2e1e4d43dd347d5e81282997dd2b5. 2014-09-05 16:27:43 +04:00
Ruben Ayrapetyan b9fd80ce36 Fixing object declaration and function expression opcode handlers; adding unit test that declares object and operates on the object's properties. 2014-09-04 21:02:29 +04:00
Ruben Ayrapetyan 5630352f36 Adding arm-linux-perf notes ref to tools/pull.sh and tools/log.sh. 2014-09-04 17:29:54 +04:00
Ruben Ayrapetyan 3bb990d782 Fixing LIBC_MUSL build for ARM Linux host (adjusting heap limit under LIBC_MUSL). 2014-09-04 16:47:39 +04:00
Ruben Ayrapetyan 31b5451b50 Moving label descriptor from ecma_completion_value_t to separate structure on heap (fixing performance degradation that occured in commit 5d92544db57203603a6ed53b5c18562065a70b77). 2014-09-04 14:27:40 +04:00
Ruben Ayrapetyan 50371ddf20 Implementing Array construction routine; adding unit test on array operations. 2014-09-03 17:30:03 +04:00
Ruben Ayrapetyan 76de0e9a06 Improving precision of ecma_number_to_string in case number can be represented as UInt32. 2014-09-03 15:05:58 +04:00
Ruben Ayrapetyan b275218e63 Fixing [[DefineOwnProperty]] routine of general object. 2014-09-02 22:34:50 +04:00
Ruben Ayrapetyan d45748a001 Implementing [[Get]] routine for function objects. 2014-09-02 22:34:38 +04:00
Ruben Ayrapetyan 57058c30ef Implementing rest unimplemented cases in ecma comparison routines. 2014-09-02 22:18:28 +04:00
Ruben Ayrapetyan 3dc9a5838a Fixing ecma_uint32_to_string helper. 2014-09-02 21:55:04 +04:00
Ruben Ayrapetyan 9acbaafc8e Implementing ecma-strings relational comparison helper. 2014-09-02 21:10:50 +04:00
Ruben Ayrapetyan 0a6e1a83f8 Renaming ecma_compare_ecma_string_to_ecma_string to ecma_compare_ecma_strings. 2014-09-02 20:16:41 +04:00
Ruben Ayrapetyan 11d772fda4 Implementing unimplemented cases in ecma comparison routines. 2014-09-02 19:57:55 +04:00
Ruben Ayrapetyan c581f10b94 Changing return value of ecma_op_abstract_equality_compare to ecma_completion_value_t. 2014-09-02 19:07:43 +04:00
Ruben Ayrapetyan c9f954ec2e Implementing several unimplemented cases in ecma conversion routines. 2014-09-02 18:49:45 +04:00
Ruben Ayrapetyan aa86a3643b Implementing remainder operation according to ECMA. Checking that implementations of other arithmetic operations already conform to ECMA and removing corresponding TODOs from them. 2014-09-02 15:09:36 +04:00
Ruben Ayrapetyan afc21fad8e Simple implementation of string concatenations comparison. 2014-09-02 13:31:56 +04:00
Ruben Ayrapetyan 4d9602ba0d Supporting string concatenations that are longer than 64k. 2014-09-01 22:11:54 +04:00
Ruben Ayrapetyan 813831a23b Decimal conversion of Number to zt-string (still not precise enough). Zt-string copy and length calculation helpers. 2014-09-01 21:12:02 +04:00
Ruben Ayrapetyan e35f54fe86 Implementing ECMA String to Number conversion helper. 2014-08-29 22:46:38 +04:00
Ruben Ayrapetyan 23b62bce54 Replacing doxygen header for ECMA modules 'addtogroup ecma ---TODO---' -> 'addtogroup ecma ECMA'. 2014-08-29 18:35:44 +04:00
Ruben Ayrapetyan 32d111fecf Changing pool's chunk size to 8 bytes. Adding configurable value for minimum chunks in a pool allocated by pools' manager: CONFIG_MEM_LEAST_CHUNK_NUMBER_IN_POOL = 32. 2014-08-29 18:21:22 +04:00
Ruben Ayrapetyan 32f20a02a3 Adding missing may_ref_younger flags updates and assertion check for the flags value. 2014-08-29 18:06:20 +04:00
Ruben Ayrapetyan 1d02085dc6 Packing ecma_object_t to 8 bytes. 2014-08-29 17:38:05 +04:00
Ruben Ayrapetyan 8e14f32806 Introducing getters/setters for ecma_object_t structure. 2014-08-29 15:53:07 +04:00
Ruben Ayrapetyan f7968e617d Adding several completion value construction and comparison helpers. 2014-08-29 12:51:06 +04:00
Ruben Ayrapetyan 164350b369 Introducing constructor for label completion values (for 'break' and 'continue' completion types). 2014-08-28 23:08:31 +04:00
Ruben Ayrapetyan 227c09fb3e Adding target counter and depth level to 'break' and 'continue' completion values. 2014-08-28 22:56:29 +04:00
Ruben Ayrapetyan 16cbe0c63b Removing try_get_string_by_idx and get_number_by_idx. 2014-08-28 21:19:44 +04:00
Ruben Ayrapetyan b36f997ef2 Determining if global code is strict code by checking if first opcode is 'meta' opcode of OPCODE_META_TYPE_STRICT_CODE type; setting 'configurableBindings' in 'var_decl' opcode to true if current code is eval code. 2014-08-28 20:29:42 +04:00
Ruben Ayrapetyan b529fc2da9 Processing unhandled exception by exiting engine with ERR_UNHANDLED_EXCEPTION; determining if function's code is strict by checking for appearance of 'meta' opcode of OPCODE_META_TYPE_STRICT_CODE type at the beginning of the function's code. 2014-08-28 20:21:47 +04:00
Ruben Ayrapetyan ddb2e6e9d5 Introducing and implementing 'throw' and 'try' opcode handlers. 2014-08-28 18:57:34 +04:00
Ruben Ayrapetyan 647f6b3c67 Renaming OPCODE_META_TYPE_OPCODE_COUNTER -> OPCODE_META_TYPE_FUNCTION_END. 2014-08-28 16:49:03 +04:00
Ruben Ayrapetyan 9d45f68370 Introducing 'opcode counter' type for 'meta' opcode; replacing 'jmp_down' opcodes that are used as pointers only with 'meta' opcodes of the introduced type. 2014-08-28 15:17:49 +04:00
Ruben Ayrapetyan 5d2b535cec Implementing 'with' opcode; replacing 'end_with' opcode with 'meta' opcode of corresponding type. 2014-08-27 21:38:53 +04:00
Ruben Ayrapetyan f08c242156 Implementing 'obj_decl' opcode; replacing 'prop', 'prop_get_decl', 'prop_set_decl' with 'meta' opcodes of corresponding types. 2014-08-27 20:43:31 +04:00
Ruben Ayrapetyan d286a93e2c Replacing 'varg' opcode with 'meta' opcode with corresponding type. 2014-08-27 19:35:56 +04:00
Ruben Ayrapetyan 2feb159fd8 Implementing 'array_decl' opcode handler. 2014-08-27 18:28:26 +04:00
Ruben Ayrapetyan 76121926d1 Splitting 'delete' opcode to 'delete_var' and 'delete_prop'. Implementing corresponding opcode handlers. 2014-08-27 17:12:59 +04:00
Ruben Ayrapetyan 05185bb2e9 Implementing 'native_call' opcode handler. 2014-08-27 15:38:31 +04:00
Ruben Ayrapetyan bc2f827447 Implementing 'unreachable' handler for 'meta' opcode. 2014-08-27 13:45:27 +04:00
Ruben Ayrapetyan f8907573dd Implementing 'func_expr_n' opcode handler. 2014-08-26 22:15:40 +04:00
Ruben Ayrapetyan 6cfcedb053 Evaluation of expressions passed in arguments lists just before corresponding 'varg' opcodes. 2014-08-26 21:39:54 +04:00
Ruben Ayrapetyan 6f58335f23 Replacing 'varg_list' (3 args) with 'varg' (1 arg). 2014-08-26 20:50:41 +04:00
Ruben Ayrapetyan 32ba30ddef Extracting interpreter loop from run_int_from_pos. 2014-08-26 20:20:33 +04:00
Ruben Ayrapetyan bf5bda11ed Implementing 'construct_n' opcode handler. 2014-08-26 17:47:14 +04:00
Ruben Ayrapetyan 9573b7234d Implementing 'func_decl_n' and 'func_call_n' opcodes' handlers. 2014-08-26 17:30:23 +04:00
Ruben Ayrapetyan 02f31fbcfb Adding 'func_expr_n' opcode; replacing arg1 and arg2 of 'func_decl_n' opcode with arg_list. 2014-08-26 15:58:57 +04:00
Ruben Ayrapetyan 7a80b7f4f1 Renaming 'construct_decl' opcode to 'construct_n'. 2014-08-26 12:50:23 +04:00
Ruben Ayrapetyan dc3f529307 Implementing 'typeof' opcode handler. 2014-08-26 12:43:13 +04:00
Ruben Ayrapetyan 704c26ff80 Setting ThisBinding of the Global Environment to the Global Object. 2014-08-26 12:43:10 +04:00
Ruben Ayrapetyan 9a203c580e Implementing 'this' opcode handler. 2014-08-26 12:17:29 +04:00
Ruben Ayrapetyan 38fdcba69c Implementing opfunc_addition with a string-operand. 2014-08-26 11:26:47 +04:00
Ruben Ayrapetyan c72555d25f Introducing new type of ecma-string: concatenation of two ecma-strings (comparison is not implemented). loop_arithmetics_1kk.js: 2.8968 -> 2.8464. 2014-08-26 11:11:20 +04:00
Ruben Ayrapetyan d0963f6d3d Fixing deref and comparison for uint32-represented ecma-strings. loop_arithmetics_1kk.js: 2.8448 -> 2.9056. 2014-08-26 11:06:06 +04:00
Ruben Ayrapetyan 2194f80d71 Revert "Fixing deref and comparison for uint32-represented ecma-strings."
This reverts commit c3adae65625c4fcf25049a3a67e1f1862b443c35.
2014-08-26 11:05:19 +04:00
Ruben Ayrapetyan 6ca0942b74 Fixing deref and comparison for uint32-represented ecma-strings. 2014-08-26 10:26:47 +04:00
Ruben Ayrapetyan aeb363075b Adding const qualifier to ecma_string_t* in ecma-string comparison and property search routines. 2014-08-25 20:28:26 +04:00
Ruben Ayrapetyan ebfacc82d3 Removing is_length_valid from ecma-string descriptor. 2014-08-25 20:11:24 +04:00
Ruben Ayrapetyan 8998189bc0 Storing Number as UInt32 in ecma-string if the Number may be represented as UInt32. Calculating length for Number-represented ecma-strings in ecma-string constructor. loop_arithmetics_1kk.js: 2.9112 -> 2.8536. 2014-08-25 20:03:33 +04:00
Ruben Ayrapetyan 57965bf160 Moving {get,set}_variable_value and do_strict_eval_arguments_check from opcodes-ecma-support.h to opcodes-helpers-variables.c. loop_arithmetics_1kk.js: 3.0848 -> 2.9584. 2014-08-25 18:54:46 +04:00
e.gavrin 4ffbdd2c3f __opcode -> opcode_t 2014-08-23 02:01:56 +04:00
e.gavrin a99907670b OPCODE define replaced with opcode_t. T_IDX define replaced with idx_t. 2014-08-23 00:53:41 +04:00
e.gavrin 0eece0be5a Remove not needed opcode-support.[c,h] 2014-08-23 00:24:49 +04:00
e.gavrin d80cb10361 Refine opcodes OP_LIST macro. Removed ambiguous lists of opcodes in several files. The only list is in opcodes.h 2014-08-23 00:16:56 +04:00
e.gavrin d4a9d9430e Refactoring of libcoreint part1 2014-08-23 00:16:56 +04:00
Ruben Ayrapetyan 6fbf3e4eed Implementing accessor properties operations in general objects' [[Get]] and [[Put]] routines. 2014-08-22 21:27:46 +04:00
Ruben Ayrapetyan 90c006771f One more fix in Function objects' [[Construct]] routine 2014-08-22 21:16:43 +04:00
Ruben Ayrapetyan e6c10655c5 Fixing Function objects'[[Construct]] routine 2014-08-22 21:01:58 +04:00
Ruben Ayrapetyan a341fe044b call_0, call_1 opcode handlers: wrapping function calls using ECMA_FUNCTION_CALL helper 2014-08-22 20:50:40 +04:00
Ruben Ayrapetyan bf1841ce54 Full implementation of GetValue, PutValue operations. 2014-08-22 20:27:07 +04:00
Ruben Ayrapetyan 6801f22bd9 Introducing ECMA_FUNCTION_CALL helper macro for handling return completion values of function calls. 2014-08-22 20:26:23 +04:00
Ruben Ayrapetyan 80e6cd3a60 Fixing ecma_create_arguments_object: adding deref for allocated ecma-string 2014-08-22 18:47:46 +04:00
Ruben Ayrapetyan 077392e5c5 Fixing ecma_compare_zt_string_to_zt_string 2014-08-22 18:44:54 +04:00
Ruben Ayrapetyan f266b84016 Adding configuration header file for engine's parameters/limitations 2014-08-22 18:29:39 +04:00
Ruben Ayrapetyan dca9bcc387 Removing ECMA_TYPE__COUNT enum value; fixing comment to ecma_copy_value 2014-08-22 17:50:57 +04:00
Ruben Ayrapetyan a8486b01ed Partial implementation of 'Object' object construction routine 2014-08-22 17:18:29 +04:00
Ruben Ayrapetyan 3bcf02137e Adding stub for Array construction routine 2014-08-22 17:17:17 +04:00
Ruben Ayrapetyan 5713373279 Partial implementation of [[Construct]] routine for Function objects 2014-08-22 16:56:00 +04:00
Ruben Ayrapetyan 50a1532801 Implementing opfunc_instanceof using ecma_op_has_instance for [[HasInstance]] call 2014-08-22 15:39:23 +04:00
Ruben Ayrapetyan 7a20454047 Using ToString for property name conversion in opfunc_in 2014-08-22 15:26:05 +04:00
Ruben Ayrapetyan b1b6ae5a41 Partial implementation of [[HasInstance]] ecma-object's operation 2014-08-22 15:24:09 +04:00
Ruben Ayrapetyan 9cc27115fa Using ToString for property name conversion in opfunc_getter, opfunc_setter 2014-08-22 15:07:21 +04:00
Ruben Ayrapetyan f7cdb454ed Implementing ToString operation (ecma_op_to_string) 2014-08-22 14:40:58 +04:00
e.gavrin 7bda6e9d01 Add opcode handlers for logical_[not, or, and]] 2014-08-22 01:27:37 +04:00
e.gavrin 8e4ff93436 Add instanceof opcode handler. Untested. 2014-08-22 00:29:42 +04:00
e.gavrin 3dc1f8df77 Add in opcode handler. Untested. 2014-08-21 23:59:58 +04:00
e.gavrin b822c704e5 Add b_not opcode handler. Fixes in shift opcodes and in test 2014-08-21 22:52:34 +04:00
e.gavrin 7dea812364 Add shift opcodes handlers 2014-08-21 21:39:05 +04:00
Ruben Ayrapetyan 148d9c4cb6 Disabling creation of testing notes during pre-push testing 2014-08-21 20:14:54 +04:00
e.gavrin dfcc3a0986 Add retval opcode handler. 2014-08-21 20:01:50 +04:00
Ruben Ayrapetyan 7d38fee700 Implementing comparison of ecma-strings for different types of string containers. 2014-08-21 19:54:11 +04:00
Ruben Ayrapetyan bb55d895c4 ./tools/pull.sh: pulling notes with git pull --rebase. tools/push.sh: make pull just before pushing; pushing master and notes with one command. 2014-08-21 18:21:35 +04:00
Ruben Ayrapetyan 2851c59d97 Add noopt=1 option to override OPTION_OPTIMIZE to disable. 2014-08-21 17:48:26 +04:00
e.gavrin c6a41c167e Add native_call opcode. 2014-08-21 17:30:52 +04:00
Ruben Ayrapetyan 902f8c3414 Reducing build time: make debug.linux 8.778s -> 6.426s; make unittests: 32.230s -> 9.259s. 2014-08-21 17:28:14 +04:00
Ruben Ayrapetyan 616c96d3bb Implementing ecma_string_to_zt_string for number-represented string and strings that are stored in literal table 2014-08-21 16:46:45 +04:00
e.gavrin 1261820838 Add meta opcode. 2014-08-21 16:07:05 +04:00
e.gavrin 5b2b04f5f9 Various opcode's refinements: obj[0,1, 2, n]->obj_decl, array[0, 1, 2, n]->array_decl, func_expr[0, 1, n]->removed, varg[1_end, 2_end, 3_end, 3]->varg_list. 2014-08-21 15:49:10 +04:00
Ruben Ayrapetyan a96705701d Implementing prototype of ToString (Number) routine - ecma_number_to_zt_string; adding unit tests for the routine. 2014-08-21 14:43:43 +04:00
Ruben Ayrapetyan 5095bd31c9 Ecma-number decoding helpers 2014-08-20 19:20:03 +04:00
Ruben Ayrapetyan 284e7fc91b Renaming prop_access opcode to prop_getter; introducing prop_setter opcode; implementing property getter/setter opcode handlers. 2014-08-20 16:34:03 +04:00
Ruben Ayrapetyan fe34bf7e01 Fixing: deallocation of number-represented ecma-string; [[Get]] of Arguments object for index arguments. 2014-08-20 13:47:51 +04:00
Ruben Ayrapetyan f9ff4e1ba3 Reducing includes of system headers in jerry-libc.c (LIBC_RAW). 2014-08-19 20:51:30 +04:00
Ruben Ayrapetyan 50554a81e4 Implementing Arguments object construction, [[Get]], [[GetOwnProperty]], [[DefineOwnProperty]], [[Delete]] routines. 2014-08-19 19:17:03 +04:00
Ruben Ayrapetyan d5f50ebd04 Add dbgsyms=1 option to override OPTION_DEBUG_SYMS to enable, OPTION_STRIP to disable. 2014-08-19 19:17:03 +04:00
Ilmir Usmanov a2fe594d0f Merge branch 'geppetto' 2014-08-19 16:22:39 +04:00
Ilmir Usmanov 126b8814a8 Add rules to check switch-cases 2014-08-19 16:22:05 +04:00
e.gavrin 0fb8076d2a fix formatting issues in src/*. Ignore #define.. in jerry_funcname_space_parentheses.tcl 2014-08-19 15:03:05 +04:00
e.gavrin abd686242a Reorder fields in rss_measure.sh 2014-08-19 13:32:51 +04:00
e.gavrin 27b24a45f2 Refine rss_measure.sh 2014-08-19 02:13:18 +04:00
e.gavrin 98e544459d Add shared_clean/dirty collection to rss_measure script 2014-08-18 22:48:03 +04:00
e.gavrin 7f77a1aafd Add private_clean/dirty collection to rss_measure script 2014-08-18 22:26:48 +04:00
Ruben Ayrapetyan d393d0c041 Fixing check of git push status code in tools/push.sh 2014-08-18 21:14:35 +04:00
Ruben Ayrapetyan 9d33a91822 Storing literals' indexes instead of literals' contents in ecma-strings if possible. 2014-08-18 20:52:02 +04:00
Ruben Ayrapetyan 8bc41358ec Replacing const ecma_char_t* with ecma_string_t*; supporting number-represented string in ecma_string_t. 2014-08-18 18:34:34 +04:00
Ruben Ayrapetyan 15b65a27fb Moving type conversion helpers from libecmaoperations to libecmaobjects. 2014-08-18 16:26:22 +04:00
Ruben Ayrapetyan bcddffbefb Preparations to lazy conversion of Number to String: introducing ECMA_STRING_CONTAINER_HEAP_NUMBER container type for ecma_string_t. 2014-08-18 16:10:54 +04:00
Ruben Ayrapetyan 471bbd9fc4 Test for function calls with args. 2014-08-15 20:14:02 +04:00
Ruben Ayrapetyan 04112c6fea Implementing opfunc_call_1. 2014-08-15 20:10:22 +04:00
Ruben Ayrapetyan 116a80f8ae Ilmir's fix of register variables counting. 2014-08-15 19:46:02 +04:00
Ruben Ayrapetyan b582d56ecb Implementing opfunc_decl_1, opfunc_decl_2. 2014-08-15 18:30:47 +04:00
Ruben Ayrapetyan 4de3da90a5 Implementing function's argument variables instantiation during function call. Implementing function declaration routine. 2014-08-15 17:30:11 +04:00
Ruben Ayrapetyan 04c6cb30c7 Adding ecma_is_lexical_environment_global helper. 2014-08-15 17:26:49 +04:00
Ruben Ayrapetyan 21a84afc4f Adding ecma_is_property_enumerable, ecma_is_property_configurable helpers. 2014-08-15 17:22:29 +04:00
Ruben Ayrapetyan 8f08c1c70e Fixing collections' construction and iteration routines. 2014-08-15 17:21:21 +04:00
Ruben Ayrapetyan 2a199cc6a7 Iterators for ecma-values collections 2014-08-15 15:58:34 +04:00
Ruben Ayrapetyan cf098ad4ac Adding missing 'break's in ecma_op_{create,initialize}_immutable_binding. 2014-08-14 21:36:33 +04:00
Ruben Ayrapetyan f638c381a3 Introducing ecma-values collection. Implementing ecma-strings collection through ecma-values collection. 2014-08-14 21:19:56 +04:00
e.gavrin af798a7142 Fix mistype in opfunc_greater_or_equal_than and opfunc_less_or_equal_than opcodes 2014-08-14 20:42:28 +04:00
Ruben Ayrapetyan 3f01ac6c45 Removing commit notes if push failed in tools/push.sh 2014-08-14 20:11:30 +04:00
Ruben Ayrapetyan 1d70fe0a37 Fixing ecma_op_abstract_equality_compare 2014-08-14 20:03:50 +04:00
Ruben Ayrapetyan 0447d128d0 Implementing b_and, b_or, b_xor opcode handlers. 2014-08-14 19:56:55 +04:00
Ruben Ayrapetyan 86a0c701df Partial stub for Int32 operation. 2014-08-14 19:15:25 +04:00
Ruben Ayrapetyan 85556504e4 Fixing exit code of tools/log.sh 2014-08-14 18:55:21 +04:00
e.gavrin a075051d6f Add opfunc_equal_value_type and opfunc_not_equal_value_type opcode handlers. Add test. 2014-08-14 18:04:43 +04:00
Ruben Ayrapetyan 0cd5fbfd81 Adding src/main.c to cppcheck and vera++ source list. 2014-08-14 17:55:46 +04:00
Ruben Ayrapetyan 04dedd8f87 Adding 'make log' to list commits with commit testing notes. 2014-08-14 17:52:54 +04:00
Ruben Ayrapetyan 5bb76486b0 Fixing exit code of tools/push.sh 2014-08-14 17:38:31 +04:00
Ruben Ayrapetyan 5ebc744511 Logging performance and memory benchmarks to git notes during precommit testing. 2014-08-14 17:28:41 +04:00
Ruben Ayrapetyan e25b1d0249 Performance measurement script tools/perf.sh 2014-08-14 16:52:45 +04:00
e.gavrin 7803e073c4 Add opfuncs for greater_or_equal_than and less_or_equal_than opcodes. Add test. 2014-08-14 16:36:53 +04:00
Ruben Ayrapetyan 6553daa22b Limiting data and stack size by setrlimit. 2014-08-14 16:08:06 +04:00
Ruben Ayrapetyan 63133c247f Initializing [[FormalParameters]] internal property of Function object in ecma_op_create_function_object. 2014-08-13 21:47:56 +04:00
Ruben Ayrapetyan daf1cfc9e6 Introducing helpers for construction and freeing of ecma-strings' collections. 2014-08-13 21:36:36 +04:00
e.gavrin 684c028954 Add script to run ubench. Fix rss_meaasure.sh 2014-08-13 21:11:53 +04:00
Ruben Ayrapetyan eb7441198c Commenting out performance and memory benchmarking in tools/push.sh 2014-08-13 20:59:39 +04:00
Ruben Ayrapetyan 507b91973a Renaming ecma_array_first_chunk_t -> ecma_collection_header_t; ecma_array_non_first_chunk_t -> ecma_collection_chunk_t. 2014-08-13 20:58:17 +04:00
Ruben Ayrapetyan 25ae71353d Removing print of opcode in optimizer_reorder_scope. 2014-08-13 20:28:12 +04:00
Ruben Ayrapetyan 613c43cc14 Fixing internal properties handling in ecma_gc_mark. 2014-08-13 20:18:41 +04:00
Ruben Ayrapetyan 4bacc6c957 Adding literal variable to tests/jerry/variables.js. 2014-08-13 19:30:37 +04:00
Ruben Ayrapetyan c831912ae5 Replacing ecma_array_first_chunk_t with ecma_string_t for ecma-strings. 2014-08-13 19:21:25 +04:00
e.gavrin 871c36feb7 Enable variables.js test 2014-08-13 18:10:04 +04:00
Ruben Ayrapetyan b66981d19f Introducing ecma_string_t type that will be used for ecma-strings instead of ecma_array_first_chunk_t. 2014-08-13 17:01:05 +04:00
Ruben Ayrapetyan 567d54f7e5 Move ecma-string helpers from ecma-helpers.c to ecma-helpers-string.c 2014-08-13 17:01:05 +04:00
Ruben Ayrapetyan bd280df9bf Making vera++ to stop compilation on style errors. 2014-08-13 16:50:44 +04:00
Ruben Ayrapetyan a672807990 Style fix in stm32f4/jerry-libc.c. 2014-08-13 16:50:17 +04:00
e.gavrin 350580c49e Fix style in liboptimizer 2014-08-13 16:41:39 +04:00
e.gavrin c5f33d184d fix style errors in libjsparser 2014-08-13 16:23:59 +04:00
e.gavrin 9ad1e27c75 Merge branch 'master' of git-server:jerry 2014-08-13 15:40:05 +04:00
e.gavrin 19e71e98e2 fix style error 2014-08-13 15:39:56 +04:00
Ruben Ayrapetyan c3cc674fef Definition of function object's 'length' property in ecma_op_create_function_object. 2014-08-13 15:17:12 +04:00
Ruben Ayrapetyan 4fe85cdd1a Full implementation of [[DefineOwnProperty]] for array objects. 2014-08-13 14:55:40 +04:00
Ilmir Usmanov 2e1da4cae5 Quickfix N2 2014-08-12 22:48:24 +04:00
Ilmir Usmanov 6f41c1c59b Quickfix 2014-08-12 22:30:24 +04:00
Ilmir Usmanov bbde9f4180 Merge branch 'geppetto' 2014-08-12 22:27:32 +04:00
Ilmir Usmanov 0a68baa479 Add support of floating-point literals 2014-08-12 22:27:12 +04:00
Ruben Ayrapetyan 3ae7a284dc Partially implementing [[DefineOwnProperty]] for Array objects. 2014-08-12 21:45:11 +04:00
Ruben Ayrapetyan eee1daec91 Introducing ecma_compare_zt_string_to_zt_string interface that is __strcmp for ecma_char_t* zero-terminated strings. 2014-08-12 18:51:49 +04:00
Ruben Ayrapetyan 389d88bbb8 Adding tools/some_style_fixes.sh script that makes some style fixes in code. 2014-08-12 18:18:50 +04:00
Ruben Ayrapetyan a886053e54 Extracting ecma_op_object* routines to ecma_op_general_object_*. Redefining ecma_op_object* interface to be usable for all object types (not only for general objects). 2014-08-12 18:11:56 +04:00
Ruben Ayrapetyan bc34fa3be6 Renaming src/libecmaoperations/ecma-objects-properties.[ch] -> src/libecmaoperations/ecma-objects.[ch]. 2014-08-12 17:09:46 +04:00
Ruben Ayrapetyan 8bde4ecbf2 Implementing ecma_compare_ecma_string_to_ecma_string helper. 2014-08-12 16:56:35 +04:00
Ruben Ayrapetyan b987bcc920 Compaction of heap block's header from 32 bytes to 8 bytes. ./benchmarks/jerry/loop_arithmetics_1kk.js: 2.77 -> 2.82. 2014-08-12 16:23:44 +04:00
Ruben Ayrapetyan b4a29f754a Style fixes in libruntime. 2014-08-12 14:16:05 +04:00
Ruben Ayrapetyan aa43e06366 Style fixes in liballocator, libecmaobjects, libecmaoperations: putting else on separate line after closing brace of 'if' block. 2014-08-12 13:53:34 +04:00
Ruben Ayrapetyan 701f03309a Replacing -O2 with -O3. ./benchmarks/jerry/loop_arithmetics_1kk.js: 2.97 -> 2.79. 2014-08-12 12:28:37 +04:00
Ruben Ayrapetyan b260f2458e Fixing debug.stm32f4 build. 2014-08-12 12:01:47 +04:00
e.gavrin b3b1ba0206 Formatting fixes in libcoreint 2014-08-12 01:13:32 +04:00
e.gavrin d40c21b616 Fixes for interpreter.* 2014-08-12 00:53:40 +04:00
e.gavrin 464bf578cc Remove unneeded test 2014-08-12 00:20:39 +04:00
e.gavrin e76f690a25 Merge branch 'master' of git-server:jerry 2014-08-12 00:19:36 +04:00
e.gavrin 0510b66504 Formatting fixes for libperipherals 2014-08-12 00:15:13 +04:00
Ilmir Usmanov bca7f7f095 Merge branch 'geppetto' 2014-08-11 23:18:06 +04:00
Ilmir Usmanov 5373b60955 Reformat 2014-08-11 23:17:45 +04:00
Ruben Ayrapetyan 839ad7e4b4 Fixing cppcheck warning about comma in return statement (libecmaobjects/ecma-helpers-value.c). 2014-08-11 22:17:35 +04:00
Ruben Ayrapetyan 1b84ca8412 Style fix: indentation in src/libecmaoperations/ecma-objects-properties.c. 2014-08-11 22:10:55 +04:00
Ruben Ayrapetyan 48cff24f08 Styles fixes in libecmaobjects, libecmaoperations: indentation and braces rules. 2014-08-11 22:05:59 +04:00
Ruben Ayrapetyan 38c6c2357d Styles fixes in liballocator: indentation and braces rules. 2014-08-11 21:10:06 +04:00
Ruben Ayrapetyan 59940fb648 Style fixes in liballocator, libecmaobjects, libecmaoperations: now lines are not longer than 120 characters. 2014-08-11 19:51:40 +04:00
Ruben Ayrapetyan 0b592470d5 Style fixes in libecmaoperations: space between function name and opening parenthesis, no space after opening parenthesis/before closing parenthesis. By mistake, the changes weren't commited with 8081e5cdb38ad0f9789a89c92362fc73a716d85c. 2014-08-11 19:34:49 +04:00
Ruben Ayrapetyan b02eefd4ae Style fixes in liballocator, libecmaobjects, libecmaoperations: space between function name and opening parenthesis, no space after opening parenthesis/before closing parenthesis. 2014-08-11 19:28:14 +04:00
Ruben Ayrapetyan e53be2b441 Renaming ecma_get_pointer, ecma_set_pointer, ecma_set_pointer_non_null macroses to uppercase names. 2014-08-11 19:13:59 +04:00
e.gavrin 14d8b0d55e Add new runtime tests 2014-08-11 19:08:54 +04:00
Ruben Ayrapetyan 6564cbee76 Indentation checking rule for vera++. 2014-08-11 18:37:43 +04:00
Ruben Ayrapetyan 8ce1ef3c8b Removing trailing whitespace in liballocator, libecmaobjects and libecmaoperations. 2014-08-11 15:59:19 +04:00
Ruben Ayrapetyan 8e87c8d3ed Temporarily disabling error mode of vera++ style checker. 2014-08-11 14:55:02 +04:00
e.gavrin 3d946da4fb Revert "fix formatting in rc/libruntime/target/linux/jerry-libc.c"
This reverts commit 22892ba01bf9fe0fea2f04bfb5767285c0fa270c.

Conflicts:
	Makefile.mk
2014-08-11 13:05:22 +04:00
e.gavrin 18a3f7f64e Remove check gnu style 2014-08-11 12:54:13 +04:00
e.gavrin 4b651ab427 fix formatting in rc/libruntime/target/linux/jerry-libc.c 2014-08-11 11:33:42 +04:00
e.gavrin 3a388b07a1 Add several checking rules. Add some fixes. Force vera++ to produce error 2014-08-09 00:41:24 +04:00
Ruben Ayrapetyan 4fb0080701 Adding test nested_function.js. 2014-08-08 23:20:34 +04:00
Ruben Ayrapetyan 7b04e9eaeb Compacting pool header to 8 bytes. Replaced typed pool chunks with fixed-size untyped ones. loop_arithmetics_1kk.js benchmark: 2.98517 -> 2.9443. 2014-08-08 23:11:06 +04:00
e.gavrin 49a809d56f Add optional vera++ support. Add several rules. Fixes for vera compatibility - new lines at EOF 2014-08-08 22:40:17 +04:00
e.gavrin 06d394cc2b reduce number of mandatory precommit builds 2014-08-08 22:27:33 +04:00
e.gavrin 887ac9c114 reduce number of mandatory precommit builds 2014-08-08 22:24:40 +04:00
Ruben Ayrapetyan cd0246bedc Changing size of ecma-array's chunk to fixed 8 bytes. 2014-08-08 18:23:02 +04:00
e.gavrin 0007adce8b Add new line for vera++ compatibility 2014-08-08 18:00:31 +04:00
e.gavrin f7a4b330d0 repeat test 5 times for better stability 2014-08-08 16:35:00 +04:00
Ruben Ayrapetyan 1ab3eaa389 Optimizing ecma_get_pointer/ecma_set_pointer, introducing ecma_set_non_null_pointer. loop_arithmetics_1kk.js benchmark: 3.450 -> 3.025. 2014-08-08 15:22:05 +04:00
Ruben Ayrapetyan 0194e63331 Removing pool bitmaps; optimizing search for free pool chunks. loop_arithmetics_1kk.js benchmark: 4.134s -> 3.479s. 2014-08-08 14:26:28 +04:00
Ruben Ayrapetyan b6d9ed42ec Adding test_stability.sh to pre-commit testing. 2014-08-08 14:19:38 +04:00
e.gavrin 7038288f7f add test_stability.sh script to test last N commit for perf 2014-08-08 13:56:59 +04:00
Ruben Ayrapetyan c688f27f62 Adding memmove (for compiler usage). 2014-08-08 12:42:57 +04:00
Ruben Ayrapetyan f76795db8c Replacing -Os wth -O2. 2014-08-08 12:42:19 +04:00
Ruben Ayrapetyan 5788ce1199 Fixing OPTION_OPTIMIZE setup in Makefile. 2014-08-08 12:41:56 +04:00
e.gavrin 88515c9776 Extend rss_measure 2014-08-08 11:35:23 +04:00
e.gavrin 6506147ebb Temporaly remove sanitize builds from precommit(until fixed), fix mistype in rss_measure.sh 2014-08-08 11:22:07 +04:00
e.gavrin af61b73a3e Fix perf degradation while using rss_measure.sh. Pretify output of script. Add RSS, PSS and SHARE to the script 2014-08-08 10:57:40 +04:00
Ruben Ayrapetyan 7ad6c25bb2 Fix invocation of GC for non-zero generations. 2014-08-07 21:10:36 +04:00
Ruben Ayrapetyan d7e28e3a28 Fixing memory leak in mem_pools_alloc. 2014-08-07 21:08:31 +04:00
Ruben Ayrapetyan 2887332573 Fixing valgrind annotations in mem_heap_alloc_block for path added in ae189c6107f943f5273f9b2fce14ad17a396636c. 2014-08-07 21:08:07 +04:00
Ruben Ayrapetyan cc4d55803c Fix func_decl_0: correctly set interpreter's opcode counter. 2014-08-07 19:35:11 +04:00
Ruben Ayrapetyan 99c15ef802 Implementing object model, memory allocators finalization routines. Adding assertion that all memory was freed before exit. 2014-08-07 19:24:32 +04:00
Ruben Ayrapetyan 5e1c4b533f Fix ecma_copy_ecma_string_chars_to_buffer. 2014-08-07 18:36:05 +04:00
Ruben Ayrapetyan 6d7c2120ef Fix ecma_gc_mark routine: checking properties, located immediately in an object descriptor. 2014-08-07 18:28:46 +04:00
Ruben Ayrapetyan 93c7b813cf Fixing heap's block allocation routine. Adding related checks to mem_check_heap. 2014-08-07 18:26:26 +04:00
Ilmir Usmanov 32c97b97a7 Merge branch 'master' of git-server:jerry 2014-08-07 15:01:29 +04:00
Ruben Ayrapetyan e3cd8ee942 Generational mark and sweep GC. 2014-08-07 14:54:32 +04:00
Ilmir Usmanov 5690be49dd Move serializer and deserializer to liboptimizer 2014-08-06 20:32:16 +04:00
e.gavrin ba6713e295 Replace -Og -> -O0 2014-08-06 16:40:27 +04:00
Ruben Ayrapetyan 4ff5042abc Enabling full testing mode during pre-commit. 2014-08-06 15:54:37 +04:00
e.gavrin 8dcafe6239 <Merge branch 'master' of git-server:jerry 2014-08-06 15:11:08 +04:00
e.gavrin 545e8fe698 Merge branch 'master' of git-server:jerry 2014-08-06 15:01:41 +04:00
Ruben Ayrapetyan 084ca2325c Implementing __printf. Setting libc_raw as default libc. Removing LIBC_STD mode. 2014-08-06 15:00:33 +04:00
Ruben Ayrapetyan 440a3c64a2 Handling git push non-zero exit code in tools/push.sh. 2014-08-06 14:51:37 +04:00
Ilmir Usmanov 8afbb39df0 Merge branch 'master' of git-server:jerry 2014-08-06 14:21:06 +04:00
Ilmir Usmanov 4a7bb710fa Add 'assert' intrinsic 2014-08-06 14:17:53 +04:00
e.gavrin 95c1fba2f6 Merge branch 'master' of git-server:jerry 2014-08-06 14:09:18 +04:00
Ruben Ayrapetyan 6c01782e91 Hiding *.check targets. Enablings pre-commit parse-only tests from ./benchmarks/jerry except cse.js and chess.js. Making tests named beginning from N to be skipped in jerry_test.sh. Renaming cse.js and chess.js to N.cse.js, N.chess.js. 2014-08-06 13:49:51 +04:00
Ruben Ayrapetyan 137ace24db Handling return value of run_int by setting exit code. 2014-08-06 13:06:55 +04:00
e.gavrin 3984df5c9e Replace -Og -> -O0 2014-08-05 21:27:49 +04:00
Ruben Ayrapetyan 411791ea32 Fix: remove unnecessary ecma_ref_object. 2014-08-05 17:59:20 +04:00
Ruben Ayrapetyan cd0c7ab9a0 Fixing make push output. 2014-08-05 16:02:07 +04:00
Ruben Ayrapetyan 4a3195cbba Adding *.swp to .gitignore. 2014-08-05 15:58:14 +04:00
Ruben Ayrapetyan e4ce585823 Implementing 'nop' opcode handler. 2014-08-05 15:53:17 +04:00
Ruben Ayrapetyan adfa6d3576 Adding -s (silent) flag to make command line in tools/push.sh. 2014-08-05 15:37:16 +04:00
Ruben Ayrapetyan 9f56d42ceb Adding push target. Handling empty commit list by early exit. Successful push message coloring. 2014-08-05 15:24:37 +04:00
e.gavrin 8530cf6cd4 Merge branch 'master' of git-server:jerry 2014-08-05 15:09:29 +04:00
e.gavrin 96939be7ac fix smth 2014-08-05 15:02:38 +04:00
e.gavrin 94fe8803e1 fix smth 2014-08-05 14:58:04 +04:00
Ilmir Usmanov 998a52b416 Merge branch 'geppetto' 2014-08-05 14:52:32 +04:00
Ilmir Usmanov bfe2293d43 Replace repeated var_decls with nop 2014-08-05 14:52:03 +04:00
e.gavrin be42a7b128 fix formatting. add commit message 2014-08-05 14:48:32 +04:00
e.gavrin f52a6a6ae3 add verbosity 2014-08-05 14:31:02 +04:00
e.gavrin f247162255 add out dir to git ignore. clean up main.c 2014-08-05 14:23:17 +04:00
Ruben Ayrapetyan 447d0295eb Adding tools/push.sh that runs precommit testing for every commit prepared for pushing, pushes the whole commit pack upon successful pass of all test runs. 2014-08-05 14:17:25 +04:00
Ruben Ayrapetyan eb233804d7 Removing git status checking from 'make precommit'. 2014-08-05 13:55:59 +04:00
Ruben Ayrapetyan 78a782b791 Fixing text of message in precommit script. 2014-08-05 12:50:58 +04:00
Ruben Ayrapetyan 0f8798aa1f Removing '.SILENT' special target. 2014-08-05 12:49:46 +04:00
Ilmir Usmanov 3b624be051 Fix adjusting jumps 2014-08-05 11:51:49 +04:00
Ilmir Usmanov fb86387675 Merge branch 'geppetto' 2014-08-04 22:56:41 +04:00
Ilmir Usmanov 557100059a Add bytecode pretty-printing 2014-08-04 22:56:26 +04:00
Ruben Ayrapetyan c5930c8775 Adding new line after 'OK to push' message. 2014-08-04 22:14:26 +04:00
Ruben Ayrapetyan 8c2e5b1f7a Fixing command that excludes 'out' directory from list outputted by git status for checking if Git status of directory is clean. 2014-08-04 22:10:42 +04:00
Ruben Ayrapetyan 304098a984 Introducing make target for precommit testing: 'make precommit' that also supports parallel run: 'make -j precommit'. Introducing set of modifiers for linux target: libc_raw, musl, sanitize, valgrind. For example: 'make debug.linux-libc_raw-sanitize' or 'make release.linux-valgrind'. Removing corresponding flags. 2014-08-04 22:02:48 +04:00
Ruben Ayrapetyan 1834887a93 Fixing conflicting types for serializer_rewrite_opcode function. 2014-08-04 18:58:16 +04:00
Ruben Ayrapetyan feba25f055 Supporting ASAN with LIBC_RAW. 2014-08-04 18:43:46 +04:00
Ruben Ayrapetyan ac35a4ebf2 Fixing cppcheck warnings in mem-heap.c (appeared when valgrind=1) and in jerry-libc.c (appeared libc_raw=1). 2014-08-04 18:42:40 +04:00
Ilmir Usmanov 97dc322085 Fix assertions in parser 2014-08-04 17:50:08 +04:00
Ilmir Usmanov 084ed7aee4 Add --suppress=sizeofwithnumericparameter param to cppcheck 2014-08-04 17:22:32 +04:00
Ilmir Usmanov 039efcc3ae Merge branch 'geppetto' 2014-08-04 17:09:22 +04:00
Ilmir Usmanov eee88ffdc2 Add basic support of 'break' and 'continue' statements (without identifiers) 2014-08-04 17:09:02 +04:00
Ruben Ayrapetyan 09136e3e38 Moving cppcheck run from check targets to corresponding build targets; setting cppcheck's error exit code to 1. 2014-08-04 16:59:45 +04:00
Ruben Ayrapetyan a16c1a0597 Reducing scope of 'data' variable in deserialize_num_by_id. 2014-08-04 16:57:28 +04:00
Ruben Ayrapetyan 0025827eac Fixes: JERRY_NVALGRIND effect was inverted; also a block was marked as inaccessible too early. 2014-08-01 18:30:24 +04:00
Ruben Ayrapetyan fa87696275 Revert "Fixes: JERRY_NVALGRIND effect was inverted; also a block was marked as inaccessible too early."
This reverts commit 53c0da4307b1407f506ff71b0e014eefe00da985.
2014-08-01 18:29:55 +04:00
Ruben Ayrapetyan a6feea1068 Fixes: JERRY_NVALGRIND effect was inverted; also a block was marked as inaccessible too early. 2014-08-01 18:28:18 +04:00
Ruben Ayrapetyan e1c57dc231 Adding valgrind's memcheck support in mem-heap. Adding valgrind's headers valgrind.h and memcheck.h to third-party/valgrind directory. 2014-08-01 18:22:34 +04:00
Ilmir Usmanov 806b4828af Merge branch 'master' of git-server:jerry 2014-08-01 15:49:57 +04:00
Ilmir Usmanov 59403ac7f2 Parse empty files correctly 2014-08-01 15:49:35 +04:00
Ruben Ayrapetyan 61dd7a5dd9 nostdlib under libc_raw=1 option. 2014-08-01 15:49:27 +04:00
Ilmir Usmanov 0ee1b9b54e Merge branch 'master' into geppetto 2014-08-01 15:25:49 +04:00
Ilmir Usmanov d15cf8f436 Fix some bugs in lexer 2014-08-01 15:24:48 +04:00
Ruben Ayrapetyan f4a4c91a98 Fixing read_sources: buffer and buffer_size were filled incorrectly. 2014-08-01 14:37:23 +04:00
Ruben Ayrapetyan 8260cc0214 Implementing case 3.b in PutValue operation. 2014-08-01 12:48:03 +04:00
e.gavrin a7b2aa1014 Improved generator.sh script to generate file to the specified file 2014-08-01 00:53:07 +04:00
e.gavrin 22b7797a83 -03 causes crashes on release 2014-08-01 00:37:43 +04:00
e.gavrin b1f940c863 add new benchmark and new test 2014-07-31 23:44:18 +04:00
e.gavrin d97c51d76e Add -O3 for host builds 2014-07-31 23:41:57 +04:00
Ilmir Usmanov dd5f90d50f Merge branch 'master' of git-server:jerry 2014-07-31 23:16:45 +04:00
Ilmir Usmanov 3f108ec1e7 Add asserts for testing and add test for 'for' loops 2014-07-31 23:16:24 +04:00
e.gavrin 0518c41121 refine tests 2014-07-31 22:45:59 +04:00
Ruben Ayrapetyan 779fe64161 Introducing ERR_SYSCALL that should be used on failures during syscalls execution. 2014-07-31 22:31:47 +04:00
Ruben Ayrapetyan 5c72a30228 Adding ./src/libruntime/target/linux/asm_{x86,x64}.h for architecture specific assembler blocks. 2014-07-31 22:26:01 +04:00
Ruben Ayrapetyan 020325d199 __HOST -> __TARGET_HOST_X64 2014-07-31 22:23:05 +04:00
e.gavrin 7ba8167591 Add exports 2014-07-31 22:11:46 +04:00
e.gavrin c2ad77b2b5 Add sanitize=1 flag to enable build with address sanitizer, while disabling it from default build 2014-07-31 22:04:42 +04:00
e.gavrin 3a53cc406b Merge branch 'master' of git-server:jerry 2014-07-31 21:59:44 +04:00
e.gavrin 2c193c1e2b Rename Makefile.mak -> Makefile.mk; Replace -O0 -> -Og 2014-07-31 21:59:35 +04:00
Ilmir Usmanov 420d3bf8f5 Merge branch 'master' of git-server:jerry 2014-07-31 21:52:33 +04:00
Ilmir Usmanov 1d41e8a355 Add 'exit' intrinsic 2014-07-31 21:52:25 +04:00
e.gavrin 7a076c3624 Remove PID printing 2014-07-31 21:26:27 +04:00
Ilmir Usmanov 2e0a3d4aca Add support of input several files 2014-07-31 21:23:29 +04:00
Ilmir Usmanov 14f0563d1a Fix couple of bugs show-opcodes: lexer should not dump lines, serializer must not rewrite a single opcode when dumping 2014-07-31 21:09:42 +04:00
Ilmir Usmanov 0d1935e3a8 Merge 2014-07-31 20:11:31 +04:00
Ilmir Usmanov 2809ffb36d Add scope reordering ("use strict" -> func_decl -> var_decl -> other opcodes); Add --show-opcodes console parameter 2014-07-31 19:30:27 +04:00
e.gavrin 7ff82e63c4 fix stm build 2014-07-31 17:58:29 +04:00
e.gavrin cf613ad594 Merge branch 'master' of git-server:jerry 2014-07-31 17:56:29 +04:00
e.gavrin 6f7e2ecdbc add --mem-stats flag to print memory usage statistics at exit 2014-07-31 17:56:17 +04:00
Ruben Ayrapetyan f177633622 Decreasing array chunk size to 8 bytes. 2014-07-31 17:53:43 +04:00
Ruben Ayrapetyan 4d7f14d059 Fixing ecma_compare_zt_string_to_ecma_string routine. 2014-07-31 17:52:10 +04:00
Ruben Ayrapetyan 9fd708eabe Revert "Fixing ecma_compare_zt_string_to_ecma_string routine."
This reverts commit c6e955aa2b231076b3ec70c55b38084afb4d01d2.
2014-07-31 17:51:40 +04:00
Ruben Ayrapetyan d327bf5682 Fixing ecma_compare_zt_string_to_ecma_string routine. 2014-07-31 17:49:16 +04:00
Ruben Ayrapetyan 2c85a55c85 Introducing Global Environment constructor; using Global Environment as starting lexical environment. 2014-07-31 17:21:47 +04:00
Ruben Ayrapetyan bfad8e897d Implementing ECMA-262 v5 10.2.1.2 operations (object environment record's CreateMutableBinding, SetMutableBinding, etc.). 2014-07-31 17:13:20 +04:00
Ruben Ayrapetyan f8ef3deaf3 Full implementation of general objects' [[DefineOwnProperty]]. 2014-07-31 17:07:21 +04:00
Ruben Ayrapetyan a084273286 Minor style fixes. 2014-07-31 17:05:51 +04:00
Ruben Ayrapetyan 9610680e3c Fix ecma_create_object_lex_env: increasing binding object's reference counter. 2014-07-31 14:56:22 +04:00
Ruben Ayrapetyan c364461b80 Splitting ecma_create_lexical_environment to ecma_create_decl_lex_env and ecma_create_object_lex_env. 2014-07-31 14:48:28 +04:00
Ruben Ayrapetyan 16cab18ae9 Introducing partially implemented Global object constructor. 2014-07-31 14:26:24 +04:00
Ruben Ayrapetyan e25e4d6cab Introducing constructor for ecma_property_descriptor_t. 2014-07-31 14:03:11 +04:00
e.gavrin 0709c3d07c fix main 2014-07-31 13:35:41 +04:00
e.gavrin 454744d816 add counters to MCU version 2014-07-31 00:26:58 +04:00
e.gavrin dba333c2c4 add timers 2014-07-30 23:49:49 +04:00
e.gavrin 1b47f87c5f Merge branch 'master' of git-server:jerry 2014-07-30 21:57:53 +04:00
e.gavrin c25db6d7b9 refine peripherals processing. Use libs 2014-07-30 21:57:41 +04:00
Ruben Ayrapetyan b50e091b08 Renaming opcode_idx_t to opcode_counter_t. 2014-07-30 21:54:53 +04:00
Ruben Ayrapetyan 4ebf551525 Renaming interp_bytecode_idx to op_idx_t. 2014-07-30 21:52:17 +04:00
Ruben Ayrapetyan c344cc7422 Correct implementation of opfunc_call_0 that was commited in c8dc00f4558efeb4bc0c2cd5d21e778294cb0d3a. The comment to that revision is incorrect: it specifies that opfunc_func_decl_0 should be rewritten; it is mistake, really it was about opfunc_call_0. 2014-07-30 21:46:02 +04:00
Ruben Ayrapetyan e540590ddd Partial implementation of function call routine ([[Call]]). 2014-07-30 20:34:04 +04:00
Ruben Ayrapetyan 221fb47a77 Implementing steps 16 - 19 of 'Function object creation' routine; creating ecma_op_get_throw_type_error stub. 2014-07-30 18:27:48 +04:00
Ruben Ayrapetyan 45a3d52d70 Fixing [[DefineOwnProperty]]: correctly setting up value of data named property; correctly increasing reference counters of getter and setter. 2014-07-30 18:24:14 +04:00
Ruben Ayrapetyan df224408fc Introducing ecma_get_magic_string that returns pointer to requested magic string that is used in an ECMA routine. 2014-07-30 17:56:53 +04:00
Ruben Ayrapetyan b059212e32 Implementing IsCallable operation. 2014-07-30 17:48:28 +04:00
Ruben Ayrapetyan d4d446cd4f Temporary implementation of 'func_decl_0' opcode handler. Should be rewritten from scratch after 'Function object creation' routine is fully implemented. 2014-07-30 15:44:28 +04:00
Ruben Ayrapetyan ccb0701469 Removing 'ret' opcode from unimplemented opcodes' list. 2014-07-30 15:42:32 +04:00
Ruben Ayrapetyan fe54e4dfd8 Implementation of 'ret' opcode handler. 2014-07-30 15:41:47 +04:00
Ruben Ayrapetyan e6f0057456 Partial implementation of func_decl_0 opcode handler. 2014-07-30 15:40:41 +04:00
Ruben Ayrapetyan f05719d622 Partial implementation of ECMA Function object creation routine. 2014-07-30 15:36:21 +04:00
Ruben Ayrapetyan 7bca73b8be Removing build targets from 'all' because check targets call build targets themself. 2014-07-30 15:08:50 +04:00
Ruben Ayrapetyan 52495b2cc1 Generating version info without header file. 2014-07-30 15:08:02 +04:00
e.gavrin c6baf89035 Merge branch 'master' of git-server:jerry 2014-07-30 14:43:13 +04:00
e.gavrin ab4e59700f add message on top main with info about branch/revision data 2014-07-30 14:43:02 +04:00
Ruben Ayrapetyan c1d0a4dd13 Introducing interp_bytecode_idx type for opcode indexes. 2014-07-30 14:34:31 +04:00
Ruben Ayrapetyan 0dd67e4799 Introducing ecma_object_class_t type that describes ecma-defined object classes (value of ECMA_INTERNAL_PROPERTY_CLASS internal property); adding outer lexical environment's reference counter increment in ecma_create_lexical_environment; updating ecma_create_object to support object type field (that is not connected with ecma-defined object class, but is internal implementation defined type of an object). 2014-07-30 14:24:01 +04:00
Ruben Ayrapetyan f8743a1375 Switching from 'echa_char_t*' to 'const ecma_char_t*' where appropriate. 2014-07-30 14:20:20 +04:00
Ruben Ayrapetyan 56daef38eb Fixing debug.stm32f4: uncommented memcpy and memset aliases, placed them under #ifndef LIBC_MUSL. 2014-07-30 13:57:40 +04:00
e.gavrin d8c721f57a Fix not working ulimit while using musl=1. Add color flag, that enables -fdiagnostics-color=always if specified 2014-07-30 00:22:14 +04:00
e.gavrin 076af9e1d3 add musl support for host systems using musl=1 flag 2014-07-29 23:28:11 +04:00
Ilmir Usmanov 8c5309d131 Add jump after function declaration and function expression header 2014-07-29 20:22:12 +04:00
Ilmir Usmanov 7d20bb3361 Merge branch 'master' into geppetto 2014-07-29 17:49:23 +04:00
Ilmir Usmanov e497875c06 Change strings offset size from 8 bits to 16 bits 2014-07-29 17:49:13 +04:00
Ruben Ayrapetyan 8d387cd32f Introducing make parameters todo, fixme and echo: todo/fixme enable printing of todo/fixme pragma messages if set to 1 (that are disabled by default after this commit); echo enables compilation/linking command line echoing if set to 1. 2014-07-29 14:52:42 +04:00
Ruben Ayrapetyan 299c94ee85 Implementation of general objects' [[GetOwnProperty]], [[GetProperty]], [[CanPut]], [[HasProperty]], [[Delete]]; partial implementation of general objects' [[Get]], [[Put]], [[DefineOwnProperty]]. 2014-07-29 14:32:01 +04:00
e.gavrin 5aaa853b9f Stable and tested demo ^^ 2014-07-29 12:23:04 +04:00
e.gavrin f4cdf1d266 Stable demo 2014-07-29 12:21:30 +04:00
Ilmir Usmanov ac22173ddd Merge branch 'master' of git-server:jerry 2014-07-29 11:55:37 +04:00
Ilmir Usmanov bc9d80147a Reduce lexer's memory consumption 2014-07-29 11:55:16 +04:00
Ruben Ayrapetyan 4cefa6950e Fix ecma_op_define_own_property argument list: the routine now takes property descriptor as an argument instead of property. 2014-07-28 21:57:27 +04:00
Ruben Ayrapetyan b073701da4 Introducing ECMA property descriptor (8.10) type and helpers for it: constructor and destructor. 2014-07-28 21:54:42 +04:00
Ruben Ayrapetyan 3ee0e8a8a5 Style fixes regarding 'empty' value: introducing ecma_is_empty_completion_value, reducing usage of the 'empty' value, listing possible usage cases of the 'empty' value in the comment to it's definition. 2014-07-28 21:21:31 +04:00
Ilmir Usmanov 177a2d1382 Merge branch 'geppetto' 2014-07-28 19:39:25 +04:00
Ilmir Usmanov 1b6638f073 Add ERR_MEMORY exit code to show that there was not enough memory; fix debug.stm build 2014-07-28 19:39:11 +04:00
Ruben Ayrapetyan cae07c0832 Implementing stubs for ecma objects' common internal properties and methods (ECMA-262 v5, Table 8). 2014-07-28 18:16:05 +04:00
Ilmir Usmanov d927d3e320 Fixes after review: simplification 2014-07-28 17:59:46 +04:00
Ilmir Usmanov 306f111a28 Add 'make testparser' option to test parser only 2014-07-28 17:28:18 +04:00
Ilmir Usmanov 24403c618e Merge branch 'geppetto' 2014-07-28 15:56:56 +04:00
Ilmir Usmanov 06473f0db2 Add Dolphin's .directory files to ignore 2014-07-28 15:56:28 +04:00
Ruben Ayrapetyan 7840a846e8 Fix: removing extra semi-colon after FIXME. 2014-07-28 15:46:12 +04:00
Ruben Ayrapetyan 7984c7e65f Fixing comment about an object's maximum reference counter. Adding runtime check for the counter's overflow. 2014-07-28 15:17:01 +04:00
Ruben Ayrapetyan 27f6d2b552 Fixing test_poolman that is failing after 6b050cc03719bfdb49b68eeb5deeed61bc51ff5a. 2014-07-25 20:23:34 +04:00
Ruben Ayrapetyan f1a0e616b1 Resident set size measurement script. 2014-07-25 20:16:43 +04:00
Ruben Ayrapetyan 09c1f91bb3 Printing heap's block headers before beginning of unit test. 2014-07-25 20:00:59 +04:00
e.gavrin 43ad060aa0 add js fuzz 2014-07-25 19:44:00 +04:00
e.gavrin 65b4968a69 fix text 2014-07-25 19:24:19 +04:00
Ruben Ayrapetyan e3c8af68f5 Enhancement of heap memory usage statistics output. 2014-07-25 19:16:52 +04:00
Ruben Ayrapetyan 5e4078095a Print heap memory usage statistics before exit (host version). 2014-07-25 19:09:10 +04:00
Ruben Ayrapetyan d90dccde9a Reducing heap's chunk size to 64 bytes, heap size to 2.5K; RAM size to 8K in stm32f4 linker script. 2014-07-25 19:03:45 +04:00
e.gavrin 78f92d8377 fix generated with appropriate example, limit ram with 48KB 2014-07-25 18:34:13 +04:00
Ruben Ayrapetyan 222e9e680c Adding assertion checks in serializer_dump_opcode and serializer_rewrite_opcode to avoid buffer overrun. 2014-07-25 18:20:54 +04:00
Ruben Ayrapetyan ff2609eb88 Implementing {pre,post}_{incr,decr} opcodes. 2014-07-25 18:07:18 +04:00
Ruben Ayrapetyan cfdef23303 Adding compilation flag '-Wfatal-errors'. 2014-07-25 18:06:45 +04:00
e.gavrin 43a8bbd576 fixed led processing and wait 2014-07-25 17:47:09 +04:00
e.gavrin 5da1df37de add led_on, led_off, led_toggle, led_blink_one to lib 2014-07-25 16:29:12 +04:00
Ilmir Usmanov 8745c47192 Merge branch 'geppetto' 2014-07-25 14:16:52 +04:00
Ilmir Usmanov 40007126fa Fix memory corruptions in lexer, which occured while parsing cse.js; remove lexer.log and parser.log files 2014-07-25 14:16:29 +04:00
Ruben Ayrapetyan 361e5a6f38 Use -gdwarf-3 by default, -gdwarf-4 if dwarf4=1 option is passed to make. 2014-07-25 13:51:35 +04:00
e.gavrin 1d42426fa4 Merge branch 'master' of git-server:jerry 2014-07-25 13:18:44 +04:00
e.gavrin 8094de86d1 add wait for stm, move fake_exit to peripheraks 2014-07-25 13:18:31 +04:00
Ilmir Usmanov c9c26251a4 Add savings bytecode in memory on target 2014-07-25 12:37:29 +04:00
Ilmir Usmanov 518ff9a864 Merge branch 'master' into geppetto 2014-07-24 21:51:17 +04:00
Ruben Ayrapetyan 7077e42c85 Improving performance of building unittests. 2014-07-24 21:41:04 +04:00
Ilmir Usmanov 8fadaf5277 Merge branch 'master' into geppetto 2014-07-24 21:40:59 +04:00
Ilmir Usmanov c6c2abce0e Merge 2014-07-24 21:40:30 +04:00
Ruben Ayrapetyan 7f918612c1 Removing 'dev.*' targets. 2014-07-24 21:19:34 +04:00
Ruben Ayrapetyan 6301cba0c3 Implementing equal_value, not_equal_value, less_than, greater_than opcodes. 2014-07-24 21:09:02 +04:00
Ruben Ayrapetyan 20b04a5ed7 Adding ecma-try-catch-macro.h that should have been a part of previous commit. 2014-07-24 20:33:58 +04:00
Ruben Ayrapetyan b2ae827fbd Partially implementing ECMA 'Absract relational comparison' (11.8.5). 2014-07-24 20:31:57 +04:00
Ruben Ayrapetyan 61550f2029 Fixing opcode unit tests. 2014-07-24 20:04:27 +04:00
Ilmir Usmanov 1f3b5a4c29 Merge 2014-07-24 19:50:37 +04:00
Ilmir Usmanov 3b0fef6e04 Add opcodes for increment and decrement; add optimizer 2014-07-24 19:27:58 +04:00
e.gavrin c2f82eefc0 add blink_toggle_once 2014-07-24 19:27:19 +04:00
Ruben Ayrapetyan 89834cd616 Printing of called function's name in 'call_1' opcode handler. 2014-07-24 18:30:49 +04:00
Ruben Ayrapetyan 63a757a5a7 Connecting try_get_str_by_idx with deserialize_string_by_id and get_number_by_idx with deserialize_num_by_id. 2014-07-24 18:28:46 +04:00
Ruben Ayrapetyan b7a3a13bc9 Implementing register variables. 2014-07-24 18:13:32 +04:00
Ilmir Usmanov c837c7d435 Optimize reg_var_decl memory usage 2014-07-24 16:54:59 +04:00
e.gavrin 389cd34bc0 Enable address sanitizer + color output 2014-07-24 15:57:10 +04:00
Ilmir Usmanov 1790739b93 Add 'reg_var_decl' opcode 2014-07-24 15:45:55 +04:00
Ilmir Usmanov b4404578ca Lazy initialization in deserializer 2014-07-24 15:24:51 +04:00
Ilmir Usmanov ea4278184c Rename deserializer_get_* -> deserialize_* 2014-07-24 12:17:59 +04:00
Ilmir Usmanov 60fa1d1178 Add checks of dumped literals and identifiers. Fix deserializer and serializer. 2014-07-24 11:55:14 +04:00
Ilmir Usmanov 597b5fe5c2 Merge branch 'master' of git-server:jerry 2014-07-23 22:56:06 +04:00
Ilmir Usmanov ed4e2a20e4 Add deserializer 2014-07-23 22:55:45 +04:00
Ruben Ayrapetyan 2718d8e918 Fixing is_false_jmp, is_true_jmp opcodes; adding them to var_decl and assignment unit tests as partial checks. 2014-07-23 22:22:50 +04:00
Ruben Ayrapetyan d659b703a1 Style fix in ecma_make_reference. 2014-07-23 21:59:32 +04:00
Ruben Ayrapetyan 826c6aeca2 Implementing is_false_jmp, is_true_jmp opcodes. 2014-07-23 21:58:15 +04:00
Ilmir Usmanov b923468720 Merge branch 'geppetto' 2014-07-23 21:34:43 +04:00
Ilmir Usmanov db9d18bd26 Don't dump trash 2014-07-23 21:34:25 +04:00
Ruben Ayrapetyan 13b6d13c3c Implementing jmp_down, jmp_up opcodes. 2014-07-23 21:00:03 +04:00
Ilmir Usmanov f1dd405933 Merge 2014-07-23 20:50:29 +04:00
Ilmir Usmanov 764efa41b8 Fix parsing of for-loops. 2014-07-23 20:47:31 +04:00
Ruben Ayrapetyan 8d180e9be1 Minor style fixes. 2014-07-23 20:41:21 +04:00
e.gavrin 2ff5d14b06 new test 2014-07-23 19:44:29 +04:00
Ruben Ayrapetyan 26c00acd50 Refinement of src/main.c. 2014-07-23 19:08:06 +04:00
e.gavrin 0b76dfb6df Merge branch 'master' of git-server:jerry 2014-07-23 18:59:21 +04:00
Ilmir Usmanov e5cdf93d2d Dump script line before bytecode (Only on host). Fix parsing literals: assing literal to temp before usage. 2014-07-23 18:43:03 +04:00
Ilmir Usmanov d57da2aa8a Num literals outside of assignments (in lists) are not allowed 2014-07-23 17:52:02 +04:00
Ilmir Usmanov b3b1d485ab Merge 2014-07-23 17:37:49 +04:00
Ilmir Usmanov f264d24b5a Rewrite serializer and lexer: adjust nums' ids, dump strings, nums and rewrites 2014-07-23 17:36:11 +04:00
Ruben Ayrapetyan dafae023e3 Merge branch 'master' of git-server.vd:jerry 2014-07-23 15:50:07 +04:00
Ruben Ayrapetyan cbba89c7f8 Extending each *.check target by unit tests' run. 2014-07-23 15:48:58 +04:00
Ilmir Usmanov 7fdbc84e3e Merge branch 'geppetto' 2014-07-23 15:39:21 +04:00
Ilmir Usmanov 1b2a52da51 Parse blinky 2014-07-23 15:39:01 +04:00
Ruben Ayrapetyan d17e28b7bf Fixing *.stm32f4 builds. 2014-07-23 14:57:37 +04:00
Ruben Ayrapetyan 0eea67ceb2 Renaming camelCase-named identifiers in unit tests' code. 2014-07-23 14:14:45 +04:00
Ruben Ayrapetyan 1796b9d903 Renaming rest camelCase-named identifiers according to underscore_named_value-naming. 2014-07-23 14:07:45 +04:00
Ruben Ayrapetyan 79f3d97434 Renaming jerry_* identifiers from 'camelCase' to 'underscore_naming'. 2014-07-23 13:03:30 +04:00
Ruben Ayrapetyan c0df259726 Renaming ecma_GC_info_t -> ecma_gc_info_t (missed this renaming in previous commit). 2014-07-23 13:00:01 +04:00
Ruben Ayrapetyan bc0c7824c2 Renaming ecma_* identifiers from 'camelCase' to 'underscore_naming'. 2014-07-23 12:54:56 +04:00
Ruben Ayrapetyan b3b4c74cbe Renaming mem_* identifiers from 'camelCase' to 'underscore_naming'. 2014-07-23 12:54:45 +04:00
Ruben Ayrapetyan 2d4ed154ee Removing m_ prefix from identifiers (m_ValueType -> ValueType, ...). 2014-07-23 11:41:58 +04:00
Ruben Ayrapetyan 3ef9ee9eb4 Merge branch 'master' of git-server.vd:jerry 2014-07-22 22:15:03 +04:00
Ruben Ayrapetyan 8e08d5f6d6 Partially implementing ECMA 'Absract equality comparison' (11.9.3). 2014-07-22 22:13:51 +04:00
e.gavrin 844382be19 Moved scopes of several variables closer to usage; 2014-07-22 21:53:18 +04:00
Ruben Ayrapetyan 19c15b03b0 Reverting changes in jerry_Exit and adding comment about jerry_AssertFail call. 2014-07-22 21:47:33 +04:00
Ilmir Usmanov 931815c915 Merge branch 'master' of git-server:jerry 2014-07-22 21:19:48 +04:00
Ilmir Usmanov 18fcf4bd77 Merge with 'geppetto': Generate bytecode while parsing 2014-07-22 21:18:19 +04:00
Ilmir Usmanov efb7009cfb Generate bytecode while parsing 2014-07-22 20:49:51 +04:00
Ruben Ayrapetyan cc513e9f35 Adding assertion that interpreter doesn't receive non-empty normal ecma completion value. 2014-07-22 19:01:11 +04:00
Ruben Ayrapetyan 488ed41c2b Implementing 'substraction' opcode handler and, partially (except string operands), 'addition' opcode handler; adding unit tests for them. 2014-07-22 18:55:13 +04:00
Ruben Ayrapetyan cbbd71588a Implementing 'division' and 'remainder' opcode handlers, adding unit tests for the opcodes. 2014-07-22 18:26:06 +04:00
Ruben Ayrapetyan f71e8c521a Adding stubs with partial implementation for ecma numbers' addition, substraction, division, remainder calculation and negation. 2014-07-22 17:38:39 +04:00
Ruben Ayrapetyan f0abfbb31b Refinement of exception handling code in 'multiplication' and 'assignment' opcode handlers. 2014-07-22 17:23:29 +04:00
Ruben Ayrapetyan 739d19be5b Implementing 'multiplication' opcode handler and unit test for the opcode. 2014-07-21 21:59:15 +04:00
Ruben Ayrapetyan 9b2b248728 Partially implementing ToNumber operation. 2014-07-21 20:36:08 +04:00
Ruben Ayrapetyan 7a0612d441 Adding is_strict flag to interpreter context. 2014-07-21 20:24:48 +04:00
Ruben Ayrapetyan 7e87a1fde0 Implementing CheckObjectCoercible operation and partial stubs for ToPrimitive and ToObject operations. 2014-07-21 19:58:04 +04:00
Ruben Ayrapetyan 2590b032e1 Fixing get_number_by_idx. 2014-07-21 19:41:12 +04:00
Ruben Ayrapetyan ff4d3e4af3 Implementing assignment of number literal values in 'assignment' opcode handler. 2014-07-21 19:22:25 +04:00
Ruben Ayrapetyan 84131d9a28 Introducing get_number_by_idx interface for retrieving literal number value by it's identifier. Change ecma_Number_t type from double to float. 2014-07-21 19:16:08 +04:00
Ruben Ayrapetyan 5df6233e0b Fix description comment for ecma_op_put_value. 2014-07-21 18:11:05 +04:00
Ruben Ayrapetyan 30c383556d Unit test for 'assignment' opcode. 2014-07-21 18:09:05 +04:00
Ruben Ayrapetyan 6abc3ae3a2 Merge branch 'master' of git-server.vd:jerry 2014-07-21 18:06:54 +04:00
Ruben Ayrapetyan d62f145ff2 Implementing 'assignment' opcode handler. 2014-07-21 18:03:12 +04:00
e.gavrin cfcdc72dc9 Merge branch 'master' of git-server:jerry 2014-07-21 17:56:35 +04:00
e.gavrin 90a8e86bbe fixes 2014-07-21 17:56:23 +04:00
Ruben Ayrapetyan 5e503ced32 Fixing ecma_op_get_value, ecma_op_put_value: correctly distinguishing whether the base is object or lexical environment. 2014-07-21 17:51:11 +04:00
Ruben Ayrapetyan 57629912e4 Rename: ecma_OpGetValue -> ecma_op_get_value; ecma_OpSetValue -> ecma_op_put_value. 2014-07-21 17:47:39 +04:00
Ruben Ayrapetyan 1175526d52 Fixing value copying/value leakage issues. 2014-07-21 17:39:39 +04:00
Ruben Ayrapetyan 0ff6d7ae9e Fixing ecma_CopyValue: adding missing breaks in switch. 2014-07-21 16:55:39 +04:00
Ruben Ayrapetyan 98a0c0f933 Introducing type argument in 'assignment' opcode handler. 2014-07-21 15:57:15 +04:00
e.gavrin 123df0f185 added benchmarks.js 2014-07-21 15:01:55 +04:00
Ruben Ayrapetyan 0af0c86532 Unit test: single var_decl, followed by exitval. 2014-07-18 15:27:38 +04:00
Ruben Ayrapetyan aa6bed0c4c Implementing ecma_CompareZtStringToEcmaString - zero-terminated- and ecma- strings compare routine. 2014-07-18 14:07:07 +04:00
Ruben Ayrapetyan ef51126aab Adding boolean return value, indicating whether script execution finished with success or failure, to run_int. Moving opcode loop from run_int to run_int_from_pos. 2014-07-18 12:27:17 +04:00
Ruben Ayrapetyan dd7029e15d Fixing ecma_OpHasBinding, ecma_OpCreateMutableBinding and ecma_OpSetMutableBinding (inserting missing breaks in switches). 2014-07-17 22:06:51 +04:00
Ruben Ayrapetyan f1d33b9236 Inverting properties' attributes' values in corresponding enums - now not_{writable,configurable,enumerable} correspond to 0 and {writable,configurable,enumerable} to 1. 2014-07-17 22:02:57 +04:00
Ruben Ayrapetyan f7abe7190d Implementing var_decl opcode. 2014-07-17 22:02:07 +04:00
Ruben Ayrapetyan 383853c116 Introducing string_literal_copy type descripting string literal copy for using in opcode handlers implementation. 2014-07-17 21:53:26 +04:00
Ruben Ayrapetyan 0209acad65 Introducing exitval opcode for end of script and assertions in unit tests. The opcode finishes interpretation with status code 0 (success) or 1 (failure). 2014-07-17 21:32:29 +04:00
Ruben Ayrapetyan 819b947445 Introducing try_get_string_by_idx interface for retrieving literal string value by it's identifier. 2014-07-17 21:07:25 +04:00
Ruben Ayrapetyan 0a87643eb6 Changing size of ecma_Char_t to 1 byte. 2014-07-17 20:56:20 +04:00
Ruben Ayrapetyan dd5c9dfb39 Changing return type of opcode handlers to ecma_CompletionValue_t. 2014-07-17 20:53:48 +04:00
Ruben Ayrapetyan a20aa29354 Templating definition of unimplemented opcodes. 2014-07-17 20:46:47 +04:00
Ruben Ayrapetyan d7a1566c23 During compilation of unit tests print compilation command line if it has been failed. 2014-07-17 20:43:30 +04:00
Ruben Ayrapetyan dd3f85b594 Making cppcheck to suppress warnings about missing system includes and unused functions. Setting --error-exitcode to 0 until all other warnings are fixed. 2014-07-17 18:55:25 +04:00
Ruben Ayrapetyan ffe6ab14bb Adding ctags and ID database to .gitignore list. 2014-07-17 18:55:10 +04:00
e.gavrin 0c9f81dbf9 add var_decl 2014-07-17 15:19:55 +04:00
Ruben Ayrapetyan 124673b5b4 Merge branch 'master' of git-server.vd:jerry 2014-07-17 14:48:41 +04:00
Ruben Ayrapetyan c0232c45f3 Redirecting all build's and tests' output to out/$(TARGET)/{.,obj,check}. Make clean now is rm -rf ./out. 2014-07-17 14:46:50 +04:00
e.gavrin 9a0b54313d remove opcodes 2014-07-17 13:08:43 +04:00
e.gavrin 080fb4aa5a aaa lickser.c 2014-07-17 11:54:31 +04:00
e.gavrin a61d31e9bf fix style error: Variable xxx hides enumerator with same name 2014-07-16 23:20:27 +04:00
e.gavrin 73bf0f9be1 remove unused gen_bytecode and save_op_data 2014-07-16 23:03:58 +04:00
Ilmir Usmanov c53eccbdd6 Merge branch 'master' into geppetto 2014-07-16 22:24:42 +04:00
Ilmir Usmanov 270ee301b4 Start dumping assignment expressions to bytecode; revise bytecode instructions 2014-07-16 22:23:55 +04:00
Ruben Ayrapetyan 6891039184 Fixing assertion on HasBinding result in ecma_OpGetIdentifierReference. 2014-07-16 22:21:15 +04:00
Ruben Ayrapetyan b300316403 Fixing assertion in ecma_OpGetIdentifierReference. 2014-07-16 22:16:14 +04:00
Ruben Ayrapetyan 6cdb927d14 Implementing ECMA-262 v5 10.2.1.1 operations (declarative environment record's CreateMutableBinding, SetMutableBinding, etc.). 2014-07-16 21:44:10 +04:00
Ruben Ayrapetyan 2598d01105 Renaming ecma_IsUndefinedValue -> ecma_IsValueUndefined and the like; introducing ecma_IsCompletionValueNormal{True,False} helpers. 2014-07-16 21:42:49 +04:00
Ruben Ayrapetyan c8605bb4d1 Renaming ecma_GC*Property to ecma_Free*Property and moving them to ecma-helpers.c; introducing ecma_CreateNamedProperty, ecma_GetNamedProperty, ecma_GetNamedDataProperty, ecma_FreeProperty (extracted from ecma_GCRun), ecma_DeleteProperty; removing length argument of ecma_NewEcmaString helper. 2014-07-16 21:37:24 +04:00
Ruben Ayrapetyan 8d07e2b239 Introducing ecma_Property{Writable,Enumerable,Configurable}Value_t enum value types for properties' attributes. 2014-07-16 21:19:44 +04:00
Ruben Ayrapetyan 6918db2f59 Replacing 'ecma_Free' prefix in ecma_Free{Object,Property,Number,ArrayFirstChunk,ArrayNonFirstChunk} to 'ecma_Dealloc'. 2014-07-16 21:17:43 +04:00
Ruben Ayrapetyan b72185696a Introducing ecma_MakeReference and ecma_FreeReference, moving ecma_OpGetIdentifierReference to libecmaoperations/ecma-reference.c. 2014-07-16 17:20:40 +04:00
Ruben Ayrapetyan 60063683aa Rename ecma_GCValue to ecma_FreeValue and move it to ecma-helpers-value.c. Introduce ecma_CopyValue. 2014-07-16 17:12:45 +04:00
Ruben Ayrapetyan ca420ea0e9 Implementing PutValue for cases:
- base is lexical environment;
      - base is undefined (unresolvable reference);

    Descripting implementation of other PutValue's cases in comments.
2014-07-16 14:41:17 +04:00
Ilmir Usmanov 0c64b78430 Merge branch 'geppetto' 2014-07-16 13:04:54 +04:00
Ilmir Usmanov 438318d788 Generate getop_* functions 2014-07-16 13:04:30 +04:00
e.gavrin 3721569d6c minor formatting fix 2014-07-16 12:47:27 +04:00
Ruben Ayrapetyan b1f9275048 Merge branch 'master' of git-server.vd:jerry 2014-07-15 21:44:21 +04:00
Ilmir Usmanov 32b4b7c869 Merge branch 'geppetto' 2014-07-15 21:42:33 +04:00
Ilmir Usmanov 87072c6088 Merge with master 2014-07-15 21:42:05 +04:00
Ruben Ayrapetyan c5cfff3d92 Adding comment to ecma_NewStandardError. 2014-07-15 21:41:47 +04:00
Ruben Ayrapetyan 16be2ee3ab Implementing GetValue for cases:
- base is lexical environment;
  - base is undefined (unresolvable reference);

Descripting implementation of other GetValue's cases in comments.
2014-07-15 21:41:47 +04:00
Ruben Ayrapetyan 56f731a3f2 Introducing ecma_MakeThrowValue constructor for throw completion values. 2014-07-15 21:41:47 +04:00
Ruben Ayrapetyan cdde0900e3 Introducing native ecma error types and ecma_NewStandardError interface. 2014-07-15 21:41:47 +04:00
Ilmir Usmanov 0647cdd4f1 Add bytecode generator 2014-07-15 19:32:26 +04:00
Ruben Ayrapetyan 4395da05d3 Renaming ecma_Object_t::u_Attributes to u.
Renaming ecma_CompletionValue_t:: completion_type to type, completion_value to value.
Introducing ECMA_TARGET_ID_RESERVED value of ecma_CompletionValue_t::target when it is unused.
Adding ecma_Reference_t type for ECMA-reference.
Introducing some constructors and helpers for ecma-values.
Introducing ecma_FindNamedProperty helper.
Removing ecma_SyntacticReference_t type.
Implementing ecma operation GetIdentifierReference.
Stubs and partial implementation for GetValue, SetValue, lexical environment operations (HasBinding, etc.).
2014-07-15 19:27:15 +04:00
Ruben Ayrapetyan f88fe5fae3 Moving jerry defines from CFLAGS_COMMON to DEFINES_JERRY and fixing cppcheck arguments. 2014-07-15 19:17:21 +04:00
Ruben Ayrapetyan 2615f28700 Adding JERRY_UNIMPLEMENTED_REF_UNUSED_VARS(...) macros that allow referencing variables that are unused due to partial implementation. 2014-07-15 18:56:09 +04:00
Ruben Ayrapetyan 4ffbb5dc0c Emptying LDFLAGS_OPTIMIZE and LDFLAGS_NO_OPTIMIZE, because their current values are duplicating flags in $(CFLAGS_COMMON). 2014-07-15 15:43:16 +04:00
Ruben Ayrapetyan b4cafc2ae8 Removing *.linux.flash targets. Adding dependency from check, flash to target of an action, fix path used in flash action. Temporarily changing --error-exitcode parameter of cppcheck to 0. 2014-07-14 21:00:40 +04:00
Ruben Ayrapetyan 18a5852914 Fix src/main.c for target MCU. 2014-07-14 20:53:06 +04:00
Ruben Ayrapetyan 7a2397f235 Introducing new make targets scheme: {dev,debug,release,debug_release}.{linux,stm32f{4}}[.{check,flash}]. 2014-07-14 20:10:46 +04:00
Ruben Ayrapetyan d4b84f47a8 Fixing type conversion warnings in src/main.c and disabling warnings for third-party headers, included from that module. 2014-07-14 20:03:43 +04:00
Ruben Ayrapetyan dfb9441e8c Removed typedefs for basic int types and bool, definition of NULL from globals.h. Included <stdint.h>, <stdbool.h>, <stddef.h> in that header. 2014-07-14 19:59:29 +04:00
Ruben Ayrapetyan 63547e9f2c Change bit fields' type from uint32_t to unsigned int (because uint32_t is defined as something other than unsigned int in arm-none-eabi stdint.h; using that type for bit-fields is GCC extension). 2014-07-14 19:56:17 +04:00
Ruben Ayrapetyan c9e98171fd Remove inline attributes from src/libjsparser/lexer.c. 2014-07-14 19:53:41 +04:00
Ruben Ayrapetyan 4ca4c71c8b Fix warning about unused parameter 'opdata' in opfunc_call_1. 2014-07-14 19:51:11 +04:00
Ruben Ayrapetyan 0dd13021ae Remove usage of 'double' type. 2014-07-14 19:44:54 +04:00
Ruben Ayrapetyan 30b1a43e1e Adding memcpy, memset (for compiler usage). 2014-07-14 19:43:07 +04:00
Ruben Ayrapetyan bc83f77abe Fixing warnings and removing call to vprintf in src/libruntime/target/stm32f4/*. 2014-07-14 19:39:22 +04:00
Ruben Ayrapetyan 97a2776996 Deleting tests/jerry/*.exp. 2014-07-14 19:36:05 +04:00
Ruben Ayrapetyan 25ad63c9be Adding forgotten jerry-libc.c for linux and stm32f4 targets. 2014-07-10 22:20:31 +04:00
Ruben Ayrapetyan 5b48cb1a37 Move src/libruntime/{linux,stm32f4} to src/libruntime/target. 2014-07-10 22:17:33 +04:00
Ruben Ayrapetyan 6a27068dbd Move fatal from lexer.c to parser.c, rename it to parser_fatal, replace calls from main.c to parser_fatal with calls to jerry_Exit. 2014-07-10 22:06:09 +04:00
Ruben Ayrapetyan e6b3be5dfc jerry_Exit - exit function that under !JERRY_NDEBUG, in case status code is non-zero, prints exit status as string and calls handler of failed assertion. 2014-07-10 21:52:15 +04:00
Ruben Ayrapetyan f9ee8960c7 Move fatal from parser.c to lexer.c. 2014-07-10 21:12:26 +04:00
Ruben Ayrapetyan 224c509ff3 Merge with master. 2014-07-10 21:02:48 +04:00
Ruben Ayrapetyan c531c78b10 Setting non-zero error exit code to cppcheck and jerry_test.sh. 2014-07-10 19:46:24 +04:00
Ruben Ayrapetyan b71daa172c Enable -flto. 2014-07-10 19:46:24 +04:00
Ruben Ayrapetyan 4cb5fb646e memmove, fprintf. 2014-07-10 19:46:24 +04:00
Ruben Ayrapetyan 76e579d4e1 Remove inclusion of std headers to our headers; move fatal from src/error.h to src/libjsparser/parser.c. 2014-07-10 19:46:24 +04:00
Ruben Ayrapetyan c132f6aa3c Creating libruntime, moving jerry-libc and pretty-printer to libruntime, creating platform-dependent handlers of failed assertions. 2014-07-10 19:46:23 +04:00
Ruben Ayrapetyan 8641b79ed5 Fix type conversion warnings in unit tests for memory allocators. 2014-07-10 19:45:31 +04:00
Ilmir Usmanov 4e17a97dca Merge branch 'master' into geppetto 2014-07-10 18:09:25 +04:00
Ilmir Usmanov 1d6aac7839 Fixes in triple-address code parser, 1% tests passed 2014-07-10 18:08:52 +04:00
Ruben Ayrapetyan 74af82c983 Enable warning compilation options. 2014-07-10 14:45:40 +04:00
Ruben Ayrapetyan fa63065412 Adding libecmaoperations module that implements ECMA-262 defined operations. 2014-07-10 14:28:01 +04:00
Ilmir Usmanov 7da95ecefa Merge branch 'master' into geppetto 2014-07-10 11:27:07 +04:00
Ilmir Usmanov 99464d6ca7 Quickfix 2014-07-10 11:26:52 +04:00
Ruben Ayrapetyan c4d2c4c916 Moved definition of syntactic reference structure to ecma-refecence.h, removed ctx-reference.[ch] and ctx-manager.[ch]. 2014-07-10 11:16:23 +04:00
Ilmir Usmanov 2d4b325d24 Fix warnings 2014-07-10 11:01:40 +04:00
e.gavrin a787f17a1b Add support of stm32 in Makefile (ugly one) 2014-07-10 01:01:22 +04:00
Ilmir Usmanov 74a0f470d2 Merge branch 'master' of git-server:jerry 2014-07-09 20:03:32 +04:00
Ilmir Usmanov feddd33b00 Quickfix 2014-07-09 20:03:28 +04:00
e.gavrin 7c55a15002 uncomment assert (opcode <=4) 2014-07-09 19:58:28 +04:00
e.gavrin 80ee7731e3 Add TODO and FIXME macroses 2014-07-09 19:47:35 +04:00
Ruben Ayrapetyan aaf2bc4f41 Fix mem-heap.c, mem-poolman.c and test_poolman.c compilation for '#ifndef MEM_STATS' case. 2014-07-09 19:43:50 +04:00
Ruben Ayrapetyan 4afd54d820 Remove JERRY_NDEBUG from DEBUG_OPTIONS. 2014-07-09 19:33:48 +04:00
Ruben Ayrapetyan 1f1190a346 Move mem_GetChunkSize to mem-poolman.c from mem-poolman.h. 2014-07-09 19:24:07 +04:00
Ruben Ayrapetyan c54370bfec Remove inline from mem_GetChunkSize and mem-heap internal static functions. 2014-07-09 19:15:51 +04:00
Ruben Ayrapetyan c5d72afa79 Remove '-m32' compilation flag. Enable warning compilation options. 2014-07-09 19:12:57 +04:00
Ruben Ayrapetyan 6dc72837ba Remove ';' from JERRY_STATIC_ASSERT. 2014-07-09 19:12:41 +04:00
Ruben Ayrapetyan 0163425208 Fix JERRY_STATIC_ASSERT: add __unused attribute to defined type. 2014-07-09 19:03:42 +04:00
Ilmir Usmanov 3f39a50cc8 Merge with master 2014-07-09 18:44:59 +04:00
Ilmir Usmanov a2350cb88e Change parser to stack-only version 2014-07-09 18:05:19 +04:00
Ilmir Usmanov f46d5b440c Merge line-by-line parser 2014-07-09 16:17:42 +04:00
Ruben Ayrapetyan f31ee76c6e Compile options: -Wpedantic -> -pedantic. 2014-07-09 15:01:16 +04:00
Ruben Ayrapetyan aaf3d76cae Memory usage statistics for heap and pools. 2014-07-09 14:59:27 +04:00
e.gavrin d25d33cd58 fixes 2014-07-08 16:16:04 +04:00
e.gavrin 26f94aa6da fyxed typos 2014-07-08 16:14:27 +04:00
e.gavrin 0e6a9b7f22 fix warnings 2014-07-08 16:12:00 +04:00
e.gavrin 294d5e9754 preparation for MCU porting 2014-07-08 16:12:00 +04:00
e.gavrin 26d0824def fix warnings 2014-07-08 16:11:54 +04:00
e.gavrin 45d71fa70f fyxed typos 2014-07-08 16:11:34 +04:00
e.gavrin 3c14dee395 Merge branch 'dev_int' of git-server:jerry into dev_int 2014-07-08 15:46:47 +04:00
e.gavrin 7ef551fdde preparation for MCU porting 2014-07-08 15:45:53 +04:00
e.gavrin 68e6a6241b fix warnings 2014-07-08 15:45:47 +04:00
e.gavrin 4255c43f4a Ported remove_m32.diff by Ruben to master. 2014-07-08 15:45:00 +04:00
e.gavrin 972cd2c885 preparation for MCU porting 2014-07-08 15:43:26 +04:00
e.gavrin 480b2ebaea fix warnings 2014-07-08 13:47:33 +04:00
e.gavrin 823432664e Applied memory tests 2014-07-08 13:24:57 +04:00
e.gavrin f18a5f5e31 opcodes + refined int structure 2014-07-08 13:18:00 +04:00
e.gavrin 21db33fa97 added opcodes 2014-07-07 23:18:49 +04:00
e.gavrin 8ab8adb031 fixed 2014-07-07 11:55:10 +04:00
e.gavrin 2091bfb9e4 opcodes 2014-07-04 23:51:42 +04:00
e.gavrin aace544c55 fixed Makefile and tests, wrapped interpreter and opcodes 2014-07-04 21:34:44 +04:00
e.gavrin 7759e4b99f fixes 2014-07-04 19:08:21 +04:00
e.gavrin e3e0167249 remove output from lexer, fixes 2014-07-04 17:11:06 +04:00
e.gavrin e4122522ae tests 2014-07-04 14:20:06 +04:00
e.gavrin 6e2e50aa9f renaimings 2014-07-04 14:17:57 +04:00
e.gavrin 8fe5dcb14d add AUTHORS, docs, + several benchmarks 2014-07-04 13:06:37 +04:00
e.gavrin d3a26dc982 compacting 2014-07-03 19:45:27 +04:00
e.gavrin 052efb86a9 jmps 2014-07-03 19:22:36 +04:00
e.gavrin 7f878fd8a7 add opcodes 2014-07-03 18:37:57 +04:00
e.gavrin b05eb83966 fixed dump opcode struct 2014-07-03 18:27:49 +04:00
e.gavrin 3fde3400f4 manualy generated blinky opcodes 2014-07-03 16:23:25 +04:00
e.gavrin 1c4873f4b6 Add JSBench 2014-07-02 18:56:08 +04:00
e.gavrin eb38816fc4 new generated file + genscript + skeleton of interpreter 2014-07-02 16:42:03 +04:00
e.gavrin 604771248f renamed ecma-defs.h -> src/ecma-globals.h 2014-07-02 14:20:54 +04:00
e.gavrin 5923418e69 renamed _ -> - 2014-07-02 13:54:22 +04:00
e.gavrin 91313597c6 add memory related files 2014-07-01 21:35:20 +04:00
e.gavrin 4755260930 add generated.h with literal of js app 2014-07-01 19:23:24 +04:00
e.gavrin 6e88d76fec improve Makefile 2014-07-01 19:05:37 +04:00
e.gavrin dcde2cf705 improve Makefile 2014-07-01 19:01:52 +04:00
e.gavrin 2e64056390 add parser 2014-07-01 17:57:11 +04:00
e.gavrin 9a63527b91 add parser tests + magic 2014-07-01 17:09:17 +04:00
e.gavrin de0d6a11bc add skeleton of make_release.sh file 2014-07-01 16:07:54 +04:00
e.gavrin 1bf48a4c51 initial commit with octane 2014-07-01 15:51:35 +04:00
3441 changed files with 220332 additions and 92306 deletions
+77
View File
@@ -0,0 +1,77 @@
---
name: Bug report
about: Create a report to help us improve
---
First of all, when reporting a bug, give the issue a descriptive title.
In the body of the issue, optionally give a free-form text description of the
bug. Give the context necessary for others to understand the problem.
Then, provide information necessary to reproduce the bug.
Omit sections that are irrelevant for the bug report, but note that information
like git revision, build platform, build command, and test case are required in
almost all cases.
###### JerryScript revision
Identify the git hash(es) or tag(s) where the issue was observed.
###### Build platform
Name the build platform. E.g., copy the output of
`echo "$(lsb_release -ds) ($(uname -mrs))"` (on Linux),
`echo "$(sw_vers -productName) $(sw_vers -productVersion) ($(uname -mrs))"` (on macOS), or
`python -c "import platform; print(platform.platform())"` (should work everywhere).
###### Build steps
Describe how to build JerryScript. Give all the necessary details of the build
(e.g., environment variables, command(s), profile, command line options, etc.).
E.g.:
```sh
tools/build.py --clean --debug
```
Or:
```sh
mkdir build && cmake -H. -Bbuild && make -C build
```
Even if the bug was originally observed when JerryScript was integrated into a
larger project, try to reproduce it with as few external code as possible,
preferably by building the `jerry` command line tool.
###### Build log
Copy the build log if the reported issue is a build problem. Do a verbose build
if necessary. Try and trim the log to relevant parts.
###### Test case
Give the JavaScript input that should be passed to the engine to trigger the
bug. Try and post a reduced test case that is minimally necessary to reproduce
the issue. As a rule of thumb, use Markdown's fenced code block syntax for the
test case. Attach the file (renamed to .txt) if the test case contains
'problematic' bytes that cannot be copied in the bug report directly.
###### Execution platform
Unnecessary if the same as the build platform.
###### Execution steps
List the steps that trigger the bug.
E.g., if a bug is snapshot-specific:
```sh
build/bin/jerry-snapshot generate -o testcase.js.snapshot testcase.js
build/bin/jerry --exec-snapshot testcase.js.snapshot
```
Unnecessary if trivial (i.e., `build/bin/jerry testcase.js`).
###### Output
Copy relevant output from the standard output and/or error channels.
###### Backtrace
In case of a crash (assertion failure, etc.), try to copy the backtrace from a
debugger at the point of failure.
###### Expected behavior
Describe what should happen instead of current behavior. Unnecessary if trivial
(e.g., in case of a crash, the trivial expected behavior is not to crash).
+19
View File
@@ -0,0 +1,19 @@
**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**
Before submitting a PR, please, make sure that:
- Changes are in a separate branch, not in master.
- The branch contains only one commit on top of master (if not, squash them into
one commit).
- The commit has a descriptive commit message with a concise title (first line).
- The commit message contains `fixes #XXXX` or `closes #XXXX` to auto-close the
issue(s) that the PR fixes (if any).
- Tests for the changes have been added (for bug fixes / features).
- Documentation has been added / updated (if applicable).
- All new and existing tests passed locally (if not, fix them first and amend
the commit).
IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing
guidelines.
**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**
+41 -2
View File
@@ -1,2 +1,41 @@
_site
.sass-cache
# Produced files
.mbedignore
build/*
# IDE related files
nbproject
*.sublime-project
*.sublime-workspace
.idea
# Random Trash
*.swp
*.swo
*~
core
vgcore.*
*.orig
*.directory
*.patch
.tags*
cscope.*
__pycache__
*.pyc
.DS_Store
# ctags and ID database
tags
ID
# targets
jerry-targetjs.h
.output
targets/esp8266/output.map
targets/esp8266/libs
# Generated documentation
docs/doxygen
# Tests
tests/test262/
.vs
+186 -9
View File
@@ -1,13 +1,190 @@
language: c
# Default environment: Ubuntu Trusty 14.04.
os: linux
dist: trusty
install:
- wget https://raw.githubusercontent.com/${TRAVIS_REPO_SLUG}/master/tools/check-signed-off.sh
- chmod u+x check-signed-off.sh
script: ./check-signed-off.sh --gh-actions
# Default job task: run tests as defined in the $OPT environment variable.
# Jobs can redefine the 'script' stage in the matrix below.
script: tools/run-tests.py $OPTS
branches:
only:
- master
- gh-pages
- /.*/
# All the job definitions in the matrix.
matrix:
include:
- name: "Checks"
install: pip install --user pylint==1.6.5
script:
- tools/run-tests.py --check-signed-off=travis --check-doxygen --check-vera --check-license --check-magic-strings --check-pylint
- travis_wait 40 tools/run-tests.py --check-cppcheck
addons:
apt:
packages: [doxygen, cppcheck, vera++]
- name: "Linux/x86-64 Build & Correctness Tests"
env:
- OPTS="--quiet --jerry-tests --jerry-test-suite"
- name: "Linux/x86 (cpointer-32bit) Build & Correctness Tests"
env:
- OPTS="--quiet --jerry-tests --jerry-test-suite --buildoptions=--compile-flag=-m32,--cpointer-32bit=on"
addons:
apt:
packages: [gcc-multilib]
- name: "Linux/ARM Build & Correctness Tests"
env:
- OPTS="--quiet --jerry-tests --jerry-test-suite --toolchain=cmake/toolchain_linux_armv7l.cmake --buildoptions=--linker-flag=-static"
- RUNTIME=qemu-arm-static
- TIMEOUT=300
addons:
apt:
packages: [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, qemu-user-static]
- name: "OSX/x86-64 Build, Correctness & Unit Tests"
env:
- OPTS="--quiet --jerry-tests --jerry-test-suite --unittests"
os: osx
addons:
homebrew:
packages: [cmake, cppcheck, vera++]
- name: "Build Tests"
env:
- OPTS="--buildoption-test"
addons:
apt:
packages: [gcc-multilib]
- name: "Unit Tests"
env:
- OPTS="--unittests"
- name: "Unit Tests (INIT_FINI)"
env:
- OPTS="--unittests --buildoptions=--cmake-param=-DFEATURE_INIT_FINI=ON"
- name: "Debugger Tests"
env:
- OPTS="--jerry-debugger"
- name: "Conformance Tests"
env:
- OPTS="--test262"
- name: "ASAN Tests"
env:
# Skipping maximum stack usage related tests due to 'detect_stack_use_after_return=1' ASAN option.
# For more detailed description: https://github.com/google/sanitizers/wiki/AddressSanitizerUseAfterReturn#compatibility
- OPTS="--quiet --jerry-tests --jerry-test-suite --skip-list=parser-oom.js,parser-oom2.js,stack-limit.js,regression-test-issue-2190.js,regression-test-issue-2258-2963.js,regression-test-issue-2448.js,regression-test-issue-2905.js --buildoptions=--stack-limit=0,--compile-flag=-fsanitize=address,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--compile-flag=-O2,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold"
- ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=true:strict_init_order=true
- TIMEOUT=600
compiler: gcc-5
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: [gcc-5, gcc-5-multilib]
- name: "UBSAN Tests"
env:
- OPTS="--quiet --jerry-tests --jerry-test-suite --skip-list=parser-oom.js,parser-oom2.js --buildoptions=--compile-flag=-fsanitize=undefined,--compile-flag=-m32,--compile-flag=-fno-omit-frame-pointer,--compile-flag=-fno-common,--debug,--system-allocator=on,--linker-flag=-fuse-ld=gold"
- UBSAN_OPTIONS=print_stacktrace=1
- TIMEOUT=600
compiler: gcc-5
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: [gcc-5, gcc-5-multilib]
- name: "Coverity Scan"
env:
# Declaration of the encrypted COVERITY_SCAN_TOKEN, created via the
# "travis encrypt" command using the project repo's public key.
- secure: "V7BdXv3FCVkFGEfKfWto6I+Sytou1zTCGyn49xurkBfKNsG/3vbkXfsbK1m6lCZxmY7W/1odpfjixpAPZgy2L4FgPZK6/UyVvC8pIFjDOubcEniN48haleSvm/ZFPLDifxDL2+VVFtK1oRYPtDBzzSoUCcfwovgk+Wy+tSBnhnyRLqO/WaI6PqFof7ECYMTRlJVjioZARVP4YmkBruIPmGDdR/3EvwowlxfuiFoPheix61ug4x3tpTBW2qWgvFjDyCZXFz4pJrBQPTAIbyKMxHcBykJjl9eR+dWAOsvE1Uw48tFOJxjKDfUttVQUPsyKFllmcCVS0fDYB5pzZOmRUPxJmox1jt8J1FY85Ri1PGY0THBPM2H7to4Yf2418Y3539epbN8p+79dwaM7e2OiJ2owukbWI7PoNqIz5DV5zxpIKsOQfeWuNLJOgsBePEIU7lz133Si/2d5W/7If46B1d+hZRBJfSYksgDqDU6G/voZkPf0K5bKe2O2BxiIW1DYk4yQ1ecZAkqGjZ8jG3zYGMG3mSF4VyuU4UGFG1Pg8fw7Ap5zuHxSVY1H9dtu4T6JQG3aj/x1omlzfw48DjgkwxVhf7Xvl3yfR7pzydYheLX3MZYtcVo7rWnglZFZoUjWDK1StbmzsvPftvwWtoDTWlzo4xeSXhahSJvJyc4U8Wc="
addons:
coverity_scan:
project:
name: "jerryscript-project/jerryscript"
description: "Ultra-lightweight JavaScript engine for the Internet of Things."
notification_email: rsipka.uszeged@partner.samsung.com
build_command: "tools/build.py --clean"
branch_pattern: master
script: skip # Changed to nop, Coverity Scan has already built the project by the time 'script' stage is reached.
- name: "SonarQube"
addons:
sonarcloud:
organization: "jerryscript-project"
script: tools/check-sonarqube.sh
cache:
directories:
- '${HOME}/.sonar/cache'
- name: "ESP8266 Build Test"
install: make -f ./targets/esp8266/Makefile.travis install-noapt
script: make -f ./targets/esp8266/Makefile.travis script
addons:
apt:
packages: [wget]
- name: "Mbed OS 5/K64F Build Test"
addons:
apt:
sources:
- sourceline: ppa:team-gcc-arm-embedded/ppa
packages: [gcc-arm-embedded]
language: python # NOTE: only way to ensure python>=2.7.10 on Trusty image
python: 3.6
install: make -f ./targets/mbedos5/Makefile.travis install
script: make -f ./targets/mbedos5/Makefile.travis script
- name: "NuttX/STM32F4 Build Test"
install: make -f targets/nuttx-stm32f4/Makefile.travis install-noapt
script: make -f targets/nuttx-stm32f4/Makefile.travis script
addons:
apt:
packages: [gcc-arm-none-eabi, libnewlib-arm-none-eabi, gperf]
- name: "RIOT/STM32F4 Build Test"
install: make -f ./targets/riot-stm32f4/Makefile.travis install-noapt
script: make -f ./targets/riot-stm32f4/Makefile.travis script
compiler: clang-3.9
addons:
apt:
sources:
- sourceline: ppa:team-gcc-arm-embedded/ppa
packages: [clang-3.9, gcc-arm-embedded, gcc-multilib]
- name: "Tizen RT/Artik053 Build Test"
addons:
apt:
sources:
- sourceline: ppa:team-gcc-arm-embedded/ppa
packages: [gcc-arm-embedded, genromfs]
install: make -f ./targets/tizenrt-artik053/Makefile.travis install
script: make -f ./targets/tizenrt-artik053/Makefile.travis script
- name: "Zephyr/Arduino 101 Build Test"
install: make -f ./targets/zephyr/Makefile.travis install-noapt
script: make -f ./targets/zephyr/Makefile.travis script
addons:
apt:
packages: [gperf, dfu-util, device-tree-compiler, python3-ply, python3-pip]
fast_finish: true
# The channel name "chat.freenode.net#jerryscript"
# is encrypted against Samsung/jerryscript
# to prevent IRC spam of forks.
#
# travis encrypt -r "Samsung/jerryscript" "chat.freenode.net#jerryscript"
notifications:
irc:
channels:
- secure: "4kML4uZywOPaT3r/bHCvZCeQWooyzZumESmKuHG2Y8/B29WtMBobsoRQZRfOmlUP5kshfjh0Itp5WFpdACiBCoorHch/8z3VT7fIbKF4UnxrAvNiFArqxXC0OWGIu93e7uyyXJCsQ/JiOXU7bD31Mh8LbnfS1z3wBAMXi+AwcaGiVVH4VTL6O8sR3ij5WmsqpECWhyWTgTP3MiLquZ+09Lv9mp5GGciEemq4p8VnaQt2BdyEBmUJJ1EAyMCJlKNObQudegOzYsY3CVON9C87dCuHf7DYstsxb8AzwRAKn8LHiaWhYaWLfvHqoXmc4w1ZgN0HZ5Qyx8KMkZkXKUiHxuCSoXDxNAHWTGQBsTDid5drZeqOFucOHEKJzkqaWSUKUF3pY/hq/h2kjAn230DlBNkJt+ikSxwy6Mm8GG8LnH5gRMl37zHDHrtyRsKR8GIst9B1B95LAOLA5t8U/ucGKXqLsohS8glXaM4jjh69it3GeHj6NhB8NbC/LsmRrhjKzV+VnjPI6gZvN+5tDiuxMbsMal+0DdWVNCst/aO3Jz0iaA5ahyo2ZwBb2efw3CekRLMKmHtnjqB0SWWXT3/t2+5zNoM6gBjo4RPOg7k5eTOXcfk8okWtQ5d3n8UtvZ5rSiDl3rssHwp1yHuuC8rGGov74DLvyDlpM6p/dmtu2o8="
on_success: always
on_failure: always
use_notice: true
template:
- "%{repository_name} (%{branch}@%{commit}): %{author} - %{commit_subject} [%{result}]"
- "Commit: %{compare_url}"
- "Build: %{build_url}"
-410
View File
@@ -1,410 +0,0 @@
---
layout: page
title: Configuration
category: navbar
permalink: /configuration/
---
* toc
{:toc}
# Configuration
JerryScript provides a large number of configuration options which can be used to enable or disable specific features, allowing users to fine tune the engine to best suit their needs.
A configuration option's value can be changed either by providing specific C preprocessor definitions, by adding CMake definitions, or by using the arguments of the `tools/build.py` script.
This document lists the available configuration options, shows the configuration name for C, CMake, and python, and provides a brief description that explains the effect of the options.
### Amalgamated build
Enables the amalgamated build process, which aggregates the contents of each source file per library
(i.e., JerryScript's core, port, and math libraries), and uses these combined files to compile the project.
This process can provide comparable results to link-time optimization, and can be useful when LTO is not available otherwise.
| Options | |
|---------|----------------------------------------------|
| C: | `<none>` |
| CMake: | `-DENABLE_AMALGAM=ON/OFF` |
| Python: | `--amalgam=ON/OFF` |
See also: [Amalgamated sources](#amalgamated-sources)
### Jerry debugger
Enables debugger support in the engine, which can be used to debug running JavaScript code. For more information on using the debugger see [Debugger](07.DEBUGGER.md).
The debugger is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_DEBUGGER=0/1` |
| CMake: | `-DJERRY_DEBUGGER=ON/OFF` |
| Python: | `--jerry-debugger=ON/OFF` |
### Line information
By default, all source code information is discarded after parsing is complete. This option can be used to augment the created bytecode to provide line information during runtime,
that can be used by the debugger to identify the currently executed source context. See [Debugger](07.DEBUGGER.md).
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_LINE_INFO=0/1` |
| CMake: | `-DJERRY_LINE_INFO=ON/OFF` |
| Python: | `--line-info=ON/OFF` |
### Profiles
This option can be used to enable/disable available JavaScript language features by providing profile files. Profile files contain a list of C definitions that configure each individual feature.
The `path` value for CMake and Python arguments should be a file path to the profile file, or one of `es.next` or `minimal`, which are the pre-defined profiles.
To see how a profile file should be created, or what configuration options are available in C, see the profile [README](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
| Options | |
|---------|----------------------------------------------|
| C: | `<see description>` |
| CMake: | `-DJERRY_PROFILE="path"` |
| Python: | `--profile="path"` |
### Promise callback
Enables Promise event notification support. This feature allows setting a user callback, which is called when certain Promise related events occur such as
creating a new Promise, resolving a Promise with a value, etc.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_PROMISE_CALLBACK=0/1` |
| CMake: | `-DJERRY_PROMISE_CALLBACK=ON/OFF` |
| Python: | `--promise-callback=ON/OFF` |
### External context
Enables external context support in the engine. By default, JerryScript uses a statically allocated context to store the current state of the engine internals.
When this option is enabled, an externally allocated memory region can be provided through the port API to the engine, to be used as the context.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_EXTERNAL_CONTEXT=0/1` |
| CMake: | `-DJERRY_EXTERNAL_CONTEXT=ON/OFF` |
| Python: | `--external-context=ON/OFF` |
### Snapshot execution
This option can be used to enable snapshot execution in the engine.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_SNAPSHOT_EXEC=0/1` |
| CMake: | `-DJERRY_SNAPSHOT_EXEC=ON/OFF` |
| Python: | `--snapshot-exec=ON/OFF` |
### Snapshot saving
This option can be used to enable snapshot saving in the engine.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_SNAPSHOT_SAVE=0/1` |
| CMake: | `-DJERRY_SNAPSHOT_SAVE=ON/OFF` |
| Python: | `--snapshot-save=ON/OFF` |
### Jerry parser
This option can be used to enable or disable the parser. When the parser is disabled all features that depend on source parsing are unavailable (eg. `jerry_parse`, `eval`, Function constructor).
This option can be useful in combination with the snapshot feature. The parser is enabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_PARSER=0/1` |
| CMake: | `-DJERRY_PARSER=ON/OFF` |
| Python: | `--js-parser=ON/OFF` |
### Dump bytecode
This option can be used to display created bytecode in a human readable format. See [Internals](04.INTERNALS.md#byte-code) for more details.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_PARSER_DUMP_BYTE_CODE=0/1` |
| CMake: | `-DJERRY_PARSER_DUMP_BYTE_CODE=ON/OFF` |
| Python: | `--show-opcodes=ON/OFF` |
### Dump RegExp bytecode
This option can be used to display created RegExp bytecode in a human readable format. The RegExp bytecode is different from the bytecode used by the virtual machine.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_REGEXP_DUMP_BYTE_CODE=0/1` |
| CMake: | `-DJERRY_REGEXP_DUMP_BYTE_CODE=ON/OFF` |
| Python: | `--show-regexp-opcodes=ON/OFF` |
### Strict RegExp
This option can be used to enable strict RegExp mode. The standard RegExp syntax is a lot stricter than what is common in current JavaScript implementations.
When enabled, this flag disables all of the non-standard, quality-of-life RegExp features, that are implemented to provide compatibility with other commonly used engines.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_REGEXP_STRICT_MODE=0/1` |
| CMake: | `-DJERRY_REGEXP_STRICT_MODE=ON/OFF` |
| Python: | `--regexp-strict-mode=ON/OFF` |
### Error messages
Enables error messages for thrown Error objects. By default, error messages are omitted to reduce memory usage.
Enabling this feature provides detailed error messages where available, like line information for Syntax errors, variable names for Reference errors, Type/Range error messages for built-in routines, etc.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_ERROR_MESSAGES=0/1` |
| CMake: | `-DJERRY_ERROR_MESSAGES=ON/OFF` |
| Python: | `--error-messages=ON/OFF` |
### Logging
This option can be used to enable log messages during runtime. When enabled the engine will use the `jerry_port_log` port API function to print relevant log messages.
This feature is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_LOGGING=0/1` |
| CMake: | `-DJERRY_LOGGING=ON/OFF` |
| Python: | `--logging=ON/OFF` |
### LCache
This option enables the LCache, allowing faster access to object properties. The LCache uses a statically allocated hash-map, which increases memory consumption.
See [Internals](04.INTERNALS.md#lcache) for further details.
This option is enabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_LCACHE=0/1` |
| CMake: | `<none>` |
| Python: | `<none>` |
### Property hashmaps
This option enables the creation of hashmaps for object properties, which allows faster property access, at the cost of increased memory consumption.
See [Internals](04.INTERNALS.md#property-hashmap) for further details.
This option is enabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_PROPERTY_HASHMAP=0/1` |
| CMake: | `<none>` |
| Python: | `<none>` |
### Memory statistics
This option can be used to provide memory usage statistics either upon engine termination, or during runtime using the `jerry_heap_stats` jerry API function.
The feature can create a significant performance overhead, and should only be used for measurement purposes. This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_MEM_STATS=0/1` |
| CMake: | `-DJERRY_MEM_STATS=ON/OFF` |
| Python: | `--mem-stats=ON/OFF` |
### Heap size
This option can be used to adjust the size of the internal heap, represented in kilobytes. The provided value should be an integer. Values larger than 512 require 32-bit compressed pointers to be enabled.
The default value is 512.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_GLOBAL_HEAP_SIZE=(int)` |
| CMake: | `-DJERRY_GLOBAL_HEAP_SIZE=(int)` |
| Python: | `--mem-heap=(int)` |
### Garbage collection limit
This option can be used to adjust the maximum allowed heap usage increase until triggering the next garbage collection, in bytes.
When the total allocated memory size reaches the current gc limit, garbage collection will be triggered to try and reduce clutter from unreachable objects.
If the total allocated memory can't be reduced below the current limit, then the limit will be increased by the amount specified via this option.
Similarly, when the total allocated memory goes well below the current gc limit, the limit is reduced by this amount.
The default value is 1/32 of the total heap size, but not greater than 8192 bytes.
A value of 0 will use the default value.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_GC_LIMIT=(int)` |
| CMake: | `-DJERRY_GC_LIMIT=(int)` |
| Python: | `--gc-limit=(int)` |
### GC mark recursion limit
This option can be used to adjust the maximum recursion depth during the GC mark phase. The provided value should be an integer, which represents the allowed number of recursive calls. Increasing the depth of the recursion reduces the time of GC cycles, however increases stack usage.
A value of 0 will prevent any recursive GC calls.
| Options | |
|---------|---------------------------------------------------|
| C: | `-DJERRY_GC_MARK_LIMIT=(int)` |
| CMake: | `-DJERRY_GC_MARK_LIMIT=(int)` |
| Python: | `--gc-mark-limit=(int)` |
### Stack limit
This option can be used to cap the stack usage of the engine, and prevent stack overflows due to recursion. The provided value should be an integer, which represents the allowed stack usage in kilobytes.
The default value is 0 (unlimited).
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_STACK_LIMIT=(int)` |
| CMake: | `-DJERRY_STACK_LIMIT=(int)` |
| Python: | `--stack-limit=(int)` |
### 32-bit compressed pointers
Enables 32-bit pointers instead of the default 16-bit compressed pointers. This allows the engine to use a much larger heap, but also comes with slightly increased memory usage, as objects can't be packed as tightly.
This option must be enabled when using the system allocator.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_CPOINTER_32_BIT=0/1` |
| CMake: | `-DJERRY_CPOINTER_32_BIT=ON/OFF` |
| Python: | `--cpointer-32bit=ON/OFF` |
### System allocator
This option enables the use of malloc/free instead of the internal JerryScript allocator. This feature requires 32-bit compressed pointers, and is unsupported on 64-bit architectures.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_SYSTEM_ALLOCATOR=0/1` |
| CMake: | `-DJERRY_SYSTEM_ALLOCATOR=ON/OFF` |
| Python: | `--system-allocator=ON/OFF` |
### Valgrind support
This option enables valgrind support for the internal allocator. When enabled, valgrind will be able to properly identify allocated memory regions, and report leaks or out-of-bounds memory accesses.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_VALGRIND=0/1` |
| CMake: | `-DJERRY_VALGRIND=ON/OFF` |
| Python: | `--valgrind=ON/OFF` |
### Memory stress test
This option can be used to stress test memory management, by running garbage collection before every allocation attempt.
This option is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_MEM_GC_BEFORE_EACH_ALLOC=0/1` |
| CMake: | `-DJERRY_MEM_GC_BEFORE_EACH_ALLOC=ON/OFF` |
| Python: | `--mem-stress-test=ON/OFF` |
### MSVC CRT
This option enables the use of the MSVC CRT library and is disabled by default.
| Options | |
|---------|----------------------------------------------|
| C: | `<none>` |
| CMake: | `-DENABLE_STATIC_CRT=ON/OFF` |
| Python: | `--static-crt=ON/OFF` |
### Architecture
Specify the platform name if it is supported by the generator.
| Options | |
|---------|----------------------------------------------|
| C: | `<none>` |
| CMake: | `-A (string)` |
| Python: | `--arch=(string)` |
### Tostring function
Enable function toString.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_FUNCTION_TO_STRING=0/1` |
| CMake: | `-DJERRY_FUNCTION_TO_STRING=ON/OFF` |
| Python: | `--function-to-string=ON/OFF` |
### VM throw
Enable VM throw.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_VM_THROW=0/1` |
| CMake: | `-DJERRY_VM_THROW=ON/OFF` |
| Python: | `--vm-throw=ON/OFF` |
### Promise callback
Enable Promise callback.
| Options | |
|---------|----------------------------------------------|
| C: | `-DJERRY_PROMISE_CALLBACK=0/1` |
| CMake: | `-DJERRY_PROMISE_CALLBACK=ON/OFF` |
| Python: | `--promise-callback=ON/OFF` |
# Amalgamated sources
The sources of JerryScript can be combined into a handful of files to allow their easy integration
in other projects. To achieve this, the following command can be executed to create a set of files
into the `amalgam` directory:
```sh
$ python tools/amalgam.py --output-dir amalgam --jerry-core --jerry-port --jerry-math
```
(Note: In the example above, the command is executed from the project's root directory, but that is
not mandatory.)
The command creates the following files in the `amalgam` dir:
* `jerryscript.c`
* `jerryscript.h`
* `jerryscript-config.h`
* `jerryscript-port.c`
* `jerryscript-math.c`
* `math.h`
**Important**: the `jerryscript-config.h` contains the configurations mentioned above and
should be adapted to the required use-case. See the file contents for more details and for the
default configuration. (Note: This config file is created from the the `jerry-core/config.h` file.)
These files can be directly compiled with an application using the JerryScript API.
E.g., using a command similar to the one below:
```sh
$ gcc -Wall -o demo_app demo_app.c amalgam/jerryscript.c amalgam/jerryscript-port.c amalgam/jerryscript-math.c -Iamalgam/
```
(Note: The headers must be available on the include path.)
This approach is also under the hood of the [amalgamated build](#amalgamated-build) process.
# Target specific information
## x86 with GCC
When building for Intel 32 bit architecture it is possible that GCC uses conservative options, thus assuming the most
basic floating-point support (that is it does not generate SSE or others instructions).
However this could lead to loss off precision and/or different results than what is required by the JavaScript standard
in regards of floating-point values and arithmetic.
To resolve this precision problem it is advised to use at least SSE2.
To do this with GCC please provide the `-mfpmath=sse -msse2` options during build.
These options can also be specified via the `build.py` script:
```sh
$ ./tools/build.py --compile-flag=-mfpmath=sse --compile-flag=-msse2 --compile-flag=-m32
```
-13674
View File
File diff suppressed because it is too large Load Diff
-1088
View File
File diff suppressed because it is too large Load Diff
-286
View File
@@ -1,286 +0,0 @@
---
layout: page
title: Port API
category: documents
permalink: /port-api/
---
* toc
{:toc}
# Reference
## Process management
It is questionable whether a library should be able to terminate an application. Any API function can signal an error (ex.: cannot allocate memory), so the engine use the termination approach with this port function.
```c
/**
* Init the program
*/
void jerry_port_init (void);
```
```c
/**
* Signal the port that jerry experienced a fatal failure from which it cannot
* recover.
*
* @param code gives the cause of the error.
*
* Note:
* Jerry expects the function not to return.
*
* Example: a libc-based port may implement this with exit() or abort(), or both.
*/
void jerry_port_fatal (jerry_fatal_code_t code);
```
Error codes
```c
typedef enum
{
JERRY_FATAL_OUT_OF_MEMORY = 10,
JERRY_FATAL_REF_COUNT_LIMIT = 12,
JERRY_FATAL_DISABLED_BYTE_CODE = 13,
JERRY_FATAL_UNTERMINATED_GC_LOOPS = 14,
JERRY_FATAL_FAILED_ASSERTION = 120
} jerry_fatal_code_t;
```
```c
/**
* Makes the process sleep for a given time.
*
* Note:
* This port function is called by jerry-core when JERRY_DEBUGGER is set to 1.
* Otherwise this function is not used.
*
* @param sleep_time milliseconds to sleep.
*/
void jerry_port_sleep (uint32_t sleep_time);
```
## External context
Allows the user to provide external buffer for isolated engine contexts, so that user
can configure the heap size at runtime and run multiple JS applications
simultaneously.
```c
/**
* Allocate a new context for the engine.
*
* This port function is called by jerry_init when JERRY_EXTERNAL_CONTEXT is enabled. Otherwise this function is not
* used. The engine will pass the size required for the context structure. An implementation must make sure to
* allocate at least this amount.
*
* Excess allocated space will be used as the engine heap when jerryscript is configured to use it's internal allocator,
* this can be used to control the internal heap size.
*
* NOTE: The allocated memory must be pointer-aligned, otherwise the behavior is
* undefined.
*
* @param context_size: the size of the internal context structure
*
* @return total size of the allocated buffer
*/
size_t jerry_port_context_alloc (size_t context_size);
```
```c
/**
* Get the currently active context of the engine.
*
* This port function is called by jerry-core when JERRY_EXTERNAL_CONTEXT is enabled.
* Otherwise this function is not used.
*
* @return the pointer to the currently used engine context.
*/
struct jerry_context_t *jerry_port_context_get (void);
```
```c
/**
* Free the currently used context.
*
* This port function is called by jerry_cleanup when JERRY_EXTERNAL_CONTEXT is enabled.
* Otherwise this function is not used.
*
* @return the pointer to the engine context.
*/
void jerry_port_context_free (void);
```
## I/O
```c
/**
* Display or log a debug/error message.
*
* The message is passed as a zero-terminated string. Messages may be logged in parts, which
* will result in multiple calls to this functions. The implementation should consider
* this before appending or prepending strings to the argument.
*
* This function is called with messages coming from the jerry engine as
* the result of some abnormal operation or describing its internal operations
* (e.g., data structure dumps or tracing info).
*
* The implementation can decide whether error and debug messages are logged to
* the console, or saved to a database or to a file.
*/
void jerry_port_log (const char *message_p);
```
```c
/**
* Print a buffer to standard output
*
* This port function is never called from jerry-core directly, it is only used by jerry-ext components to print
* information.
*
* @param buffer_p: input buffer
* @param buffer_size: data size
*/
void jerry_port_print_buffer (const jerry_char_t *buffer_p, jerry_size_t buffer_size);
```
```c
/**
* Read a line from standard input.
*
* The implementation should allocate storage necessary for the string. The result string should include the ending line
* terminator character(s) and should be zero terminated.
*
* An implementation may return NULL to signal that the end of input is reached, or an error occured.
*
* When a non-NULL value is returned, the caller will pass the returned value to `jerry_port_line_free` when the line is
* no longer needed. This can be used to finalize dynamically allocated buffers if necessary.
*
* This port function is never called from jerry-core directly, it is only used by some jerry-ext components that
* require user input.
*
* @param out_size_p: size of the input string in bytes, excluding terminating zero byte
*
* @return pointer to the buffer storing the string,
* or NULL if end of input
*/
jerry_char_t *jerry_port_line_read (jerry_size_t *out_size_p);
```
```c
/**
* Free a line buffer allocated by jerry_port_line_read
*
* @param buffer_p: buffer returned by jerry_port_line_read
*/
void jerry_port_line_free (jerry_char_t *buffer_p);
```
## Filesystem
```
/**
* Canonicalize a file path.
*
* If possible, the implementation should resolve symbolic links and other directory references found in the input path,
* and create a fully canonicalized file path as the result.
*
* The function may return with NULL in case an error is encountered, in which case the calling operation will not
* proceed.
*
* The implementation should allocate storage for the result path as necessary. Non-NULL return values will be passed
* to `jerry_port_path_free` when the result is no longer needed by the caller, which can be used to finalize
* dynamically allocated buffers.
*
* NOTE: The implementation must not return directly with the input, as the input buffer is released after the call.
*
* @param path_p: zero-terminated string containing the input path
* @param path_size: size of the input path string in bytes, excluding terminating zero
*
* @return buffer with the normalized path if the operation is successful,
* NULL otherwise
*/
jerry_char_t *jerry_port_path_normalize (const jerry_char_t *path_p, jerry_size_t path_size);
```
```c
/**
* Free a path buffer returned by jerry_port_path_normalize.
*
* @param path_p: the path buffer to free
*/
void jerry_port_path_free (jerry_char_t *path_p);
```
```c
/**
* Get the offset of the basename component in the input path.
*
* The implementation should return the offset of the first character after the last path separator found in the path.
* This is used by the caller to split the path into a directory name and a file name.
*
* @param path_p: input zero-terminated path string
*
* @return offset of the basename component in the input path
*/
jerry_size_t jerry_port_path_base (const jerry_char_t *path_p);
```
```c
/**
* Open a source file and read its contents into a buffer.
*
* When the source file is no longer needed by the caller, the returned pointer will be passed to
* `jerry_port_source_free`, which can be used to finalize the buffer.
*
* @param file_name_p: Path that points to the source file in the filesystem.
* @param out_size_p: The opened file's size in bytes.
*
* @return pointer to the buffer which contains the content of the file.
*/
jerry_char_t *jerry_port_source_read (const char *file_name_p, jerry_size_t *out_size_p);
```
```c
/**
* Free a source file buffer.
*
* @param buffer_p: buffer returned by jerry_port_source_read
*/
void jerry_port_source_free (jerry_char_t *buffer_p);
```
## Date
```c
/**
* Get local time zone adjustment in milliseconds for the given input time.
*
* The argument is a time value representing milliseconds since unix epoch.
*
* Ideally, this function should satisfy the stipulations applied to LocalTZA
* in section 21.4.1.7 of the ECMAScript version 12.0, as if called with isUTC true.
*
* This port function can be called by jerry-core when JERRY_BUILTIN_DATE is enabled.
* Otherwise this function is not used.
*
* @param unix_ms: time value in milliseconds since unix epoch
*
* @return local time offset in milliseconds applied to UTC for the given time value
*/
int32_t jerry_port_local_tza (double unix_ms);
```
```c
/**
* Get the current system time in UTC.
*
* This port function is called by jerry-core when JERRY_BUILTIN_DATE is enabled.
* It can also be used in the implementing application to initialize the random number generator.
*
* @return milliseconds since Unix epoch
*/
double jerry_port_current_time (void);
```
-417
View File
@@ -1,417 +0,0 @@
---
layout: page
title: 'Extension API: External Function Handlers'
category: documents
permalink: /ext-reference-handler/
---
* toc
{:toc}
# Common methods to handle properties
The `jerryscript-ext/properties.h` header defines a set of convenience methods
which makes the property access a bit straightforward.
# Utility to register multiple properties in bulk
In some cases it is useful to register multiple properties for a given object
for this the following utility structures and methods are provided.
## jerryx_property_entry
**Summary**
Structure to define an array of properties with `name` and `value` fields which
can be registered to a target object.
The engine must be initialized before specifying the `jerry_value_t` in the struct.
**Prototype**
```c
typedef struct {
const char *name;
jerry_value_t value;
} jerryx_property_entry;
```
**See also**
- [jerryx_set_properties](#jerryx_set_properties)
## jerryx_register_result
**Summary**
Structure returned as the result of the [jerryx_set_properties](#jerryx_set_properties) operation.
The `result` field will either be a JavaScript undefined value or an error object.
In every case the `registered` field is used to indicated the number of
successfully registered methods.
This must be passed for the [jerryx_release_property_entry](#jerryx_release_property_entry) method
after the property registration.
If any error occurred during the property registration the `result` field of the structure
must be manually released after processing the error value.
**Prototype**
```c
typedef struct {
jerry_value_t result;
uint32_t registered;
} jerryx_register_result;
```
**See also**
- [jerryx_set_properties](#jerryx_set_properties)
- [jerryx_release_property_entry](#jerryx_release_property_entry)
## jerryx_set_properties
**Summary**
Set multiple properties on a target object.
The properties are an array of (name, jerry_value_t) pairs and
this list must end with a (NULL, 0) entry.
Important notes:
* Each property value in the input array is released after a successful property registration.
* The method [jerryx_release_property_entry](#jerryx_release_property_entry) must be called if there is any failed registration
to release the values in the entries array.
It is safe to call this cleanup method in every case not just in case of failure.
* If the error value is reported via the result it must be freed manually.
**Prototype**
```c
jerryx_register_result
jerryx_set_properties (const jerry_value_t target_object,
const jerryx_property_entry entries[]);
```
- `target_object` - object on which the entries will be set.
- `entries` - array of (name, jerry_value_t) pairs.
- return a [jerryx_register_result](#jerryx_register_result).
- if everything is ok, the struct's `result` field is set to a JS undefined value.
- otherwise the `result` field is an error object indicating the problem.
- in every case the `registered` field contains the number of successfully registered properties.
**Example**
[doctest]: # ()
```c
#include <stdio.h>
#include "jerryscript.h"
#include "jerryscript-ext/handlers.h"
#include "jerryscript-ext/properties.h"
static jerry_value_t
handler (const jerry_call_info_t *call_info_p,
const jerry_value_t args_p[],
const jerry_length_t args_cnt)
{
printf ("native handler called!\n");
return jerry_boolean (true);
}
int
main (int argc, char **argv)
{
jerry_init (JERRY_INIT_EMPTY);
jerryx_property_entry methods[] =
{
{ "demo", jerry_function_external (handler) },
{ NULL, 0 },
};
jerry_value_t global = jerry_current_realm ();
jerryx_register_result reg = jerryx_set_properties (global, methods);
/* if `reg.result` is undefined all methods are registered */
if (jerry_value_is_exception (reg.result))
{
printf ("Only registered %d properties\r\n", reg.registered);
/* clean up not registered property values */
jerryx_release_property_entry (methods, reg);
/* clean up the error */
jerry_value_free (reg.result);
}
jerry_value_free (global);
jerry_cleanup();
return 0;
}
```
**Convenience macros**
To make property registration convenient, there are a set of macros to use
when setting a property entry:
* `JERRYX_PROPERTY_NUMBER(NAME, NUMBER)` - creates a number entry.
* `JERRYX_PROPERTY_STRING(NAME, STR, SIZE)` - creates an UTF-8 string entry using `SIZE` bytes from the string.
* `JERRYX_PROPERTY_STRING_SZ(NAME, STR)` - creates an ASCII string entry. This string must be zero terminated.
* `JERRYX_PROPERTY_BOOLEAN(NAME, VALUE)` - creates a boolean entry.
* `JERRYX_PROPERTY_FUNCTION(NAME, NATIVE)` - creates a native C function entry.
* `JERRYX_PROPERTY_UNDEFINED(NAME)` - creates an undefined property entry.
* `JERRYX_PROPERTY_LIST_END()` - indicates the end of the property list.
**Example usage of Convenience macros**
[doctest]: # ()
```c
#include <stdio.h>
#include "jerryscript.h"
#include "jerryscript-ext/handlers.h"
#include "jerryscript-ext/properties.h"
static jerry_value_t
handler (const jerry_call_info_t *call_info_p,
const jerry_value_t args_p[],
const jerry_length_t args_cnt)
{
printf ("native handler called!\n");
return jerry_boolean (true);
}
int
main (int argc, char **argv)
{
jerry_init (JERRY_INIT_EMPTY);
/**
* Create a array of properties to be registered.
* This must be done after initializing the engine as creating `jerry_value_t`
* elements are invalid before `jerry_init`.
*/
jerryx_property_entry methods[] =
{
JERRYX_PROPERTY_FUNCTION ("demo", handler),
JERRYX_PROPERTY_NUMBER ("test_num", 2.3),
JERRYX_PROPERTY_UNDEFINED ("this_is_undefined"),
JERRYX_PROPERTY_LIST_END(),
};
jerry_value_t global = jerry_current_realm ();
jerryx_register_result reg = jerryx_set_properties (global, methods);
/* if `reg.result` is undefined all methods are registered */
if (jerry_value_is_exception (reg.result))
{
printf ("Only registered %d properties\r\n", reg.registered);
/* clean up not registered property values */
jerryx_release_property_entry (methods, reg);
/* clean up the error */
jerry_value_free (reg.result);
}
jerry_value_free (global);
jerry_cleanup();
return 0;
}
```
**See also**
- [jerryx_property_entry](#jerryx_property_entry)
- [jerryx_release_property_entry](#jerryx_release_property_entry)
- [jerryx_register_result](#jerryx_register_result)
## jerryx_release_property_entry
**Summary**
Release all `jerry_value_t` in a `jerryx_property_entry` array based on a previous [jerryx_set_properties](#jerryx_set_properties) call
and also the error value (if any) in the `jerryx_register_result` structure.
In case of a successful registration it is safe to call this method.
After the method call the `entries` array should not be used as all values are released.
**Prototype**
```
void
jerryx_release_property_entry (const jerryx_property_entry entries[],
const jerryx_register_result register_result);
```
- `entries` - array of [jerryx_property_entry](#jerryx_property_entry).
- `register_result` - result of a previous [jerryx_set_properties](#jerryx_set_properties) call.
**Example**
For example usage see [jerryx_set_properties](#jerryx_set_properties).
# Common external function handlers
## jerryx_handler_assert
**Summary**
Hard assert for scripts. The routine calls `jerry_port_fatal` on assertion failure.
If the `JERRY_FEATURE_LINE_INFO` runtime feature is enabled (build option: `JERRY_LINE_INFO`)
a backtrace is also printed out.
**Prototype**
```c
jerry_value_t
jerryx_handler_assert (const jerry_call_info_t *call_info_p,
const jerry_value_t args_p[],
const jerry_length_t args_cnt);
```
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
structure which holds call related information (unused).
- `args_p` - the array of function arguments.
- `args_cnt` - the number of function arguments.
- return value - `jerry_value_t` representing boolean true, if only one argument
was passed and that argument was a boolean true. Note that the function does
not return otherwise.
**See also**
- [jerryx_register_global](#jerryx_register_global)
## jerryx_handler_gc
**Summary**
Expose garbage collector to scripts. If the first argument of the function
is logical true, it performs a high pressure gc. Otherwise a low pressure
gc is performed, which is also the default if no parameters passed.
**Prototype**
```c
jerry_value_t
jerryx_handler_gc (const jerry_call_info_t *call_info_p,
const jerry_value_t args_p[],
const jerry_length_t args_cnt);
```
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
structure which holds call related information (unused).
- `args_p` - the array of function arguments (unused).
- `args_cnt` - the number of function arguments (unused).
- return value - `jerry_value_t` representing `undefined`.
**See also**
- [jerryx_register_global](#jerryx_register_global)
## jerryx_handler_print
**Summary**
Provide a `print` implementation for scripts. The routine converts all of its
arguments to strings and outputs them by using `jerry_port_print_buffer`.
The NULL character is output as "\u0000", other characters are output bytewise.
*Note*: This implementation does not use standard C `printf` to print its
output. This allows more flexibility but also extends the core JerryScript
engine port API. Applications that want to use `jerryx_handler_print` must
ensure that their port implementation also provides
`jerry_port_print_buffer`.
**Prototype**
```c
jerry_value_t
jerryx_handler_print (const jerry_call_info_t *call_info_p,
const jerry_value_t args_p[],
const jerry_length_t args_cnt);
```
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
structure which holds call related information (unused).
- `args_p` - the array of function arguments.
- `args_cnt` - the number of function arguments.
- return value - `jerry_value_t` representing `undefined` if all arguments could
be converted to strings, an `Error` otherwise.
**See also**
- [jerryx_register_global](#jerryx_register_global)
- [jerry_port_print_buffer](05.PORT-API.md#jerry_port_print_buffer)
# Handler registration helper
## jerryx_register_global
**Summary**
Register a JavaScript function in the global object.
*Note*: Returned value must be freed with `jerry_value_free`, when it is no
longer needed.
**Prototype**
```c
jerry_value_t
jerryx_register_global (const char *name_p,
jerry_external_handler_t handler_p);
```
- `name_p` - the name of the function to be registered.
- `handler_p` - the address of the external function handler.
- return value - `jerry_value_t` representing boolean true, if the operation was
successful, an `Error` otherwise.
**Example**
[doctest]: # (test="compile")
```c
#include "jerryscript.h"
#include "jerryscript-ext/handlers.h"
#include "jerryscript-ext/properties.h"
static const struct {
const char *name_p;
jerry_external_handler_t handler_p;
} common_functions[] =
{
{ "assert", jerryx_handler_assert },
{ "gc", jerryx_handler_gc },
{ "print", jerryx_handler_print },
{ NULL, NULL }
};
static void
register_common_functions (void)
{
jerry_value_t ret = jerry_undefined ();
for (int i = 0; common_functions[i].name_p != NULL && !jerry_value_is_exception (ret); i++)
{
ret = jerryx_register_global (common_functions[i].name_p,
common_functions[i].handler_p);
}
jerry_value_free (ret);
}
```
-60
View File
@@ -1,60 +0,0 @@
---
layout: page
title: 'Extension API: Autorelease Values'
category: documents
permalink: /ext-reference-autorelease/
---
* toc
{:toc}
# Autorelease values
## JERRYX_AR_VALUE_T
**Summary**
Macro for `const jerry_value_t` for which jerry_value_free() is
automatically called when the variable goes out of scope.
*Note*: The macro depends on compiler support. For GCC and LLVM/clang, the macro is implemented
using the `__cleanup__` variable attribute. For other compilers, no support has been added yet.
**Example**
[doctest]: # (test="compile", name="11.EXT-REFERENCE-AUTORELEASE.c")
```c
#include "jerryscript.h"
#include "jerryscript-ext/autorelease.h"
static void
foo (bool enable)
{
JERRYX_AR_VALUE_T bar = jerry_string_sz ("...");
if (enable)
{
JERRYX_AR_VALUE_T baz = jerry_current_realm ();
/* bar and baz can now be used. */
/*
* jerry_value_free (baz) and jerry_value_free (bar) is called automatically before
* returning, because `baz` and `bar` go out of scope.
*/
return;
}
/*
* jerry_value_free (bar) is called automatically when the function returns,
* because `bar` goes out of scope.
*/
}
```
**See also**
- [jerry_value_t](../api-reference#jerry_value_t)
- [jerry_value_copy](../api-reference#jerry_value_copy)
- [jerry_value_free](../api-reference#jerry_value_free)
+274
View File
@@ -0,0 +1,274 @@
# Copyright JS Foundation and other contributors, http://js.foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required (VERSION 2.8.12)
project (Jerry C)
# Determining platform
set(PLATFORM "${CMAKE_SYSTEM_NAME}")
string(TOUPPER "${PLATFORM}" PLATFORM)
# Determining compiler
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(USING_GCC 1)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(USING_CLANG 1)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "TI")
set(USING_TI 1)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
set(USING_MSVC 1)
endif()
# Determining build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "MinSizeRel")
endif()
# Optional components
set(JERRY_CMDLINE ON CACHE BOOL "Build jerry command line tool?")
set(JERRY_CMDLINE_TEST OFF CACHE BOOL "Build jerry test command line tool?")
set(JERRY_CMDLINE_SNAPSHOT OFF CACHE BOOL "Build jerry snapshot command line tool?")
set(JERRY_LIBFUZZER OFF CACHE BOOL "Build jerry with libfuzzer support?")
set(JERRY_PORT_DEFAULT ON CACHE BOOL "Build default jerry port implementation?")
set(JERRY_EXT ON CACHE BOOL "Build jerry-ext?")
set(JERRY_LIBM ON CACHE BOOL "Build and use jerry-libm?")
set(UNITTESTS OFF CACHE BOOL "Build unit tests?")
set(DOCTESTS OFF CACHE BOOL "Build doc tests?")
# Optional build settings
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries?")
set(ENABLE_LTO ON CACHE BOOL "Enable LTO build?")
set(ENABLE_STRIP ON CACHE BOOL "Enable stripping all symbols from release binary?")
# Option overrides
if(NOT USING_CLANG)
set(JERRY_LIBFUZZER OFF)
set(JERRY_LIBFUZZER_MESSAGE " (FORCED BY COMPILER)")
endif()
if(JERRY_CMDLINE OR JERRY_CMDLINE_TEST OR JERRY_CMDLINE_SNAPSHOT OR JERRY_LIBFUZZER OR UNITTESTS OR DOCTESTS)
set(JERRY_PORT_DEFAULT ON)
set(JERRY_PORT_DEFAULT_MESSAGE " (FORCED BY CMDLINE OR LIBFUZZER OR TESTS)")
endif()
if(JERRY_CMDLINE OR DOCTESTS)
set(JERRY_EXT ON)
set(JERRY_EXT_MESSAGE " (FORCED BY CMDLINE OR TESTS)")
endif()
if("${PLATFORM}" STREQUAL "DARWIN")
set(JERRY_LIBM OFF)
set(ENABLE_LTO OFF)
set(ENABLE_STRIP OFF)
set(JERRY_LIBM_MESSAGE " (FORCED BY PLATFORM)")
set(ENABLE_LTO_MESSAGE " (FORCED BY PLATFORM)")
set(ENABLE_STRIP_MESSAGE " (FORCED BY PLATFORM)")
endif()
if(USING_TI)
set(ENABLE_STRIP OFF)
set(ENABLE_STRIP_MESSAGE " (FORCED BY COMPILER)")
endif()
if(USING_MSVC)
set(JERRY_LIBM OFF)
set(ENABLE_STRIP OFF)
set(JERRY_LIBM_MESSAGE " (FORCED BY COMPILER)")
set(ENABLE_STRIP_MESSAGE " (FORCED BY COMPILER)")
endif()
# Status messages
message(STATUS "CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
message(STATUS "CMAKE_C_COMPILER_ID " ${CMAKE_C_COMPILER_ID})
message(STATUS "CMAKE_SYSTEM_NAME " ${CMAKE_SYSTEM_NAME})
message(STATUS "CMAKE_SYSTEM_PROCESSOR " ${CMAKE_SYSTEM_PROCESSOR})
message(STATUS "BUILD_SHARED_LIBS " ${BUILD_SHARED_LIBS})
message(STATUS "ENABLE_LTO " ${ENABLE_LTO} ${ENABLE_LTO_MESSAGE})
message(STATUS "ENABLE_STRIP " ${ENABLE_STRIP} ${ENABLE_STRIP_MESSAGE})
message(STATUS "JERRY_CMDLINE " ${JERRY_CMDLINE} ${JERRY_CMDLINE_MESSAGE})
message(STATUS "JERRY_CMDLINE_TEST " ${JERRY_CMDLINE_TEST} ${JERRY_CMDLINE_TEST_MESSAGE})
message(STATUS "JERRY_CMDLINE_SNAPSHOT " ${JERRY_CMDLINE_SNAPSHOT} ${JERRY_CMDLINE_SNAPSHOT_MESSAGE})
message(STATUS "JERRY_LIBFUZZER " ${JERRY_LIBFUZZER} ${JERRY_LIBFUZZER_MESSAGE})
message(STATUS "JERRY_PORT_DEFAULT " ${JERRY_PORT_DEFAULT} ${JERRY_PORT_DEFAULT_MESSAGE})
message(STATUS "JERRY_EXT " ${JERRY_EXT} ${JERRY_EXT_MESSAGE})
message(STATUS "JERRY_LIBM " ${JERRY_LIBM} ${JERRY_LIBM_MESSAGE})
message(STATUS "UNITTESTS " ${UNITTESTS})
message(STATUS "DOCTESTS " ${DOCTESTS})
# Setup directories
# Note: This mimics a conventional file system layout in the build directory for
# the sake of convenient location of build artefacts. Proper installation to
# traditional locations is also supported, e.g., to /usr/local.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/")
# Remove rdynamic option
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS )
# Compile/link flags
# Helper macros
macro(jerry_add_flags VAR)
foreach(_flag ${ARGN})
set(${VAR} "${${VAR}} ${_flag}")
endforeach()
endmacro()
macro(jerry_add_compile_flags)
jerry_add_flags(CMAKE_C_FLAGS ${ARGV})
endmacro()
macro(jerry_add_compile_warnings)
foreach(_warning ${ARGV})
jerry_add_compile_flags(-W${_warning})
jerry_add_compile_flags(-Werror=${_warning})
endforeach()
endmacro()
macro(jerry_add_link_flags)
jerry_add_flags(LINKER_FLAGS_COMMON ${ARGV})
endmacro()
# Architecture-specific compile/link flags
jerry_add_compile_flags(${FLAGS_COMMON_ARCH})
jerry_add_flags(CMAKE_EXE_LINKER_FLAGS ${FLAGS_COMMON_ARCH})
# LTO
if(ENABLE_LTO)
if(USING_GCC OR USING_CLANG)
jerry_add_compile_flags(-flto)
jerry_add_link_flags(-flto)
endif()
if(USING_GCC)
jerry_add_compile_flags(-fno-fat-lto-objects)
# Use gcc-ar and gcc-ranlib to support LTO
set(CMAKE_AR "gcc-ar")
set(CMAKE_RANLIB "gcc-ranlib")
endif()
if(USING_TI)
jerry_add_link_flags(-lto)
endif()
endif()
# Compiler / Linker flags
if("${PLATFORM}" STREQUAL "DARWIN")
jerry_add_link_flags(-lSystem)
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Sqc <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
elseif(USING_GCC OR USING_CLANG)
jerry_add_link_flags(-Wl,-z,noexecstack)
endif()
if(USING_GCC OR USING_CLANG)
jerry_add_compile_flags(-std=c99 -pedantic)
# Turn off stack protector
jerry_add_compile_flags(-fno-builtin -fno-stack-protector)
jerry_add_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations shadow strict-prototypes undef old-style-definition)
jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes -Werror)
endif()
if(USING_GCC)
jerry_add_compile_warnings(logical-op)
# TODO: Remove workaround for gcc 7 bug if the fallthrough comment detection is fixed.
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 7.0)
jerry_add_compile_flags(-Wno-implicit-fallthrough)
endif()
endif()
if(USING_CLANG)
jerry_add_compile_flags(-Wno-nested-anon-types -Wno-static-in-inline)
endif()
if(USING_TI)
jerry_add_compile_flags(--c99)
endif()
if(USING_MSVC)
jerry_add_link_flags(/OPT:NOREF)
# Disable MSVC warning 4996 globally because it stops us from using standard C functions.
jerry_add_compile_flags(/wd4996)
endif()
if(JERRY_LIBFUZZER)
jerry_add_compile_flags(-fsanitize=fuzzer-no-link)
endif()
# Strip binary
if(ENABLE_STRIP AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
jerry_add_link_flags(-s)
endif()
# External compiler & linker flags
if(DEFINED EXTERNAL_COMPILE_FLAGS)
jerry_add_compile_flags(${EXTERNAL_COMPILE_FLAGS})
endif()
if(DEFINED EXTERNAL_LINKER_FLAGS)
jerry_add_link_flags(${EXTERNAL_LINKER_FLAGS})
endif()
# Used for placeholder to attach single source build targets
add_custom_target(generate-single-source)
# Jerry's libm
if(JERRY_LIBM)
add_subdirectory(jerry-libm)
endif()
# Jerry's core
add_subdirectory(jerry-core)
# Jerry's extension tools
if(JERRY_EXT)
add_subdirectory(jerry-ext)
endif()
# Jerry's default port implementation
if(JERRY_PORT_DEFAULT)
add_subdirectory(jerry-port/default)
endif()
# Jerry command line tool
if(JERRY_CMDLINE OR JERRY_CMDLINE_TEST OR JERRY_CMDLINE_SNAPSHOT OR JERRY_LIBFUZZER)
add_subdirectory(jerry-main)
endif()
# Unittests
if(UNITTESTS)
add_subdirectory(tests/unit-core)
if(JERRY_LIBM)
add_subdirectory(tests/unit-libm)
endif()
if(JERRY_EXT)
add_subdirectory(tests/unit-ext)
endif()
endif()
# Doctests
if(DOCTESTS)
add_subdirectory(tests/unit-doc)
endif()
-1
View File
@@ -1 +0,0 @@
jerryscript.net
+98
View File
@@ -0,0 +1,98 @@
# Contribution Guidelines
## Patch Submission Process
The following guidelines on the submission process are provided to help you be more effective when submitting code to the JerryScript project.
When development is complete, a patch set should be submitted via GitHub pull requests. A review of the patch set will take place. When accepted, the patch set will be integrated into the master branch, verified, and tested. It is then the responsibility of the authoring developer to maintain the code throughout its lifecycle.
Please submit all patches in public by opening a pull request. Patches sent privately to Maintainers and Committers will not be considered. Because the JerryScript Project is an Open Source project, be prepared for feedback and criticism-it happens to everyone-. If asked to rework your code, be persistent and resubmit after making changes.
### 1. Scope the patch
Smaller patches are generally easier to understand and test, so please submit changes in the smallest increments possible, within reason. Smaller patches are less likely to have unintended consequences, and if they do, getting to the root cause is much easier for you and the Maintainers and Committers. Additionally, smaller patches are much more likely to be accepted.
### 2. Ensure all files have a proper license header and copyright notice
Any code that you want to contribute to the project must be licensed under the [Apache License 2.0](LICENSE). Contributions under a different license can not be accepted. Each file should start with the following header:
```c
/* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
```
Adding copyright notices other than the project-wide notice ("Copyright JS Foundation and other contributors, http://js.foundation") is not permitted. The only exception is adding third-party code which requires copyright notices to be preserved. Adding third-party code to the project generally requires a strong justification.
### 3. Sign your work with the JerryScript [Developer's Certificate of Origin](DCO.md)
The sign-off is a simple line at the end of the commit message of the patch, which certifies that you wrote it or otherwise have the right to pass it on as an Open Source patch. The sign-off is required for a patch to be accepted.
We have the same requirements for using the signed-off-by process as the Linux kernel.
In short, you need to include a signed-off-by tag in every patch.
You should use your real name and email address in the format below:
> JerryScript-DCO-1.0-Signed-off-by: Random J Developer random@developer.example.org
"JerryScript-DCO-1.0-Signed-off-by:" this is a developer's certification that he or she has the right to submit the patch for inclusion into the project. It is an agreement to the JerryScript [Developer's Certificate of Origin](DCO.md). **Code without a proper signoff cannot be merged into the mainline.**
### 4. Open a GitHub [pull request](https://github.com/jerryscript-project/jerryscript/pulls)
You can find instructions about opening a pull request [here](https://help.github.com/articles/creating-a-pull-request).
### 5. What if my patch is rejected?
It happens all the time, for many reasons, and not necessarily because the code is bad. Take the feedback, adapt your code, and try again. Remember, the ultimate goal is to preserve the quality of the code and maintain the focus of the Project through intensive review.
Maintainers and Committers typically have to process a lot of submissions, and the time for any individual response is generally limited. If the reason for rejection is unclear, please ask for more information from the Maintainers and Committers.
If you have a solid technical reason to disagree with feedback and you feel that reason has been overlooked, take the time to thoroughly explain it in your response.
### 6. Code review
Code review can be performed by all the members of the Project (not just Maintainers and Committers). Members can review code changes and share their opinion through comments guided by the following principles:
* Discuss code; never discuss the code's author
* Respect and acknowledge contributions, suggestions, and comments
* Listen and be open to all different opinions
* Help each other
Changes are submitted via pull requests and only the Maintainers and Committers should approve or reject the pull request (note that only Maintainers can give binding review scores).
Changes should be reviewed in reasonable amount of time. Maintainers and Committers should leave changes open for some time (at least 1 full business day) so others can offer feedback. Review times increase with the complexity of the review.
## Tips on GitHub Pull Requests
* [Fork](https://guides.github.com/activities/forking) the GitHub repository and clone it locally
* Connect your local repository to the original upstream repository by adding it as a remote
* Create a [branch](https://guides.github.com/introduction/flow) for your edits
* Pull in upstream changes often to stay up-to-date so that when you submit your pull request, merge conflicts will be less likely
For more details, see the GitHub [fork syncing](https://help.github.com/articles/syncing-a-fork) guidelines.
## How to add the DCO line to every single commit automatically
It is easy to forget adding the DCO line to the end of every commit message. Fortunately there is a nice way to do it automatically. Once you've cloned the repository into your local machine, you can add `prepare commit message hook` in `.git/hooks` directory like this:
```
#!/usr/bin/env python
import sys
commit_msg_filepath = sys.argv[1]
with open(commit_msg_filepath, "r+") as f:
content = f.read()
f.seek(0, 0)
f.write("%s\n\nJerryScript-DCO-1.0-Signed-off-by: <Your Name> <Your Email>" % content)
```
Please refer [Git Hooks](http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for more information.
+22
View File
@@ -0,0 +1,22 @@
# JerryScript Developer's Certificate of Origin
The JerryScript project uses the signed-off-by language and process to give us a clear chain of trust for every patch received.
> By making a contribution to this project, I certify that:
> (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
> (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
> (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
> (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project, under the same open source license.
We have the same requirements for using the signed-off-by process as the Linux kernel.
In short, you need to include a signed-off-by tag in the commit message of every patch.
You should use your real name and email address in the format below:
> JerryScript-DCO-1.0-Signed-off-by: Random J Developer random@developer.example.org
"JerryScript-DCO-1.0-Signed-off-by:" this is a developer's certification that he or she has the right to submit the patch for inclusion into the project. It is an agreement to the Developer's Certificate of Origin (above). **Code without a proper signoff cannot be merged into the mainline.**
+2398
View File
File diff suppressed because it is too large Load Diff
+203
View File
@@ -0,0 +1,203 @@
Copyright JS Foundation and other contributors, http://js.foundation
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

+2430
View File
File diff suppressed because one or more lines are too long
+66
View File
@@ -0,0 +1,66 @@
![](https://github.com/jerryscript-project/jerryscript/blob/master/LOGO.png)
# JerryScript: JavaScript engine for the Internet of Things
[![License](https://img.shields.io/badge/licence-Apache%202.0-brightgreen.svg?style=flat)](LICENSE)
[![Travis CI Build Status](https://travis-ci.org/jerryscript-project/jerryscript.svg?branch=master)](https://travis-ci.org/jerryscript-project/jerryscript)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/ct8reap35u2vooa5/branch/master?svg=true)](https://ci.appveyor.com/project/jerryscript-project/jerryscript/branch/master)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/12127/badge.svg)](https://scan.coverity.com/projects/jerryscript-project)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript?ref=badge_shield)
[![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=jerryscript-project_jerryscript&metric=ncloc)](https://sonarcloud.io/dashboard?id=jerryscript-project_jerryscript)
[![IRC Channel](https://img.shields.io/badge/chat-on%20freenode-brightgreen.svg)](https://kiwiirc.com/client/irc.freenode.net/#jerryscript)
JerryScript is a lightweight JavaScript engine for resource-constrained devices such as microcontrollers. It can run on devices with less than 64 KB of RAM and less than 200 KB of flash memory.
Key characteristics of JerryScript:
* Full ECMAScript 5.1 standard compliance
* 160K binary size when compiled for ARM Thumb-2
* Heavily optimized for low memory consumption
* Written in C99 for maximum portability
* Snapshot support for precompiling JavaScript source code to byte code
* Mature C API, easy to embed in applications
Additional information can be found on our [project page](http://jerryscript.net) and [Wiki](https://github.com/jerryscript-project/jerryscript/wiki).
Memory usage and Binary footprint are measured at [here](https://jerryscript-project.github.io/jerryscript-test-results) with real target daily.
The following table shows the latest results on the devices:
| STM32F4-Discovery | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fjerryscript%2Fstm32f4dis.svg?alt=media&token=1)](https://jerryscript-project.github.io/jerryscript-test-results/?view=stm32f4dis) |
| :---: | :---: |
| **Raspberry Pi 2** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fjerryscript%2Frpi2.svg?alt=media&token=1)](https://jerryscript-project.github.io/jerryscript-test-results/?view=rpi2) |
IRC channel: #jerryscript on [freenode](https://freenode.net)
Mailing list: jerryscript-dev@groups.io, you can subscribe [here](https://groups.io/g/jerryscript-dev) and access the mailing list archive [here](https://groups.io/g/jerryscript-dev/topics).
## Quick Start
### Getting the sources
```bash
git clone https://github.com/jerryscript-project/jerryscript.git
cd jerryscript
```
### Building JerryScript
```bash
python tools/build.py
```
For additional information see [Getting Started](docs/00.GETTING-STARTED.md).
## Documentation
- [Getting Started](docs/00.GETTING-STARTED.md)
- [Configuration](docs/01.CONFIGURATION.md)
- [API Reference](docs/02.API-REFERENCE.md)
- [API Example](docs/03.API-EXAMPLE.md)
- [Internals](docs/04.INTERNALS.md)
- [Migration Guide](docs/16.MIGRATION-GUIDE.md)
## Contributing
The project can only accept contributions which are licensed under the [Apache License 2.0](LICENSE) and are signed according to the JerryScript [Developer's Certificate of Origin](DCO.md). For further information please see our [Contribution Guidelines](CONTRIBUTING.md).
## License
JerryScript is open source software under the [Apache License 2.0](LICENSE). Complete license and copyright information can be found in the source code.
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fjerryscript-project%2Fjerryscript?ref=badge_large)
> Copyright JS Foundation and other contributors, http://js.foundation
> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-4
View File
@@ -1,4 +0,0 @@
# Site settings
title: JerryScript Engine
description: JerryScript is a very lightweight JavaScript engine with capability to run on microcontrollers with less than 8KB of RAM.
# baseurl: "/jerryscript" # the subpath of your site, e.g. /blog/
-5
View File
@@ -1,5 +0,0 @@
<footer class="footer">
<div class="container">
<p class="copyright_and_license_notice">JerryScript is an open source project under the <a href="http://www.apache.org/licenses/">Apache License, Version 2.0.</a></p>
</div>
</footer>
-22
View File
@@ -1,22 +0,0 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<meta name="author" content="JerryScript">
<title>JavaScript engine for Internet of Things{% if page.title %}: {{ page.title }} {% endif %}</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="{{ '/css/bootstrap.min.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/table.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/bytecode.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/block.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/main.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/css/img.css' | relative_url }}">
<script>
window.addEventListener("hashchange", function() { scrollBy(0, -50) });
</script>
</head>
-47
View File
@@ -1,47 +0,0 @@
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ '/' | relative_url }}"><b>JerryScript</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
{% if page.url == "/" %}
<li class="active"><a href="{{ '/' | relative_url }}">Home</a></li>
{% else %}
<li><a href="{{ '/' | relative_url }}">Home</a></li>
{% endif %}
<li><a href="https://www.iotjs.net">Powering <b>IoT.js</b></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
{% for p in site.pages %}
{% if p.title %}
{% if p.category == "navbar" %}
{% if page.url == p.url %}
<li class="active"><a href="{{ p.url | relative_url }}" >{{ p.title }}</a></li>
{% else %}
<li><a href="{{ p.url | relative_url }}" >{{ p.title }}</a></li>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Documents <span class="caret"></span></a>
<ul class="dropdown-menu">
{% assign doclist = site.pages | sort: 'title' %}
{% for p in doclist %}
{% if p.title and p.category == "documents" %}
<li><a href="{{ p.url | relative_url }}" >{{ p.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<a href="https://github.com/jerryscript-project/jerryscript"><img style="position: absolute; top: 50; right: 0; border: 0;" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_orange_ff7600.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
-21
View File
@@ -1,21 +0,0 @@
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body>
{% include header.html %}
<div class="container">
{{ content }}
</div><!-- /.container -->
{% include footer.html %}
<!-- Bootstrap core JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="{{ '/js/bootstrap.min.js' | relative_url }}"></script>
</body>
</html>
-14
View File
@@ -1,14 +0,0 @@
---
layout: default
---
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<article class="post-content">
{{ content }}
</article>
</div>
-15
View File
@@ -1,15 +0,0 @@
---
layout: default
---
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
</header>
<article class="post-content">
{{ content }}
</article>
</div>
-264
View File
@@ -1,264 +0,0 @@
/**
* Reset some basic elements
*/
/*body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
}*/
p {
margin: 0;
padding: 0;
text-align: justify;
-moz-text-align-last: left;
text-align-last: left;
}
/**
* Basic styling
*/
body {
/*font-family: $base-font-family;*/
font-size: $base-font-size;
line-height: $base-line-height;
/*font-weight: 300;*/
color: $text-color;
background-color: white;
-webkit-text-size-adjust: 100%;
}
/**
* Set `margin-bottom` to maintain vertical rhythm
*/
/*h1, h2, h3, h4, h5, h6,*/
p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
margin-bottom: $spacing-unit / 2;
}
/**
* Styles from index
*/
html {
position: relative;
min-height: 100%;
}
body {
padding-top: 50px;
margin-bottom: 50px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 40px;
background-color: #f5f5f5;
}
.project_title h1{
font-size: 64px; text-align: center;
font-weight: bold;
}
.project_title {
padding: 40px 20px;
text-align: center;
border-radius: 6px;
p {
text-align: center;
-moz-text-align-last: center;
}
}
.lead {
color:#245580;
}
.project_overview {
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 18px;
padding: 40px; padding-bottom: 20px;
background-color: #f5f5f5;
}
.learn_more {
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 18px;
padding: 40px; padding-bottom: 20px;
}
.container .copyright_and_license_notice {
margin: 8px 0;
font-size:14px; text-align: center;
color:#3C3C3C;
}
/**
* Images
*/
img {
max-width: 100%;
vertical-align: middle;
display: block;
margin: 0 auto;
max-height: 80%;
max-width: 100%;
}
/**
* Figures
*/
figure > img {
display: block;
}
figcaption {
font-size: $small-font-size;
}
/**
* Lists
*/
/*ul, ol {
margin-left: $spacing-unit;
}*/
li {
> ul,
> ol {
margin-bottom: 0;
}
}
/**
* Headings
*/
h1, h2, h3, h4, h5, h6 {
font-weight: 300;
}
/**
* Links
*/
a {
color: $brand-color;
text-decoration: none;
&:visited {
color: darken($brand-color, 15%);
}
&:hover {
color: $text-color;
text-decoration: underline;
}
}
/**
* Blockquotes
*/
blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: $spacing-unit / 2;
font-size: 18px;
letter-spacing: -1px;
font-style: italic;
> :last-child {
margin-bottom: 0;
}
}
/**
* Code formatting
*/
pre,
code {
font-size: 15px;
border: 1px solid $grey-color-light;
border-radius: 3px;
background-color: #f7f7f7;
font-family: Courier;
}
code {
padding: 1px 5px;
}
pre {
padding: 8px 12px;
> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
}
/**
* Wrapper
*/
.wrapper {
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
margin-right: auto;
margin-left: auto;
padding-right: $spacing-unit;
padding-left: $spacing-unit;
@extend %clearfix;
@include media-query($on-laptop) {
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
max-width: calc(#{$content-width} - (#{$spacing-unit}));
padding-right: $spacing-unit / 2;
padding-left: $spacing-unit / 2;
}
}
/**
* Clearfix
*/
%clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
/**
* Icons
*/
.icon {
> svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
path {
fill: $grey-color;
}
}
}
-266
View File
@@ -1,266 +0,0 @@
/**
* Site header
*/
.site-header {
border-bottom: 5px solid #1B73BA;
min-height: 64px;
// Positioning context for the mobile navigation icon
position: relative;
}
.site-title {
font-size: 36px;
line-height: 64px;
letter-spacing: -1px;
margin-bottom: 0;
float: left;
&,
&:visited {
color: white;
/*font-family: Verdana;*/
}
}
.site-nav {
float: right;
line-height: 64px;
.menu-icon {
display: none;
}
.page-link {
color: white;
line-height: $base-line-height;
font-size: 24px;
// Gaps between nav items, but not on the first one
&:not(:first-child) {
margin-left: 20px;
}
vertical-align: middle;
}
@include media-query($on-palm) {
position: absolute;
top: 14px;
right: 30px;
background-color: white;
border: 1px solid $grey-color-light;
border-radius: 5px;
text-align: right;
.menu-icon {
display: block;
float: right;
width: 36px;
height: 26px;
line-height: 0;
padding-top: 10px;
text-align: center;
> svg {
width: 18px;
height: 15px;
path {
fill: $grey-color-dark;
}
}
}
.trigger {
clear: both;
display: none;
}
.page-link {
padding: 5px 10px;
vertical-align: middle;
color: #2388DB;
display: block;
}
}
}
/**
* Site footer
*/
.site-footer {
border-top: 5px solid #1B73BA;
background-color: #2388DB;
position: absolute;
bottom: 0;
width: 100%;
}
.footer-heading {
font-size: 18px;
margin-bottom: $spacing-unit / 2;
}
.footer-copy {
font-size: 14px;
text-align: center;
color: white;
a {
color: white;
}
}
.contact-list,
.social-media-list {
list-style: none;
margin-left: 0;
}
.footer-col-wrapper {
font-size: 15px;
color: $grey-color;
margin-left: -$spacing-unit / 2;
@extend %clearfix;
}
.footer-col {
float: left;
margin-bottom: $spacing-unit / 2;
padding-left: $spacing-unit / 2;
}
.footer-col-1 {
width: -webkit-calc(35% - (#{$spacing-unit} / 2));
width: calc(35% - (#{$spacing-unit} / 2));
}
.footer-col-2 {
width: -webkit-calc(20% - (#{$spacing-unit} / 2));
width: calc(20% - (#{$spacing-unit} / 2));
}
.footer-col-3 {
width: -webkit-calc(45% - (#{$spacing-unit} / 2));
width: calc(45% - (#{$spacing-unit} / 2));
}
@include media-query($on-laptop) {
.footer-col-1,
.footer-col-2 {
width: -webkit-calc(50% - (#{$spacing-unit} / 2));
width: calc(50% - (#{$spacing-unit} / 2));
}
.footer-col-3 {
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
width: calc(100% - (#{$spacing-unit} / 2));
}
}
@include media-query($on-palm) {
.footer-col {
float: none;
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
width: calc(100% - (#{$spacing-unit} / 2));
}
}
/**
* Page content
*/
.page-content {
padding: $spacing-unit 0;
}
.page-heading {
font-size: 20px;
}
.post-list {
margin-left: 0;
list-style: none;
> li {
margin-bottom: $spacing-unit;
}
}
.post-meta {
font-size: $small-font-size;
color: $grey-color;
}
.post-link {
display: block;
font-size: 24px;
}
/**
* Posts
*/
/*.post-header {
margin-bottom: $spacing-unit;
}
.post-title {
font-size: 32px;
letter-spacing: -1px;
line-height: 1;
margin-top: 10px;
margin-bottom: 10px;
@include media-query($on-laptop) {
font-size: 28px;
}
}*/
.post-content {
margin-bottom: $spacing-unit;
h1 {
font-size: 30px;
color: #2388DB;
margin-top: 10px;
margin-bottom: 5px;
@include media-query($on-laptop) {
font-size: 32px;
}
}
h2 {
font-size: 22px;
color: #2388DB;
margin-top: 10px;
margin-bottom: 5px;
@include media-query($on-laptop) {
font-size: 26px;
}
}
h3 {
font-size: 18px;
color: #2388DB;
@include media-query($on-laptop) {
font-size: 20px;
}
}
h4 {
font-size: 16px;
color: #2388DB;
@include media-query($on-laptop) {
font-size: 18px;
}
}
}
-67
View File
@@ -1,67 +0,0 @@
/**
* Syntax highlighting styles
*/
.highlight {
background: #fff;
@extend %vertical-rhythm;
.c { color: #998; font-style: italic } // Comment
.err { color: #a61717; background-color: #e3d2d2 } // Error
.k { font-weight: bold } // Keyword
.o { font-weight: bold } // Operator
.cm { color: #998; font-style: italic } // Comment.Multiline
.cp { color: #999; font-weight: bold } // Comment.Preproc
.c1 { color: #998; font-style: italic } // Comment.Single
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
.gd { color: #000; background-color: #fdd } // Generic.Deleted
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
.ge { font-style: italic } // Generic.Emph
.gr { color: #a00 } // Generic.Error
.gh { color: #999 } // Generic.Heading
.gi { color: #000; background-color: #dfd } // Generic.Inserted
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
.go { color: #888 } // Generic.Output
.gp { color: #555 } // Generic.Prompt
.gs { font-weight: bold } // Generic.Strong
.gu { color: #aaa } // Generic.Subheading
.gt { color: #a00 } // Generic.Traceback
.kc { font-weight: bold } // Keyword.Constant
.kd { font-weight: bold } // Keyword.Declaration
.kp { font-weight: bold } // Keyword.Pseudo
.kr { font-weight: bold } // Keyword.Reserved
.kt { color: #458; font-weight: bold } // Keyword.Type
.m { color: #099 } // Literal.Number
.s { color: #d14 } // Literal.String
.na { color: #008080 } // Name.Attribute
.nb { color: #0086B3 } // Name.Builtin
.nc { color: #458; font-weight: bold } // Name.Class
.no { color: #008080 } // Name.Constant
.ni { color: #800080 } // Name.Entity
.ne { color: #900; font-weight: bold } // Name.Exception
.nf { color: #900; font-weight: bold } // Name.Function
.nn { color: #555 } // Name.Namespace
.nt { color: #000080 } // Name.Tag
.nv { color: #008080 } // Name.Variable
.ow { font-weight: bold } // Operator.Word
.w { color: #bbb } // Text.Whitespace
.mf { color: #099 } // Literal.Number.Float
.mh { color: #099 } // Literal.Number.Hex
.mi { color: #099 } // Literal.Number.Integer
.mo { color: #099 } // Literal.Number.Oct
.sb { color: #d14 } // Literal.String.Backtick
.sc { color: #d14 } // Literal.String.Char
.sd { color: #d14 } // Literal.String.Doc
.s2 { color: #d14 } // Literal.String.Double
.se { color: #d14 } // Literal.String.Escape
.sh { color: #d14 } // Literal.String.Heredoc
.si { color: #d14 } // Literal.String.Interpol
.sx { color: #d14 } // Literal.String.Other
.sr { color: #009926 } // Literal.String.Regex
.s1 { color: #d14 } // Literal.String.Single
.ss { color: #990073 } // Literal.String.Symbol
.bp { color: #999 } // Name.Builtin.Pseudo
.vc { color: #008080 } // Name.Variable.Class
.vg { color: #008080 } // Name.Variable.Global
.vi { color: #008080 } // Name.Variable.Instance
.il { color: #099 } // Literal.Number.Integer.Long
}
+36
View File
@@ -0,0 +1,36 @@
version: "{build}"
branches:
except:
- coverity_scan
- gh_pages
skip_tags: true
# Build matrix setup.
image:
- Visual Studio 2017
configuration:
- Debug
- Release
platform:
- x64
- Win32
environment:
matrix:
- FEATURE_DEBUGGER: ON
- FEATURE_DEBUGGER: OFF
# Steps of a job.
init:
- cmake -version
before_build:
- if "%PLATFORM%"=="Win32" cmake -G"Visual Studio 15 2017" -Bbuild -H. -DFEATURE_DEBUGGER=%FEATURE_DEBUGGER%
- if "%PLATFORM%"=="x64" cmake -G"Visual Studio 15 2017 Win64" -Bbuild -H. -DFEATURE_DEBUGGER=%FEATURE_DEBUGGER%
build:
project: build\Jerry.sln
parallel: true
verbosity: minimal
artifacts:
- path: build\bin\$(configuration)\
name: JerryScriptBinary
-6
View File
@@ -1,6 +0,0 @@
.graph-container {
width: 800px;
height: 400px;
display: inline-block;
}
-49
View File
@@ -1,49 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>jerryscript benchmark</title>
<!--link rel="stylesheet" type="text/css" src="benchmark.css"-->
<link rel="stylesheet" type="text/css" href="benchmark.css">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type='text/javascript' src="common.js"></script>
<script type='text/javascript' src="benchmark.js"></script>
</head>
<body>
<h1>Jerryscript Benchmark</h1>
<p>
Show data
<a href="?show=sum">by_sum</a> /
<a href="?show=max">by max</a>
value of subtests
</p>
<div class="container">
<div id="wrapper_sunspider-1.0.2" class="content">
<h3>sunspider-1.0.2</h3>
<div id="chart_sunspider-1.0.2_memory" class="graph-container">loading...</div>
<div id="chart_sunspider-1.0.2_performance" class="graph-container">loading...</div>
</div>
<div id="wrapper_ubench">
<h3>ubench</h3>
<div id="chart_ubench_memory" class="graph-container">loading...</div>
<div id="chart_ubench_performance" class="graph-container">loading...</div>
</div>
</div><!-- container -->
<p>
<span style="font-weight: bold; color: blue;">lower is better</span>
for both memory and performance.
</p>
</body>
</html>
-237
View File
@@ -1,237 +0,0 @@
///////////////////////////////////////////
// helper functions
///////////////////////////////////////////
Array.prototype.clone = function() {
return this.slice(0);
};
Array.prototype.sum = function() {
return this.reduce(function(a, b) { return a + b; });
};
Array.prototype.max = function() {
return this.reduce(function(a, b) { return Math.max(a, b); });
};
Date.prototype.toFormattedString = function() {
var yyyy = this.getFullYear().toString();
var mm = (this.getMonth() + 1).toString();
var dd = this.getDate().toString();
mm = mm[1] ? mm : '0' + mm;
dd = dd[1] ? dd : '0' + dd;
return yyyy + '-' + mm + '-' + dd;
};
Object.values = function(obj) {
return Object.keys(obj).map(function(key) { return obj[key]; });
};
Object.sum = function(obj) {
return Object.values(obj).sum();
};
Object.maxKey = function(obj) {
var key, val = -Infinity;
for (var p in obj) {
if (val < obj[p]) {
key = p;
val = obj[p];
}
}
return key;
};
function wrapTooltip(content) {
return '<div style="padding: 0.5em; font-family: consolas; line-height: 1.5em;">' + content + '</div>';
}
function wrapHyperlink(address, text) {
return '<a href="' + address + '" target="_blank">' + text + '</a>'
}
///////////////////////////////////////////
// main module
///////////////////////////////////////////
var isSum = true;
var benchmarks = ['sunspider-1.0.2', 'ubench'];
var measureTypes = ['memory', 'performance'];
var measureUnits = {'memory': 'kb', 'performance': 's'};
var engines = ['jerryscript', 'jerryscript-snapshot', 'jerryscript_cbc', 'duktape'];
var link_main = {
'jerryscript': 'http://www.jerryscript.net',
'jerryscript_cbc': 'http://www.jerryscript.net',
'duktape': 'http://duktape.org'
};
var link_code = {
'jerryscript': 'https://github.com/Samsung/jerryscript/commit/',
'jerryscript_cbc': 'https://github.com/Samsung/jerryscript/commit/',
'duktape': 'https://github.com/svaarala/duktape/commit/'
};
var beginDate = new Date('2015-07-11');
var benchmarkData = {};
google.load('visualization', '1', {packages: ['corechart', 'line']});
google.setOnLoadCallback(main);
function main() {
// get params
var data_src = getParameterByName('src') || 'data';
var show = getParameterByName('show') || 'sum';
isSum = show === 'sum';
// fetch data via ajax
var today = new Date();
for (var d = beginDate; d <= today; d.setDate(d.getDate() + 1)) {
var curDate = (new Date(d)).toFormattedString();
$.ajax({
_date: curDate,
url: data_src + '/' + curDate + '.json',
dataType: 'json',
success: function(data) {
benchmarkData[this._date] = data;
},
error: function(request, status, error) {
}
});
}
}
$(document).ajaxStop(function () {
benchmarks.forEach(function(benchmark) {
measureTypes.forEach(function(measureType) {
// transform data for internal use
var transData = {}, transInfo = {};
$.each(benchmarkData, function(date, element) {
transData[date] = [];
transInfo[date] = element['info'];
engines.forEach(function(engine, index) {
var sum = undefined; // default value
var max = undefined; // default value
var maxTest = ''; // default value
var numTests = 0;
var benchmark_obj = element[benchmark];
if (benchmark_obj) {
var record = benchmark_obj[measureType][engine];
if (record && Object.keys(record).length > 0) {
sum = Object.sum(record);
maxTest = Object.maxKey(record);
max = record[maxTest];
numTests = Object.values(record).length;
}
}
transData[date][index] = {
tests: numTests,
sum: sum,
max: max,
maxTest: maxTest,
score: isSum ? sum : max
};
});
});
// transform data for google charts
var data = new google.visualization.DataTable();
data.addColumn('date', 'Date');
engines.forEach(function(engine) {
data.addColumn('number', engine);
data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
});
var arrayData = Object.keys(transData).sort().map(function(date) {
// data
var row = Object.values(transData[date]);
// tooltip
var tooltips = row.clone().map(function(value, index) {
var engine = engines[index];
var engine_pure = engine.split('-')[0];
var info = transInfo[date] ? transInfo[date][engine_pure] : undefined;
var score = value.score ? value.score.toFixed(2) + measureUnits[measureType] : '';
var tests = value.tests || 0;
var max_test = value.maxTest || '';
var info_text = '';
if (info && info.version)
info_text = wrapHyperlink(link_code[engine_pure] + info.version, info.version);
var engine_text = wrapHyperlink(link_main[engine_pure], engine);
var score_text = score;
if (isSum) {
score_text += ' (' + tests + ' subtests)';
}
else {
score_text += ' (' + max_test + ')';
}
score_text += ' ' + wrapHyperlink('details.html?' + $.param({date: date, engine: engine, benchmark:benchmark}), 'details');
var textData = [
['source&nbsp; ', engine_text],
['version ', info_text],
['date&nbsp;&nbsp;&nbsp; ', date],
['score&nbsp;&nbsp; ', score_text]];
return wrapTooltip(textData.map(function(v) { return v.join(': '); }).join('<br />'));
});
// zip data and tooltips
// so the array will be like [data, tooltip, data, tooltip, ...]
row = row.map(function (v, i) {
return [v.score, tooltips[i]];
}).reduce(function(a, b) {
return a.concat(b)
});
return [new Date(date)].concat(row);
});
data.addRows(arrayData);
// chart options
var options = {
title: measureType,
titleTextStyle: {
fontSize: 20,
bold: true
},
legend: { position: 'bottom', alignment: 'vertical' },
backgroundColor: '#f8f8f8',
hAxis: {
title: 'Date',
textStyle: {
fontSize: 12,
bold: false
},
titleTextStyle: {
fontSize: 16,
bold: true
},
format: 'yyyy-MM-dd'
},
vAxis: {
minValue: 0,
title: measureType + ' (' + measureUnits[measureType] + ')',
textStyle: {
fontSize: 12,
bold: false
},
titleTextStyle: {
fontSize: 16,
bold: true
}
},
tooltip: {
isHtml: true,
trigger: 'both'
}
};
// draw chart
var divObj = document.getElementById(
['chart', benchmark, measureType].join('_'));
if (divObj) {
var chart = new google.visualization.LineChart(divObj);
chart.draw(data, options);
}
});
});
});
-7
View File
@@ -1,7 +0,0 @@
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "9c559216b7b72cf5073cc4dea644ae332d3c140b",
"size": 173764
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.55867,
"3d-cube.js": 6.03467,
"access-fannkuch.js": 15.6373,
"access-nbody.js": 7.07733,
"bitops-bitwise-and.js": 5.27733,
"math-partial-sums.js": 3.052,
"controlflow-recursive.js": 4.31333,
"bitops-bits-in-byte.js": 7.08667,
"access-binary-trees.js": 3.68267,
"bitops-3bit-bits-in-byte.js": 5.06267,
"string-fasta.js": 36.3067,
"math-cordic.js": 8.172
},
"duktape": {
"math-spectral-norm.js": 1.048,
"3d-cube.js": 1.17333,
"access-fannkuch.js": 1.988,
"access-nbody.js": 1.74667,
"bitops-bitwise-and.js": 7.30267,
"math-partial-sums.js": 2.80933,
"controlflow-recursive.js": 1.24933,
"bitops-bits-in-byte.js": 0.934667,
"access-binary-trees.js": 1.292,
"bitops-3bit-bits-in-byte.js": 0.593333,
"string-fasta.js": 4.72533,
"math-cordic.js": 2.544
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 160,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 84,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.3133,
"function-empty.js": 31.348,
"function-excess-args.js": 61.9253,
"function-closure.js": 5.09867,
"function-missing-args.js": 64.3867,
"loop-sum.js": 50.6907,
"loop-empty-resolve.js": 5.14533,
"function-correct-args.js": 86.9693,
"function-sum.js": 47.9907
},
"duktape": {
"loop-empty.js": 56.012,
"function-empty.js": 40.1773,
"function-excess-args.js": 32.252,
"function-closure.js": 19.872,
"function-missing-args.js": 31.0453,
"loop-sum.js": 73.62,
"loop-empty-resolve.js": 6.752,
"function-correct-args.js": 32.336,
"function-sum.js": 26.736
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "9c559216b7b72cf5073cc4dea644ae332d3c140b",
"size": 173764
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.55467,
"3d-cube.js": 6.02533,
"access-fannkuch.js": 15.612,
"access-nbody.js": 7.05467,
"bitops-bitwise-and.js": 5.276,
"math-partial-sums.js": 3.05467,
"controlflow-recursive.js": 4.33333,
"bitops-bits-in-byte.js": 7.08267,
"access-binary-trees.js": 3.676,
"bitops-3bit-bits-in-byte.js": 5.05467,
"string-fasta.js": 36.324,
"math-cordic.js": 8.176
},
"duktape": {
"math-spectral-norm.js": 1.052,
"3d-cube.js": 1.17733,
"access-fannkuch.js": 1.98533,
"access-nbody.js": 1.74533,
"bitops-bitwise-and.js": 7.31867,
"math-partial-sums.js": 2.80933,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.936,
"access-binary-trees.js": 1.29867,
"bitops-3bit-bits-in-byte.js": 0.592,
"string-fasta.js": 4.73067,
"math-cordic.js": 2.53867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 160,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 84,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.3093,
"function-empty.js": 31.2987,
"function-excess-args.js": 61.9293,
"function-closure.js": 5.09467,
"function-missing-args.js": 64.3147,
"loop-sum.js": 50.704,
"loop-empty-resolve.js": 5.14533,
"function-correct-args.js": 86.956,
"function-sum.js": 48.032
},
"duktape": {
"loop-empty.js": 56.0093,
"function-empty.js": 40.1587,
"function-excess-args.js": 32.276,
"function-closure.js": 19.924,
"function-missing-args.js": 31.044,
"loop-sum.js": 73.604,
"loop-empty-resolve.js": 6.748,
"function-correct-args.js": 32.4333,
"function-sum.js": 26.86
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "13cf31413f6a3a1683c62ac4ed3f19d98d9b2cd2",
"size": 173764
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.55467,
"3d-cube.js": 6.03333,
"access-fannkuch.js": 15.6333,
"access-nbody.js": 7.07867,
"bitops-bitwise-and.js": 5.27733,
"math-partial-sums.js": 3.05333,
"controlflow-recursive.js": 4.34267,
"bitops-bits-in-byte.js": 7.09733,
"access-binary-trees.js": 3.68267,
"bitops-3bit-bits-in-byte.js": 5.04533,
"string-fasta.js": 36.2973,
"math-cordic.js": 8.18133
},
"duktape": {
"math-spectral-norm.js": 1.04933,
"3d-cube.js": 1.176,
"access-fannkuch.js": 1.98267,
"access-nbody.js": 1.74933,
"bitops-bitwise-and.js": 7.272,
"math-partial-sums.js": 2.812,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.934667,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.72133,
"math-cordic.js": 2.544
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 160,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 84,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.3107,
"function-empty.js": 31.348,
"function-excess-args.js": 61.94,
"function-closure.js": 5.09467,
"function-missing-args.js": 64.3307,
"loop-sum.js": 50.6613,
"loop-empty-resolve.js": 5.14,
"function-correct-args.js": 86.944,
"function-sum.js": 47.968
},
"duktape": {
"loop-empty.js": 56.0307,
"function-empty.js": 40.1453,
"function-excess-args.js": 32.2893,
"function-closure.js": 19.9533,
"function-missing-args.js": 31.0787,
"loop-sum.js": 73.6507,
"loop-empty-resolve.js": 6.74133,
"function-correct-args.js": 32.324,
"function-sum.js": 26.808
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "bc0ca7be5d1081e8a1115b870237f8d3f19b32d9",
"size": 173768
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.60933,
"3d-cube.js": 5.968,
"access-fannkuch.js": 15.7533,
"access-nbody.js": 7.09867,
"bitops-bitwise-and.js": 5.572,
"math-partial-sums.js": 3.12667,
"controlflow-recursive.js": 4.45333,
"bitops-bits-in-byte.js": 7.13067,
"access-binary-trees.js": 3.73733,
"bitops-3bit-bits-in-byte.js": 5.11333,
"string-fasta.js": 36.2867,
"math-cordic.js": 8.26933
},
"duktape": {
"math-spectral-norm.js": 1.05067,
"3d-cube.js": 1.17867,
"access-fannkuch.js": 1.984,
"access-nbody.js": 1.748,
"bitops-bitwise-and.js": 7.3,
"math-partial-sums.js": 2.812,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.937333,
"access-binary-trees.js": 1.296,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.74133,
"math-cordic.js": 2.54533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 232,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 84,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 46.3,
"function-empty.js": 34.4373,
"function-excess-args.js": 64.692,
"function-closure.js": 5.40933,
"function-missing-args.js": 67.6853,
"loop-sum.js": 51.9187,
"loop-empty-resolve.js": 5.256,
"function-correct-args.js": 90.2733,
"function-sum.js": 49.968
},
"duktape": {
"loop-empty.js": 56.0267,
"function-empty.js": 40.184,
"function-excess-args.js": 32.332,
"function-closure.js": 19.8213,
"function-missing-args.js": 31.0187,
"loop-sum.js": 73.6293,
"loop-empty-resolve.js": 6.752,
"function-correct-args.js": 32.332,
"function-sum.js": 26.8
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "7ccec19c268352314d1e48365d17f65e3dd6287f",
"size": 173768
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.688,
"3d-cube.js": 6.64267,
"access-fannkuch.js": 16.1907,
"access-nbody.js": 7.11467,
"bitops-bitwise-and.js": 5.28533,
"math-partial-sums.js": 3.376,
"controlflow-recursive.js": 4.44267,
"bitops-bits-in-byte.js": 7.784,
"access-binary-trees.js": 3.35333,
"bitops-3bit-bits-in-byte.js": 5.348,
"string-fasta.js": 36.2507,
"math-cordic.js": 8.64933
},
"duktape": {
"math-spectral-norm.js": 1.052,
"3d-cube.js": 1.176,
"access-fannkuch.js": 1.988,
"access-nbody.js": 1.74267,
"bitops-bitwise-and.js": 7.29067,
"math-partial-sums.js": 2.812,
"controlflow-recursive.js": 1.24667,
"bitops-bits-in-byte.js": 0.933333,
"access-binary-trees.js": 1.3,
"bitops-3bit-bits-in-byte.js": 0.592,
"string-fasta.js": 4.736,
"math-cordic.js": 2.536
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.1187,
"function-empty.js": 32.1413,
"function-excess-args.js": 62.8133,
"function-closure.js": 5.26133,
"function-missing-args.js": 65.0187,
"loop-sum.js": 50.4533,
"loop-empty-resolve.js": 5.12267,
"function-correct-args.js": 87.9467,
"function-sum.js": 48.66
},
"duktape": {
"loop-empty.js": 55.9547,
"function-empty.js": 40.1253,
"function-excess-args.js": 32.284,
"function-closure.js": 19.904,
"function-missing-args.js": 30.9787,
"loop-sum.js": 73.6333,
"loop-empty-resolve.js": 6.76133,
"function-correct-args.js": 32.2893,
"function-sum.js": 26.732
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "351df6184c62b74f1246e9400fb5180d94882baf",
"size": 181960
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.76133,
"3d-cube.js": 6.68267,
"access-fannkuch.js": 16.3613,
"access-nbody.js": 7.14133,
"bitops-bitwise-and.js": 5.38267,
"math-partial-sums.js": 3.38933,
"controlflow-recursive.js": 4.48,
"bitops-bits-in-byte.js": 7.872,
"access-binary-trees.js": 3.35467,
"bitops-3bit-bits-in-byte.js": 5.39733,
"string-fasta.js": 36.2213,
"math-cordic.js": 8.69733
},
"duktape": {
"math-spectral-norm.js": 1.05467,
"3d-cube.js": 1.176,
"access-fannkuch.js": 1.984,
"access-nbody.js": 1.74267,
"bitops-bitwise-and.js": 7.31067,
"math-partial-sums.js": 2.812,
"controlflow-recursive.js": 1.24667,
"bitops-bits-in-byte.js": 0.936,
"access-binary-trees.js": 1.296,
"bitops-3bit-bits-in-byte.js": 0.592,
"string-fasta.js": 4.724,
"math-cordic.js": 2.54133
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.9093,
"function-empty.js": 32.7053,
"function-excess-args.js": 63.4707,
"function-closure.js": 5.25467,
"function-missing-args.js": 65.5867,
"loop-sum.js": 50.8587,
"loop-empty-resolve.js": 5.12933,
"function-correct-args.js": 88.4387,
"function-sum.js": 49.2533
},
"duktape": {
"loop-empty.js": 55.9947,
"function-empty.js": 40.1507,
"function-excess-args.js": 32.3307,
"function-closure.js": 19.8693,
"function-missing-args.js": 31.0453,
"loop-sum.js": 73.56,
"loop-empty-resolve.js": 6.75067,
"function-correct-args.js": 32.3373,
"function-sum.js": 26.8133
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "6038173e76265ab30ae7b5b70a4d20633e1de9b7",
"size": 181960
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.76133,
"3d-cube.js": 6.68667,
"access-fannkuch.js": 16.3267,
"access-nbody.js": 7.148,
"bitops-bitwise-and.js": 5.37733,
"math-partial-sums.js": 3.39067,
"controlflow-recursive.js": 4.47467,
"bitops-bits-in-byte.js": 7.864,
"access-binary-trees.js": 3.35867,
"bitops-3bit-bits-in-byte.js": 5.39733,
"string-fasta.js": 36.228,
"math-cordic.js": 8.69333
},
"duktape": {
"math-spectral-norm.js": 1.036,
"3d-cube.js": 1.17333,
"access-fannkuch.js": 1.98133,
"access-nbody.js": 1.744,
"bitops-bitwise-and.js": 7.31467,
"math-partial-sums.js": 2.81067,
"controlflow-recursive.js": 1.25067,
"bitops-bits-in-byte.js": 0.932,
"access-binary-trees.js": 1.29733,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.73333,
"math-cordic.js": 2.54267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.9267,
"function-empty.js": 32.6907,
"function-excess-args.js": 63.228,
"function-closure.js": 5.24933,
"function-missing-args.js": 65.5267,
"loop-sum.js": 50.884,
"loop-empty-resolve.js": 5.15067,
"function-correct-args.js": 88.4173,
"function-sum.js": 49.3293
},
"duktape": {
"loop-empty.js": 56.0027,
"function-empty.js": 40.2107,
"function-excess-args.js": 32.3027,
"function-closure.js": 19.8653,
"function-missing-args.js": 31.0053,
"loop-sum.js": 73.58,
"loop-empty-resolve.js": 6.75467,
"function-correct-args.js": 32.3627,
"function-sum.js": 26.7067
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "bbfddea032fc622cef6279b308f5d77e135dd19b",
"size": 181960
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.788,
"3d-cube.js": 6.72267,
"access-fannkuch.js": 16.44,
"access-nbody.js": 7.212,
"bitops-bitwise-and.js": 5.38533,
"math-partial-sums.js": 3.40267,
"controlflow-recursive.js": 4.492,
"bitops-bits-in-byte.js": 7.92133,
"access-binary-trees.js": 3.384,
"bitops-3bit-bits-in-byte.js": 5.41867,
"string-fasta.js": 36.2507,
"math-cordic.js": 8.73733
},
"duktape": {
"math-spectral-norm.js": 1.052,
"3d-cube.js": 1.17867,
"access-fannkuch.js": 1.98533,
"access-nbody.js": 1.744,
"bitops-bitwise-and.js": 7.312,
"math-partial-sums.js": 2.808,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.936,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.732,
"math-cordic.js": 2.53867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.7227,
"function-empty.js": 32.936,
"function-excess-args.js": 63.6613,
"function-closure.js": 5.272,
"function-missing-args.js": 65.7773,
"loop-sum.js": 51.1173,
"loop-empty-resolve.js": 5.20533,
"function-correct-args.js": 88.6173,
"function-sum.js": 49.4933
},
"duktape": {
"loop-empty.js": 55.9933,
"function-empty.js": 40.156,
"function-excess-args.js": 32.304,
"function-closure.js": 19.9813,
"function-missing-args.js": 31.028,
"loop-sum.js": 73.5627,
"loop-empty-resolve.js": 6.744,
"function-correct-args.js": 32.3827,
"function-sum.js": 26.8253
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "bbfddea032fc622cef6279b308f5d77e135dd19b",
"size": 181960
},
"duktape": {
"version": "cd2c19761b07e8d675f2079328fbfc9dd9c3b83a",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.788,
"3d-cube.js": 6.69867,
"access-fannkuch.js": 16.4787,
"access-nbody.js": 7.20533,
"bitops-bitwise-and.js": 5.38267,
"math-partial-sums.js": 3.40267,
"controlflow-recursive.js": 4.472,
"bitops-bits-in-byte.js": 7.90933,
"access-binary-trees.js": 3.37067,
"bitops-3bit-bits-in-byte.js": 5.428,
"string-fasta.js": 36.272,
"math-cordic.js": 8.74133
},
"duktape": {
"math-spectral-norm.js": 1.05467,
"3d-cube.js": 1.17733,
"access-fannkuch.js": 1.98133,
"access-nbody.js": 1.74667,
"bitops-bitwise-and.js": 7.30133,
"math-partial-sums.js": 2.82267,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.934667,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.592,
"string-fasta.js": 4.71733,
"math-cordic.js": 2.544
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.7107,
"function-empty.js": 32.9267,
"function-excess-args.js": 63.78,
"function-closure.js": 5.26267,
"function-missing-args.js": 65.8,
"loop-sum.js": 51.1907,
"loop-empty-resolve.js": 5.22,
"function-correct-args.js": 88.6333,
"function-sum.js": 49.5533
},
"duktape": {
"loop-empty.js": 55.8693,
"function-empty.js": 40.2093,
"function-excess-args.js": 32.308,
"function-closure.js": 19.9347,
"function-missing-args.js": 31.012,
"loop-sum.js": 73.4987,
"loop-empty-resolve.js": 6.73467,
"function-correct-args.js": 32.3253,
"function-sum.js": 26.748
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "bbfddea032fc622cef6279b308f5d77e135dd19b",
"size": 181960
},
"duktape": {
"version": "6fed0c9a7a0c96c69918821063d26525b40f80b4",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.77867,
"3d-cube.js": 6.708,
"access-fannkuch.js": 16.472,
"access-nbody.js": 7.212,
"bitops-bitwise-and.js": 5.396,
"math-partial-sums.js": 3.39867,
"controlflow-recursive.js": 4.488,
"bitops-bits-in-byte.js": 7.92133,
"access-binary-trees.js": 3.38267,
"bitops-3bit-bits-in-byte.js": 5.41867,
"string-fasta.js": 36.264,
"math-cordic.js": 8.74667
},
"duktape": {
"math-spectral-norm.js": 1.056,
"3d-cube.js": 1.17867,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.74133,
"bitops-bitwise-and.js": 7.308,
"math-partial-sums.js": 2.81333,
"controlflow-recursive.js": 1.25067,
"bitops-bits-in-byte.js": 0.933333,
"access-binary-trees.js": 1.3,
"bitops-3bit-bits-in-byte.js": 0.593333,
"string-fasta.js": 4.73867,
"math-cordic.js": 2.53867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.644,
"function-empty.js": 32.9213,
"function-excess-args.js": 63.7093,
"function-closure.js": 5.27467,
"function-missing-args.js": 65.8,
"loop-sum.js": 51.216,
"loop-empty-resolve.js": 5.22,
"function-correct-args.js": 88.652,
"function-sum.js": 49.4493
},
"duktape": {
"loop-empty.js": 56.04,
"function-empty.js": 40.184,
"function-excess-args.js": 32.2707,
"function-closure.js": 19.864,
"function-missing-args.js": 31.0587,
"loop-sum.js": 73.5787,
"loop-empty-resolve.js": 6.74933,
"function-correct-args.js": 32.4067,
"function-sum.js": 26.796
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "c7a47c17918e32267628218e164f5ee4e97e54d6",
"size": 181960
},
"duktape": {
"version": "6fed0c9a7a0c96c69918821063d26525b40f80b4",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.72,
"3d-cube.js": 6.67467,
"access-fannkuch.js": 16.1787,
"access-nbody.js": 7.136,
"bitops-bitwise-and.js": 5.35467,
"math-partial-sums.js": 3.36533,
"controlflow-recursive.js": 4.504,
"bitops-bits-in-byte.js": 7.968,
"access-binary-trees.js": 3.37467,
"bitops-3bit-bits-in-byte.js": 5.444,
"string-fasta.js": 36.4587,
"math-cordic.js": 8.66933
},
"duktape": {
"math-spectral-norm.js": 1.056,
"3d-cube.js": 1.17733,
"access-fannkuch.js": 1.988,
"access-nbody.js": 1.748,
"bitops-bitwise-and.js": 7.31333,
"math-partial-sums.js": 2.812,
"controlflow-recursive.js": 1.25067,
"bitops-bits-in-byte.js": 0.936,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.74267,
"math-cordic.js": 2.54
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.1773,
"function-empty.js": 32.72,
"function-excess-args.js": 63.996,
"function-closure.js": 5.44933,
"function-missing-args.js": 66.0,
"loop-sum.js": 50.388,
"loop-empty-resolve.js": 5.16933,
"function-correct-args.js": 89.492,
"function-sum.js": 49.6773
},
"duktape": {
"loop-empty.js": 55.932,
"function-empty.js": 40.176,
"function-excess-args.js": 32.1893,
"function-closure.js": 19.8467,
"function-missing-args.js": 31.044,
"loop-sum.js": 73.6827,
"loop-empty-resolve.js": 6.75067,
"function-correct-args.js": 32.3013,
"function-sum.js": 26.7853
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "7c1622855da1c4757d9c76c3bcdac3e47408ed76",
"size": 186056
},
"duktape": {
"version": "8e9117160b252d93a936d1231c84388adedefb32",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.76267,
"3d-cube.js": 6.704,
"access-fannkuch.js": 16.532,
"access-nbody.js": 7.40533,
"bitops-bitwise-and.js": 5.32133,
"math-partial-sums.js": 3.47733,
"controlflow-recursive.js": 4.572,
"bitops-bits-in-byte.js": 7.81733,
"access-binary-trees.js": 3.46533,
"bitops-3bit-bits-in-byte.js": 5.404,
"string-fasta.js": 36.3987,
"math-cordic.js": 8.79867
},
"duktape": {
"math-spectral-norm.js": 1.05333,
"3d-cube.js": 1.17467,
"access-fannkuch.js": 1.98267,
"access-nbody.js": 1.74933,
"bitops-bitwise-and.js": 7.308,
"math-partial-sums.js": 2.812,
"controlflow-recursive.js": 1.25067,
"bitops-bits-in-byte.js": 0.933333,
"access-binary-trees.js": 1.3,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.73867,
"math-cordic.js": 2.54133
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 46.2027,
"function-empty.js": 32.7427,
"function-excess-args.js": 65.0587,
"function-closure.js": 5.44533,
"function-missing-args.js": 67.048,
"loop-sum.js": 51.3,
"loop-empty-resolve.js": 5.16267,
"function-correct-args.js": 90.692,
"function-sum.js": 50.68
},
"duktape": {
"loop-empty.js": 56.0573,
"function-empty.js": 40.1853,
"function-excess-args.js": 32.288,
"function-closure.js": 19.956,
"function-missing-args.js": 31.0013,
"loop-sum.js": 73.5787,
"loop-empty-resolve.js": 6.75467,
"function-correct-args.js": 32.268,
"function-sum.js": 26.74
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "63083b3b51157b0f02d1170fc0296845f2bcf79f",
"size": 186056
},
"duktape": {
"version": "30613ee6f7248d88abde62d0492cd1ee88e3eda3",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.76667,
"3d-cube.js": 6.74,
"access-fannkuch.js": 16.3733,
"access-nbody.js": 7.19067,
"bitops-bitwise-and.js": 5.488,
"math-partial-sums.js": 3.416,
"controlflow-recursive.js": 4.53467,
"bitops-bits-in-byte.js": 7.988,
"access-binary-trees.js": 3.41067,
"bitops-3bit-bits-in-byte.js": 5.48267,
"string-fasta.js": 36.5333,
"math-cordic.js": 8.828
},
"duktape": {
"math-spectral-norm.js": 1.052,
"3d-cube.js": 1.176,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.74,
"bitops-bitwise-and.js": 7.292,
"math-partial-sums.js": 2.81333,
"controlflow-recursive.js": 1.24933,
"bitops-bits-in-byte.js": 0.934667,
"access-binary-trees.js": 1.29733,
"bitops-3bit-bits-in-byte.js": 0.589333,
"string-fasta.js": 4.73867,
"math-cordic.js": 2.54
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 47.124,
"function-empty.js": 33.7227,
"function-excess-args.js": 64.1573,
"function-closure.js": 5.46667,
"function-missing-args.js": 66.4093,
"loop-sum.js": 52.38,
"loop-empty-resolve.js": 5.32,
"function-correct-args.js": 89.7587,
"function-sum.js": 50.136
},
"duktape": {
"loop-empty.js": 56.0293,
"function-empty.js": 40.168,
"function-excess-args.js": 32.2987,
"function-closure.js": 19.952,
"function-missing-args.js": 31.0747,
"loop-sum.js": 73.6333,
"loop-empty-resolve.js": 6.75867,
"function-correct-args.js": 32.3653,
"function-sum.js": 26.792
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "11c310322b0b09e8d60c72ee5263798938a8d9e0",
"size": 186056
},
"duktape": {
"version": "5b2a3f53f020b816957129ac448efad1b701e895",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.73067,
"3d-cube.js": 6.70267,
"access-fannkuch.js": 16.3107,
"access-nbody.js": 7.104,
"bitops-bitwise-and.js": 5.34267,
"math-partial-sums.js": 3.36533,
"controlflow-recursive.js": 4.492,
"bitops-bits-in-byte.js": 7.97467,
"access-binary-trees.js": 3.392,
"bitops-3bit-bits-in-byte.js": 5.464,
"string-fasta.js": 36.4493,
"math-cordic.js": 8.74533
},
"duktape": {
"math-spectral-norm.js": 1.03467,
"3d-cube.js": 1.16933,
"access-fannkuch.js": 1.97867,
"access-nbody.js": 1.748,
"bitops-bitwise-and.js": 7.26267,
"math-partial-sums.js": 2.82,
"controlflow-recursive.js": 1.24933,
"bitops-bits-in-byte.js": 0.936,
"access-binary-trees.js": 1.29867,
"bitops-3bit-bits-in-byte.js": 0.589333,
"string-fasta.js": 4.66933,
"math-cordic.js": 2.54
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.8547,
"function-empty.js": 33.0987,
"function-excess-args.js": 63.9347,
"function-closure.js": 5.32667,
"function-missing-args.js": 66.0027,
"loop-sum.js": 50.5773,
"loop-empty-resolve.js": 5.224,
"function-correct-args.js": 88.84,
"function-sum.js": 49.6773
},
"duktape": {
"loop-empty.js": 55.7987,
"function-empty.js": 39.904,
"function-excess-args.js": 31.932,
"function-closure.js": 19.5653,
"function-missing-args.js": 30.6627,
"loop-sum.js": 73.58,
"loop-empty-resolve.js": 6.73333,
"function-correct-args.js": 32.0533,
"function-sum.js": 26.408
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "fc45b805794b335210a989a0a1d6d63598b84f91",
"size": 190152
},
"duktape": {
"version": "948d625b259e442581196842f4feba86f6ae94b9",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.74,
"3d-cube.js": 6.66667,
"access-fannkuch.js": 16.128,
"access-nbody.js": 7.08267,
"bitops-bitwise-and.js": 5.33467,
"math-partial-sums.js": 3.35067,
"controlflow-recursive.js": 4.536,
"bitops-bits-in-byte.js": 7.88933,
"access-binary-trees.js": 3.408,
"bitops-3bit-bits-in-byte.js": 5.41867,
"string-fasta.js": 36.5733,
"math-cordic.js": 8.70133
},
"duktape": {
"math-spectral-norm.js": 1.02933,
"3d-cube.js": 1.172,
"access-fannkuch.js": 1.97867,
"access-nbody.js": 1.752,
"bitops-bitwise-and.js": 7.27733,
"math-partial-sums.js": 2.808,
"controlflow-recursive.js": 1.25067,
"bitops-bits-in-byte.js": 0.934667,
"access-binary-trees.js": 1.29733,
"bitops-3bit-bits-in-byte.js": 0.592,
"string-fasta.js": 4.656,
"math-cordic.js": 2.54667
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.2413,
"function-empty.js": 32.808,
"function-excess-args.js": 63.4547,
"function-closure.js": 5.32667,
"function-missing-args.js": 65.5533,
"loop-sum.js": 50.62,
"loop-empty-resolve.js": 5.12133,
"function-correct-args.js": 89.024,
"function-sum.js": 49.3933
},
"duktape": {
"loop-empty.js": 55.8333,
"function-empty.js": 39.8667,
"function-excess-args.js": 31.936,
"function-closure.js": 19.6213,
"function-missing-args.js": 30.712,
"loop-sum.js": 73.6693,
"loop-empty-resolve.js": 6.73333,
"function-correct-args.js": 32.14,
"function-sum.js": 26.4307
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "fc45b805794b335210a989a0a1d6d63598b84f91",
"size": 190152
},
"duktape": {
"version": "6865293847bfeefd449da482a20d25c85096b4c8",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.74267,
"3d-cube.js": 6.66133,
"access-fannkuch.js": 16.0933,
"access-nbody.js": 7.07333,
"bitops-bitwise-and.js": 5.32933,
"math-partial-sums.js": 3.34133,
"controlflow-recursive.js": 4.516,
"bitops-bits-in-byte.js": 7.88667,
"access-binary-trees.js": 3.408,
"bitops-3bit-bits-in-byte.js": 5.40933,
"string-fasta.js": 36.56,
"math-cordic.js": 8.704
},
"duktape": {
"math-spectral-norm.js": 1.03467,
"3d-cube.js": 1.16533,
"access-fannkuch.js": 1.968,
"access-nbody.js": 1.74133,
"bitops-bitwise-and.js": 7.28533,
"math-partial-sums.js": 2.82667,
"controlflow-recursive.js": 1.252,
"bitops-bits-in-byte.js": 0.930667,
"access-binary-trees.js": 1.29467,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.66533,
"math-cordic.js": 2.512
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.28,
"function-empty.js": 32.8533,
"function-excess-args.js": 63.3933,
"function-closure.js": 5.31733,
"function-missing-args.js": 65.5333,
"loop-sum.js": 50.6213,
"loop-empty-resolve.js": 5.132,
"function-correct-args.js": 89.0427,
"function-sum.js": 49.4067
},
"duktape": {
"loop-empty.js": 55.756,
"function-empty.js": 39.8907,
"function-excess-args.js": 31.948,
"function-closure.js": 19.4587,
"function-missing-args.js": 30.7013,
"loop-sum.js": 73.6293,
"loop-empty-resolve.js": 6.72667,
"function-correct-args.js": 32.1413,
"function-sum.js": 26.3787
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "fc45b805794b335210a989a0a1d6d63598b84f91",
"size": 190152
},
"duktape": {
"version": "1f2368ec5b2120c1da1c8e92d57720d044950784",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.74,
"3d-cube.js": 6.68,
"access-fannkuch.js": 16.072,
"access-nbody.js": 7.068,
"bitops-bitwise-and.js": 5.33067,
"math-partial-sums.js": 3.352,
"controlflow-recursive.js": 4.54667,
"bitops-bits-in-byte.js": 7.87867,
"access-binary-trees.js": 3.41333,
"bitops-3bit-bits-in-byte.js": 5.40133,
"string-fasta.js": 36.584,
"math-cordic.js": 8.70533
},
"duktape": {
"math-spectral-norm.js": 1.03333,
"3d-cube.js": 1.172,
"access-fannkuch.js": 1.97733,
"access-nbody.js": 1.75067,
"bitops-bitwise-and.js": 7.28,
"math-partial-sums.js": 2.82933,
"controlflow-recursive.js": 1.252,
"bitops-bits-in-byte.js": 0.929333,
"access-binary-trees.js": 1.29867,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.68933,
"math-cordic.js": 2.54
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.26,
"function-empty.js": 32.8307,
"function-excess-args.js": 63.544,
"function-closure.js": 5.308,
"function-missing-args.js": 65.572,
"loop-sum.js": 50.6853,
"loop-empty-resolve.js": 5.13333,
"function-correct-args.js": 89.0667,
"function-sum.js": 49.3453
},
"duktape": {
"loop-empty.js": 55.8827,
"function-empty.js": 40.3307,
"function-excess-args.js": 32.3413,
"function-closure.js": 19.5213,
"function-missing-args.js": 31.0227,
"loop-sum.js": 73.584,
"loop-empty-resolve.js": 6.74133,
"function-correct-args.js": 32.088,
"function-sum.js": 26.4693
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "e34ab90e61baa478191819eb18700b69717fa743",
"size": 190152
},
"duktape": {
"version": "9509fd1af58392b6c2b30ca0058f58e1b7d92040",
"size": 157632
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.724,
"3d-cube.js": 6.63333,
"access-fannkuch.js": 16.0973,
"access-nbody.js": 7.10933,
"bitops-bitwise-and.js": 5.24667,
"math-partial-sums.js": 3.37867,
"controlflow-recursive.js": 4.456,
"bitops-bits-in-byte.js": 7.84133,
"access-binary-trees.js": 3.39067,
"bitops-3bit-bits-in-byte.js": 5.40933,
"string-fasta.js": 36.2413,
"math-cordic.js": 8.64533
},
"duktape": {
"math-spectral-norm.js": 1.05067,
"3d-cube.js": 1.17467,
"access-fannkuch.js": 1.988,
"access-nbody.js": 1.77333,
"bitops-bitwise-and.js": 7.33733,
"math-partial-sums.js": 2.86533,
"controlflow-recursive.js": 1.25733,
"bitops-bits-in-byte.js": 0.934667,
"access-binary-trees.js": 1.304,
"bitops-3bit-bits-in-byte.js": 0.596,
"string-fasta.js": 4.724,
"math-cordic.js": 2.552
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 44.6973,
"function-empty.js": 32.3533,
"function-excess-args.js": 63.688,
"function-closure.js": 5.33333,
"function-missing-args.js": 66.304,
"loop-sum.js": 50.248,
"loop-empty-resolve.js": 5.11467,
"function-correct-args.js": 88.8973,
"function-sum.js": 49.5947
},
"duktape": {
"loop-empty.js": 55.868,
"function-empty.js": 40.3413,
"function-excess-args.js": 32.252,
"function-closure.js": 19.644,
"function-missing-args.js": 30.936,
"loop-sum.js": 74.3347,
"loop-empty-resolve.js": 6.75333,
"function-correct-args.js": 32.3173,
"function-sum.js": 26.5133
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "3fbe54393f4900ea03b452326d1e96dbd9bf2d3a",
"size": 190152
},
"duktape": {
"version": "a9423c5e963d9241479a678fb62f408c3718ca0c",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.71333,
"3d-cube.js": 6.632,
"access-fannkuch.js": 16.308,
"access-nbody.js": 7.18267,
"bitops-bitwise-and.js": 5.44667,
"math-partial-sums.js": 3.37467,
"controlflow-recursive.js": 4.49733,
"bitops-bits-in-byte.js": 7.85067,
"access-binary-trees.js": 3.40267,
"bitops-3bit-bits-in-byte.js": 5.372,
"string-fasta.js": 36.2293,
"math-cordic.js": 8.67733
},
"duktape": {
"math-spectral-norm.js": 1.104,
"3d-cube.js": 1.156,
"access-fannkuch.js": 1.97867,
"access-nbody.js": 1.756,
"bitops-bitwise-and.js": 7.84267,
"math-partial-sums.js": 2.84667,
"controlflow-recursive.js": 1.23467,
"bitops-bits-in-byte.js": 0.928,
"access-binary-trees.js": 1.26667,
"bitops-3bit-bits-in-byte.js": 0.584,
"string-fasta.js": 4.78667,
"math-cordic.js": 2.42
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.516,
"function-empty.js": 33.4613,
"function-excess-args.js": 63.976,
"function-closure.js": 5.36533,
"function-missing-args.js": 66.1973,
"loop-sum.js": 50.7027,
"loop-empty-resolve.js": 5.14933,
"function-correct-args.js": 89.6493,
"function-sum.js": 49.7267
},
"duktape": {
"loop-empty.js": 58.4453,
"function-empty.js": 39.8,
"function-excess-args.js": 31.952,
"function-closure.js": 19.9787,
"function-missing-args.js": 30.604,
"loop-sum.js": 91.8493,
"loop-empty-resolve.js": 7.044,
"function-correct-args.js": 32.036,
"function-sum.js": 26.5227
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "8cd1ade51592e3fba0a926418b1c9990a4c409f3",
"size": 190152
},
"duktape": {
"version": "9f7eee025386711fa15d6af0ed4715650db1816a",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.73333,
"3d-cube.js": 6.64933,
"access-fannkuch.js": 16.2613,
"access-nbody.js": 7.17333,
"bitops-bitwise-and.js": 5.41733,
"math-partial-sums.js": 3.39333,
"controlflow-recursive.js": 4.52667,
"bitops-bits-in-byte.js": 7.904,
"access-binary-trees.js": 3.408,
"bitops-3bit-bits-in-byte.js": 5.42,
"string-fasta.js": 36.5933,
"math-cordic.js": 8.69067
},
"duktape": {
"math-spectral-norm.js": 1.10533,
"3d-cube.js": 1.156,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.76133,
"bitops-bitwise-and.js": 7.86667,
"math-partial-sums.js": 2.84133,
"controlflow-recursive.js": 1.24,
"bitops-bits-in-byte.js": 0.925333,
"access-binary-trees.js": 1.27733,
"bitops-3bit-bits-in-byte.js": 0.585333,
"string-fasta.js": 4.784,
"math-cordic.js": 2.40933
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.3547,
"function-empty.js": 32.6187,
"function-excess-args.js": 64.6893,
"function-closure.js": 5.36267,
"function-missing-args.js": 67.2133,
"loop-sum.js": 50.888,
"loop-empty-resolve.js": 5.11467,
"function-correct-args.js": 90.4067,
"function-sum.js": 50.272
},
"duktape": {
"loop-empty.js": 58.4093,
"function-empty.js": 39.7973,
"function-excess-args.js": 31.9133,
"function-closure.js": 19.804,
"function-missing-args.js": 30.5973,
"loop-sum.js": 91.7947,
"loop-empty-resolve.js": 7.04533,
"function-correct-args.js": 32.0293,
"function-sum.js": 26.512
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "c715a7cd1de6c498420ed024fb03674e5d74754d",
"size": 190152
},
"duktape": {
"version": "9f7eee025386711fa15d6af0ed4715650db1816a",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.82,
"3d-cube.js": 6.796,
"access-fannkuch.js": 16.8853,
"access-nbody.js": 7.4,
"bitops-bitwise-and.js": 5.40533,
"math-partial-sums.js": 3.432,
"controlflow-recursive.js": 4.604,
"bitops-bits-in-byte.js": 7.97333,
"access-binary-trees.js": 3.46933,
"bitops-3bit-bits-in-byte.js": 5.45867,
"string-fasta.js": 36.8493,
"math-cordic.js": 8.83733
},
"duktape": {
"math-spectral-norm.js": 1.10667,
"3d-cube.js": 1.15733,
"access-fannkuch.js": 1.98133,
"access-nbody.js": 1.76933,
"bitops-bitwise-and.js": 7.85733,
"math-partial-sums.js": 2.84267,
"controlflow-recursive.js": 1.236,
"bitops-bits-in-byte.js": 0.933333,
"access-binary-trees.js": 1.276,
"bitops-3bit-bits-in-byte.js": 0.586667,
"string-fasta.js": 4.792,
"math-cordic.js": 2.412
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 46.232,
"function-empty.js": 33.7587,
"function-excess-args.js": 65.288,
"function-closure.js": 5.53733,
"function-missing-args.js": 67.288,
"loop-sum.js": 51.2053,
"loop-empty-resolve.js": 5.24267,
"function-correct-args.js": 90.7587,
"function-sum.js": 50.7853
},
"duktape": {
"loop-empty.js": 58.3533,
"function-empty.js": 39.8053,
"function-excess-args.js": 31.848,
"function-closure.js": 19.8907,
"function-missing-args.js": 30.6013,
"loop-sum.js": 91.8027,
"loop-empty-resolve.js": 7.052,
"function-correct-args.js": 32.0187,
"function-sum.js": 26.528
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "f7781bb7bcfeee5913cf772d3b577e9798040b7f",
"size": 190156
},
"duktape": {
"version": "a67f893abfb26088e3cda67d5f2f3373ddf9277a",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.736,
"3d-cube.js": 6.67067,
"access-fannkuch.js": 16.3533,
"access-nbody.js": 7.23867,
"bitops-bitwise-and.js": 5.38267,
"math-partial-sums.js": 3.42,
"controlflow-recursive.js": 4.52667,
"bitops-bits-in-byte.js": 7.90267,
"access-binary-trees.js": 3.40533,
"bitops-3bit-bits-in-byte.js": 5.412,
"string-fasta.js": 36.5333,
"math-cordic.js": 8.696
},
"duktape": {
"math-spectral-norm.js": 1.108,
"3d-cube.js": 1.15333,
"access-fannkuch.js": 1.98133,
"access-nbody.js": 1.76,
"bitops-bitwise-and.js": 7.86267,
"math-partial-sums.js": 2.85733,
"controlflow-recursive.js": 1.23867,
"bitops-bits-in-byte.js": 0.928,
"access-binary-trees.js": 1.27733,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.784,
"math-cordic.js": 2.41867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.5853,
"function-empty.js": 33.1587,
"function-excess-args.js": 64.6413,
"function-closure.js": 5.48133,
"function-missing-args.js": 66.916,
"loop-sum.js": 50.68,
"loop-empty-resolve.js": 5.19467,
"function-correct-args.js": 89.8747,
"function-sum.js": 50.1747
},
"duktape": {
"loop-empty.js": 58.4013,
"function-empty.js": 39.7947,
"function-excess-args.js": 31.928,
"function-closure.js": 19.9387,
"function-missing-args.js": 30.5333,
"loop-sum.js": 91.864,
"loop-empty-resolve.js": 7.05067,
"function-correct-args.js": 31.9747,
"function-sum.js": 26.5387
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "f7781bb7bcfeee5913cf772d3b577e9798040b7f",
"size": 190156
},
"duktape": {
"version": "a67f893abfb26088e3cda67d5f2f3373ddf9277a",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.73867,
"3d-cube.js": 6.68133,
"access-fannkuch.js": 16.3653,
"access-nbody.js": 7.23467,
"bitops-bitwise-and.js": 5.37467,
"math-partial-sums.js": 3.416,
"controlflow-recursive.js": 4.52667,
"bitops-bits-in-byte.js": 7.90533,
"access-binary-trees.js": 3.428,
"bitops-3bit-bits-in-byte.js": 5.40667,
"string-fasta.js": 36.5853,
"math-cordic.js": 8.70933
},
"duktape": {
"math-spectral-norm.js": 1.09867,
"3d-cube.js": 1.156,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.75867,
"bitops-bitwise-and.js": 7.83067,
"math-partial-sums.js": 2.84133,
"controlflow-recursive.js": 1.24133,
"bitops-bits-in-byte.js": 0.930667,
"access-binary-trees.js": 1.28,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.78667,
"math-cordic.js": 2.41733
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.5747,
"function-empty.js": 33.128,
"function-excess-args.js": 64.6227,
"function-closure.js": 5.48667,
"function-missing-args.js": 66.848,
"loop-sum.js": 50.6933,
"loop-empty-resolve.js": 5.18933,
"function-correct-args.js": 89.9933,
"function-sum.js": 50.2107
},
"duktape": {
"loop-empty.js": 58.364,
"function-empty.js": 39.7947,
"function-excess-args.js": 31.924,
"function-closure.js": 19.8027,
"function-missing-args.js": 30.5667,
"loop-sum.js": 91.8733,
"loop-empty-resolve.js": 7.044,
"function-correct-args.js": 32.0093,
"function-sum.js": 26.5013
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "f7781bb7bcfeee5913cf772d3b577e9798040b7f",
"size": 190156
},
"duktape": {
"version": "a67f893abfb26088e3cda67d5f2f3373ddf9277a",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.74133,
"3d-cube.js": 6.736,
"access-fannkuch.js": 16.36,
"access-nbody.js": 7.228,
"bitops-bitwise-and.js": 5.388,
"math-partial-sums.js": 3.424,
"controlflow-recursive.js": 4.54933,
"bitops-bits-in-byte.js": 7.91333,
"access-binary-trees.js": 3.41467,
"bitops-3bit-bits-in-byte.js": 5.41733,
"string-fasta.js": 36.5973,
"math-cordic.js": 8.71067
},
"duktape": {
"math-spectral-norm.js": 1.108,
"3d-cube.js": 1.16,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.74267,
"bitops-bitwise-and.js": 7.86267,
"math-partial-sums.js": 2.844,
"controlflow-recursive.js": 1.24267,
"bitops-bits-in-byte.js": 0.932,
"access-binary-trees.js": 1.28,
"bitops-3bit-bits-in-byte.js": 0.590667,
"string-fasta.js": 4.79333,
"math-cordic.js": 2.40667
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.6093,
"function-empty.js": 33.1693,
"function-excess-args.js": 64.6187,
"function-closure.js": 5.47867,
"function-missing-args.js": 66.88,
"loop-sum.js": 50.724,
"loop-empty-resolve.js": 5.19333,
"function-correct-args.js": 89.9587,
"function-sum.js": 50.244
},
"duktape": {
"loop-empty.js": 58.436,
"function-empty.js": 39.776,
"function-excess-args.js": 31.9373,
"function-closure.js": 19.84,
"function-missing-args.js": 30.592,
"loop-sum.js": 91.836,
"loop-empty-resolve.js": 7.03867,
"function-correct-args.js": 32.032,
"function-sum.js": 26.5307
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "c41f76aba2473e9c241e06b12a4309fa265c857b",
"size": 190156
},
"duktape": {
"version": "bdd02a059f4658b87a03ddc2156f111693743b27",
"size": 161728
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.74533,
"3d-cube.js": 6.71733,
"access-fannkuch.js": 16.5987,
"access-nbody.js": 7.35067,
"bitops-bitwise-and.js": 5.49733,
"math-partial-sums.js": 3.408,
"controlflow-recursive.js": 4.444,
"bitops-bits-in-byte.js": 7.82667,
"access-binary-trees.js": 3.43333,
"bitops-3bit-bits-in-byte.js": 5.372,
"string-fasta.js": 36.4347,
"math-cordic.js": 8.71333
},
"duktape": {
"math-spectral-norm.js": 1.104,
"3d-cube.js": 1.15867,
"access-fannkuch.js": 1.98667,
"access-nbody.js": 1.76133,
"bitops-bitwise-and.js": 7.86267,
"math-partial-sums.js": 2.848,
"controlflow-recursive.js": 1.23733,
"bitops-bits-in-byte.js": 0.932,
"access-binary-trees.js": 1.28267,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.78933,
"math-cordic.js": 2.41467
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 192,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 140,
"math-partial-sums.js": 144,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 140,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 140,
"string-fasta.js": 156,
"math-cordic.js": 144
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.28,
"function-empty.js": 33.6253,
"function-excess-args.js": 64.1067,
"function-closure.js": 5.33467,
"function-missing-args.js": 66.324,
"loop-sum.js": 50.5907,
"loop-empty-resolve.js": 5.12667,
"function-correct-args.js": 89.5387,
"function-sum.js": 50.012
},
"duktape": {
"loop-empty.js": 58.424,
"function-empty.js": 39.804,
"function-excess-args.js": 31.9427,
"function-closure.js": 19.876,
"function-missing-args.js": 30.6187,
"loop-sum.js": 91.7333,
"loop-empty-resolve.js": 7.03067,
"function-correct-args.js": 31.9987,
"function-sum.js": 26.5133
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 140,
"function-excess-args.js": 140,
"function-closure.js": 472,
"function-missing-args.js": 140,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 140,
"function-sum.js": 140
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "af56cd8465e530428e5be6ac9074201a21e36da3",
"size": 194252
},
"duktape": {
"version": "0b005c676c66f76431f2af7d8eacd1f81fb238fb",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.78933,
"3d-cube.js": 6.70267,
"access-fannkuch.js": 16.34,
"access-nbody.js": 7.20667,
"bitops-bitwise-and.js": 5.37733,
"math-partial-sums.js": 3.39867,
"controlflow-recursive.js": 4.56533,
"bitops-bits-in-byte.js": 7.88667,
"access-binary-trees.js": 3.40933,
"bitops-3bit-bits-in-byte.js": 5.47467,
"string-fasta.js": 36.264,
"math-cordic.js": 8.81467
},
"duktape": {
"math-spectral-norm.js": 1.072,
"3d-cube.js": 1.164,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.76267,
"bitops-bitwise-and.js": 10.2053,
"math-partial-sums.js": 2.89467,
"controlflow-recursive.js": 1.224,
"bitops-bits-in-byte.js": 0.941333,
"access-binary-trees.js": 1.28533,
"bitops-3bit-bits-in-byte.js": 0.582667,
"string-fasta.js": 4.836,
"math-cordic.js": 2.44533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 168,
"access-fannkuch.js": 52,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 45.324,
"function-empty.js": 33.2627,
"function-excess-args.js": 64.176,
"function-closure.js": 5.41867,
"function-missing-args.js": 66.308,
"loop-sum.js": 50.596,
"loop-empty-resolve.js": 5.17467,
"function-correct-args.js": 89.4587,
"function-sum.js": 50.1053
},
"duktape": {
"loop-empty.js": 76.2387,
"function-empty.js": 48.284,
"function-excess-args.js": 38.3613,
"function-closure.js": 20.072,
"function-missing-args.js": 36.796,
"loop-sum.js": 89.8813,
"loop-empty-resolve.js": 9.072,
"function-correct-args.js": 38.2333,
"function-sum.js": 31.528
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "caeae0f6212dfee662a4082862ca78c66827102b",
"size": 190156
},
"duktape": {
"version": "8e948aa60d0b468396f4b00b22b427d548d4c011",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.87467,
"3d-cube.js": 6.69067,
"access-fannkuch.js": 16.6013,
"access-nbody.js": 7.148,
"bitops-bitwise-and.js": 5.296,
"math-partial-sums.js": 3.39867,
"controlflow-recursive.js": 4.556,
"bitops-bits-in-byte.js": 7.68667,
"access-binary-trees.js": 3.39733,
"bitops-3bit-bits-in-byte.js": 5.368,
"string-fasta.js": 36.0893,
"math-cordic.js": 8.97733
},
"duktape": {
"math-spectral-norm.js": 1.07333,
"3d-cube.js": 1.16133,
"access-fannkuch.js": 1.98533,
"access-nbody.js": 1.76267,
"bitops-bitwise-and.js": 10.22,
"math-partial-sums.js": 2.90133,
"controlflow-recursive.js": 1.21867,
"bitops-bits-in-byte.js": 0.941333,
"access-binary-trees.js": 1.28933,
"bitops-3bit-bits-in-byte.js": 0.581333,
"string-fasta.js": 4.83867,
"math-cordic.js": 2.44133
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 43.5427,
"function-empty.js": 33.8133,
"function-excess-args.js": 77.4747,
"function-closure.js": 5.29867,
"function-missing-args.js": 66.4987,
"loop-sum.js": 49.368,
"loop-empty-resolve.js": 5.092,
"function-correct-args.js": 104.023,
"function-sum.js": 53.3507
},
"duktape": {
"loop-empty.js": 76.292,
"function-empty.js": 48.228,
"function-excess-args.js": 38.3267,
"function-closure.js": 20.0667,
"function-missing-args.js": 36.7933,
"loop-sum.js": 90.108,
"loop-empty-resolve.js": 9.10267,
"function-correct-args.js": 38.2467,
"function-sum.js": 31.5667
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "a19dd0523e5e48f7496fe60caa3f195193f638d2",
"size": 194252
},
"duktape": {
"version": "322ccf9a10675a07d594bda9fac9e1ff72ee3f03",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.85333,
"3d-cube.js": 6.732,
"access-fannkuch.js": 16.7347,
"access-nbody.js": 7.37733,
"bitops-bitwise-and.js": 5.39467,
"math-partial-sums.js": 3.50533,
"controlflow-recursive.js": 4.51067,
"bitops-bits-in-byte.js": 7.568,
"access-binary-trees.js": 3.416,
"bitops-3bit-bits-in-byte.js": 5.32533,
"string-fasta.js": 36.3853,
"math-cordic.js": 8.94533
},
"duktape": {
"math-spectral-norm.js": 1.072,
"3d-cube.js": 1.16,
"access-fannkuch.js": 1.98267,
"access-nbody.js": 1.764,
"bitops-bitwise-and.js": 10.2133,
"math-partial-sums.js": 2.89333,
"controlflow-recursive.js": 1.224,
"bitops-bits-in-byte.js": 0.941333,
"access-binary-trees.js": 1.292,
"bitops-3bit-bits-in-byte.js": 0.581333,
"string-fasta.js": 4.82933,
"math-cordic.js": 2.436
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 236,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 44.7613,
"function-empty.js": 34.164,
"function-excess-args.js": 77.7893,
"function-closure.js": 5.352,
"function-missing-args.js": 67.1813,
"loop-sum.js": 50.2573,
"loop-empty-resolve.js": 5.17467,
"function-correct-args.js": 103.824,
"function-sum.js": 53.8987
},
"duktape": {
"loop-empty.js": 76.276,
"function-empty.js": 48.252,
"function-excess-args.js": 38.4093,
"function-closure.js": 20.1427,
"function-missing-args.js": 36.7787,
"loop-sum.js": 90.1533,
"loop-empty-resolve.js": 9.092,
"function-correct-args.js": 38.3093,
"function-sum.js": 31.528
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "640370da43b51c934205df3a0de597079a8f6a3c",
"size": 194252
},
"duktape": {
"version": "322ccf9a10675a07d594bda9fac9e1ff72ee3f03",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.872,
"3d-cube.js": 6.72,
"access-fannkuch.js": 16.8653,
"access-nbody.js": 7.25733,
"bitops-bitwise-and.js": 5.368,
"math-partial-sums.js": 3.444,
"controlflow-recursive.js": 4.50267,
"bitops-bits-in-byte.js": 7.66133,
"access-binary-trees.js": 3.44133,
"bitops-3bit-bits-in-byte.js": 5.39333,
"string-fasta.js": 36.1267,
"math-cordic.js": 8.96267
},
"duktape": {
"math-spectral-norm.js": 1.076,
"3d-cube.js": 1.16533,
"access-fannkuch.js": 1.97733,
"access-nbody.js": 1.76267,
"bitops-bitwise-and.js": 10.2133,
"math-partial-sums.js": 2.9,
"controlflow-recursive.js": 1.224,
"bitops-bits-in-byte.js": 0.941333,
"access-binary-trees.js": 1.28267,
"bitops-3bit-bits-in-byte.js": 0.58,
"string-fasta.js": 4.83733,
"math-cordic.js": 2.44533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 232,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 44.3067,
"function-empty.js": 33.5453,
"function-excess-args.js": 77.4547,
"function-closure.js": 5.372,
"function-missing-args.js": 66.632,
"loop-sum.js": 49.936,
"loop-empty-resolve.js": 5.168,
"function-correct-args.js": 104.269,
"function-sum.js": 53.64
},
"duktape": {
"loop-empty.js": 76.2893,
"function-empty.js": 48.2293,
"function-excess-args.js": 38.3893,
"function-closure.js": 20.2013,
"function-missing-args.js": 36.804,
"loop-sum.js": 90.2027,
"loop-empty-resolve.js": 9.088,
"function-correct-args.js": 38.2853,
"function-sum.js": 31.5
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "640370da43b51c934205df3a0de597079a8f6a3c",
"size": 194252
},
"duktape": {
"version": "75dab4ae685a75d5293d794969330c2657aab50c",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.85867,
"3d-cube.js": 6.71733,
"access-fannkuch.js": 16.8627,
"access-nbody.js": 7.24,
"bitops-bitwise-and.js": 5.36533,
"math-partial-sums.js": 3.44667,
"controlflow-recursive.js": 4.50533,
"bitops-bits-in-byte.js": 7.64667,
"access-binary-trees.js": 3.444,
"bitops-3bit-bits-in-byte.js": 5.37067,
"string-fasta.js": 36.0787,
"math-cordic.js": 8.98133
},
"duktape": {
"math-spectral-norm.js": 1.088,
"3d-cube.js": 1.168,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.79333,
"bitops-bitwise-and.js": 10.2667,
"math-partial-sums.js": 2.93467,
"controlflow-recursive.js": 1.23467,
"bitops-bits-in-byte.js": 0.950667,
"access-binary-trees.js": 1.304,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.87867,
"math-cordic.js": 2.468
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 232,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 44.2787,
"function-empty.js": 33.588,
"function-excess-args.js": 77.652,
"function-closure.js": 5.37467,
"function-missing-args.js": 66.524,
"loop-sum.js": 49.9,
"loop-empty-resolve.js": 5.156,
"function-correct-args.js": 104.297,
"function-sum.js": 53.6587
},
"duktape": {
"loop-empty.js": 75.9933,
"function-empty.js": 48.6013,
"function-excess-args.js": 38.676,
"function-closure.js": 20.268,
"function-missing-args.js": 37.1173,
"loop-sum.js": 90.4187,
"loop-empty-resolve.js": 9.05733,
"function-correct-args.js": 38.5267,
"function-sum.js": 31.7907
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "640370da43b51c934205df3a0de597079a8f6a3c",
"size": 194252
},
"duktape": {
"version": "217e3b95910d70ed15cfd5a813fb2a5c95fabf13",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.86267,
"3d-cube.js": 6.71067,
"access-fannkuch.js": 16.8333,
"access-nbody.js": 7.22933,
"bitops-bitwise-and.js": 5.36933,
"math-partial-sums.js": 3.456,
"controlflow-recursive.js": 4.50667,
"bitops-bits-in-byte.js": 7.64667,
"access-binary-trees.js": 3.43867,
"bitops-3bit-bits-in-byte.js": 5.37067,
"string-fasta.js": 36.1053,
"math-cordic.js": 9.01733
},
"duktape": {
"math-spectral-norm.js": 1.08533,
"3d-cube.js": 1.168,
"access-fannkuch.js": 1.97867,
"access-nbody.js": 1.792,
"bitops-bitwise-and.js": 10.1947,
"math-partial-sums.js": 2.936,
"controlflow-recursive.js": 1.23333,
"bitops-bits-in-byte.js": 0.950667,
"access-binary-trees.js": 1.30667,
"bitops-3bit-bits-in-byte.js": 0.585333,
"string-fasta.js": 4.89467,
"math-cordic.js": 2.46667
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 232,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 44.2627,
"function-empty.js": 33.5067,
"function-excess-args.js": 77.5333,
"function-closure.js": 5.38667,
"function-missing-args.js": 66.6,
"loop-sum.js": 49.968,
"loop-empty-resolve.js": 5.15467,
"function-correct-args.js": 103.957,
"function-sum.js": 53.6747
},
"duktape": {
"loop-empty.js": 75.5853,
"function-empty.js": 48.436,
"function-excess-args.js": 38.4107,
"function-closure.js": 20.204,
"function-missing-args.js": 36.9653,
"loop-sum.js": 89.996,
"loop-empty-resolve.js": 8.99467,
"function-correct-args.js": 38.2187,
"function-sum.js": 31.636
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "e22a085fc1385f2e0d60eb324063b344c239a949",
"size": 194252
},
"duktape": {
"version": "f28f6c2bbb3781711609d401cda6a3b9f6a7d29f",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.864,
"3d-cube.js": 6.74667,
"access-fannkuch.js": 16.6253,
"access-nbody.js": 7.23733,
"bitops-bitwise-and.js": 5.33067,
"math-partial-sums.js": 3.48667,
"controlflow-recursive.js": 4.56,
"bitops-bits-in-byte.js": 7.70267,
"access-binary-trees.js": 3.41467,
"bitops-3bit-bits-in-byte.js": 5.424,
"string-fasta.js": 36.5293,
"math-cordic.js": 8.99733
},
"duktape": {
"math-spectral-norm.js": 1.092,
"3d-cube.js": 1.168,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.79333,
"bitops-bitwise-and.js": 10.2107,
"math-partial-sums.js": 2.93867,
"controlflow-recursive.js": 1.23467,
"bitops-bits-in-byte.js": 0.948,
"access-binary-trees.js": 1.30267,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.89067,
"math-cordic.js": 2.46267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 232,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 44.6253,
"function-empty.js": 33.7853,
"function-excess-args.js": 77.5427,
"function-closure.js": 5.32,
"function-missing-args.js": 66.38,
"loop-sum.js": 50.0413,
"loop-empty-resolve.js": 5.2,
"function-correct-args.js": 103.961,
"function-sum.js": 54.2893
},
"duktape": {
"loop-empty.js": 75.564,
"function-empty.js": 48.3947,
"function-excess-args.js": 38.4213,
"function-closure.js": 20.2053,
"function-missing-args.js": 36.9187,
"loop-sum.js": 90.0107,
"loop-empty-resolve.js": 9.00533,
"function-correct-args.js": 38.3107,
"function-sum.js": 31.6707
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "c4b1f02947aee10f8ca20ea17da340f8c5fe5a3a",
"size": 194252
},
"duktape": {
"version": "a773df04bdc84c842bceaeb918bd910579ea8841",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.72667,
"3d-cube.js": 6.67733,
"access-fannkuch.js": 16.4707,
"access-nbody.js": 7.12667,
"bitops-bitwise-and.js": 5.21067,
"math-partial-sums.js": 3.38667,
"controlflow-recursive.js": 3.98,
"bitops-bits-in-byte.js": 7.572,
"access-binary-trees.js": 3.336,
"bitops-3bit-bits-in-byte.js": 5.276,
"string-fasta.js": 36.096,
"math-cordic.js": 8.82933
},
"duktape": {
"math-spectral-norm.js": 1.092,
"3d-cube.js": 1.16267,
"access-fannkuch.js": 1.984,
"access-nbody.js": 1.796,
"bitops-bitwise-and.js": 10.2013,
"math-partial-sums.js": 2.93067,
"controlflow-recursive.js": 1.23333,
"bitops-bits-in-byte.js": 0.949333,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.586667,
"string-fasta.js": 4.88267,
"math-cordic.js": 2.46533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 100,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 43.996,
"function-empty.js": 33.328,
"function-excess-args.js": 74.8947,
"function-closure.js": 5.452,
"function-missing-args.js": 66.6867,
"loop-sum.js": 49.4373,
"loop-empty-resolve.js": 5.09333,
"function-correct-args.js": 102.744,
"function-sum.js": 51.856
},
"duktape": {
"loop-empty.js": 75.584,
"function-empty.js": 48.396,
"function-excess-args.js": 38.3987,
"function-closure.js": 20.1213,
"function-missing-args.js": 36.9253,
"loop-sum.js": 89.7707,
"loop-empty-resolve.js": 9.00267,
"function-correct-args.js": 38.3653,
"function-sum.js": 31.6947
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "4ee30cba5d68586d4d248660df83dac316c7603a",
"size": 194252
},
"duktape": {
"version": "3e95145cc06041751b51656156177601b97e0197",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.83733,
"3d-cube.js": 6.72933,
"access-fannkuch.js": 16.7347,
"access-nbody.js": 7.388,
"bitops-bitwise-and.js": 5.22,
"math-partial-sums.js": 3.49333,
"controlflow-recursive.js": 4.028,
"bitops-bits-in-byte.js": 7.576,
"access-binary-trees.js": 3.35867,
"bitops-3bit-bits-in-byte.js": 5.308,
"string-fasta.js": 36.5467,
"math-cordic.js": 8.93733
},
"duktape": {
"math-spectral-norm.js": 1.09067,
"3d-cube.js": 1.164,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.792,
"bitops-bitwise-and.js": 10.1787,
"math-partial-sums.js": 2.93333,
"controlflow-recursive.js": 1.22933,
"bitops-bits-in-byte.js": 0.945333,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.586667,
"string-fasta.js": 4.884,
"math-cordic.js": 2.45467
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 172,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 100,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 52
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 43.992,
"function-empty.js": 33.7067,
"function-excess-args.js": 76.0,
"function-closure.js": 5.48667,
"function-missing-args.js": 67.536,
"loop-sum.js": 49.9027,
"loop-empty-resolve.js": 5.12,
"function-correct-args.js": 103.776,
"function-sum.js": 52.864
},
"duktape": {
"loop-empty.js": 75.608,
"function-empty.js": 48.348,
"function-excess-args.js": 38.444,
"function-closure.js": 20.3053,
"function-missing-args.js": 36.9387,
"loop-sum.js": 89.8893,
"loop-empty-resolve.js": 8.99467,
"function-correct-args.js": 38.38,
"function-sum.js": 31.6613
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 28,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 36,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "8f594aebfad8860cfd25a9d9d875233122081bd3",
"size": 194252
},
"duktape": {
"version": "0d0d23c6fd5103a81398241217af2a98cca6f5d7",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.04133,
"3d-cube.js": 5.98,
"access-fannkuch.js": 14.4653,
"access-nbody.js": 6.49467,
"bitops-bitwise-and.js": 4.32,
"math-partial-sums.js": 3.144,
"controlflow-recursive.js": 3.57333,
"bitops-bits-in-byte.js": 6.808,
"access-binary-trees.js": 3.51333,
"bitops-3bit-bits-in-byte.js": 4.804,
"string-fasta.js": 36.448,
"math-cordic.js": 7.64267
},
"duktape": {
"math-spectral-norm.js": 1.08533,
"3d-cube.js": 1.168,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.79333,
"bitops-bitwise-and.js": 10.188,
"math-partial-sums.js": 2.924,
"controlflow-recursive.js": 1.236,
"bitops-bits-in-byte.js": 0.950667,
"access-binary-trees.js": 1.30533,
"bitops-3bit-bits-in-byte.js": 0.586667,
"string-fasta.js": 4.87067,
"math-cordic.js": 2.45867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 104,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.5107,
"function-empty.js": 31.772,
"function-excess-args.js": 69.3707,
"function-closure.js": 5.752,
"function-missing-args.js": 70.0893,
"loop-sum.js": 44.7947,
"loop-empty-resolve.js": 4.61333,
"function-correct-args.js": 98.256,
"function-sum.js": 47.4067
},
"duktape": {
"loop-empty.js": 75.6147,
"function-empty.js": 48.3933,
"function-excess-args.js": 38.44,
"function-closure.js": 20.1813,
"function-missing-args.js": 36.9267,
"loop-sum.js": 89.9187,
"loop-empty-resolve.js": 8.99867,
"function-correct-args.js": 38.3147,
"function-sum.js": 31.6547
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "38fa391cd8eef20d9b8b9c32453b89bacf7de436",
"size": 194252
},
"duktape": {
"version": "6600dde85e0c930021e23a43fe59d3762b9bb58c",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.952,
"3d-cube.js": 5.88667,
"access-fannkuch.js": 14.0573,
"access-nbody.js": 6.26667,
"bitops-bitwise-and.js": 4.15467,
"math-partial-sums.js": 2.996,
"controlflow-recursive.js": 3.50933,
"bitops-bits-in-byte.js": 6.648,
"access-binary-trees.js": 3.42267,
"bitops-3bit-bits-in-byte.js": 4.67867,
"string-fasta.js": 36.1147,
"math-cordic.js": 7.376
},
"duktape": {
"math-spectral-norm.js": 1.1,
"3d-cube.js": 1.17733,
"access-fannkuch.js": 1.976,
"access-nbody.js": 1.80933,
"bitops-bitwise-and.js": 10.7587,
"math-partial-sums.js": 2.95333,
"controlflow-recursive.js": 1.232,
"bitops-bits-in-byte.js": 0.946667,
"access-binary-trees.js": 1.30667,
"bitops-3bit-bits-in-byte.js": 0.582667,
"string-fasta.js": 4.93467,
"math-cordic.js": 2.53067
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 104,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 48,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.392,
"function-empty.js": 29.98,
"function-excess-args.js": 67.7107,
"function-closure.js": 5.56933,
"function-missing-args.js": 68.216,
"loop-sum.js": 43.216,
"loop-empty-resolve.js": 4.51067,
"function-correct-args.js": 96.5427,
"function-sum.js": 45.5333
},
"duktape": {
"loop-empty.js": 80.2533,
"function-empty.js": 50.3467,
"function-excess-args.js": 40.1013,
"function-closure.js": 20.9413,
"function-missing-args.js": 38.5253,
"loop-sum.js": 95.8627,
"loop-empty-resolve.js": 9.588,
"function-correct-args.js": 39.956,
"function-sum.js": 33.0053
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "38fa391cd8eef20d9b8b9c32453b89bacf7de436",
"size": 194252
},
"duktape": {
"version": "d4bb9798b4145ec3a8cf156abf877f30d98b0e5c",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.95467,
"3d-cube.js": 5.89467,
"access-fannkuch.js": 14.0667,
"access-nbody.js": 6.27867,
"bitops-bitwise-and.js": 4.15333,
"math-partial-sums.js": 3.00533,
"controlflow-recursive.js": 3.512,
"bitops-bits-in-byte.js": 6.66933,
"access-binary-trees.js": 3.45467,
"bitops-3bit-bits-in-byte.js": 4.672,
"string-fasta.js": 36.0947,
"math-cordic.js": 7.39733
},
"duktape": {
"math-spectral-norm.js": 1.09733,
"3d-cube.js": 1.172,
"access-fannkuch.js": 1.97467,
"access-nbody.js": 1.81467,
"bitops-bitwise-and.js": 10.7333,
"math-partial-sums.js": 2.94267,
"controlflow-recursive.js": 1.24,
"bitops-bits-in-byte.js": 0.946667,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.93467,
"math-cordic.js": 2.52533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 104,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 48,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.3813,
"function-empty.js": 29.9053,
"function-excess-args.js": 67.7147,
"function-closure.js": 5.596,
"function-missing-args.js": 68.2693,
"loop-sum.js": 43.2253,
"loop-empty-resolve.js": 4.52,
"function-correct-args.js": 96.496,
"function-sum.js": 45.488
},
"duktape": {
"loop-empty.js": 80.3747,
"function-empty.js": 50.256,
"function-excess-args.js": 40.0373,
"function-closure.js": 20.904,
"function-missing-args.js": 38.5627,
"loop-sum.js": 95.7053,
"loop-empty-resolve.js": 9.572,
"function-correct-args.js": 39.8453,
"function-sum.js": 32.9227
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "38fa391cd8eef20d9b8b9c32453b89bacf7de436",
"size": 194252
},
"duktape": {
"version": "8a90f515606ca59394b8d8351bde6876c6ab4b73",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.94133,
"3d-cube.js": 5.896,
"access-fannkuch.js": 14.0533,
"access-nbody.js": 6.272,
"bitops-bitwise-and.js": 4.156,
"math-partial-sums.js": 2.99467,
"controlflow-recursive.js": 3.508,
"bitops-bits-in-byte.js": 6.652,
"access-binary-trees.js": 3.44667,
"bitops-3bit-bits-in-byte.js": 4.66667,
"string-fasta.js": 36.1653,
"math-cordic.js": 7.39867
},
"duktape": {
"math-spectral-norm.js": 1.10133,
"3d-cube.js": 1.17333,
"access-fannkuch.js": 1.97467,
"access-nbody.js": 1.812,
"bitops-bitwise-and.js": 10.7387,
"math-partial-sums.js": 2.94133,
"controlflow-recursive.js": 1.244,
"bitops-bits-in-byte.js": 0.944,
"access-binary-trees.js": 1.304,
"bitops-3bit-bits-in-byte.js": 0.585333,
"string-fasta.js": 4.95333,
"math-cordic.js": 2.52533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 104,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 48,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.3893,
"function-empty.js": 30.0227,
"function-excess-args.js": 67.6693,
"function-closure.js": 5.59733,
"function-missing-args.js": 68.188,
"loop-sum.js": 43.1947,
"loop-empty-resolve.js": 4.51333,
"function-correct-args.js": 96.5373,
"function-sum.js": 45.5427
},
"duktape": {
"loop-empty.js": 80.3133,
"function-empty.js": 50.2827,
"function-excess-args.js": 40.1213,
"function-closure.js": 20.884,
"function-missing-args.js": 38.572,
"loop-sum.js": 95.768,
"loop-empty-resolve.js": 9.56267,
"function-correct-args.js": 39.8013,
"function-sum.js": 32.9413
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "ab47365b710c72536d6dfb85ea1fb4f1290da723",
"size": 194252
},
"duktape": {
"version": "51661c12265f0ae04239a3256e6d5428d1b3aaf5",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.03733,
"3d-cube.js": 5.88667,
"access-fannkuch.js": 14.2493,
"access-nbody.js": 6.32133,
"bitops-bitwise-and.js": 4.168,
"math-partial-sums.js": 3.02533,
"controlflow-recursive.js": 3.55467,
"bitops-bits-in-byte.js": 6.64,
"access-binary-trees.js": 3.10533,
"bitops-3bit-bits-in-byte.js": 4.64,
"string-fasta.js": 35.7107,
"math-cordic.js": 7.412
},
"duktape": {
"math-spectral-norm.js": 1.096,
"3d-cube.js": 1.17733,
"access-fannkuch.js": 1.97867,
"access-nbody.js": 1.80933,
"bitops-bitwise-and.js": 10.7267,
"math-partial-sums.js": 2.944,
"controlflow-recursive.js": 1.24,
"bitops-bits-in-byte.js": 0.944,
"access-binary-trees.js": 1.30267,
"bitops-3bit-bits-in-byte.js": 0.586667,
"string-fasta.js": 4.94533,
"math-cordic.js": 2.528
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 160,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.8707,
"function-empty.js": 31.6013,
"function-excess-args.js": 67.7427,
"function-closure.js": 5.62133,
"function-missing-args.js": 68.0613,
"loop-sum.js": 44.2693,
"loop-empty-resolve.js": 4.58133,
"function-correct-args.js": 98.768,
"function-sum.js": 45.412
},
"duktape": {
"loop-empty.js": 80.336,
"function-empty.js": 50.2373,
"function-excess-args.js": 40.1067,
"function-closure.js": 20.8853,
"function-missing-args.js": 38.516,
"loop-sum.js": 95.82,
"loop-empty-resolve.js": 9.556,
"function-correct-args.js": 39.8453,
"function-sum.js": 32.9293
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "ab47365b710c72536d6dfb85ea1fb4f1290da723",
"size": 194252
},
"duktape": {
"version": "e55e469c68b90f0aac86eca7c058b8347ef2f03e",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 4.04,
"3d-cube.js": 5.89067,
"access-fannkuch.js": 14.2387,
"access-nbody.js": 6.33467,
"bitops-bitwise-and.js": 4.16267,
"math-partial-sums.js": 3.016,
"controlflow-recursive.js": 3.56267,
"bitops-bits-in-byte.js": 6.65067,
"access-binary-trees.js": 3.11467,
"bitops-3bit-bits-in-byte.js": 4.63333,
"string-fasta.js": 35.7867,
"math-cordic.js": 7.41867
},
"duktape": {
"math-spectral-norm.js": 1.10133,
"3d-cube.js": 1.17467,
"access-fannkuch.js": 1.97733,
"access-nbody.js": 1.81467,
"bitops-bitwise-and.js": 10.7213,
"math-partial-sums.js": 2.948,
"controlflow-recursive.js": 1.23867,
"bitops-bits-in-byte.js": 0.945333,
"access-binary-trees.js": 1.30667,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.94,
"math-cordic.js": 2.52267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 160,
"access-fannkuch.js": 48,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.836,
"function-empty.js": 31.6013,
"function-excess-args.js": 67.7533,
"function-closure.js": 5.62533,
"function-missing-args.js": 68.1773,
"loop-sum.js": 44.212,
"loop-empty-resolve.js": 4.58133,
"function-correct-args.js": 98.704,
"function-sum.js": 45.508
},
"duktape": {
"loop-empty.js": 80.2453,
"function-empty.js": 50.2667,
"function-excess-args.js": 40.108,
"function-closure.js": 20.96,
"function-missing-args.js": 38.5333,
"loop-sum.js": 95.8133,
"loop-empty-resolve.js": 9.58267,
"function-correct-args.js": 39.848,
"function-sum.js": 32.9507
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "e0dee65a368b8ca7fa69c81af9517dd8824d98ed",
"size": 194252
},
"duktape": {
"version": "e55e469c68b90f0aac86eca7c058b8347ef2f03e",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.84,
"3d-cube.js": 5.76133,
"access-fannkuch.js": 14.12,
"access-nbody.js": 5.88133,
"bitops-bitwise-and.js": 4.08267,
"math-partial-sums.js": 2.82667,
"controlflow-recursive.js": 3.572,
"bitops-bits-in-byte.js": 6.55067,
"access-binary-trees.js": 3.08933,
"bitops-3bit-bits-in-byte.js": 4.62667,
"string-fasta.js": 28.856,
"math-cordic.js": 7.268
},
"duktape": {
"math-spectral-norm.js": 1.1,
"3d-cube.js": 1.176,
"access-fannkuch.js": 1.97867,
"access-nbody.js": 1.808,
"bitops-bitwise-and.js": 10.728,
"math-partial-sums.js": 2.94667,
"controlflow-recursive.js": 1.24,
"bitops-bits-in-byte.js": 0.942667,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.585333,
"string-fasta.js": 4.93867,
"math-cordic.js": 2.52267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.3613,
"function-empty.js": 31.3627,
"function-excess-args.js": 67.7373,
"function-closure.js": 5.828,
"function-missing-args.js": 68.468,
"loop-sum.js": 41.2827,
"loop-empty-resolve.js": 4.568,
"function-correct-args.js": 98.716,
"function-sum.js": 45.82
},
"duktape": {
"loop-empty.js": 80.284,
"function-empty.js": 50.2653,
"function-excess-args.js": 40.064,
"function-closure.js": 20.9013,
"function-missing-args.js": 38.5107,
"loop-sum.js": 95.784,
"loop-empty-resolve.js": 9.56133,
"function-correct-args.js": 39.86,
"function-sum.js": 32.9187
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b3b87add02f42eac1df89320ac08b760a58abfa1",
"size": 194252
},
"duktape": {
"version": "e55e469c68b90f0aac86eca7c058b8347ef2f03e",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.86667,
"3d-cube.js": 5.73467,
"access-fannkuch.js": 13.9827,
"access-nbody.js": 5.864,
"bitops-bitwise-and.js": 4.05333,
"math-partial-sums.js": 2.84933,
"controlflow-recursive.js": 3.60933,
"bitops-bits-in-byte.js": 6.60267,
"access-binary-trees.js": 3.10533,
"bitops-3bit-bits-in-byte.js": 4.62667,
"string-fasta.js": 29.0307,
"math-cordic.js": 7.27333
},
"duktape": {
"math-spectral-norm.js": 1.09733,
"3d-cube.js": 1.17467,
"access-fannkuch.js": 1.976,
"access-nbody.js": 1.80933,
"bitops-bitwise-and.js": 10.7053,
"math-partial-sums.js": 2.94,
"controlflow-recursive.js": 1.24133,
"bitops-bits-in-byte.js": 0.945333,
"access-binary-trees.js": 1.30267,
"bitops-3bit-bits-in-byte.js": 0.586667,
"string-fasta.js": 4.93867,
"math-cordic.js": 2.52267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.2213,
"function-empty.js": 31.66,
"function-excess-args.js": 68.3853,
"function-closure.js": 5.90267,
"function-missing-args.js": 69.144,
"loop-sum.js": 40.7867,
"loop-empty-resolve.js": 4.53067,
"function-correct-args.js": 99.3,
"function-sum.js": 46.172
},
"duktape": {
"loop-empty.js": 80.2987,
"function-empty.js": 50.2067,
"function-excess-args.js": 40.1227,
"function-closure.js": 20.9413,
"function-missing-args.js": 38.5147,
"loop-sum.js": 95.7587,
"loop-empty-resolve.js": 9.56533,
"function-correct-args.js": 39.84,
"function-sum.js": 32.9507
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b3b87add02f42eac1df89320ac08b760a58abfa1",
"size": 194252
},
"duktape": {
"version": "e55e469c68b90f0aac86eca7c058b8347ef2f03e",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.86267,
"3d-cube.js": 5.74667,
"access-fannkuch.js": 14.0147,
"access-nbody.js": 5.872,
"bitops-bitwise-and.js": 4.05333,
"math-partial-sums.js": 2.84667,
"controlflow-recursive.js": 3.57867,
"bitops-bits-in-byte.js": 6.59867,
"access-binary-trees.js": 3.088,
"bitops-3bit-bits-in-byte.js": 4.62667,
"string-fasta.js": 29.0707,
"math-cordic.js": 7.26267
},
"duktape": {
"math-spectral-norm.js": 1.1,
"3d-cube.js": 1.17333,
"access-fannkuch.js": 1.97333,
"access-nbody.js": 1.81067,
"bitops-bitwise-and.js": 10.7213,
"math-partial-sums.js": 2.93733,
"controlflow-recursive.js": 1.236,
"bitops-bits-in-byte.js": 0.945333,
"access-binary-trees.js": 1.3,
"bitops-3bit-bits-in-byte.js": 0.588,
"string-fasta.js": 4.94533,
"math-cordic.js": 2.52533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.1573,
"function-empty.js": 31.672,
"function-excess-args.js": 68.3653,
"function-closure.js": 5.916,
"function-missing-args.js": 69.1267,
"loop-sum.js": 40.7987,
"loop-empty-resolve.js": 4.52533,
"function-correct-args.js": 99.2413,
"function-sum.js": 46.0987
},
"duktape": {
"loop-empty.js": 80.2853,
"function-empty.js": 50.2733,
"function-excess-args.js": 40.1053,
"function-closure.js": 20.8933,
"function-missing-args.js": 38.528,
"loop-sum.js": 95.696,
"loop-empty-resolve.js": 9.56267,
"function-correct-args.js": 39.812,
"function-sum.js": 32.9333
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b3b87add02f42eac1df89320ac08b760a58abfa1",
"size": 194252
},
"duktape": {
"version": "dabddfb6f8df5a9ccf44908055fefbc74c3a5643",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.86,
"3d-cube.js": 5.744,
"access-fannkuch.js": 14.0093,
"access-nbody.js": 5.88667,
"bitops-bitwise-and.js": 4.05467,
"math-partial-sums.js": 2.844,
"controlflow-recursive.js": 3.61067,
"bitops-bits-in-byte.js": 6.59467,
"access-binary-trees.js": 3.10933,
"bitops-3bit-bits-in-byte.js": 4.63067,
"string-fasta.js": 29.0493,
"math-cordic.js": 7.268
},
"duktape": {
"math-spectral-norm.js": 1.09867,
"3d-cube.js": 1.17467,
"access-fannkuch.js": 1.98,
"access-nbody.js": 1.808,
"bitops-bitwise-and.js": 10.728,
"math-partial-sums.js": 2.948,
"controlflow-recursive.js": 1.24,
"bitops-bits-in-byte.js": 0.941333,
"access-binary-trees.js": 1.3,
"bitops-3bit-bits-in-byte.js": 0.582667,
"string-fasta.js": 4.94933,
"math-cordic.js": 2.52933
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.2573,
"function-empty.js": 31.672,
"function-excess-args.js": 68.308,
"function-closure.js": 5.91467,
"function-missing-args.js": 69.0693,
"loop-sum.js": 40.8067,
"loop-empty-resolve.js": 4.53333,
"function-correct-args.js": 99.2293,
"function-sum.js": 46.152
},
"duktape": {
"loop-empty.js": 80.3027,
"function-empty.js": 50.2733,
"function-excess-args.js": 40.092,
"function-closure.js": 20.848,
"function-missing-args.js": 38.5133,
"loop-sum.js": 95.736,
"loop-empty-resolve.js": 9.556,
"function-correct-args.js": 39.8573,
"function-sum.js": 32.9067
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b3b87add02f42eac1df89320ac08b760a58abfa1",
"size": 194252
},
"duktape": {
"version": "dabddfb6f8df5a9ccf44908055fefbc74c3a5643",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.872,
"3d-cube.js": 5.82533,
"access-fannkuch.js": 14.0027,
"access-nbody.js": 5.87333,
"bitops-bitwise-and.js": 4.05067,
"math-partial-sums.js": 2.852,
"controlflow-recursive.js": 3.62133,
"bitops-bits-in-byte.js": 6.60133,
"access-binary-trees.js": 3.10667,
"bitops-3bit-bits-in-byte.js": 4.62133,
"string-fasta.js": 29.0347,
"math-cordic.js": 7.26933
},
"duktape": {
"math-spectral-norm.js": 1.10267,
"3d-cube.js": 1.18133,
"access-fannkuch.js": 1.97733,
"access-nbody.js": 1.81333,
"bitops-bitwise-and.js": 10.732,
"math-partial-sums.js": 2.94667,
"controlflow-recursive.js": 1.24,
"bitops-bits-in-byte.js": 0.948,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.585333,
"string-fasta.js": 4.94667,
"math-cordic.js": 2.52533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.1907,
"function-empty.js": 31.656,
"function-excess-args.js": 68.3493,
"function-closure.js": 5.91733,
"function-missing-args.js": 69.1347,
"loop-sum.js": 40.8133,
"loop-empty-resolve.js": 4.536,
"function-correct-args.js": 99.2427,
"function-sum.js": 46.0933
},
"duktape": {
"loop-empty.js": 80.2773,
"function-empty.js": 50.2373,
"function-excess-args.js": 40.056,
"function-closure.js": 20.8573,
"function-missing-args.js": 38.5093,
"loop-sum.js": 95.7973,
"loop-empty-resolve.js": 9.57333,
"function-correct-args.js": 39.84,
"function-sum.js": 32.9573
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "e4843ece763cd4f977d98eaf6f68148ba1ee50fd",
"size": 198352
},
"duktape": {
"version": "64560f815f1bb762460d02a8df0cac2f93d07eaf",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.81067,
"3d-cube.js": 5.78933,
"access-fannkuch.js": 14.14,
"access-nbody.js": 5.94667,
"bitops-bitwise-and.js": 4.13867,
"math-partial-sums.js": 2.83867,
"controlflow-recursive.js": 3.59867,
"bitops-bits-in-byte.js": 6.68267,
"access-binary-trees.js": 3.096,
"bitops-3bit-bits-in-byte.js": 4.67333,
"string-fasta.js": 28.672,
"math-cordic.js": 7.328
},
"duktape": {
"math-spectral-norm.js": 1.06533,
"3d-cube.js": 1.104,
"access-fannkuch.js": 1.816,
"access-nbody.js": 1.70667,
"bitops-bitwise-and.js": 10.284,
"math-partial-sums.js": 2.86133,
"controlflow-recursive.js": 1.21067,
"bitops-bits-in-byte.js": 0.849333,
"access-binary-trees.js": 1.284,
"bitops-3bit-bits-in-byte.js": 0.566667,
"string-fasta.js": 4.84,
"math-cordic.js": 2.36667
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.0827,
"function-empty.js": 31.8293,
"function-excess-args.js": 68.6413,
"function-closure.js": 5.81467,
"function-missing-args.js": 69.048,
"loop-sum.js": 41.196,
"loop-empty-resolve.js": 4.512,
"function-correct-args.js": 100.0,
"function-sum.js": 45.936
},
"duktape": {
"loop-empty.js": 76.6493,
"function-empty.js": 48.9467,
"function-excess-args.js": 38.7307,
"function-closure.js": 20.084,
"function-missing-args.js": 37.3213,
"loop-sum.js": 91.512,
"loop-empty-resolve.js": 9.104,
"function-correct-args.js": 38.396,
"function-sum.js": 31.9747
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "bf780ad3dc6fe336d6741a8cdc9d6d4f51f3e95e",
"size": 198328
},
"duktape": {
"version": "50171d671af34f2c403acf61c6dc83f2d2561e24",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.864,
"3d-cube.js": 5.8,
"access-fannkuch.js": 14.3773,
"access-nbody.js": 5.92933,
"bitops-bitwise-and.js": 4.13733,
"math-partial-sums.js": 2.84267,
"controlflow-recursive.js": 3.58933,
"bitops-bits-in-byte.js": 6.70133,
"access-binary-trees.js": 3.08667,
"bitops-3bit-bits-in-byte.js": 4.66,
"string-fasta.js": 28.9347,
"math-cordic.js": 7.35467
},
"duktape": {
"math-spectral-norm.js": 1.07733,
"3d-cube.js": 1.104,
"access-fannkuch.js": 1.824,
"access-nbody.js": 1.70533,
"bitops-bitwise-and.js": 10.3147,
"math-partial-sums.js": 2.87333,
"controlflow-recursive.js": 1.208,
"bitops-bits-in-byte.js": 0.857333,
"access-binary-trees.js": 1.28267,
"bitops-3bit-bits-in-byte.js": 0.566667,
"string-fasta.js": 4.82667,
"math-cordic.js": 2.368
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 60,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.3013,
"function-empty.js": 31.532,
"function-excess-args.js": 67.956,
"function-closure.js": 5.76933,
"function-missing-args.js": 68.6813,
"loop-sum.js": 41.9653,
"loop-empty-resolve.js": 4.54533,
"function-correct-args.js": 99.0587,
"function-sum.js": 45.6547
},
"duktape": {
"loop-empty.js": 76.5387,
"function-empty.js": 48.5947,
"function-excess-args.js": 38.568,
"function-closure.js": 20.1053,
"function-missing-args.js": 37.2773,
"loop-sum.js": 91.2093,
"loop-empty-resolve.js": 9.11333,
"function-correct-args.js": 38.2867,
"function-sum.js": 31.888
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "bf780ad3dc6fe336d6741a8cdc9d6d4f51f3e95e",
"size": 198328
},
"duktape": {
"version": "8b5bcca3cfab0ef9fff55422530e6e5a2d7eec04",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.88133,
"3d-cube.js": 5.796,
"access-fannkuch.js": 14.3467,
"access-nbody.js": 5.94,
"bitops-bitwise-and.js": 4.13333,
"math-partial-sums.js": 2.85333,
"controlflow-recursive.js": 3.58667,
"bitops-bits-in-byte.js": 6.70667,
"access-binary-trees.js": 3.10133,
"bitops-3bit-bits-in-byte.js": 4.656,
"string-fasta.js": 28.9267,
"math-cordic.js": 7.36933
},
"duktape": {
"math-spectral-norm.js": 1.06667,
"3d-cube.js": 1.10533,
"access-fannkuch.js": 1.81733,
"access-nbody.js": 1.69867,
"bitops-bitwise-and.js": 10.32,
"math-partial-sums.js": 2.87067,
"controlflow-recursive.js": 1.21333,
"bitops-bits-in-byte.js": 0.856,
"access-binary-trees.js": 1.28667,
"bitops-3bit-bits-in-byte.js": 0.561333,
"string-fasta.js": 4.832,
"math-cordic.js": 2.37867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 52,
"3d-cube.js": 168,
"access-fannkuch.js": 48,
"access-nbody.js": 76,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 224,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 96,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 60,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.4,
"function-empty.js": 31.5533,
"function-excess-args.js": 68.0027,
"function-closure.js": 5.76267,
"function-missing-args.js": 68.8507,
"loop-sum.js": 41.9147,
"loop-empty-resolve.js": 4.548,
"function-correct-args.js": 99.0587,
"function-sum.js": 45.676
},
"duktape": {
"loop-empty.js": 76.7093,
"function-empty.js": 48.948,
"function-excess-args.js": 38.708,
"function-closure.js": 20.2333,
"function-missing-args.js": 37.3493,
"loop-sum.js": 90.9467,
"loop-empty-resolve.js": 9.15467,
"function-correct-args.js": 38.4253,
"function-sum.js": 32.0293
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 24,
"function-empty.js": 24,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 24,
"loop-empty-resolve.js": 24,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "10e5f3530d1bce030ef1006c682735e389b8bcef",
"size": 198328
},
"duktape": {
"version": "dfc66cd923ac8185524647138c518f4dfae46163",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.20667,
"3d-cube.js": 3.768,
"access-fannkuch.js": 10.156,
"access-nbody.js": 4.74933,
"bitops-bitwise-and.js": 4.192,
"math-partial-sums.js": 2.576,
"controlflow-recursive.js": 3.15333,
"bitops-bits-in-byte.js": 4.40933,
"access-binary-trees.js": 2.81867,
"bitops-3bit-bits-in-byte.js": 3.27067,
"string-fasta.js": 27.6907,
"math-cordic.js": 4.84933
},
"duktape": {
"math-spectral-norm.js": 1.05867,
"3d-cube.js": 1.10933,
"access-fannkuch.js": 1.81467,
"access-nbody.js": 1.696,
"bitops-bitwise-and.js": 10.3,
"math-partial-sums.js": 2.88133,
"controlflow-recursive.js": 1.22133,
"bitops-bits-in-byte.js": 0.848,
"access-binary-trees.js": 1.30133,
"bitops-3bit-bits-in-byte.js": 0.557333,
"string-fasta.js": 4.83333,
"math-cordic.js": 2.35867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 40,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.192,
"function-empty.js": 29.8107,
"function-excess-args.js": 64.968,
"function-closure.js": 5.21467,
"function-missing-args.js": 64.6507,
"loop-sum.js": 42.6293,
"loop-empty-resolve.js": 4.62933,
"function-correct-args.js": 92.8987,
"function-sum.js": 43.9893
},
"duktape": {
"loop-empty.js": 76.5493,
"function-empty.js": 49.4,
"function-excess-args.js": 38.8493,
"function-closure.js": 20.2453,
"function-missing-args.js": 37.4987,
"loop-sum.js": 91.0907,
"loop-empty-resolve.js": 9.10667,
"function-correct-args.js": 38.6453,
"function-sum.js": 32.2707
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "a00079e8ff203e1a373ed0ada152bdcac37fc90c",
"size": 194232
},
"duktape": {
"version": "589b96fc9bba5996b143b6459414ab8456abd6d4",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.188,
"3d-cube.js": 3.72667,
"access-fannkuch.js": 9.93467,
"access-nbody.js": 4.66,
"bitops-bitwise-and.js": 4.17867,
"math-partial-sums.js": 2.57333,
"controlflow-recursive.js": 3.176,
"bitops-bits-in-byte.js": 4.47867,
"access-binary-trees.js": 2.82133,
"bitops-3bit-bits-in-byte.js": 3.32133,
"string-fasta.js": 27.8453,
"math-cordic.js": 4.896
},
"duktape": {
"math-spectral-norm.js": 1.05867,
"3d-cube.js": 1.11067,
"access-fannkuch.js": 1.82533,
"access-nbody.js": 1.70667,
"bitops-bitwise-and.js": 10.2733,
"math-partial-sums.js": 2.876,
"controlflow-recursive.js": 1.21733,
"bitops-bits-in-byte.js": 0.848,
"access-binary-trees.js": 1.30667,
"bitops-3bit-bits-in-byte.js": 0.564,
"string-fasta.js": 4.83733,
"math-cordic.js": 2.36667
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.2973,
"function-empty.js": 31.3387,
"function-excess-args.js": 66.4893,
"function-closure.js": 5.35467,
"function-missing-args.js": 66.096,
"loop-sum.js": 42.3813,
"loop-empty-resolve.js": 4.65467,
"function-correct-args.js": 94.284,
"function-sum.js": 45.1453
},
"duktape": {
"loop-empty.js": 76.5573,
"function-empty.js": 49.392,
"function-excess-args.js": 38.8667,
"function-closure.js": 20.2667,
"function-missing-args.js": 37.5067,
"loop-sum.js": 91.032,
"loop-empty-resolve.js": 9.108,
"function-correct-args.js": 38.664,
"function-sum.js": 32.2707
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "a00079e8ff203e1a373ed0ada152bdcac37fc90c",
"size": 194232
},
"duktape": {
"version": "8bc77c5ca3a2a59dc8306ea7e6bcf6d5463d645f",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.19333,
"3d-cube.js": 3.73867,
"access-fannkuch.js": 9.95733,
"access-nbody.js": 4.66533,
"bitops-bitwise-and.js": 4.18267,
"math-partial-sums.js": 2.57067,
"controlflow-recursive.js": 3.17867,
"bitops-bits-in-byte.js": 4.484,
"access-binary-trees.js": 2.82533,
"bitops-3bit-bits-in-byte.js": 3.31733,
"string-fasta.js": 27.8453,
"math-cordic.js": 4.90267
},
"duktape": {
"math-spectral-norm.js": 1.05867,
"3d-cube.js": 1.10933,
"access-fannkuch.js": 1.82133,
"access-nbody.js": 1.72933,
"bitops-bitwise-and.js": 10.3333,
"math-partial-sums.js": 2.892,
"controlflow-recursive.js": 1.22933,
"bitops-bits-in-byte.js": 0.853333,
"access-binary-trees.js": 1.312,
"bitops-3bit-bits-in-byte.js": 0.561333,
"string-fasta.js": 4.84667,
"math-cordic.js": 2.388
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.2187,
"function-empty.js": 31.2347,
"function-excess-args.js": 66.456,
"function-closure.js": 5.37067,
"function-missing-args.js": 66.0053,
"loop-sum.js": 42.2627,
"loop-empty-resolve.js": 4.65333,
"function-correct-args.js": 94.192,
"function-sum.js": 45.12
},
"duktape": {
"loop-empty.js": 76.7293,
"function-empty.js": 49.772,
"function-excess-args.js": 39.3213,
"function-closure.js": 20.292,
"function-missing-args.js": 37.7653,
"loop-sum.js": 91.5947,
"loop-empty-resolve.js": 9.13467,
"function-correct-args.js": 39.0187,
"function-sum.js": 32.5347
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "a26c45421988d138a01408ecfefb80816e3bcf81",
"size": 194232
},
"duktape": {
"version": "95681fbe0d5bd548c9ea918d10eb5a4daa7df96d",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.18933,
"3d-cube.js": 3.74,
"access-fannkuch.js": 9.92,
"access-nbody.js": 4.66,
"bitops-bitwise-and.js": 4.19333,
"math-partial-sums.js": 2.57333,
"controlflow-recursive.js": 3.18133,
"bitops-bits-in-byte.js": 4.48667,
"access-binary-trees.js": 2.82667,
"bitops-3bit-bits-in-byte.js": 3.32267,
"string-fasta.js": 27.7667,
"math-cordic.js": 4.908
},
"duktape": {
"math-spectral-norm.js": 1.06933,
"3d-cube.js": 1.11867,
"access-fannkuch.js": 1.808,
"access-nbody.js": 1.724,
"bitops-bitwise-and.js": 10.644,
"math-partial-sums.js": 2.99067,
"controlflow-recursive.js": 1.26533,
"bitops-bits-in-byte.js": 0.850667,
"access-binary-trees.js": 1.31467,
"bitops-3bit-bits-in-byte.js": 0.557333,
"string-fasta.js": 4.92267,
"math-cordic.js": 2.46133
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.764,
"function-empty.js": 31.32,
"function-excess-args.js": 66.4547,
"function-closure.js": 5.34667,
"function-missing-args.js": 66.1093,
"loop-sum.js": 42.3773,
"loop-empty-resolve.js": 4.708,
"function-correct-args.js": 94.272,
"function-sum.js": 45.268
},
"duktape": {
"loop-empty.js": 79.004,
"function-empty.js": 50.3947,
"function-excess-args.js": 39.7,
"function-closure.js": 20.4093,
"function-missing-args.js": 38.4667,
"loop-sum.js": 95.6813,
"loop-empty-resolve.js": 9.42933,
"function-correct-args.js": 39.512,
"function-sum.js": 32.7507
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "a26c45421988d138a01408ecfefb80816e3bcf81",
"size": 194232
},
"duktape": {
"version": "95681fbe0d5bd548c9ea918d10eb5a4daa7df96d",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.19867,
"3d-cube.js": 3.75333,
"access-fannkuch.js": 9.93867,
"access-nbody.js": 4.668,
"bitops-bitwise-and.js": 4.19733,
"math-partial-sums.js": 2.57733,
"controlflow-recursive.js": 3.18667,
"bitops-bits-in-byte.js": 4.50933,
"access-binary-trees.js": 2.83067,
"bitops-3bit-bits-in-byte.js": 3.33067,
"string-fasta.js": 27.6893,
"math-cordic.js": 4.908
},
"duktape": {
"math-spectral-norm.js": 1.06933,
"3d-cube.js": 1.12133,
"access-fannkuch.js": 1.79867,
"access-nbody.js": 1.72267,
"bitops-bitwise-and.js": 10.588,
"math-partial-sums.js": 2.98,
"controlflow-recursive.js": 1.26533,
"bitops-bits-in-byte.js": 0.849333,
"access-binary-trees.js": 1.30933,
"bitops-3bit-bits-in-byte.js": 0.56,
"string-fasta.js": 4.90933,
"math-cordic.js": 2.46133
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 144,
"3d-cube.js": 188,
"access-fannkuch.js": 148,
"access-nbody.js": 156,
"bitops-bitwise-and.js": 144,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 184,
"bitops-bits-in-byte.js": 144,
"access-binary-trees.js": 208,
"bitops-3bit-bits-in-byte.js": 144,
"string-fasta.js": 156,
"math-cordic.js": 148
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.712,
"function-empty.js": 31.3,
"function-excess-args.js": 66.3573,
"function-closure.js": 5.34667,
"function-missing-args.js": 66.104,
"loop-sum.js": 42.2333,
"loop-empty-resolve.js": 4.69867,
"function-correct-args.js": 94.3267,
"function-sum.js": 45.276
},
"duktape": {
"loop-empty.js": 79.0093,
"function-empty.js": 50.352,
"function-excess-args.js": 39.632,
"function-closure.js": 20.3333,
"function-missing-args.js": 38.452,
"loop-sum.js": 95.7187,
"loop-empty-resolve.js": 9.41067,
"function-correct-args.js": 39.468,
"function-sum.js": 32.7947
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 140,
"function-empty.js": 144,
"function-excess-args.js": 144,
"function-closure.js": 472,
"function-missing-args.js": 144,
"loop-sum.js": 140,
"loop-empty-resolve.js": 140,
"function-correct-args.js": 144,
"function-sum.js": 144
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "a26c45421988d138a01408ecfefb80816e3bcf81",
"size": 194232
},
"duktape": {
"version": "cbb85c1c99736b22a2f336f8a863d176e20089c9",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.20533,
"3d-cube.js": 3.74133,
"access-fannkuch.js": 9.94133,
"access-nbody.js": 4.664,
"bitops-bitwise-and.js": 4.188,
"math-partial-sums.js": 2.57467,
"controlflow-recursive.js": 3.176,
"bitops-bits-in-byte.js": 4.48933,
"access-binary-trees.js": 2.82933,
"bitops-3bit-bits-in-byte.js": 3.324,
"string-fasta.js": 27.708,
"math-cordic.js": 4.90933
},
"duktape": {
"math-spectral-norm.js": 1.08267,
"3d-cube.js": 1.12533,
"access-fannkuch.js": 1.82667,
"access-nbody.js": 1.77067,
"bitops-bitwise-and.js": 10.896,
"math-partial-sums.js": 3.02267,
"controlflow-recursive.js": 1.24133,
"bitops-bits-in-byte.js": 0.833333,
"access-binary-trees.js": 1.312,
"bitops-3bit-bits-in-byte.js": 0.552,
"string-fasta.js": 4.96267,
"math-cordic.js": 2.48667
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 52,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.76,
"function-empty.js": 31.2413,
"function-excess-args.js": 66.4693,
"function-closure.js": 5.36267,
"function-missing-args.js": 66.1213,
"loop-sum.js": 42.3547,
"loop-empty-resolve.js": 4.708,
"function-correct-args.js": 94.296,
"function-sum.js": 45.2467
},
"duktape": {
"loop-empty.js": 80.4693,
"function-empty.js": 50.7293,
"function-excess-args.js": 39.8867,
"function-closure.js": 20.6187,
"function-missing-args.js": 38.8387,
"loop-sum.js": 96.9093,
"loop-empty-resolve.js": 9.564,
"function-correct-args.js": 39.796,
"function-sum.js": 32.96
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "5a09ff2d36d983354df04f526e619e5c3ff22825",
"size": 194244
},
"duktape": {
"version": "cbb85c1c99736b22a2f336f8a863d176e20089c9",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.168,
"3d-cube.js": 3.74133,
"access-fannkuch.js": 10.0507,
"access-nbody.js": 4.684,
"bitops-bitwise-and.js": 4.12533,
"math-partial-sums.js": 2.52,
"controlflow-recursive.js": 3.17067,
"bitops-bits-in-byte.js": 4.42133,
"access-binary-trees.js": 2.81067,
"bitops-3bit-bits-in-byte.js": 3.288,
"string-fasta.js": 27.7827,
"math-cordic.js": 4.84667
},
"duktape": {
"math-spectral-norm.js": 1.084,
"3d-cube.js": 1.12667,
"access-fannkuch.js": 1.828,
"access-nbody.js": 1.76533,
"bitops-bitwise-and.js": 10.8867,
"math-partial-sums.js": 3.01867,
"controlflow-recursive.js": 1.24133,
"bitops-bits-in-byte.js": 0.844,
"access-binary-trees.js": 1.31333,
"bitops-3bit-bits-in-byte.js": 0.552,
"string-fasta.js": 4.96267,
"math-cordic.js": 2.47733
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.872,
"function-empty.js": 29.7347,
"function-excess-args.js": 65.4187,
"function-closure.js": 5.252,
"function-missing-args.js": 64.7933,
"loop-sum.js": 42.06,
"loop-empty-resolve.js": 4.57867,
"function-correct-args.js": 93.34,
"function-sum.js": 44.3213
},
"duktape": {
"loop-empty.js": 80.4213,
"function-empty.js": 50.6827,
"function-excess-args.js": 39.8933,
"function-closure.js": 20.648,
"function-missing-args.js": 38.864,
"loop-sum.js": 96.8747,
"loop-empty-resolve.js": 9.564,
"function-correct-args.js": 39.8173,
"function-sum.js": 32.9587
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 32,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 32,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "5a09ff2d36d983354df04f526e619e5c3ff22825",
"size": 194244
},
"duktape": {
"version": "565dd9e0a04a83b18384a426142d7b0c3bfb18b9",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.18,
"3d-cube.js": 3.73733,
"access-fannkuch.js": 10.048,
"access-nbody.js": 4.67467,
"bitops-bitwise-and.js": 4.12933,
"math-partial-sums.js": 2.52,
"controlflow-recursive.js": 3.17467,
"bitops-bits-in-byte.js": 4.42,
"access-binary-trees.js": 2.80667,
"bitops-3bit-bits-in-byte.js": 3.28933,
"string-fasta.js": 27.8507,
"math-cordic.js": 4.84533
},
"duktape": {
"math-spectral-norm.js": 1.07067,
"3d-cube.js": 1.12267,
"access-fannkuch.js": 1.81733,
"access-nbody.js": 1.688,
"bitops-bitwise-and.js": 10.368,
"math-partial-sums.js": 2.928,
"controlflow-recursive.js": 1.24267,
"bitops-bits-in-byte.js": 0.841333,
"access-binary-trees.js": 1.292,
"bitops-3bit-bits-in-byte.js": 0.554667,
"string-fasta.js": 4.92,
"math-cordic.js": 2.47067
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.9907,
"function-empty.js": 29.7133,
"function-excess-args.js": 65.444,
"function-closure.js": 5.256,
"function-missing-args.js": 64.7373,
"loop-sum.js": 41.948,
"loop-empty-resolve.js": 4.60133,
"function-correct-args.js": 93.276,
"function-sum.js": 44.3293
},
"duktape": {
"loop-empty.js": 76.0667,
"function-empty.js": 49.1147,
"function-excess-args.js": 38.7933,
"function-closure.js": 20.288,
"function-missing-args.js": 37.5787,
"loop-sum.js": 91.8787,
"loop-empty-resolve.js": 9.06267,
"function-correct-args.js": 38.6813,
"function-sum.js": 32.092
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 32,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 32,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "5a09ff2d36d983354df04f526e619e5c3ff22825",
"size": 194244
},
"duktape": {
"version": "b492c79f2c3a1f2e54086ea5a7a1b5cb01596a65",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.17867,
"3d-cube.js": 3.73067,
"access-fannkuch.js": 10.0467,
"access-nbody.js": 4.67067,
"bitops-bitwise-and.js": 4.128,
"math-partial-sums.js": 2.516,
"controlflow-recursive.js": 3.184,
"bitops-bits-in-byte.js": 4.42667,
"access-binary-trees.js": 2.804,
"bitops-3bit-bits-in-byte.js": 3.288,
"string-fasta.js": 27.8933,
"math-cordic.js": 4.84933
},
"duktape": {
"math-spectral-norm.js": 1.07067,
"3d-cube.js": 1.11733,
"access-fannkuch.js": 1.816,
"access-nbody.js": 1.688,
"bitops-bitwise-and.js": 10.38,
"math-partial-sums.js": 2.93067,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.84,
"access-binary-trees.js": 1.292,
"bitops-3bit-bits-in-byte.js": 0.552,
"string-fasta.js": 4.90667,
"math-cordic.js": 2.46933
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.9173,
"function-empty.js": 29.668,
"function-excess-args.js": 65.3573,
"function-closure.js": 5.25867,
"function-missing-args.js": 64.7613,
"loop-sum.js": 42.06,
"loop-empty-resolve.js": 4.59067,
"function-correct-args.js": 93.216,
"function-sum.js": 44.2347
},
"duktape": {
"loop-empty.js": 75.952,
"function-empty.js": 49.1613,
"function-excess-args.js": 38.8573,
"function-closure.js": 20.228,
"function-missing-args.js": 37.484,
"loop-sum.js": 92.02,
"loop-empty-resolve.js": 9.10133,
"function-correct-args.js": 38.7547,
"function-sum.js": 32.08
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 32,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 32,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "5a09ff2d36d983354df04f526e619e5c3ff22825",
"size": 194244
},
"duktape": {
"version": "e2ab21201fc23c26f6a371ea08e79133e88221c9",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.15867,
"3d-cube.js": 3.73467,
"access-fannkuch.js": 10.0547,
"access-nbody.js": 4.62133,
"bitops-bitwise-and.js": 4.13067,
"math-partial-sums.js": 2.516,
"controlflow-recursive.js": 3.17467,
"bitops-bits-in-byte.js": 4.42667,
"access-binary-trees.js": 2.80133,
"bitops-3bit-bits-in-byte.js": 3.284,
"string-fasta.js": 27.872,
"math-cordic.js": 4.848
},
"duktape": {
"math-spectral-norm.js": 1.06667,
"3d-cube.js": 1.112,
"access-fannkuch.js": 1.82,
"access-nbody.js": 1.684,
"bitops-bitwise-and.js": 10.3627,
"math-partial-sums.js": 2.92667,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.837333,
"access-binary-trees.js": 1.29467,
"bitops-3bit-bits-in-byte.js": 0.552,
"string-fasta.js": 4.896,
"math-cordic.js": 2.46533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.9267,
"function-empty.js": 29.6867,
"function-excess-args.js": 65.4787,
"function-closure.js": 5.248,
"function-missing-args.js": 64.7707,
"loop-sum.js": 42.032,
"loop-empty-resolve.js": 4.6,
"function-correct-args.js": 93.3573,
"function-sum.js": 44.2933
},
"duktape": {
"loop-empty.js": 76.0547,
"function-empty.js": 49.1267,
"function-excess-args.js": 38.824,
"function-closure.js": 20.2853,
"function-missing-args.js": 37.5893,
"loop-sum.js": 91.8747,
"loop-empty-resolve.js": 9.11067,
"function-correct-args.js": 38.6787,
"function-sum.js": 32.0907
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 32,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 32,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "5a09ff2d36d983354df04f526e619e5c3ff22825",
"size": 194244
},
"duktape": {
"version": "146fb34eab8f844bed999b0f188c0d3a08d86b11",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.17333,
"3d-cube.js": 3.73333,
"access-fannkuch.js": 10.0413,
"access-nbody.js": 4.65867,
"bitops-bitwise-and.js": 4.11867,
"math-partial-sums.js": 2.51867,
"controlflow-recursive.js": 3.176,
"bitops-bits-in-byte.js": 4.412,
"access-binary-trees.js": 2.80667,
"bitops-3bit-bits-in-byte.js": 3.28133,
"string-fasta.js": 27.8627,
"math-cordic.js": 4.84667
},
"duktape": {
"math-spectral-norm.js": 1.05467,
"3d-cube.js": 1.112,
"access-fannkuch.js": 1.81867,
"access-nbody.js": 1.67867,
"bitops-bitwise-and.js": 10.368,
"math-partial-sums.js": 2.908,
"controlflow-recursive.js": 1.23733,
"bitops-bits-in-byte.js": 0.84,
"access-binary-trees.js": 1.292,
"bitops-3bit-bits-in-byte.js": 0.553333,
"string-fasta.js": 4.91067,
"math-cordic.js": 2.448
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.8893,
"function-empty.js": 29.74,
"function-excess-args.js": 65.3933,
"function-closure.js": 5.264,
"function-missing-args.js": 64.6907,
"loop-sum.js": 42.0533,
"loop-empty-resolve.js": 4.60267,
"function-correct-args.js": 93.2973,
"function-sum.js": 44.112
},
"duktape": {
"loop-empty.js": 75.9253,
"function-empty.js": 48.592,
"function-excess-args.js": 38.3813,
"function-closure.js": 20.44,
"function-missing-args.js": 37.2347,
"loop-sum.js": 91.824,
"loop-empty-resolve.js": 9.06,
"function-correct-args.js": 38.3333,
"function-sum.js": 31.78
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 32,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 32,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "ed321da8c190507fb5a1eb1405bbdb0653e86825",
"size": 194244
},
"duktape": {
"version": "a9003d1838aed9fac3bac490941e5a21d7069417",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.148,
"3d-cube.js": 3.70667,
"access-fannkuch.js": 9.82533,
"access-nbody.js": 4.64,
"bitops-bitwise-and.js": 4.03067,
"math-partial-sums.js": 2.51333,
"controlflow-recursive.js": 3.12933,
"bitops-bits-in-byte.js": 4.39333,
"access-binary-trees.js": 2.776,
"bitops-3bit-bits-in-byte.js": 3.256,
"string-fasta.js": 27.7893,
"math-cordic.js": 4.82133
},
"duktape": {
"math-spectral-norm.js": 1.06533,
"3d-cube.js": 1.11733,
"access-fannkuch.js": 1.81467,
"access-nbody.js": 1.68933,
"bitops-bitwise-and.js": 10.4813,
"math-partial-sums.js": 2.94933,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.84,
"access-binary-trees.js": 1.292,
"bitops-3bit-bits-in-byte.js": 0.549333,
"string-fasta.js": 4.924,
"math-cordic.js": 2.46267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 38.6813,
"function-empty.js": 28.9587,
"function-excess-args.js": 64.3267,
"function-closure.js": 5.196,
"function-missing-args.js": 63.836,
"loop-sum.js": 41.1787,
"loop-empty-resolve.js": 4.48133,
"function-correct-args.js": 92.2947,
"function-sum.js": 43.544
},
"duktape": {
"loop-empty.js": 76.8507,
"function-empty.js": 49.2813,
"function-excess-args.js": 38.7987,
"function-closure.js": 20.484,
"function-missing-args.js": 37.5693,
"loop-sum.js": 92.92,
"loop-empty-resolve.js": 9.17467,
"function-correct-args.js": 38.7213,
"function-sum.js": 31.976
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 32,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 32,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-124
View File
@@ -1,124 +0,0 @@
{
"info": {
"jerryscript": {
"version": "c86bf1425d1f1f9ce1cf04a0093a804cb686b52f",
"size": 194244
},
"duktape": {
"version": "81c2e5d1e1625581a3dd2d8b351d2f8bf81c7cf6",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.156,
"3d-cube.js": 3.72,
"access-fannkuch.js": 9.968,
"access-nbody.js": 4.67733,
"bitops-bitwise-and.js": 4.09067,
"math-partial-sums.js": 2.54533,
"controlflow-recursive.js": 3.14533,
"bitops-bits-in-byte.js": 4.4,
"access-binary-trees.js": 2.72133,
"bitops-3bit-bits-in-byte.js": 3.26267,
"string-fasta.js": 27.7733,
"math-cordic.js": 4.832
},
"duktape": {
"math-spectral-norm.js": 1.06533,
"3d-cube.js": 1.11733,
"access-fannkuch.js": 1.81867,
"access-nbody.js": 1.69467,
"bitops-bitwise-and.js": 10.464,
"math-partial-sums.js": 2.948,
"controlflow-recursive.js": 1.24667,
"bitops-bits-in-byte.js": 0.836,
"access-binary-trees.js": 1.29733,
"bitops-3bit-bits-in-byte.js": 0.552,
"string-fasta.js": 4.93067,
"math-cordic.js": 2.45867
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 48,
"3d-cube.js": 132,
"access-fannkuch.js": 36,
"access-nbody.js": 64,
"bitops-bitwise-and.js": 32,
"math-partial-sums.js": 36,
"controlflow-recursive.js": 212,
"bitops-bits-in-byte.js": 32,
"access-binary-trees.js": 88,
"bitops-3bit-bits-in-byte.js": 36,
"string-fasta.js": 56,
"math-cordic.js": 48
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 39.0827,
"function-empty.js": 28.6,
"function-excess-args.js": 64.4133,
"function-closure.js": 3.424,
"function-missing-args.js": 63.992,
"loop-sum.js": 41.9827,
"loop-empty-resolve.js": 4.51067,
"function-correct-args.js": 92.112,
"function-sum.js": 43.78
},
"duktape": {
"loop-empty.js": 76.7253,
"function-empty.js": 49.264,
"function-excess-args.js": 38.76,
"function-closure.js": 20.4973,
"function-missing-args.js": 37.6133,
"loop-sum.js": 92.9,
"loop-empty-resolve.js": 9.17733,
"function-correct-args.js": 38.7093,
"function-sum.js": 32.0213
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 28,
"function-empty.js": 32,
"function-excess-args.js": 32,
"function-closure.js": 32,
"function-missing-args.js": 32,
"loop-sum.js": 32,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 32,
"function-sum.js": 32
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-174
View File
@@ -1,174 +0,0 @@
{
"info": {
"jerryscript": {
"version": "84ff4de3859a3aad3e720570dd57ace28dd2bd06",
"size": 198340
},
"duktape": {
"version": "507f786924c7632c5b66cb98adaee2bb8f5c179b",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.208,
"3d-cube.js": 3.864,
"access-fannkuch.js": 9.90533,
"access-nbody.js": 4.69333,
"bitops-bitwise-and.js": 4.18133,
"math-partial-sums.js": 2.54933,
"controlflow-recursive.js": 3.18933,
"bitops-bits-in-byte.js": 4.448,
"access-binary-trees.js": 2.76,
"bitops-3bit-bits-in-byte.js": 3.288,
"string-fasta.js": 27.864,
"math-cordic.js": 4.87067
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 3.20933,
"3d-cube.js": 3.72,
"access-fannkuch.js": 9.876,
"access-nbody.js": 4.66133,
"bitops-bitwise-and.js": 4.18133,
"math-partial-sums.js": 2.54267,
"controlflow-recursive.js": 3.19733,
"bitops-bits-in-byte.js": 4.44133,
"access-binary-trees.js": 2.772,
"bitops-3bit-bits-in-byte.js": 3.27067,
"string-fasta.js": 27.8107,
"math-cordic.js": 4.84267
},
"duktape": {
"math-spectral-norm.js": 1.06667,
"3d-cube.js": 1.12,
"access-fannkuch.js": 1.82267,
"access-nbody.js": 1.692,
"bitops-bitwise-and.js": 10.4733,
"math-partial-sums.js": 2.94667,
"controlflow-recursive.js": 1.248,
"bitops-bits-in-byte.js": 0.837333,
"access-binary-trees.js": 1.29867,
"bitops-3bit-bits-in-byte.js": 0.552,
"string-fasta.js": 4.93067,
"math-cordic.js": 2.46267
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 56,
"3d-cube.js": 144,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 36,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 60,
"math-cordic.js": 52
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 40,
"3d-cube.js": 108,
"access-fannkuch.js": 28,
"access-nbody.js": 44,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 28,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 28,
"access-binary-trees.js": 76,
"bitops-3bit-bits-in-byte.js": 28,
"string-fasta.js": 48,
"math-cordic.js": 32
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.0147,
"function-empty.js": 29.3413,
"function-excess-args.js": 65.608,
"function-closure.js": 3.52667,
"function-missing-args.js": 64.876,
"loop-sum.js": 43.9067,
"loop-empty-resolve.js": 4.68533,
"function-correct-args.js": 93.1373,
"function-sum.js": 44.5307
},
"jerryscript-snapshot": {
"loop-empty.js": 40.0427,
"function-empty.js": 29.352,
"function-excess-args.js": 65.8733,
"function-closure.js": 3.54667,
"function-missing-args.js": 64.9467,
"loop-sum.js": 43.8213,
"loop-empty-resolve.js": 4.67067,
"function-correct-args.js": 91.3493,
"function-sum.js": 44.556
},
"duktape": {
"loop-empty.js": 76.764,
"function-empty.js": 49.2707,
"function-excess-args.js": 38.7227,
"function-closure.js": 20.4413,
"function-missing-args.js": 37.6093,
"loop-sum.js": 92.816,
"loop-empty-resolve.js": 9.16933,
"function-correct-args.js": 38.7067,
"function-sum.js": 32.044
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 36,
"function-empty.js": 36,
"function-excess-args.js": 36,
"function-closure.js": 36,
"function-missing-args.js": 36,
"loop-sum.js": 36,
"loop-empty-resolve.js": 36,
"function-correct-args.js": 36,
"function-sum.js": 36
},
"jerryscript-snapshot": {
"loop-empty.js": 28,
"function-empty.js": 28,
"function-excess-args.js": 28,
"function-closure.js": 28,
"function-missing-args.js": 28,
"loop-sum.js": 28,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 28,
"function-sum.js": 28
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-174
View File
@@ -1,174 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b6fcf44873060dc5d59f7d9840edbdf6ed906f74",
"size": 198340
},
"duktape": {
"version": "530ca642c79d4fd3569f3d652474aa0689991d44",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.20667,
"3d-cube.js": 3.77067,
"access-fannkuch.js": 9.908,
"access-nbody.js": 4.692,
"bitops-bitwise-and.js": 4.18667,
"math-partial-sums.js": 2.552,
"controlflow-recursive.js": 3.19733,
"bitops-bits-in-byte.js": 4.44267,
"access-binary-trees.js": 2.75333,
"bitops-3bit-bits-in-byte.js": 3.29333,
"string-fasta.js": 27.8813,
"math-cordic.js": 4.88667
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 3.22267,
"3d-cube.js": 3.71467,
"access-fannkuch.js": 9.912,
"access-nbody.js": 4.66667,
"bitops-bitwise-and.js": 4.184,
"math-partial-sums.js": 2.54933,
"controlflow-recursive.js": 3.20133,
"bitops-bits-in-byte.js": 4.44133,
"access-binary-trees.js": 2.77867,
"bitops-3bit-bits-in-byte.js": 3.27467,
"string-fasta.js": 27.8013,
"math-cordic.js": 4.86267
},
"duktape": {
"math-spectral-norm.js": 1.05867,
"3d-cube.js": 1.11467,
"access-fannkuch.js": 1.81333,
"access-nbody.js": 1.68667,
"bitops-bitwise-and.js": 10.464,
"math-partial-sums.js": 2.94267,
"controlflow-recursive.js": 1.24267,
"bitops-bits-in-byte.js": 0.836,
"access-binary-trees.js": 1.29867,
"bitops-3bit-bits-in-byte.js": 0.554667,
"string-fasta.js": 4.93467,
"math-cordic.js": 2.456
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 56,
"3d-cube.js": 144,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 36,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 60,
"math-cordic.js": 52
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 40,
"3d-cube.js": 108,
"access-fannkuch.js": 28,
"access-nbody.js": 44,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 28,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 28,
"access-binary-trees.js": 76,
"bitops-3bit-bits-in-byte.js": 28,
"string-fasta.js": 48,
"math-cordic.js": 32
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.0587,
"function-empty.js": 29.3333,
"function-excess-args.js": 65.6253,
"function-closure.js": 3.52533,
"function-missing-args.js": 64.8987,
"loop-sum.js": 43.924,
"loop-empty-resolve.js": 4.664,
"function-correct-args.js": 93.2253,
"function-sum.js": 44.516
},
"jerryscript-snapshot": {
"loop-empty.js": 40.0933,
"function-empty.js": 29.3347,
"function-excess-args.js": 65.784,
"function-closure.js": 3.536,
"function-missing-args.js": 65.0267,
"loop-sum.js": 43.9787,
"loop-empty-resolve.js": 4.68133,
"function-correct-args.js": 91.3493,
"function-sum.js": 44.5467
},
"duktape": {
"loop-empty.js": 76.8053,
"function-empty.js": 49.224,
"function-excess-args.js": 38.8093,
"function-closure.js": 20.5707,
"function-missing-args.js": 37.6147,
"loop-sum.js": 92.8573,
"loop-empty-resolve.js": 9.168,
"function-correct-args.js": 38.7413,
"function-sum.js": 31.9987
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 36,
"function-empty.js": 36,
"function-excess-args.js": 36,
"function-closure.js": 36,
"function-missing-args.js": 36,
"loop-sum.js": 36,
"loop-empty-resolve.js": 36,
"function-correct-args.js": 36,
"function-sum.js": 36
},
"jerryscript-snapshot": {
"loop-empty.js": 28,
"function-empty.js": 28,
"function-excess-args.js": 28,
"function-closure.js": 28,
"function-missing-args.js": 28,
"loop-sum.js": 28,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 28,
"function-sum.js": 28
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-174
View File
@@ -1,174 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b6fcf44873060dc5d59f7d9840edbdf6ed906f74",
"size": 198340
},
"duktape": {
"version": "72568bb89225af2c12e42e0f69ff1e4dc282ca41",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.208,
"3d-cube.js": 3.764,
"access-fannkuch.js": 9.91333,
"access-nbody.js": 4.696,
"bitops-bitwise-and.js": 4.17733,
"math-partial-sums.js": 2.55067,
"controlflow-recursive.js": 3.19733,
"bitops-bits-in-byte.js": 4.44667,
"access-binary-trees.js": 2.76267,
"bitops-3bit-bits-in-byte.js": 3.292,
"string-fasta.js": 27.8773,
"math-cordic.js": 4.86933
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 3.20667,
"3d-cube.js": 3.71733,
"access-fannkuch.js": 9.91333,
"access-nbody.js": 4.67067,
"bitops-bitwise-and.js": 4.18667,
"math-partial-sums.js": 2.54667,
"controlflow-recursive.js": 3.19733,
"bitops-bits-in-byte.js": 4.448,
"access-binary-trees.js": 2.77467,
"bitops-3bit-bits-in-byte.js": 3.27733,
"string-fasta.js": 27.8707,
"math-cordic.js": 4.87067
},
"duktape": {
"math-spectral-norm.js": 1.07067,
"3d-cube.js": 1.12133,
"access-fannkuch.js": 1.82267,
"access-nbody.js": 1.73067,
"bitops-bitwise-and.js": 10.4627,
"math-partial-sums.js": 2.95333,
"controlflow-recursive.js": 1.25067,
"bitops-bits-in-byte.js": 0.838667,
"access-binary-trees.js": 1.31333,
"bitops-3bit-bits-in-byte.js": 0.554667,
"string-fasta.js": 4.94933,
"math-cordic.js": 2.46533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 56,
"3d-cube.js": 144,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 36,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 60,
"math-cordic.js": 52
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 40,
"3d-cube.js": 108,
"access-fannkuch.js": 28,
"access-nbody.js": 44,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 28,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 28,
"access-binary-trees.js": 76,
"bitops-3bit-bits-in-byte.js": 28,
"string-fasta.js": 48,
"math-cordic.js": 32
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.0013,
"function-empty.js": 29.28,
"function-excess-args.js": 65.6773,
"function-closure.js": 3.52933,
"function-missing-args.js": 64.936,
"loop-sum.js": 43.9373,
"loop-empty-resolve.js": 4.67733,
"function-correct-args.js": 93.168,
"function-sum.js": 44.4453
},
"jerryscript-snapshot": {
"loop-empty.js": 40.0093,
"function-empty.js": 29.3853,
"function-excess-args.js": 65.808,
"function-closure.js": 3.54133,
"function-missing-args.js": 65.0453,
"loop-sum.js": 44.0187,
"loop-empty-resolve.js": 4.67467,
"function-correct-args.js": 91.3307,
"function-sum.js": 44.5573
},
"duktape": {
"loop-empty.js": 76.8853,
"function-empty.js": 49.5307,
"function-excess-args.js": 39.1387,
"function-closure.js": 20.6787,
"function-missing-args.js": 37.8227,
"loop-sum.js": 92.7907,
"loop-empty-resolve.js": 9.14,
"function-correct-args.js": 39.1413,
"function-sum.js": 32.348
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 36,
"function-empty.js": 36,
"function-excess-args.js": 36,
"function-closure.js": 36,
"function-missing-args.js": 36,
"loop-sum.js": 36,
"loop-empty-resolve.js": 36,
"function-correct-args.js": 36,
"function-sum.js": 36
},
"jerryscript-snapshot": {
"loop-empty.js": 28,
"function-empty.js": 28,
"function-excess-args.js": 28,
"function-closure.js": 28,
"function-missing-args.js": 28,
"loop-sum.js": 28,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 28,
"function-sum.js": 28
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-174
View File
@@ -1,174 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b6fcf44873060dc5d59f7d9840edbdf6ed906f74",
"size": 198340
},
"duktape": {
"version": "72568bb89225af2c12e42e0f69ff1e4dc282ca41",
"size": 165824
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.20267,
"3d-cube.js": 3.764,
"access-fannkuch.js": 9.90267,
"access-nbody.js": 4.70533,
"bitops-bitwise-and.js": 4.15333,
"math-partial-sums.js": 2.53733,
"controlflow-recursive.js": 3.20533,
"bitops-bits-in-byte.js": 4.45733,
"access-binary-trees.js": 2.75867,
"bitops-3bit-bits-in-byte.js": 3.292,
"string-fasta.js": 27.8933,
"math-cordic.js": 4.872
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 3.212,
"3d-cube.js": 3.71733,
"access-fannkuch.js": 9.89733,
"access-nbody.js": 4.668,
"bitops-bitwise-and.js": 4.18667,
"math-partial-sums.js": 2.548,
"controlflow-recursive.js": 3.2,
"bitops-bits-in-byte.js": 4.45067,
"access-binary-trees.js": 2.77733,
"bitops-3bit-bits-in-byte.js": 3.27467,
"string-fasta.js": 27.8733,
"math-cordic.js": 4.86933
},
"duktape": {
"math-spectral-norm.js": 1.07067,
"3d-cube.js": 1.124,
"access-fannkuch.js": 1.81867,
"access-nbody.js": 1.72933,
"bitops-bitwise-and.js": 10.46,
"math-partial-sums.js": 2.95333,
"controlflow-recursive.js": 1.24933,
"bitops-bits-in-byte.js": 0.837333,
"access-binary-trees.js": 1.31733,
"bitops-3bit-bits-in-byte.js": 0.556,
"string-fasta.js": 4.96533,
"math-cordic.js": 2.46533
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 56,
"3d-cube.js": 144,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 36,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 60,
"math-cordic.js": 52
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 40,
"3d-cube.js": 108,
"access-fannkuch.js": 28,
"access-nbody.js": 44,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 28,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 28,
"access-binary-trees.js": 76,
"bitops-3bit-bits-in-byte.js": 28,
"string-fasta.js": 48,
"math-cordic.js": 32
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 192,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 216,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 160,
"math-cordic.js": 152
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.1173,
"function-empty.js": 29.276,
"function-excess-args.js": 65.584,
"function-closure.js": 3.52933,
"function-missing-args.js": 64.9373,
"loop-sum.js": 43.964,
"loop-empty-resolve.js": 4.68533,
"function-correct-args.js": 93.1307,
"function-sum.js": 44.5213
},
"jerryscript-snapshot": {
"loop-empty.js": 40.1093,
"function-empty.js": 29.376,
"function-excess-args.js": 65.7453,
"function-closure.js": 3.54133,
"function-missing-args.js": 64.9533,
"loop-sum.js": 43.9227,
"loop-empty-resolve.js": 4.68267,
"function-correct-args.js": 91.292,
"function-sum.js": 44.604
},
"duktape": {
"loop-empty.js": 76.9427,
"function-empty.js": 49.4573,
"function-excess-args.js": 39.2,
"function-closure.js": 20.4853,
"function-missing-args.js": 37.904,
"loop-sum.js": 92.796,
"loop-empty-resolve.js": 9.15733,
"function-correct-args.js": 39.1453,
"function-sum.js": 32.4133
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 36,
"function-empty.js": 36,
"function-excess-args.js": 36,
"function-closure.js": 36,
"function-missing-args.js": 36,
"loop-sum.js": 36,
"loop-empty-resolve.js": 36,
"function-correct-args.js": 36,
"function-sum.js": 36
},
"jerryscript-snapshot": {
"loop-empty.js": 28,
"function-empty.js": 28,
"function-excess-args.js": 28,
"function-closure.js": 28,
"function-missing-args.js": 28,
"loop-sum.js": 28,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 28,
"function-sum.js": 28
},
"duktape": {
"loop-empty.js": 144,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 476,
"function-missing-args.js": 148,
"loop-sum.js": 144,
"loop-empty-resolve.js": 144,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}
-174
View File
@@ -1,174 +0,0 @@
{
"info": {
"jerryscript": {
"version": "b6fcf44873060dc5d59f7d9840edbdf6ed906f74",
"size": 198340
},
"duktape": {
"version": "9165478b97ccda04b9f59ceb4c4fdb5d32dcd036",
"size": 169920
}
},
"sunspider-1.0.2": {
"performance": {
"jerryscript": {
"math-spectral-norm.js": 3.204,
"3d-cube.js": 3.76667,
"access-fannkuch.js": 9.908,
"access-nbody.js": 4.692,
"bitops-bitwise-and.js": 4.18667,
"math-partial-sums.js": 2.54933,
"controlflow-recursive.js": 3.19333,
"bitops-bits-in-byte.js": 4.456,
"access-binary-trees.js": 2.75867,
"bitops-3bit-bits-in-byte.js": 3.29067,
"string-fasta.js": 27.856,
"math-cordic.js": 4.872
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 3.20933,
"3d-cube.js": 3.7,
"access-fannkuch.js": 9.88,
"access-nbody.js": 4.664,
"bitops-bitwise-and.js": 4.20133,
"math-partial-sums.js": 2.544,
"controlflow-recursive.js": 3.19467,
"bitops-bits-in-byte.js": 4.45333,
"access-binary-trees.js": 2.76933,
"bitops-3bit-bits-in-byte.js": 3.28133,
"string-fasta.js": 27.876,
"math-cordic.js": 4.86267
},
"duktape": {
"math-spectral-norm.js": 1.01067,
"3d-cube.js": 1.12133,
"access-fannkuch.js": 1.79333,
"access-nbody.js": 1.73733,
"bitops-bitwise-and.js": 9.48133,
"math-partial-sums.js": 2.90667,
"controlflow-recursive.js": 1.20667,
"bitops-bits-in-byte.js": 0.8,
"access-binary-trees.js": 1.256,
"bitops-3bit-bits-in-byte.js": 0.514667,
"string-fasta.js": 4.768,
"math-cordic.js": 2.48933
}
},
"memory": {
"jerryscript": {
"math-spectral-norm.js": 56,
"3d-cube.js": 144,
"access-fannkuch.js": 44,
"access-nbody.js": 68,
"bitops-bitwise-and.js": 36,
"math-partial-sums.js": 40,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 36,
"access-binary-trees.js": 92,
"bitops-3bit-bits-in-byte.js": 40,
"string-fasta.js": 60,
"math-cordic.js": 52
},
"jerryscript-snapshot": {
"math-spectral-norm.js": 40,
"3d-cube.js": 108,
"access-fannkuch.js": 28,
"access-nbody.js": 44,
"bitops-bitwise-and.js": 28,
"math-partial-sums.js": 28,
"controlflow-recursive.js": 216,
"bitops-bits-in-byte.js": 28,
"access-binary-trees.js": 76,
"bitops-3bit-bits-in-byte.js": 28,
"string-fasta.js": 48,
"math-cordic.js": 32
},
"duktape": {
"math-spectral-norm.js": 152,
"3d-cube.js": 196,
"access-fannkuch.js": 152,
"access-nbody.js": 160,
"bitops-bitwise-and.js": 148,
"math-partial-sums.js": 148,
"controlflow-recursive.js": 192,
"bitops-bits-in-byte.js": 148,
"access-binary-trees.js": 212,
"bitops-3bit-bits-in-byte.js": 148,
"string-fasta.js": 164,
"math-cordic.js": 156
}
}
},
"ubench": {
"performance": {
"jerryscript": {
"loop-empty.js": 40.1347,
"function-empty.js": 29.264,
"function-excess-args.js": 65.5693,
"function-closure.js": 3.52667,
"function-missing-args.js": 64.8533,
"loop-sum.js": 43.9613,
"loop-empty-resolve.js": 4.68,
"function-correct-args.js": 93.14,
"function-sum.js": 44.5093
},
"jerryscript-snapshot": {
"loop-empty.js": 39.964,
"function-empty.js": 29.4013,
"function-excess-args.js": 65.7893,
"function-closure.js": 3.53467,
"function-missing-args.js": 65.0587,
"loop-sum.js": 43.9973,
"loop-empty-resolve.js": 4.684,
"function-correct-args.js": 91.3293,
"function-sum.js": 44.516
},
"duktape": {
"loop-empty.js": 81.2667,
"function-empty.js": 47.42,
"function-excess-args.js": 38.2613,
"function-closure.js": 19.9427,
"function-missing-args.js": 36.4427,
"loop-sum.js": 102.38,
"loop-empty-resolve.js": 9.46,
"function-correct-args.js": 38.1453,
"function-sum.js": 31.6547
}
},
"memory": {
"jerryscript": {
"loop-empty.js": 36,
"function-empty.js": 36,
"function-excess-args.js": 36,
"function-closure.js": 36,
"function-missing-args.js": 36,
"loop-sum.js": 36,
"loop-empty-resolve.js": 36,
"function-correct-args.js": 36,
"function-sum.js": 36
},
"jerryscript-snapshot": {
"loop-empty.js": 28,
"function-empty.js": 28,
"function-excess-args.js": 28,
"function-closure.js": 28,
"function-missing-args.js": 28,
"loop-sum.js": 28,
"loop-empty-resolve.js": 28,
"function-correct-args.js": 28,
"function-sum.js": 28
},
"duktape": {
"loop-empty.js": 148,
"function-empty.js": 148,
"function-excess-args.js": 148,
"function-closure.js": 460,
"function-missing-args.js": 148,
"loop-sum.js": 148,
"loop-empty-resolve.js": 148,
"function-correct-args.js": 148,
"function-sum.js": 148
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More