1822 Commits

Author SHA1 Message Date
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