nit.git
10 years agobenches: remove alternative typings from benches
Alexandre Terrasa [Fri, 9 May 2014 17:28:06 +0000 (13:28 -0400)]
benches: remove alternative typings from benches

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

10 years agotests: remove pep8analysis from skip list
Alexandre Terrasa [Wed, 30 Apr 2014 21:36:33 +0000 (17:36 -0400)]
tests: remove pep8analysis from skip list

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

10 years agolayout_builders: removed module
Alexandre Terrasa [Wed, 30 Apr 2014 20:47:11 +0000 (16:47 -0400)]
layout_builders: removed module

Achievement Unlocked: remove one the most complex (and crappy) module from the compiler +10 nitCoins

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

10 years agoseparate_erasure_compiler: remove usage of MClass and MProperty LayoutMPropertyLayout
Alexandre Terrasa [Wed, 30 Apr 2014 20:40:56 +0000 (16:40 -0400)]
separate_erasure_compiler: remove usage of MClass and MProperty LayoutMPropertyLayout

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

10 years agoseparate_compiler: remove usage of MpropertyLayout
Alexandre Terrasa [Wed, 30 Apr 2014 20:29:56 +0000 (16:29 -0400)]
separate_compiler: remove usage of MpropertyLayout

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

10 years agoseparate_compiler: remove usage of ResolutionLayout
Alexandre Terrasa [Wed, 30 Apr 2014 20:19:50 +0000 (16:19 -0400)]
separate_compiler: remove usage of ResolutionLayout

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

10 years agoseparate_compiler: remove usage of TypingLayout
Alexandre Terrasa [Wed, 30 Apr 2014 20:14:47 +0000 (16:14 -0400)]
separate_compiler: remove usage of TypingLayout

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

10 years agoseparate_erasure_compiler: migrate virtual types coloring
Alexandre Terrasa [Wed, 30 Apr 2014 20:04:56 +0000 (16:04 -0400)]
separate_erasure_compiler: migrate virtual types coloring

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

10 years agoseparate_erasure_compiler: migrate class coloring
Alexandre Terrasa [Wed, 30 Apr 2014 20:04:44 +0000 (16:04 -0400)]
separate_erasure_compiler: migrate class coloring

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

10 years agoseparate_compiler: migrate resolution table coloring
Alexandre Terrasa [Wed, 30 Apr 2014 18:05:09 +0000 (14:05 -0400)]
separate_compiler: migrate resolution table coloring

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

10 years agoseparate_compiler: migrate mprops coloring
Alexandre Terrasa [Wed, 30 Apr 2014 17:56:43 +0000 (13:56 -0400)]
separate_compiler: migrate mprops coloring

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

10 years agoseparate_compiler: start migration from layout_builder to coloring on type tables
Alexandre Terrasa [Thu, 8 May 2014 01:42:44 +0000 (21:42 -0400)]
separate_compiler: start migration from layout_builder to coloring on type tables

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

10 years agocoloring: introduce new module for class and property coloring in Nit execution engines
Alexandre Terrasa [Thu, 8 May 2014 01:42:10 +0000 (21:42 -0400)]
coloring: introduce new module for class and property coloring in Nit execution engines

This module will replace layout_builders

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

10 years agoposet: introduce POSet::linearize
Alexandre Terrasa [Thu, 8 May 2014 00:28:03 +0000 (20:28 -0400)]
poset: introduce POSet::linearize

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

10 years agonitc/nitc-e: remove typing options
Alexandre Terrasa [Wed, 30 Apr 2014 17:10:50 +0000 (13:10 -0400)]
nitc/nitc-e: remove typing options

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

10 years agolib/gtk: improve documentation on main modules
Alexis Laferrière [Wed, 30 Apr 2014 18:02:38 +0000 (14:02 -0400)]
lib/gtk: improve documentation on main modules

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

10 years agolib/gtk: fix missing pkgconfig declaration in v3_6 and v3_8
Alexis Laferrière [Wed, 30 Apr 2014 18:04:33 +0000 (14:04 -0400)]
lib/gtk: fix missing pkgconfig declaration in v3_6 and v3_8

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

10 years agolib/gtk: move gtk3_8 to gtk::v3_8
Alexis Laferrière [Wed, 30 Apr 2014 17:59:58 +0000 (13:59 -0400)]
lib/gtk: move gtk3_8 to gtk::v3_8

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

10 years agolib/gtk: move gtk3_6 to gtk::v3_6
Alexis Laferrière [Wed, 30 Apr 2014 17:58:06 +0000 (13:58 -0400)]
lib/gtk: move gtk3_6 to gtk::v3_6

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

10 years agolib/gtk: move default gtk module as a project
Alexis Laferrière [Tue, 29 Apr 2014 23:48:29 +0000 (19:48 -0400)]
lib/gtk: move default gtk module as a project

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

10 years agoMerge: introduce Nith, the ligHt Nit compiler
Jean Privat [Tue, 29 Apr 2014 00:51:26 +0000 (20:51 -0400)]
Merge: introduce Nith, the ligHt  Nit compiler

It is just nitg with less features, thus should be faster to compile and should compile faster.
The result of the compilation should be the same however.

Independently, the series implements phases for the various nitg engines

Pull-Request: #385
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agotests: add nith
Jean Privat [Mon, 28 Apr 2014 23:58:37 +0000 (19:58 -0400)]
tests: add nith

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

10 years agotests: update nitmetric becase the name of the mainmodule has changed
Jean Privat [Mon, 28 Apr 2014 22:51:27 +0000 (18:51 -0400)]
tests: update nitmetric becase the name of the mainmodule has changed

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

10 years agoMerge: Interactive parser
Jean Privat [Mon, 28 Apr 2014 22:45:17 +0000 (18:45 -0400)]
Merge: Interactive parser

Just to play with `parse_something`

~~~
$ test_parser -i -n
--> hello world
Got ABlockExpr
--> "hello world"
Got AStringExpr
--> for x in [1,2,3] do
... print x
... end
Got ABlockExpr
--> fun foo do
... print "hello"
... end
Got AModule
--> for x in in in p
        for x in in in p
                 ^: Syntax error: unexpected keyword 'in'.
--> :q
~~~

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

10 years agoMerge: Customize the generated Android project
Jean Privat [Mon, 28 Apr 2014 20:33:30 +0000 (16:33 -0400)]
Merge: Customize the generated Android project

Annotations:
* `app_name("My Name")` will be used to set the project full name and the shortcut name on Android.
* `app_version(1, 5)` or `app_version(1, 5, git_revision)` sets the project `versionName` in the manifest. It does not set the `versionCode`, this will require a way to track the project.
* `java_package` specifies the package of the generated APK (the package should be unique to each applications). The plan is to also use it to specify the Java namespace of the generated code.
* `android_manifest("some lines")` adds custom lines to the manifest. And  `android_manifest_application("some lines")` adds lines to the application sub section of the manifest.

I'll have to add this information as a manual somewhere. Should it be in the documentation of the `android` module or on the website?

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

10 years agoabs_comp: move call of `supports_libunwind` in the right place
Jean Privat [Mon, 28 Apr 2014 18:07:52 +0000 (14:07 -0400)]
abs_comp: move call of `supports_libunwind` in the right place

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

10 years agomodelbuilder: name the main module like the first module.
Jean Privat [Mon, 28 Apr 2014 18:05:58 +0000 (14:05 -0400)]
modelbuilder: name the main module like the first module.

It is the way done by the compilers, and a lot of parts use
`mainmodule.name` to name things when `-m` is used.

So, in order to not broke the compilers parts,
generalize the idea in phases.

Note: the implicit main-module have no projets associated, so things
should not use "<main>" to identify then.

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

10 years agoMerge: Fix to inkscape_tools and introduce Float::ceil|floor
Jean Privat [Mon, 28 Apr 2014 17:49:20 +0000 (13:49 -0400)]
Merge: Fix to inkscape_tools and introduce Float::ceil|floor

Previously image generation would cut off some extremities of the source drawing.

Pull-Request: #426
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

10 years agoMerge: Benchs nullables
Jean Privat [Mon, 28 Apr 2014 16:45:47 +0000 (12:45 -0400)]
Merge: Benchs nullables

Allow us to compare engine performances with or without isset-checks before non-nullable attribute accesses

Pull-Request: #419
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

10 years agoexamples/mnit_simple: use vibration and android_manifest annotation
Alexis Laferrière [Sun, 27 Apr 2014 23:10:16 +0000 (19:10 -0400)]
examples/mnit_simple: use vibration and android_manifest annotation

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

10 years agoexamples/mnit_simple: use android project annotations
Alexis Laferrière [Fri, 25 Apr 2014 21:01:44 +0000 (17:01 -0400)]
examples/mnit_simple: use android project annotations

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

10 years agoandroid: use custom manifest lines
Alexis Laferrière [Sun, 27 Apr 2014 19:34:01 +0000 (15:34 -0400)]
android: use custom manifest lines

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

10 years agoandroid: use the metadata to customize the generated Android project
Alexis Laferrière [Sun, 27 Apr 2014 19:06:43 +0000 (15:06 -0400)]
android: use the metadata to customize the generated Android project

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

10 years agoandroid: intro annotation to customize Android manifest
Alexis Laferrière [Mon, 28 Apr 2014 13:14:19 +0000 (09:14 -0400)]
android: intro annotation to customize Android manifest

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

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: tests: better handling of tests without a sav file
Jean Privat [Mon, 28 Apr 2014 15:21:02 +0000 (11:21 -0400)]
Merge: tests: better handling of tests without a sav file

In tests, do not tag tests without sav files with *skipped*.
Instead: an empty `.res` file is a *success*, otherwise a non-empty `.res` is a *failure*.

In order to enable the correct behavior for all tests, two special `.skip` files are added to catch regressions in the Nit code.

`cc.skip` skips the C compilation and is used for programs that require a specific but unavailable C library.
Tests in this file are compiled with the `--no-cc` option.

`exec.skip` skips the execution and is used for program whose execution is unsuitable or unreproducible.
Programs that rely on the environ var `NIT_TESTING` in their code may want to drop it and just add themselves to the `exec.skip`

Pull-Request: #423
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agotests: add more stuff from examples and contrib
Jean Privat [Mon, 28 Apr 2014 15:20:02 +0000 (11:20 -0400)]
tests: add more stuff from examples and contrib

Thanks to the cc.skip and exec.skip files, suitable tests are available

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

10 years agoandroid: intro annotation to get project version
Alexis Laferrière [Mon, 28 Apr 2014 14:43:28 +0000 (10:43 -0400)]
android: intro annotation to get project version

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

10 years agoandroid: intro annotations to gather project metadata
Alexis Laferrière [Thu, 17 Apr 2014 17:16:55 +0000 (13:16 -0400)]
android: intro annotations to gather project metadata

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

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 agobenches: add benches about nullables things
Alexandre Terrasa [Wed, 26 Mar 2014 21:31:39 +0000 (17:31 -0400)]
benches: add benches about nullables things

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

10 years agonitc: add option --count-isset-checks to count all compiled isset checks on non-nulla...
Alexandre Terrasa [Tue, 25 Mar 2014 19:43:15 +0000 (15:43 -0400)]
nitc: add option --count-isset-checks to count all compiled isset checks on non-nullable attributes

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

10 years agonitc: renamed --no-check-initialization in --no-check-attr-isset to follow the new...
Alexandre Terrasa [Tue, 25 Mar 2014 19:32:47 +0000 (15:32 -0400)]
nitc: renamed --no-check-initialization in --no-check-attr-isset to follow the new specification of nullable attributes

Signed-off-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 agocontrib/inkscape_tools: remove all to_i_strip_e
Alexis Laferrière [Sun, 27 Apr 2014 19:38:46 +0000 (15:38 -0400)]
contrib/inkscape_tools: remove all to_i_strip_e

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

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 agocontrib/inkscape_tools: use floor and ceil to better cut images
Alexis Laferrière [Sun, 27 Apr 2014 12:48:29 +0000 (08:48 -0400)]
contrib/inkscape_tools: use floor and ceil to better cut images

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

10 years agolib/math: intro ceil and floor
Alexis Laferrière [Sun, 27 Apr 2014 12:46:47 +0000 (08:46 -0400)]
lib/math: intro ceil and floor

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

10 years agotests: tests -i on test_parser
Jean Privat [Sun, 27 Apr 2014 01:40:40 +0000 (21:40 -0400)]
tests: tests -i on test_parser

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

10 years agotest_parser: add option `-i` for interactive parsing
Jean Privat [Sun, 27 Apr 2014 01:34:32 +0000 (21:34 -0400)]
test_parser: add option `-i` for interactive parsing

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

10 years agoparser_util: add `interactive_parse` to have a simple AST from the user
Jean Privat [Sun, 27 Apr 2014 01:33:45 +0000 (21:33 -0400)]
parser_util: add `interactive_parse` to have a simple AST from the user

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: remove empty sav files
Jean Privat [Sat, 26 Apr 2014 03:06:22 +0000 (23:06 -0400)]
tests: remove empty sav files

since now, empty res and no sav is an OK test

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

10 years agotests: a res without sav is OK if empty else is failed
Jean Privat [Sat, 26 Apr 2014 02:21:31 +0000 (22:21 -0400)]
tests: a res without sav is OK if empty else is failed

This will simplify the addition of sav, that are required only if not
empty.
Moreover, a missing non-empty sav will triggers a FAIL instead of a
skip.

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

10 years agotests: add missing sav
Jean Privat [Sat, 26 Apr 2014 03:05:22 +0000 (23:05 -0400)]
tests: add missing sav

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

10 years agomodel: fatal error, instead of abort if more that one primitive class
Jean Privat [Sat, 26 Apr 2014 03:04:07 +0000 (23:04 -0400)]
model: fatal error, instead of abort if more that one primitive class

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

10 years agotests: add `cc.skip` to skip the C compilation of some programs
Jean Privat [Sat, 26 Apr 2014 03:02:01 +0000 (23:02 -0400)]
tests: add `cc.skip` to skip the C compilation of some programs

Exemple: unavailable C libraries.

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

10 years agotests: niti fully skips tests in exec.skip
Jean Privat [Sat, 26 Apr 2014 02:20:20 +0000 (22:20 -0400)]
tests: niti fully skips tests in exec.skip

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

10 years agotests: add `exec.skip` to compile but not execute tests
Jean Privat [Sat, 26 Apr 2014 02:09:35 +0000 (22:09 -0400)]
tests: add `exec.skip` to compile but not execute tests

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