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