nit.git
10 years agonith: introduce `nith` the ligHt Nit compiler
Jean Privat [Mon, 28 Apr 2014 15:49:05 +0000 (11:49 -0400)]
nith: introduce `nith` the ligHt Nit compiler

nith is just nitg with less features so, less phases to run,
and less code to compile (for a boostrap or test perspective).

Some numbers, note: `--skip-dead-methods` is used to produce less C code.

~~~
$ time nitg nitg.nit --skip-dead-methods
user 0m8.080s
$ time nitg nith.nit --skip-dead-methods
user 0m6.920s
~~~

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitg: introduce phases for Compiler classes
Jean Privat [Mon, 28 Apr 2014 15:34:12 +0000 (11:34 -0400)]
nitg: introduce phases for Compiler classes

Move the compiler invocation in each specific module (with phases)

Move the command-lice processing to abstract_compiler.

What remain in final `nitg` modules is the imports and the selection of
the default engine.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: Nitgs semiglobal
Jean Privat [Mon, 28 Apr 2014 13:56:34 +0000 (09:56 -0400)]
Merge: Nitgs semiglobal

The series add some optimizations on nitg-s and nitg-e engines

Some numbers with nitg

~~~
$ nitg nitg.nit
$ time nitg nitg.nit
user 0m12.424s

$ nitg --erasure --inline-coloring-numbers nitg.nit
$ time nitg nitg.nit
user 0m11.672s

$ nitg --erasure --rta --semi-global nitg.nit
$ time nitg nitg.nit
user 0m10.004s
~~~

Pull-Request: #425
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agoMerge: lib: fix broken assert in FStream::opens
Jean Privat [Sun, 27 Apr 2014 21:21:41 +0000 (17:21 -0400)]
Merge: lib: fix broken assert in FStream::opens

The old assert didn't work since the return was always `!= null` in Nit. Now we use instead the C value of `_file`.

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

10 years agoMerge: Java FFI on Android
Jean Privat [Sun, 27 Apr 2014 20:15:48 +0000 (16:15 -0400)]
Merge: Java FFI on Android

The FFI needed some modifications to work on Android:
* Android does not implement the full JNI (so we deactivate them)
* Its implementation does not expose the same signatures as OpenJDK's
* Provide our own load_jclass because we need a specific class loader (JNI's FindClass is no enough on Android)
* Using Dalvik's long corrupted data going through Java (more debugging will be needed, anyway we can use Ints to hold pointers to C objects)

In the API, intro `App::native_activity` as a shortcut to get the main android Activity.

Update mnit_simple to use Java on Android.

Pull-Request: #418
Reviewed-by: Jean Privat <jean@pryen.org>

10 years agoniti: implement Pointer:address_is_null as "intern" for niti executing niti
Alexis Laferrière [Sun, 27 Apr 2014 19:03:59 +0000 (15:03 -0400)]
niti: implement Pointer:address_is_null as "intern" for niti executing niti

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge branch 'master' into java-ffi-android
Alexis Laferrière [Sun, 27 Apr 2014 17:54:21 +0000 (13:54 -0400)]
Merge branch 'master' into java-ffi-android

10 years agolib: fix find_class_loader with latest FFI spec
Alexis Laferrière [Sun, 27 Apr 2014 17:52:27 +0000 (13:52 -0400)]
lib: fix find_class_loader with latest FFI spec

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge: github_merge: copy the merge message for commit when conflict
Jean Privat [Sun, 27 Apr 2014 16:07:31 +0000 (12:07 -0400)]
Merge: github_merge: copy the merge message for commit when conflict

so the following commit will be pre-rendered

Pull-Request: #422

10 years agonitgs: add --no-colo-dead-methods to explicitely disable coloring of dead methods
Jean Privat [Sun, 27 Apr 2014 15:56:47 +0000 (11:56 -0400)]
nitgs: add --no-colo-dead-methods to explicitely disable coloring of dead methods

Because of coloring bug #375 ; having less useless entries in tables
increase the likeness of the bug.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosepcomp: do not colorize dead methods
Jean Privat [Wed, 16 Apr 2014 20:25:41 +0000 (16:25 -0400)]
sepcomp: do not colorize dead methods

When RTA is available, dead methods do not need to be colored.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosepcomp: add --semi-global to activate all semi-global optimizations
Jean Privat [Mon, 7 Apr 2014 18:25:44 +0000 (14:25 -0400)]
sepcomp: add --semi-global to activate all semi-global optimizations

Some numbers:

Note that `user` is the bootstrapped time, therefore we measure both the
compilation time and the execution time.
I suspect this is stupid from the point-of-view of any scientific methodology;
but, anyway, it is numbers and people like numbers.

~~~
$ nitg --separate nitg.nit
user 0m11.228s

$ nitg --separate --semi-global nitg.nit
user 0m9.736s

$ nitg --erasure nitg.nit
user 0m7.800s

$ nitg --erasure --rta nitg.nit
user 0m8.280s

$ nitg --erasure --rta --semi-global nitg.nit
user 0m7.648s
~~~

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosepcomp: add --skip-dead-methods
Jean Privat [Mon, 7 Apr 2014 18:11:14 +0000 (14:11 -0400)]
sepcomp: add --skip-dead-methods

This avoid the generation and the C-compilation of dead methods

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitge: learn to use RTA if --rta is given
Jean Privat [Mon, 7 Apr 2014 18:09:18 +0000 (14:09 -0400)]
nitge: learn to use RTA if --rta is given

A new option `--rta` activate RTA optimization and
enable the use of some semi-global ones (like --direct-call-monomorph).

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitge: optimize compile_class_to_c for dead classes
Jean Privat [Mon, 7 Apr 2014 18:05:56 +0000 (14:05 -0400)]
nitge: optimize compile_class_to_c for dead classes

Classes that are dead (interface and abstract) do not need the full
class structure (VFT an cie). Only fields for typing are keept.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitgs: optimize compile_class_to_c for dead methods
Jean Privat [Wed, 16 Apr 2014 17:24:14 +0000 (13:24 -0400)]
nitgs: optimize compile_class_to_c for dead methods

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: Fix some AST bugs
Jean Privat [Sun, 27 Apr 2014 01:01:52 +0000 (21:01 -0400)]
Merge: Fix some AST bugs

`transform` and `rta` have some issues that lead to inconsistant information on the AST.
This series fixes them.

Note: Most commits extracted (cherry-picked) from #386 and #367

Pull-Request: #404
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agotests: niti skips test_markdown_args1
Jean Privat [Sun, 27 Apr 2014 01:00:43 +0000 (21:00 -0400)]
tests: niti skips test_markdown_args1

It borderline timeouts.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: update sav/error_needed_method_alt4
Jean Privat [Sat, 26 Apr 2014 03:26:35 +0000 (23:26 -0400)]
tests: update sav/error_needed_method_alt4

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: Metrics nullables
Jean Privat [Sat, 26 Apr 2014 01:24:07 +0000 (21:24 -0400)]
Merge: Metrics nullables

Add metrics about nullables usage in nit_metrics.

Also fix some bugs in metrics collect

Pull-Request: #420
Reviewed-by: Jean Privat <jean@pryen.org>

10 years agogithub_merge: copy the merge message for commit when conflict
Jean Privat [Sat, 26 Apr 2014 01:11:04 +0000 (21:11 -0400)]
github_merge: copy the merge message for commit when conflict

so the following commit will be pre-rendered

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoniti: add support partial for NativeFile::address_is_null
Alexis Laferrière [Tue, 22 Apr 2014 16:58:18 +0000 (12:58 -0400)]
niti: add support partial for NativeFile::address_is_null

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge: Src is a project
Jean Privat [Fri, 25 Apr 2014 19:20:23 +0000 (15:20 -0400)]
Merge: Src is a project

Improve nitls to be more versatile, and modulebuilder to detect projects in `src` directories

Pull-Request: #411
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoexamples/mnit_simple: test Android log and toasts
Alexis Laferrière [Sat, 15 Mar 2014 12:26:24 +0000 (08:26 -0400)]
examples/mnit_simple: test Android log and toasts

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_android: intro App::native_activity
Alexis Laferrière [Tue, 8 Apr 2014 13:12:26 +0000 (09:12 -0400)]
lib/mnit_android: intro App::native_activity

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agonitg: use load_jclass in Java FFI
Alexis Laferrière [Thu, 10 Apr 2014 12:52:34 +0000 (08:52 -0400)]
nitg: use load_jclass in Java FFI

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: intro the load_jclass method
Alexis Laferrière [Mon, 17 Mar 2014 04:13:57 +0000 (00:13 -0400)]
lib: intro the load_jclass method

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoandroid: enable code in AndroidManifest
Alexis Laferrière [Sun, 16 Mar 2014 21:22:31 +0000 (17:22 -0400)]
android: enable code in AndroidManifest

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoandroid: support FFI with Java
Alexis Laferrière [Sat, 15 Mar 2014 12:24:14 +0000 (08:24 -0400)]
android: support FFI with Java

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agojava ffi: use Java int to store C pointers
Alexis Laferrière [Fri, 25 Apr 2014 19:17:55 +0000 (15:17 -0400)]
java ffi: use Java int to store C pointers

While long worked with OpenJDK on linux, it did not on Android.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agotyping: remove `raw_arguments` as a cache
Jean Privat [Wed, 16 Apr 2014 20:15:52 +0000 (16:15 -0400)]
typing: remove `raw_arguments` as a cache

Because of transform and other potential optimization using astbuilder,
the typing phase cannot stores the raw_arguments and expect it is still
valid after subsequent phases.

The simplest way is to make `raw_arguments` a method that recollect the
correct nodes.

Alternative using some kind of cache invalidation seems to complex for not
a real gain.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotransform: disable transform of ASuperstringExpr
Jean Privat [Fri, 25 Apr 2014 13:16:03 +0000 (09:16 -0400)]
transform: disable transform of ASuperstringExpr

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agorta: do not try to remove things from a set in iteration
Jean Privat [Wed, 16 Apr 2014 17:28:13 +0000 (13:28 -0400)]
rta: do not try to remove things from a set in iteration

Instead, register the things to remove then remove them once the
iteration is over,

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agorta: add_monomorphic_send mark the mproperty as live
Jean Privat [Mon, 7 Apr 2014 14:49:05 +0000 (10:49 -0400)]
rta: add_monomorphic_send mark the mproperty as live

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agorta: guard `add_send` with a specific set, instead of overusing `live_methods`.
Jean Privat [Tue, 22 Apr 2014 13:29:02 +0000 (09:29 -0400)]
rta: guard `add_send` with a specific set, instead of overusing `live_methods`.

Eg. a monomorph method could be live, without being subject to try_send.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotransform: do not detach things while itering
Jean Privat [Wed, 26 Mar 2014 07:48:19 +0000 (03:48 -0400)]
transform: do not detach things while itering

This invalidates the underlying iterator.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agometrics: update tests
Alexandre Terrasa [Fri, 25 Apr 2014 02:31:31 +0000 (22:31 -0400)]
metrics: update tests

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agomodelbuilder: a directory named `src` triggers more heuristics
Jean Privat [Tue, 22 Apr 2014 20:28:23 +0000 (16:28 -0400)]
modelbuilder: a directory named `src` triggers more heuristics

A MGroup is determined by the fact that a directory is named `src`
Thus, current project that put their module in a src directory can be
correctly identified as MProject

~~~
$ nitls src/nit*.nit examples/mnit_dino/src/*.nit -t
mnit_dino (examples/mnit_dino/src)
|--dino (examples/mnit_dino/src/dino.nit)
|--dino_android (examples/mnit_dino/src/dino_android.nit)
|--dino_linux (examples/mnit_dino/src/dino_linux.nit)
|--fancy_dino (examples/mnit_dino/src/fancy_dino.nit)
|--game_logic (examples/mnit_dino/src/game_logic.nit)
|--graphism (examples/mnit_dino/src/graphism.nit)
`--splash (examples/mnit_dino/src/splash.nit)
nit (src)
|--nit (src/nit.nit)
|--nit_version (src/nit_version.nit)
|--nitdbg_client (src/nitdbg_client.nit)
|--nitdbg_server (src/nitdbg_server.nit)
|--nitdbg_websocket_server (src/nitdbg_websocket_server.nit)
|--nitdoc (src/nitdoc.nit)
|--nitg (src/nitg.nit)
|--nitlight (src/nitlight.nit)
|--nitls (src/nitls.nit)
|--nitmetrics (src/nitmetrics.nit)
|--nitunit (src/nitunit.nit)
`--nitx (src/nitx.nit)
~~~

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: improve nitls
Jean Privat [Fri, 25 Apr 2014 02:28:10 +0000 (22:28 -0400)]
Merge: improve nitls

Improve nitls to be more versatile.

Pull-Request: #413
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge: Improve nitunit
Jean Privat [Fri, 25 Apr 2014 02:28:04 +0000 (22:28 -0400)]
Merge: Improve nitunit

More robust, verbose, helpfull and now understand the fences `~~~`

Also fix some existing nitunit tests.

Pull-Request: #415
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agonitls: parse options before instantiating modelbuilder
Jean Privat [Fri, 25 Apr 2014 02:25:47 +0000 (22:25 -0400)]
nitls: parse options before instantiating modelbuilder

Because things, eg paths, may depend on options,

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agometrics: display sums in to_console
Alexandre Terrasa [Tue, 25 Mar 2014 21:28:26 +0000 (17:28 -0400)]
metrics: display sums in to_console

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agometrics: count nullable attributes
Alexandre Terrasa [Tue, 25 Mar 2014 21:27:41 +0000 (17:27 -0400)]
metrics: count nullable attributes

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agometrics: compute number of properties and number of attributes in mclasses_metrics
Alexandre Terrasa [Tue, 25 Mar 2014 21:26:25 +0000 (17:26 -0400)]
metrics: compute number of properties and number of attributes in mclasses_metrics

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agomodel_utils: add MAttribute::is_nullable
Alexandre Terrasa [Tue, 25 Mar 2014 21:25:41 +0000 (17:25 -0400)]
model_utils: add MAttribute::is_nullable

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agomodel_utils: add attributes count (local + inherited) in MClass
Alexandre Terrasa [Tue, 25 Mar 2014 21:25:05 +0000 (17:25 -0400)]
model_utils: add attributes count (local + inherited) in MClass

10 years agometrics: clear metrics set between each group analysis
Alexandre Terrasa [Tue, 25 Mar 2014 21:24:05 +0000 (17:24 -0400)]
metrics: clear metrics set between each group analysis

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agolib: fix Counter::clear
Alexandre Terrasa [Tue, 25 Mar 2014 21:21:08 +0000 (17:21 -0400)]
lib: fix Counter::clear

Now the sum is also set to 0 when call to clear

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agotests: update nitls
Jean Privat [Tue, 22 Apr 2014 20:30:59 +0000 (16:30 -0400)]
tests: update nitls

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitls: use `-P` for `--project`. `-p` is already used for `--path`
Jean Privat [Fri, 25 Apr 2014 01:36:56 +0000 (21:36 -0400)]
nitls: use `-P` for `--project`. `-p` is already used for `--path`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitls: option `-M` aliases `-d`, `-p` and `-s`
Jean Privat [Tue, 22 Apr 2014 20:04:24 +0000 (16:04 -0400)]
nitls: option `-M` aliases `-d`, `-p` and `-s`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: update sav/nitunit & sav/test_markdown
Jean Privat [Thu, 24 Apr 2014 03:43:56 +0000 (23:43 -0400)]
tests: update sav/nitunit & sav/test_markdown

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib: fix some nitunit tests, thanks to the new features of the tool
Jean Privat [Thu, 24 Apr 2014 03:41:24 +0000 (23:41 -0400)]
lib: fix some nitunit tests, thanks to the new features of the tool

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: keeps track of the source directory of the tested module.
Jean Privat [Fri, 25 Apr 2014 00:40:57 +0000 (20:40 -0400)]
nitunit: keeps track of the source directory of the tested module.

So you can do something like `nitunit src/tests.nit`.
Alternative of #415

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: `-W` warns fishy block in comments
Jean Privat [Thu, 24 Apr 2014 03:39:19 +0000 (23:39 -0400)]
nitunit: `-W` warns fishy block in comments

Usefull to find buggy nitunit tests with the `--no-act` flag.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: allows multiple independant block in a single comment
Jean Privat [Thu, 24 Apr 2014 03:36:41 +0000 (23:36 -0400)]
nitunit: allows multiple independant block in a single comment

A new block is started by non-trivial modules

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoniti: force `eval` to parse things as modules.
Jean Privat [Fri, 25 Apr 2014 00:27:56 +0000 (20:27 -0400)]
niti: force `eval` to parse things as modules.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser_util: fix and nitunitfy `parse_something`
Jean Privat [Fri, 25 Apr 2014 00:17:17 +0000 (20:17 -0400)]
parser_util: fix and nitunitfy `parse_something`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomarkdown: understang github fencing
Jean Privat [Thu, 24 Apr 2014 02:31:00 +0000 (22:31 -0400)]
markdown: understang github fencing

~~~~
blabla
~~~
code
~~~
blabla
~~~~

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: lower verbosity level to track each execution of test
Jean Privat [Thu, 24 Apr 2014 02:10:59 +0000 (22:10 -0400)]
nitunit: lower verbosity level to track each execution of test

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: add option `--no-act` that does noes run the units
Jean Privat [Thu, 24 Apr 2014 02:09:47 +0000 (22:09 -0400)]
nitunit: add option `--no-act` that does noes run the units

It just analyses and extract units.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: more verbose on execution
Jean Privat [Thu, 24 Apr 2014 01:08:09 +0000 (21:08 -0400)]
nitunit: more verbose on execution

prints the generated file name and some statistics.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: `nit_dir` as a service
Jean Privat [Wed, 23 Apr 2014 20:48:32 +0000 (16:48 -0400)]
Merge: `nit_dir` as a service

ToolContext exposes a `nit_dir` service that tools can use.
It is so good that, now, the `bin` directory can be directly put in the PATH on most system while `NIT_DIR` is unset.

Previous direct users of `NIT_DIR` are transformed to use the new service.
Also, `nitunit` uses the new service to find the compiler instead of a hard-coded path.

Closes #392
Closes #408

Pull-Request: #412
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agomkcsrc: fix a regexp that brokes the reboostrap
Jean Privat [Wed, 23 Apr 2014 20:41:31 +0000 (16:41 -0400)]
mkcsrc: fix a regexp that brokes the reboostrap

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: update sav related to `cannot find module` errors
Jean Privat [Wed, 23 Apr 2014 12:42:51 +0000 (08:42 -0400)]
tests: update sav related to `cannot find module` errors

The lib directory is not duplicated since the single nitdir player

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitunit: learn to use `nit_dir` instead of hardcoding the path of nitg
Jean Privat [Wed, 23 Apr 2014 01:47:52 +0000 (21:47 -0400)]
nitunit: learn to use `nit_dir` instead of hardcoding the path of nitg

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosrc: adapt tools to use `ToolContext::nit_dir` instead of `NIT_DIR`
Jean Privat [Wed, 23 Apr 2014 01:46:51 +0000 (21:46 -0400)]
src: adapt tools to use `ToolContext::nit_dir` instead of `NIT_DIR`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotoolcontext: add nit_dir service
Jean Privat [Wed, 23 Apr 2014 01:44:44 +0000 (21:44 -0400)]
toolcontext: add nit_dir service

Use `NIT_DIR` or some heuristic to find the Nit directory.
In next commits, tools will use it.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitls: can use `--depends` with others options.
Jean Privat [Tue, 22 Apr 2014 20:03:45 +0000 (16:03 -0400)]
nitls: can use `--depends` with others options.

~~~
$ nitls ../examples/hello_world.nit ../examples/calculator.nit -d
calculator (../examples/calculator.nit)
gtk (../lib/gtk.nit)
gtk3_4 (../lib/gtk3_4)
hello_world (../examples/hello_world.nit)
standard (../lib/standard)
~~~

~~~
$ nitls ../examples/hello_world.nit ../examples/calculator.nit -d -t -p
../examples/calculator.nit
`--../examples/calculator.nit
../lib/gtk.nit
`--../lib/gtk.nit
../lib/gtk3_4
|--../lib/gtk3_4/gdk_enums.nit
|--../lib/gtk3_4/gtk3_4.nit
|--../lib/gtk3_4/gtk_assistant.nit
|--../lib/gtk3_4/gtk_core.nit
|--../lib/gtk3_4/gtk_dialogs.nit
|--../lib/gtk3_4/gtk_enums.nit
`--../lib/gtk3_4/gtk_widgets_ext.nit
../examples/hello_world.nit
`--../examples/hello_world.nit
../lib/standard
|--../lib/standard/environ.nit
|--../lib/standard/exec.nit
|--../lib/standard/file.nit
|--../lib/standard/gc.nit
|--../lib/standard/kernel.nit
|--../lib/standard/math.nit
|--../lib/standard/posix.nit
|--../lib/standard/standard.nit
|--../lib/standard/stream.nit
|--../lib/standard/string.nit
|--../lib/standard/string_search.nit
|--../lib/standard/time.nit
`--../lib/standard/collection
   |--../lib/standard/collection/abstract_collection.nit
   |--../lib/standard/collection/array.nit
   |--../lib/standard/collection/collection.nit
   |--../lib/standard/collection/hash_collection.nit
   |--../lib/standard/collection/list.nit
   |--../lib/standard/collection/range.nit
   `--../lib/standard/collection/sorter.nit
~~~

10 years agonitls: add option --path to force the output of paths only
Jean Privat [Tue, 22 Apr 2014 19:53:02 +0000 (15:53 -0400)]
nitls: add option --path to force the output of paths only

Otherwise, a couple `name (filepath)` is displayed for each entry

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: github_merge tool
Jean Privat [Tue, 22 Apr 2014 19:22:01 +0000 (15:22 -0400)]
Merge: github_merge tool

Extraction of the github API in its own lib and rewrite of my nodejs script in pure Nit

Pull-Request: #409
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agotests: add github_merg
Jean Privat [Tue, 22 Apr 2014 16:10:27 +0000 (12:10 -0400)]
tests: add github_merg

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agocontrib: add `github_merge` the script I use to produce merge of PR
Jean Privat [Tue, 22 Apr 2014 16:08:59 +0000 (12:08 -0400)]
contrib: add `github_merge` the script I use to produce merge of PR

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agocontrib/github_search_for_jni: update to use github_api
Jean Privat [Tue, 22 Apr 2014 15:43:42 +0000 (11:43 -0400)]
contrib/github_search_for_jni: update to use github_api

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/github_api: new lib to access the github api
Jean Privat [Tue, 22 Apr 2014 15:40:29 +0000 (11:40 -0400)]
lib/github_api: new lib to access the github api

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosimple_json_reader: privately imports lexer&parser
Jean Privat [Tue, 22 Apr 2014 15:37:46 +0000 (11:37 -0400)]
simple_json_reader: privately imports lexer&parser

So public API is easier to read.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge: Inkscape tools
Jean Privat [Tue, 22 Apr 2014 13:35:53 +0000 (09:35 -0400)]
Merge: Inkscape tools

Intro 2 tools based on Inkscape.

__svg_to_png_and_nit__ reads a SVG file and outputs 2 files:
* A single png file
* A Nit source file and class, with attributes pointing to all objects with IDs beginning with 0.

__svg_to_icons__ Generates PNG files from a SVG file. It can output the format expected by Android projects.

Pull-Request: #406
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

10 years agocontrib/inkscape_tools: update to use a nested module
Alexis Laferrière [Fri, 18 Apr 2014 18:16:26 +0000 (14:16 -0400)]
contrib/inkscape_tools: update to use a nested module

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge branch 'master' into inkscape-tool
Alexis Laferrière [Fri, 18 Apr 2014 18:18:14 +0000 (14:18 -0400)]
Merge branch 'master' into inkscape-tool

To get import of nested modules.

10 years agoMerge: add NativeArray::length
Jean Privat [Fri, 18 Apr 2014 17:36:53 +0000 (13:36 -0400)]
Merge: add NativeArray::length

Add and implement native methods `NativeArray::length` and `NativeArray::to_a`

The length could be available but was not for historial reasons.
`to_a` is trivial once `length` is defined.

A future series will add `NativeArray::new` and depreciate the ugly `calloc_array`.

Note: because of a bug in nitg, the compiler in `c_src` seems to return 0 on `length` instead of aborting.

Pull-Request: #405
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

10 years agotests: add test_native_array.nit
Jean Privat [Fri, 18 Apr 2014 16:48:57 +0000 (12:48 -0400)]
tests: add test_native_array.nit

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoniti: implements `NativeArray::length`
Jean Privat [Thu, 17 Apr 2014 02:20:10 +0000 (22:20 -0400)]
niti: implements `NativeArray::length`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitg: implements `NativeArray::length`
Jean Privat [Thu, 17 Apr 2014 02:19:35 +0000 (22:19 -0400)]
nitg: implements `NativeArray::length`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: add inkscape_tools to testfull.sh
Alexis Laferrière [Thu, 17 Apr 2014 17:04:49 +0000 (13:04 -0400)]
tests: add inkscape_tools to testfull.sh

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agocontrib/inkscape_tools: add test for icons
Alexis Laferrière [Thu, 17 Apr 2014 12:45:24 +0000 (08:45 -0400)]
contrib/inkscape_tools: add test for icons

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agocontrib/inkscape_tools: intro the svg_to_icons tool
Alexis Laferrière [Thu, 17 Apr 2014 12:45:07 +0000 (08:45 -0400)]
contrib/inkscape_tools: intro the svg_to_icons tool

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: adds support lib for svg_to_png_and_nit tool
Alexis Laferrière [Sun, 6 Apr 2014 16:30:04 +0000 (12:30 -0400)]
lib: adds support lib for svg_to_png_and_nit tool

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agocontrib: intro the svg_to_png_and_nit project
Alexis Laferrière [Sun, 6 Apr 2014 03:31:26 +0000 (23:31 -0400)]
contrib: intro the svg_to_png_and_nit project

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: add `NativeArray::length`
Jean Privat [Thu, 17 Apr 2014 02:17:06 +0000 (22:17 -0400)]
lib: add `NativeArray::length`

Engines should be able to store the allocated size.
Unlike `NativeString` that is a char*, `NativeArray` is a special Nit
opaque structure.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib: opts add OptionFloat
Alexis Laferrière [Sun, 6 Apr 2014 15:58:37 +0000 (11:58 -0400)]
lib: opts add OptionFloat

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: fix broken assert in FStream::opens
Alexis Laferrière [Wed, 16 Apr 2014 17:55:17 +0000 (13:55 -0400)]
lib: fix broken assert in FStream::opens

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge: Shoot for android
Jean Privat [Tue, 15 Apr 2014 23:01:10 +0000 (19:01 -0400)]
Merge: Shoot for android

Enable control with the pointer
Compile to android
Scale view port

Pull-Request: #399
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

10 years agoMerge: Modernize syntax
Jean Privat [Tue, 15 Apr 2014 20:02:44 +0000 (16:02 -0400)]
Merge: Modernize syntax

Lot of cleanup and modernization in the syntax of Nit

* depreciate old FFI syntax: `extern` without `class` and non-dotted extern notation (quad or space)
* reduce the usage of old style getters and setters (they will be disabled soon)
* remove the shortcut `=` for one-liner function
* hexadecimal literals `var x = 0x7F`

Conflicts: lib/jvm.nit
Pull-Request: #401
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

10 years agotests: remove `base_return_assing`
Jean Privat [Tue, 15 Apr 2014 17:20:26 +0000 (13:20 -0400)]
tests: remove `base_return_assing`

The syntax is removed

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosrc: remove old-style attribute from src/ (except parser)
Jean Privat [Tue, 15 Apr 2014 13:52:01 +0000 (09:52 -0400)]
src: remove old-style attribute from src/ (except parser)

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser: regenerate parser files
Jean Privat [Tue, 15 Apr 2014 13:51:24 +0000 (09:51 -0400)]
parser: regenerate parser files

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser: add AHexIntExpr
Jean Privat [Tue, 15 Apr 2014 13:50:49 +0000 (09:50 -0400)]
parser: add AHexIntExpr

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser: split `AIntExpr` and `ADecIntExpr`
Jean Privat [Tue, 15 Apr 2014 13:49:52 +0000 (09:49 -0400)]
parser: split `AIntExpr` and `ADecIntExpr`

next commit will introduce AHexIntExpr

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser: force new style FFI in syntax.
Jean Privat [Tue, 15 Apr 2014 13:30:38 +0000 (09:30 -0400)]
parser: force new style FFI in syntax.

`extern class` + dotted extern call notations.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser: disable unused `=` shortcut for functions
Jean Privat [Tue, 15 Apr 2014 13:29:28 +0000 (09:29 -0400)]
parser: disable unused `=` shortcut for functions

So simplify the grammar.

Signed-off-by: Jean Privat <jean@pryen.org>