21 Commits

Author SHA1 Message Date
Ruben Ayrapetyan
a4e54e736e Support syntax error feedback in parser.
Now, parser correctly finishes parse procedure if syntax of source code is incorrect (syntax correctness is indicated using return value):
 - parser-internal memory management is performed using jsp_mm_alloc / jsp_mm_free;
 - upon detection of incorrect syntax, all parser-allocated memory regions are deallocated using jsp_mm_free_all and parse finishes with corresponding return value.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 17:05:15 +03:00
Ruben Ayrapetyan
de7b72d726 Add configuration for ARMv7 softfloat build; update setjmp / longjmp ARMv7 implementation to handle the softfloat-mode properly.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
b008867d81 Implement setjmp / longjmp in jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
f115f731c3 Switch unit tests to jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
6d6c913bdc Move random number generator from Math.random to jerry-libc, replace the logic with call to rand in Math.random.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:02:50 +03:00
Ruben Ayrapetyan
30277153b9 Fix strncmp, fread and fwrite in jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:02:50 +03:00
Ruben Ayrapetyan
630a1e8eba Move architecture-depedendent libc internal headers to jerry-libc/arch folder.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:02:49 +03:00
Andrey Shitov
53801e3b41 Replace array of literals with literal storage.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
Peter Gal
f6b875c36c Use __func__ instead of __FUNCTION__
The __FUNCTION__ is not part of the C99/C++11 standard.
So replace all occurrences with the standard __func__.

Side note: GCC 5.1 warns when using -Wpedantic -std=c99
and __FUNCTION__.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-09 18:03:42 +02:00
Akos Kiss
d6fb76416a Add abort () to jerry-libc
Added declaration and implementations of `void abort (void)` to
jerry-libc. As the linux implementation relies on the `getpid`
syscall - which has no arguments - `syscall_0` implementations
have been added as well.

`libc_fatal` has been adapted to use the new `abort` function
instead of `exit`. This also made the definition of
`LIBC_FATAL_ERROR_EXIT_CODE` unnecessary.

Finally, the syscall fatal error message was fixed.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-06-02 18:12:29 +02:00
Andrey Shitov
9763a93df3 Add new coding style rules and fix appeared issues.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-05-14 14:44:57 +03:00
Ruben Ayrapetyan
cf1960dbbd Support for 32-bit Linux in Jerry's libc. 2015-03-26 15:53:28 +03:00
Ruben Ayrapetyan
5e125187e5 Introducing jerry-libc's interface include directory. 2015-03-19 20:55:00 +03:00
Ruben Ayrapetyan
d83d8e0b36 Removing build of multiple identical jerry-libc and plugins libraries copies. Fixing parallel build / precommit invocation without using the workaround. 2015-03-19 19:06:02 +03:00
Ruben Ayrapetyan
f42faabe89 Fixing style according to rules defined in vera++ scripts. 2015-02-17 19:47:00 +03:00
Ruben Ayrapetyan
b6d018d019 Enable cppcheck run during precommit testing 2015-02-17 18:43:54 +03:00
Ruben Ayrapetyan
a4155f7be8 Fixing cppcheck warnings. 2015-02-17 18:43:48 +03:00
Ruben Ayrapetyan
03c81e96e9 Turning on unit tests build and run during precommit. 2015-02-16 19:35:15 +03:00
Ruben Ayrapetyan
43ea53b1d7 Jerry is now split to several components: core, libc, plugins.
The components are build independently and then are linked with main module corresponding to target platform.
Core is supposed to be platform-independent, while libc and plugins are dependent on specific architecture / platform.

The commit disables unit tests building and running during precommit.
That is supposed to be fixed in a subsequent commit.

Also, the commit disables building and running valgrind targets during precommit.
Build is supposed to be turned on by an option that should be introduced later.
Valgrind-checked runs are supposed to be performed in asynchronous mode.
2015-02-13 21:54:27 +03:00
Ruben Ayrapetyan
7e4c16e4e6 Rename Jerry's libc functions: __function_name -> function_name. 2015-02-12 20:15:56 +03:00
Ruben Ayrapetyan
af77eac8e4 Move Jerry's libc to jerry-libc directory. 2015-02-11 21:33:45 +03:00