- parser is now non-recursive (i.e. parse function is not called recursively in any case);
- byte-code is now more compact:
- constants are now not immediately dumped upon occurence, but later - where necessary;
- assignments are combined with unary / binary operations;
- binary operations are encoded more compactly in many cases;
- byte-code arrays are now allocated separately for each scope (so, GC of the scopes now becomes possible);
- byte-code is dumped directly into corresponding byte-code arrays:
- linked lists of op_meta are not now used for main code of a scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
and Ruben Ayrapetyan fix a bug in linked_list_switch_to_next_elem
Related issue: #720
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
Also changed space-based indentation in touched files if they used
4 spaces for indentation (instead of the most-often-used 2).
Also added new line to end of touched files if they did not end
that way.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Related issue: #333, #454
Works only with default libc:
```
$ make debug.linux -j TOOLCHAIN="./build/configs/toolchain_afl.cmake" USE_COMPILER_DEFAULT_LIBC=YES
```
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
When linking a release-built command line shell on Linux against
default glibc with LTO enabled, a long-open gcc bug causes spurious
warning to be emitted around a call to fread. The `-Werror` flag
turns this into an error and the build process fails.
Unfortunately, there is no way to selectively disable the warning
with pragmas or `-Wno-error=xxx` flags.
Thus, this patch introduces some helper macros and lists all
warnings explicitly with `-Werror=xxx` instead of covering all
warnings with the `-Werror` flag. This way, warnings enabled by
command line flags do cause errors, but those raised by warning
attributes (which cannot be suppressed by any `-Wno-error=xxx`
flags) don't.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The current code base does not contain any "first JavaScript
program" for those who build JerryScript for Linux console. It
does contain a LED-blinking example -- blinky.js -- but that's
only useful on an developer board where LEDs-to-be-blinked are
available. And the rest of the tests are just that: tests, giving
passed/failed information but nothing eye candy.
This patch adds a simple JS script that can act as a warm welcome
to anyone after the first successful build trying to run something
proving that Jerry works.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
For functions with the optimization applied:
- vm puts arguments values immediately to registers without putting them to variables in lexical environment;
- number of arguments is extracted from corresponding 'reg_var_decl' instruction's argument;
- for functions that also don't have local variables, lexical environments are not created.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com