nit.git
9 years agoversion 0.7.2 v0.7.2
Jean Privat [Sat, 28 Feb 2015 11:00:15 +0000 (18:00 +0700)]
version 0.7.2

9 years agoMerge: Use --log
Jean Privat [Fri, 27 Feb 2015 02:51:36 +0000 (09:51 +0700)]
Merge: Use --log

Use the option --log to log things.

It is not that hard to add logged things and it helped me, in #1177, to track easily the bug in rta.

Pull-Request: #1178
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Kill cached
Jean Privat [Fri, 27 Feb 2015 02:51:25 +0000 (09:51 +0700)]
Merge: Kill cached

Remove the deprecated annotation `is cached` that is fragile and replace the remaining cases with `lazy` attributes that is the way to go.

Pull-Request: #1175
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Nitrpg: add achievements
Jean Privat [Thu, 26 Feb 2015 23:52:38 +0000 (06:52 +0700)]
Merge: Nitrpg: add achievements

Not much achievements in this PR:

* Counting issues and rewarding at 1, 100, 1000
* Counting PR and rewarding at 1, 100, 1000
* Counting commits and rewarding at 1, 100, 1000, 10000
* Two achievements based on regexp, just for demo: Nitdoc and FFI

Partially fixes #1165: I fixed the typo in "complaint" and the first playre to unlock the achievement. But the related issue stills not linked for now.

Démo: http://nitlanguage.org/rpg/games/privat/nit (sorry, I had to reset the scores...)

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

9 years agotests: tests --log and --log-dir for nitc
Jean Privat [Thu, 26 Feb 2015 13:58:07 +0000 (20:58 +0700)]
tests: tests --log and --log-dir for nitc

So we can check that this rare path does not crashes

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

9 years agoman: document --log and --log-dir
Jean Privat [Thu, 26 Feb 2015 13:56:29 +0000 (20:56 +0700)]
man: document --log and --log-dir

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

9 years agorta: log results of analysis in the log directory
Jean Privat [Thu, 26 Feb 2015 13:45:27 +0000 (20:45 +0700)]
rta: log results of analysis in the log directory

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

9 years agotoolcontext: log all verbose infos in the log directory
Jean Privat [Thu, 26 Feb 2015 13:43:55 +0000 (20:43 +0700)]
toolcontext: log all verbose infos in the log directory

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

9 years agocontrib/nitrpg: display achievements in front end
Alexandre Terrasa [Mon, 23 Feb 2015 09:57:07 +0000 (10:57 +0100)]
contrib/nitrpg: display achievements in front end

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

9 years agocontrib/nitrpg: introduce achievements
Alexandre Terrasa [Thu, 26 Feb 2015 12:13:18 +0000 (13:13 +0100)]
contrib/nitrpg: introduce achievements

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

9 years agotests: remove base_at_cached.nit
Jean Privat [Thu, 26 Feb 2015 11:41:14 +0000 (18:41 +0700)]
tests: remove base_at_cached.nit

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

9 years agoglesv2: fix bad use of `lazy` annotation (fun instead of var)
Jean Privat [Thu, 26 Feb 2015 07:48:16 +0000 (14:48 +0700)]
glesv2: fix bad use of `lazy` annotation (fun instead of var)

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

9 years agonitrpg: implement correct caching for User::player
Jean Privat [Thu, 26 Feb 2015 07:47:15 +0000 (14:47 +0700)]
nitrpg: implement correct caching for User::player

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

9 years agomodelize: prevent the use of `lazy` on methods
Jean Privat [Thu, 26 Feb 2015 04:51:02 +0000 (11:51 +0700)]
modelize: prevent the use of `lazy` on methods

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

9 years agofrontend: remove deprecated cached annotation and phase
Jean Privat [Thu, 26 Feb 2015 04:50:42 +0000 (11:50 +0700)]
frontend: remove deprecated cached annotation and phase

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

9 years agocode: replace `is cached` by `is lazy`
Jean Privat [Thu, 26 Feb 2015 04:08:14 +0000 (11:08 +0700)]
code: replace `is cached` by `is lazy`

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

9 years agoMerge: Guard call
Jean Privat [Thu, 26 Feb 2015 02:23:36 +0000 (09:23 +0700)]
Merge: Guard call

Add option `--guard-call` as an alternative implementation of the link-time optimization `--substitute-monomorph`

The idea is to have the standard VFT call guarded by a symbol when the call is monomorphic.
So the sequence is independent of any client and is roughly

~~~
if SYMBOL != null then
   SYMBOL(ARGS)
else
   (SELF->VFT[COLOR])(ARGS)
end
~~~

where the value of the SYMBOL is set for each specific program at link-time: null when the call is polymorphic and the address of the single target when the call is monomorphic.

Benches show that, on my computer, there is from 0% to 10% in loss so this alternative implementation is pure overcost :)
Still keep it because, I coded it and works, and it may worth something on other architectures.

The benchs shows some quick results:

* first (sc, red) is default
* second (sl, green) is `--substitute-monomorph`, the previous impl
* third (gc, blue) is `--guard-call``, the new one
* last (cd, purple) is `--direct-call-monomorph0`, the optimal with direct calls directly inserted in a global way

![bench_linkboost](https://cloud.githubusercontent.com/assets/135828/6342973/794b2a92-bc13-11e4-9b22-cc43e6cda473.png)

Even if the result is deceiving, the PR does some cleanup and refactorization, so we got that goin for us,  which is nice.

Pull-Request: #1173
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: Nitdoc: HTML templates related cleaning
Jean Privat [Thu, 26 Feb 2015 02:23:27 +0000 (09:23 +0700)]
Merge: Nitdoc: HTML templates related cleaning

This PR reorganizes Nitdoc modules importation for HTML templates.

The main objective is to dissociate `doc_model` from html related things.
This is the last step before template migration from old model templates to `DocComposite`.

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

9 years agoMerge: Generalized class members
Jean Privat [Thu, 26 Feb 2015 02:23:18 +0000 (09:23 +0700)]
Merge: Generalized class members

This PR change the way class members are parsed.

Before, the order was strict: class annotations, then extern code block, then super clauses, then properties.
After, annotations and super clauses can appear in any order within the properties

The need is to enable class annotations inside the class (cf #1158) I did not find another simple way to do this.

Now, one can write
~~~nit
class B
   super A
   serializable
   var i: Int
   autoinit x, i
end
~~~

Pull-Request: #1159
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agonitpretty: handle super and class-level annotation as property
Jean Privat [Tue, 24 Feb 2015 16:15:26 +0000 (23:15 +0700)]
nitpretty: handle super and class-level annotation as property

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

9 years agotests: update test_parser_args1.res
Jean Privat [Tue, 24 Feb 2015 16:12:19 +0000 (23:12 +0700)]
tests: update test_parser_args1.res

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

9 years agoserialization: generate ASuperPropdef instead of ASuperclass
Jean Privat [Sat, 21 Feb 2015 02:58:22 +0000 (09:58 +0700)]
serialization: generate ASuperPropdef instead of ASuperclass

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

9 years agoastvalidation: skip individual annotations
Jean Privat [Fri, 20 Feb 2015 05:56:27 +0000 (12:56 +0700)]
astvalidation: skip individual annotations

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

9 years agotransform: skip if no mpropdef instead of abort
Jean Privat [Tue, 10 Feb 2015 10:33:21 +0000 (17:33 +0700)]
transform: skip if no mpropdef instead of abort

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

9 years agomodelize: implements services of APropdef as noop (instead of abstract)
Jean Privat [Tue, 10 Feb 2015 10:32:26 +0000 (17:32 +0700)]
modelize: implements services of APropdef as noop (instead of abstract)

So that working on special APropdefs do nothing by default.

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

9 years agoparser: regenerate with generalized class members
Jean Privat [Tue, 24 Feb 2015 16:06:31 +0000 (23:06 +0700)]
parser: regenerate with generalized class members

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

9 years agogrammar: introduce AAnnotPropdef for annotation in classes
Jean Privat [Tue, 24 Feb 2015 16:01:29 +0000 (23:01 +0700)]
grammar: introduce AAnnotPropdef for annotation in classes

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

9 years agogrammar: introduce ASuperPropdef for super-classes
Jean Privat [Tue, 24 Feb 2015 15:59:48 +0000 (22:59 +0700)]
grammar: introduce ASuperPropdef for super-classes

The suffix `Prodef` is unfortunate, but sablecc3 is the law.
I would have preferred `ASuperDef` or something.

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

9 years agogrammar: remove `line_annotations_forclass` and `superclass` from classdef
Jean Privat [Tue, 24 Feb 2015 15:56:44 +0000 (22:56 +0700)]
grammar: remove `line_annotations_forclass` and `superclass` from classdef

They will be reintroduced as propdefs in next commits

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

9 years agogrammar: propdefs returns a list
Jean Privat [Tue, 24 Feb 2015 15:53:24 +0000 (22:53 +0700)]
grammar: propdefs returns a list

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

9 years agosrc/doc: uniformize HTML output for topmenu
Alexandre Terrasa [Mon, 23 Feb 2015 14:54:06 +0000 (15:54 +0100)]
src/doc: uniformize HTML output for topmenu

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

9 years agosrc/doc: clean DocPage rendering API.
Alexandre Terrasa [Tue, 17 Feb 2015 19:27:37 +0000 (20:27 +0100)]
src/doc: clean DocPage rendering API.

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

9 years agosrc/doc: make DocPage render itself instead of using a TplPage
Alexandre Terrasa [Tue, 17 Feb 2015 19:11:34 +0000 (20:11 +0100)]
src/doc: make DocPage render itself instead of using a TplPage

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

9 years agosrc/doc: move `doc_templates` to `html_templates` group.
Alexandre Terrasa [Tue, 24 Feb 2015 13:57:33 +0000 (14:57 +0100)]
src/doc: move `doc_templates` to `html_templates` group.

At this point, anything that is related to HTML ouput is only required by the HTML rendering phase.

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

9 years agobench: add `bench_call_monomorph` to compare both levels
Jean Privat [Tue, 24 Feb 2015 03:33:45 +0000 (10:33 +0700)]
bench: add `bench_call_monomorph` to compare both levels

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

9 years agosepcomp: add option -direct-call-monomorph0 a less precise --direct-call-monomorph...
Jean Privat [Tue, 24 Feb 2015 03:27:40 +0000 (10:27 +0700)]
sepcomp: add option -direct-call-monomorph0 a less precise --direct-call-monomorph option

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

9 years agoMerge: Add tasks in benchmark/bench_engines
Jean Privat [Tue, 24 Feb 2015 04:00:13 +0000 (11:00 +0700)]
Merge: Add tasks in benchmark/bench_engines

More benches for more science

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

9 years agoMerge: nitrpg: add nitrpg.user.js for enhanced user experience
Jean Privat [Tue, 24 Feb 2015 03:59:58 +0000 (10:59 +0700)]
Merge: nitrpg: add nitrpg.user.js for enhanced user experience

A script to use with [user-script][1] compliant plugin for your browser to enhance the user experience on github for nitrpg players.

[1]: http://en.wikipedia.org/wiki/Greasemonkey

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

9 years agoMerge: parser: add `ASTDump` and `ANode::dump_tree`
Jean Privat [Tue, 24 Feb 2015 03:59:46 +0000 (10:59 +0700)]
Merge: parser: add `ASTDump` and `ANode::dump_tree`

A simple helper to debug AST. I used it to debug auto-serialization in #1159

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

9 years agoMerge: nitunit: fix running last test of a module, it was previously ignored
Jean Privat [Tue, 24 Feb 2015 03:59:32 +0000 (10:59 +0700)]
Merge: nitunit: fix running last test of a module, it was previously ignored

This is a very small commit, but it may reveal some previously ignored nitunits.

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

9 years agosepcomp: add option `--guard-call`
Jean Privat [Tue, 24 Feb 2015 03:19:10 +0000 (10:19 +0700)]
sepcomp: add option `--guard-call`

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

9 years agosepcomp: move out opt_substitute_monomorph from compile_module_to_c
Jean Privat [Mon, 23 Feb 2015 22:11:34 +0000 (05:11 +0700)]
sepcomp: move out opt_substitute_monomorph from compile_module_to_c

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

9 years agonitrpg: add nitrpg.user.js for enhanced user experience
Jean Privat [Mon, 23 Feb 2015 21:34:35 +0000 (04:34 +0700)]
nitrpg: add nitrpg.user.js for enhanced user experience

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

9 years agocontrib/nitrpg: also use `root_url` on site logo.
Alexandre Terrasa [Tue, 10 Feb 2015 21:38:47 +0000 (22:38 +0100)]
contrib/nitrpg: also use `root_url` on site logo.

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

9 years agocontrib/nitrpg: move statistics to GameEntity.
Alexandre Terrasa [Tue, 10 Feb 2015 21:38:06 +0000 (22:38 +0100)]
contrib/nitrpg: move statistics to GameEntity.

So even players can have stats.

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

9 years agobenches: replace niti test_parser task by two niti tasks (nitcc and queens)
Jean Privat [Sun, 22 Feb 2015 09:09:34 +0000 (16:09 +0700)]
benches: replace niti test_parser task by two niti tasks (nitcc and queens)

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

9 years agobenches: add markdown as a task in bench_engines
Jean Privat [Sun, 22 Feb 2015 03:42:36 +0000 (10:42 +0700)]
benches: add markdown as a task in bench_engines

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

9 years agolib/github: deactivate assert in broken nitunit
Alexis Laferrière [Sat, 21 Feb 2015 12:51:56 +0000 (07:51 -0500)]
lib/github: deactivate assert in broken nitunit

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

9 years agoMerge: Support Android on 2 different ARMs, x86 and even MIPS
Jean Privat [Sat, 21 Feb 2015 06:05:02 +0000 (13:05 +0700)]
Merge: Support Android on 2 different ARMs, x86 and even MIPS

Tested on ARM v7 and x86. MIPS on Android is more rare but it is used on some low-cost phones.

Each extra architecture use less than 1 mo in the release APK, but MIPS is the largest one. I could add an annotation or something else if we ever need smaller APK files. Mineit VR release with the 4 architectures and its textures takes only 2.5 mo.

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

9 years agoMerge: class annotation `autoinit` to explicitly lists initializers.
Jean Privat [Sat, 21 Feb 2015 06:04:31 +0000 (13:04 +0700)]
Merge: class annotation `autoinit` to explicitly lists initializers.

A suggestion of @Morriar is to use a class-level annotation `autoinit` to list initializers.
It should ne rarely used, in case of conflict for instance, or to restrict the number of initializers (but this could be fragile).

A step towards #785

~~~nit
class A
  var a: Int
  var b: String
end

class B
   autoinit c, b, a
   super A
   var c: Bool
end

var a = new A(10, "foo")
var b = new B(true, "foo", 10)
~~~

Some issues remains, I my require your input on these

* why I am required to put `autoinit` before the `super` clause?
  because the grammar is ugly.
  Maybe I should find a way to enable the `autoinit` clause everywhere in the body of the class?
  This is a grammar issue that can be solved independently I think.
* what are the validity of initializers?
  The first commit is used to discriminate properties that are initializers and those that are not.
  I am not sure if restricting what can be used an initializer makes sense. In fact I really do not know what is the best expressive-but-safe policy here. See the last point for a related issue
* what about clearing the full list of initializers (so no parameters in the new)?
  The annotation `noautoinit` will do the trick.
* what about setters?
  when one writes `class A var x: Int`, in fact the initializer is not the getter `x` but the setter `x=`. It is obvious once one understand that `var a = new A(10)` is just `var a = alloc A; a.x = 10; a.init`.
  However, I chose to implicitly try to search the setter first when given `x` as an element of the `autoinit` clause, so that one can write `autoinit x` instead of the less POLA `autoinit x=` (that also works by the way).
  Unfortunately this kind of heuristic makes the specification more complex, but also prevents one to use a method `x` as an initializer if a method `x=` exists.

Pull-Request: #1158
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoparser: add `ASTDump` and `ANode::dump_tree`
Jean Privat [Sat, 21 Feb 2015 02:56:54 +0000 (09:56 +0700)]
parser: add `ASTDump` and `ANode::dump_tree`

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

9 years agonitunit: fix executing last test which was previously ignored
Alexis Laferrière [Fri, 20 Feb 2015 16:34:30 +0000 (11:34 -0500)]
nitunit: fix executing last test which was previously ignored

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

9 years agonitc/android: compile Android projects for x86, mips and 2 versions of arm
Alexis Laferrière [Fri, 20 Feb 2015 14:42:01 +0000 (09:42 -0500)]
nitc/android: compile Android projects for x86, mips and 2 versions of arm

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

9 years agoshare/libgc: compile libgc for Android on more than arm: x86 and mips
Alexis Laferrière [Fri, 20 Feb 2015 03:47:58 +0000 (22:47 -0500)]
share/libgc: compile libgc for Android on more than arm: x86 and mips

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

9 years agotests: update some `base_init` to use noautoinit instead of noinit
Jean Privat [Fri, 20 Feb 2015 05:42:18 +0000 (12:42 +0700)]
tests: update some `base_init` to use noautoinit instead of noinit

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

9 years agotests: add base_init_autoinit3.nit
Jean Privat [Tue, 10 Feb 2015 10:51:07 +0000 (17:51 +0700)]
tests: add base_init_autoinit3.nit

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

9 years agomodelize: add class annotation `noautoinit` to clear the list of initializers
Jean Privat [Fri, 20 Feb 2015 05:38:58 +0000 (12:38 +0700)]
modelize: add class annotation `noautoinit` to clear the list of initializers

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

9 years agomodelize: accepts `noautoinit` the new name of `noinit`.
Jean Privat [Fri, 20 Feb 2015 05:20:12 +0000 (12:20 +0700)]
modelize: accepts `noautoinit` the new name of `noinit`.

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

9 years agomodelize: add class-annotation `autoinit` to explicitly list the initializers
Jean Privat [Tue, 10 Feb 2015 05:05:34 +0000 (12:05 +0700)]
modelize: add class-annotation `autoinit` to explicitly list the initializers

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

9 years agoMerge: Misc commits to android, json::dynamic and more_collections
Jean Privat [Thu, 19 Feb 2015 01:53:28 +0000 (08:53 +0700)]
Merge: Misc commits to android, json::dynamic and more_collections

The gamepad events are based on 2 different gamepads. They will probably need to be revisited with different layouts.

Pull-Request: #1163
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agosrc/doc: move remaining services from `doc_model` to `doc_base` and delete the module
Alexandre Terrasa [Tue, 17 Feb 2015 18:45:48 +0000 (19:45 +0100)]
src/doc: move remaining services from `doc_model` to `doc_base` and delete the module

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

9 years agosrc/doc: move HTML output related services from `doc_model` to `html_model`
Alexandre Terrasa [Tue, 17 Feb 2015 18:39:32 +0000 (19:39 +0100)]
src/doc: move HTML output related services from `doc_model` to `html_model`

So HTML related things are only imported by the HTML rendering phase.

Next commit will finish the `doc_model` cleaning by merging remaining services into `doc_base`.

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

9 years agosrc/doc: use `nitdoc_name` rather than `nitdoc_id` for debug name.
Alexandre Terrasa [Tue, 17 Feb 2015 18:39:04 +0000 (19:39 +0100)]
src/doc: use `nitdoc_name` rather than `nitdoc_id` for debug name.

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

9 years agosrc/doc: introduce `html_templates` group.
Alexandre Terrasa [Tue, 17 Feb 2015 18:17:57 +0000 (19:17 +0100)]
src/doc: introduce `html_templates` group.

This group will be used to store all the HTML output related things.

Next commit will extract HTML related services from module `doc_model`.

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

9 years agosrc/doc: make ImportationListSection and InheritanceListSection two MEntity articles...
Alexandre Terrasa [Tue, 17 Feb 2015 17:50:36 +0000 (18:50 +0100)]
src/doc: make ImportationListSection and InheritanceListSection two MEntity articles since the lists are about a specific MEntity

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

9 years agosrc/doc: make GraphArticle a MEntity article since the graph is about a specific...
Alexandre Terrasa [Tue, 17 Feb 2015 17:49:42 +0000 (18:49 +0100)]
src/doc: make GraphArticle a MEntity article since the graph is about a specific MEntity

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

9 years agosrc/doc: rename `DocComposite::add` into `add_child` to avoid conflict with `Template...
Alexandre Terrasa [Tue, 17 Feb 2015 18:11:32 +0000 (19:11 +0100)]
src/doc: rename `DocComposite::add` into `add_child` to avoid conflict with `Template::add`

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

9 years agolib/android: add the gamepad module
Alexis Laferrière [Fri, 9 Jan 2015 14:52:33 +0000 (09:52 -0500)]
lib/android: add the gamepad module

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

9 years agolib/android: move all android annotations to the `aware` submodule
Alexis Laferrière [Mon, 16 Feb 2015 19:23:22 +0000 (14:23 -0500)]
lib/android: move all android annotations to the `aware` submodule

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

9 years agolib/more_collections: add `clean` to `HashMap[23]`
Alexis Laferrière [Sat, 14 Feb 2015 19:29:02 +0000 (14:29 -0500)]
lib/more_collections: add `clean` to `HashMap[23]`

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

9 years agolib/json: converting JsonValue to float or int casts between numerics
Alexis Laferrière [Thu, 12 Feb 2015 01:51:57 +0000 (20:51 -0500)]
lib/json: converting JsonValue to float or int casts between numerics

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

9 years agoMerge: Nitrpg: introduce game events
Jean Privat [Fri, 13 Feb 2015 08:34:41 +0000 (15:34 +0700)]
Merge: Nitrpg: introduce game events

Events allow us to keep track of the history.

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

9 years agoMerge: Nitrpg: minor fixes
Jean Privat [Wed, 11 Feb 2015 07:35:18 +0000 (14:35 +0700)]
Merge: Nitrpg: minor fixes

Some fixes before next feature.

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

9 years agoMerge: Nitrpg: minor fixes
Jean Privat [Wed, 11 Feb 2015 06:26:36 +0000 (13:26 +0700)]
Merge: Nitrpg: minor fixes

Some fixes before next feature.

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

9 years agoMerge: Rename Streams
Jean Privat [Wed, 11 Feb 2015 04:12:05 +0000 (11:12 +0700)]
Merge: Rename Streams

Since #466 is not closed yet, here's the follow-up to PR #932.

This one focuses only on introducing new names for Streams, IOS and its derivatives were judged as confusing, so here's a proposition of names for the different Streams of the standard library.

Please let me know if some names are not very explicit, I'll change them if necessary.

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

9 years agoMerge: lib/glesv2: intro framebuffer related services and try a new style
Jean Privat [Wed, 11 Feb 2015 04:11:52 +0000 (11:11 +0700)]
Merge: lib/glesv2: intro framebuffer related services and try a new style

The main point of this PR is to try a new naming convention for the glesv2 module.

Ideas behind this convention:
1. Be as close as possible to the C API: use the same function and macro names.
2. Modify those names only for compatibility with the Nit language: the macros cannot begin with `GL_` so use `gl_` instead.
3. Apply types and other Nity features when they can help and don't interfere with the original API.

It differs from the previous convention of renaming all entities to the Nit style. It is not heavier in the module definition but should be easier for the users.

In practice, to convert OpenGL ES C code to Nit you would need to change the prefix `GL_` to `gl_`, and remove `;`.

In C:
~~~
glBindFramebuffer(GL_FRAMEBUFFER, my_fbo);
glBindRenderbuffer(GL_RENDERBUFFER, my_renderbuffer);
return glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE;
~~~

In Nit:
~~~
glBindFramebuffer(gl_FRAMEBUFFER, my_fbo)
glBindRenderbuffer(gl_RENDERBUFFER, my_renderbuffer)
return glCheckFramebufferStatus(gl_FRAMEBUFFER) == gl_FRAMEBUFFER_COMPLETE
~~~

What do you think of the new naming convention? I would convert the whole module to it.

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

9 years agocontrib/nitpg: make player list more easy to read
Alexandre Terrasa [Sat, 7 Feb 2015 00:47:46 +0000 (01:47 +0100)]
contrib/nitpg: make player list more easy to read

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

9 years agocontrib/nitrpg: introduce `link` service in some GameEntities
Alexandre Terrasa [Fri, 6 Feb 2015 22:48:41 +0000 (23:48 +0100)]
contrib/nitrpg: introduce `link` service in some GameEntities

This should lighten html strings

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

9 years agocontrib/nitrpg: display events in home and player page
Alexandre Terrasa [Sat, 7 Feb 2015 00:06:43 +0000 (01:06 +0100)]
contrib/nitrpg: display events in home and player page

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

9 years agocontrib/nitrpg: move logging to `listener`
Alexandre Terrasa [Fri, 6 Feb 2015 22:38:02 +0000 (23:38 +0100)]
contrib/nitrpg: move logging to `listener`

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

9 years agocontrib/nitrpg: PlayerReactor generate events
Alexandre Terrasa [Sat, 7 Feb 2015 00:05:01 +0000 (01:05 +0100)]
contrib/nitrpg: PlayerReactor generate events

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

9 years agocontrib/nitrg: fix link to puller in `PlayerReviewsPanel`
Alexandre Terrasa [Fri, 6 Feb 2015 22:15:02 +0000 (23:15 +0100)]
contrib/nitrg: fix link to puller in `PlayerReviewsPanel`

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

9 years agocontrib/nitrpg: introduce `GameEvent`
Alexandre Terrasa [Sat, 7 Feb 2015 00:04:04 +0000 (01:04 +0100)]
contrib/nitrpg: introduce `GameEvent`

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

9 years agocontrib/nitrpg: introduce Game::save_in
Alexandre Terrasa [Fri, 6 Feb 2015 22:49:43 +0000 (23:49 +0100)]
contrib/nitrpg: introduce Game::save_in

Also changes the Game::save documentation

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

9 years agocontrib/nitrpg: also reward player for merged commits.
Alexandre Terrasa [Wed, 11 Feb 2015 01:09:58 +0000 (02:09 +0100)]
contrib/nitrpg: also reward player for merged commits.

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

9 years agocontrib/nitrpg: introduce `link` service in some GameEntities
Alexandre Terrasa [Fri, 6 Feb 2015 22:48:41 +0000 (23:48 +0100)]
contrib/nitrpg: introduce `link` service in some GameEntities

This should lighten html strings

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

9 years agolib/standard: Updated documentation of Streams to fit new names.
Lucas Bajolet [Mon, 9 Feb 2015 16:51:58 +0000 (11:51 -0500)]
lib/standard: Updated documentation of Streams to fit new names.

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

9 years agolib/standard/stream: Renamed streams for more explicit denomination
Lucas Bajolet [Tue, 10 Feb 2015 18:18:41 +0000 (13:18 -0500)]
lib/standard/stream: Renamed streams for more explicit denomination

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

9 years agomodel: add MProperty::is_autoinit to identify method used as initializer
Jean Privat [Tue, 10 Feb 2015 05:04:32 +0000 (12:04 +0700)]
model: add MProperty::is_autoinit to identify method used as initializer

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

9 years agoMerge: Vim omnifunc diffentiate between types, class declaration and instanciation
Jean Privat [Tue, 10 Feb 2015 03:32:29 +0000 (10:32 +0700)]
Merge: Vim omnifunc diffentiate between types, class declaration and instanciation

The main improvement is the knowledge of constructors. They will be suggested along with their class after a `new`, ex: `new Arr`, it will autocomplete to `Array[E]`, `Array[E].with_items`, etc. It will also show their corresponding documentation.

Also detect the keywords `isa` and `as`.

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

9 years agoMerge: Link boost
Jean Privat [Tue, 10 Feb 2015 03:32:23 +0000 (10:32 +0700)]
Merge: Link boost

Follow up of #1093

This time some vft optimizations with the option `--substitute-monomorph` that replaces monomorphic trampolines with direct call.
Late-binding is implemented with *trampolines*, that are small functions that just select and jump the to right implementations.
If, at link-time, is it known that the target will always by the same implementation then all calls to the trampoline are replaced by direct calls to this single implementation.

Note that using trampolines as indirection slows down the executable.
However, it is expected that the gain of monomorphic direct-calls overcompensates the additional indirections in polymorphic trampoline-calls.

This PR first implements trampoline then build the substitute thing on it.

For times (nitc/nitc/nitc)

* default: 0m7.216s
* --link-boost: 0m7.024s (-2,7%)

Not that impressive in fact :( but anyway this PR is still required for the next round of link-time optimizations

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

9 years agofixup tramp
Jean Privat [Tue, 10 Feb 2015 03:25:53 +0000 (10:25 +0700)]
fixup tramp

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

9 years agobench_engines: add `bench_linkboost` to bench --link-boost optimizations
Jean Privat [Sat, 7 Feb 2015 15:53:22 +0000 (22:53 +0700)]
bench_engines: add `bench_linkboost` to bench --link-boost optimizations

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

9 years agosep_compiler: add alias option --link-boost
Jean Privat [Sun, 8 Feb 2015 03:07:08 +0000 (10:07 +0700)]
sep_compiler: add alias option --link-boost

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

9 years agosep_compiler: table_send take the original entity instead of the color
Jean Privat [Sun, 8 Feb 2015 02:56:11 +0000 (09:56 +0700)]
sep_compiler: table_send take the original entity instead of the color

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

9 years agosep_compiler: add option --substitute-monomorph to substitute monomorph trampoline...
Jean Privat [Sat, 7 Feb 2015 15:52:42 +0000 (22:52 +0700)]
sep_compiler: add option --substitute-monomorph to substitute monomorph trampoline calls at link-time

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

9 years agosep_compiler: optionally use a trampoline before the vft call
Jean Privat [Sat, 7 Feb 2015 15:45:28 +0000 (22:45 +0700)]
sep_compiler: optionally use a trampoline before the vft call

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

9 years agosep_compiler: SeparateRuntimeFunction save its arguments
Jean Privat [Mon, 9 Feb 2015 03:59:35 +0000 (10:59 +0700)]
sep_compiler: SeparateRuntimeFunction save its arguments

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

9 years agolib/glesv2: add glCheckFramebufferStatus
Alexis Laferrière [Sun, 8 Feb 2015 21:45:26 +0000 (16:45 -0500)]
lib/glesv2: add glCheckFramebufferStatus

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

9 years agolib/glesv2: add glHint
Alexis Laferrière [Sun, 8 Feb 2015 21:21:08 +0000 (16:21 -0500)]
lib/glesv2: add glHint

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