256 registers can be used so less equal must be used instead of less.
Fixes#1556.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Because of the fallthrough case the value of 3 is also allowed in the default case.
Fixes#1555.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
* Fixed Doxygen issues
* Updated Doxygen config
* Added new script to test whether doxygen generation was successful or not
* Added to Travis CI
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
Added a new 'buildoptions' option to tools/run-tests.py to add
a comma separated list of extra build options to each test.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
Triggering hashmap recreate during property delete may damage the
property chain list, so recreate postponed after the delete is done.
Next attempt to fix#1533.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Add Uint8Array, Int16Array Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array and Uint8ClampedArray. Support the conversion between any pairs of those types.
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
* Introduced new 'jmem.h' for public part.
* Removed obsolete headers
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
Jerryscript. The changes include:
CMakeLists.txt: we added conditionals around GCC-specific flags, added
support for TI flags, and removed the always-on debugging flag (-g)
/toolchain_mcu_tim4f.cmake: new toolchain file uses TI-specific parameters
jerry-api.h: the sys/types.h file was #include'd but never used, so we
removed it
jrt-types.h: ditto
jerry-port-default-date.c: the TI toolchain doesn't include
sys/time.h, so we guarded uses of the package
ecma-objects-general.c: added initialization that Travis (the
auto-checking tool) required
JerryScript-DCO-1.0-Signed-off-by: Timothy Harvey t-harvey@ti.com
compiled using non-GCC compilers.
This included adding an initialization to a variable that looks(!)
like it can reach a use before being initialized (b/c we turned
JERRY_UNREACHABLE into a nop) -- an example:
int foo;
switch (value_can_only_be_one_or_two)
case 1:
case 2:
foo = 5;
default:
JERRY_UNREACHABLE();
x = foo +1;
...the compiler assumes that the path can go through the default case,
which leaves the value of foo undefined.
JerryScript-DCO-1.0-Signed-off-by: Timothy Harvey t-harvey@ti.com
There are two types of NULL values in the property hashmap: deleted
entries, and never used entries. The current implementation tracks
only the never used entries, and never scales back the hashmap.
After this patch property delete can also recreate the hashmap, or
remove it entirely if there are too few items in the array.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
In mbed OS 5.3 (which we target with JerryScript on mbed) we change the way debug builds are created. This patch changes the Makefile in JerryScript to reflect this.
JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
After 378d7f7 it is not used in the codebase and can be eliminated.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
The regression-test-issue-736.js is also changed, since it expects
throwing an error, which does not happen anymore because the "x"
variable is undefined.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
* add %TypedArray% intrinsic object
* implement Int8Array
* will implement other types and prototype functions
in the following patches.
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
This function can be used to save literals into a specific file in a list or C format.
These literals are valid identifiers, and doesn't match to any magic-string.
The '--save-literals-list-format FILE' and '--save-literals-c-format FILE'
options are used to save into the given file, when the snapshot-save is enabled.
The saved literals are sorted by size and lexicographically.
The C-format is useful for jerry_register_magic_strings() to generate the array
of external magic strings.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
Rework date to string conversion, and remove nan checks from inline
functions. Furtermore some inline functions are changed to normal
functions.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Magic strings are expected to be sorted by length, then alphabetically after https://github.com/jerryscript-project/jerryscript/pull/1506 landed. This breaks the mbedos5 target against JerryScript master as it emits the pins in the order that it finds the pins. This patch sorts the pin names.
JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
After this patch, we have to provide external strings ordered by size and lexicographically.
We can do this with jerry_parse_and_save_literals() (#1500).
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
Copy the characters of a string into a specified utf-8 string buffer.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
With the newest release of mbed CLI (1.0.0) it error's when no .mbed file is present in the project root. This breaks builds for JerryScript on mbed OS 5. With this patch we create this file and builds succeed again. We cannot use `mbed new` because it also creates a new git repository in targets/mbedos5 folder which is not what we want.
Fixes#1511
JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
Doxygen reported a few issues, which are fixed by this patch:
* ArrayBuffer-related documentation group names and titles were
incorrect.
* Some Date-related helper functions used incorrect parameter
documentation syntax.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The urls in the docs/03.API-EXAMPLE.md was pointing to
the old samsung.github.io pages.
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkristof@inf.u-szeged.hu
Although many Math built-in functions have a similar structure
these code paths were implemented as separate C functions.
After this patch only one common dispatcher remains which shares
the common code paths of different built-in functions. This
reduces the binary size by 1 Kbyte.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
It's generally considered a bad programming practice to have function declarations without parameter names.
This is another legacy from the early days of the project. Fix in one go to minimize history disruption.
Used a custom clang-tidy check to create the bulk of the change.
JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
Extern keywords on function declarations/definitions provide no additional value since function declarations/definitions default to external linkage in C99, e.g. removing them won't change the semantics of the program.
The extern keywords were essentially a legacy from the early days of the project. This commit cleans this up across the whole codebase in one go to minimize history disruption.
The bulk of the changes in this commit were produced by a custom clang-tidy checker.
Note that variables declarations carrying the extern keyword are untouched by this commit since there the presence of the keyword actually has an impact on the semantics of the program.
JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com