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