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
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
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
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
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
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
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
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
* 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
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
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
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
* 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
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
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
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
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
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
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
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
* 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
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
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
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
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
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
* 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
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
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
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