6 Commits

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