tests.sh: distinguish the generated file from the executed file

Some some future engines that does not produce directly executable files
could still use the tests.sh framework.

Signed-off-by: Jean Privat <jean@pryen.org>
tests.sh: new engine `emscripten` for `nitg -m emscripten`

The produced .js files are then executed by nodejs.

All base tests that do not import kernel are skipped because
since the module lib/emscripten.nit imports the kernel module,
an automatic double definition of classes `Object` and `Sys` occurs.

nodejs cannot perform correctly synchronized input, thus `stdin` and all
file reading does not work although they work in a browser.
As a workaround, a special module `emscripten_nodejs.nit` is added that just
print "NOT_YET_IMPLEMENTED" on unsupported services on synchronized input,
thus marking the test as skipped.

Currently, 99 (7% of the 1390 tests) still cause some other kind of failures;
they will be investigated later.

The whole testing of all the tests takes 68m on my machine.
ccache in unusable and the option --jcache of emcc does not bring any boost.
So it is unlikely that `testall.sh` will include this engine.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/standard/ropes: API change, Leaves are now abstract for future flexibility.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/standard/ropes: Concat nodes cannot be constructed without children anymore.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
benchmarks: Reunited common functions for benches in a new shell file.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
abstract_compiler: add some flags to teach clang to be more silent

gcc also accepts these flags, so it is OK.

Signed-off-by: Jean Privat <jean@pryen.org>
abstract_compiler: add -Qunused-argument if clang

Signed-off-by: Jean Privat <jean@pryen.org>
abstract_compiler: remove -lunwind if target is Darwin (macosx)
global: compiler remove a useless `const` that cause C warnings

Signed-off-by: Jean Privat <jean@pryen.org>
tests.sh: force LC_ALL that cause issues with MacOSX

Signed-off-by: Jean Privat <jean@pryen.org>
Makefile: use `--no-stacktrace` on c_src/nitg to deal with the -lunwind issue on MacOSX
tests: update some tests to pass on Mac

Signed-off-by: Jean Privat <jean@pryen.org>
c_src: update Makefile to compile on MacOSX

Add a make variable OLDNITCOPT to give options for the first step

Signed-off-by: Jean Privat <jean@pryen.org>
mkcsrc: clear OLDNITCOPT in src/Makefile

Signed-off-by: Jean Privat <jean@pryen.org>
Added 'create_thread' function to enable thread creation after a exit.

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Merge: Bench scripts

Reunited common functions for benches in a new shell file.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

Pull-Request: #515
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Merge: Tests emscripten

The produced .js files are then executed by nodejs.

All base tests that do not import kernel are skipped because
since the module lib/emscripten.nit imports the kernel module,
an automatic double definition of classes `Object` and `Sys` occurs.

nodejs cannot perform correctly synchronized input, thus `stdin` and all
file reading does not work although they work in a browser.
As a workaround, a special module `emscripten_nodejs.nit` is added that just
print "NOT_YET_IMPLEMENTED" on unsupported services on synchronized input,
thus marking the test as skipped.

Currently, 99 (7% of the 1390 tests) still cause some other kind of failures;
they will be investigated later.

The whole testing of all the tests takes 68m on my machine.
ccache in unusable and the option --jcache of emcc does not bring any boost.
So it is unlikely that `testall.sh` will include this engine.

Pull-Request: #514
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Merge: Nit for mac

Some minor, but needed, tweaks to allow the compilation of Nit on Mac OS X

A special page is also created: http://nitlanguage.org/on_mac/

Currenlty, only 31 tests does not pass, most of them are platform or FFI related (some SDK are missing).

Pull-Request: #517
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Removed sockets from 'debugger.nit' to put them in 'debugger_socket.nit

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Put sockets in 'debugger_socket.nit

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>