nit.git
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>

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

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

9 years agomisc/vim: update README with latest features
Alexis Laferrière [Sun, 8 Feb 2015 18:06:43 +0000 (13:06 -0500)]
misc/vim: update README with latest features

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

9 years agomisc/vim: use shorter … char
Alexis Laferrière [Sat, 7 Feb 2015 16:54:54 +0000 (11:54 -0500)]
misc/vim: use shorter … char

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

9 years agomisc/vim: use separately class types, constructors and class declarations
Alexis Laferrière [Sat, 7 Feb 2015 13:22:31 +0000 (08:22 -0500)]
misc/vim: use separately class types, constructors and class declarations

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

9 years agonitpick autocomplete: differenciate between class types, constructors and class decla...
Alexis Laferrière [Sat, 7 Feb 2015 13:20:54 +0000 (08:20 -0500)]
nitpick autocomplete: differenciate between class types, constructors and class declarations

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

9 years agonitpick autocomplete: do not list properties beginning with @ or _
Alexis Laferrière [Sat, 7 Feb 2015 13:19:49 +0000 (08:19 -0500)]
nitpick autocomplete: do not list properties beginning with @ or _

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

9 years agoMerge: nitrpg: more statistics
Jean Privat [Sat, 7 Feb 2015 16:03:37 +0000 (23:03 +0700)]
Merge: nitrpg: more statistics

Some changes on the stats API and new stats for Players.

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

9 years agosep_compiler: add RuntimeFunction::c_fun_ptr
Jean Privat [Sat, 7 Feb 2015 15:44:16 +0000 (22:44 +0700)]
sep_compiler: add RuntimeFunction::c_fun_ptr

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

9 years agoMerge: Detect covariance
Jean Privat [Sat, 7 Feb 2015 13:46:15 +0000 (20:46 +0700)]
Merge: Detect covariance

After a slow cleanup time, publication of the tool to detect and categorize the static usage of covariance in Nit programs.

@jpages yeah!

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

9 years agoMerge: Regen c_src without libunwind
Jean Privat [Sat, 7 Feb 2015 13:43:54 +0000 (20:43 +0700)]
Merge: Regen c_src without libunwind

The last `c_src` is 3 month old, it seems to be usual to have 3 to 4 months between updates.

This update also did not depends on libunwind: so no stacktrace but can compile on rasperry pi. so fix #1149
Note that the following steps of the initial make will still implicitly include libunwind, so on raspberry, either do the next steps manually with `--stacktrace none` or edit `src/Makefile` to add `--stacktrace none` to both `NITCOPT` and `OLDNITCOPT` (at the begin of the file)

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

9 years agoMerge: Vim omnifunc for Nit
Jean Privat [Sat, 7 Feb 2015 13:43:24 +0000 (20:43 +0700)]
Merge: Vim omnifunc for Nit

Alternative autocompletion for Nit. This one is triggered by a call to
the omnitfunc, usually `ctrl-x ctrl-o`. It will show context
appropriated modules, classes and properties. It shows all properties,
but it does not use static types to show the methods available on the
specific receiver. It also displays some doc!

It uses `nitpick` to generate metadata files analyzed by the Vim plugin.
So in combination with `syntastic`, each time you save, and the program
is valid, it updates the metadata files.

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

9 years agotests: update sav/test_test_phase_args1.res
Jean Privat [Fri, 6 Feb 2015 09:16:30 +0000 (16:16 +0700)]
tests: update sav/test_test_phase_args1.res

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

9 years agotests: update sav/nitmetrics_args*.res
Jean Privat [Fri, 6 Feb 2015 05:51:07 +0000 (12:51 +0700)]
tests: update sav/nitmetrics_args*.res

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

9 years agometrics: rename title of detect_variance_constraints
Jean Privat [Fri, 6 Feb 2015 16:13:21 +0000 (23:13 +0700)]
metrics: rename title of detect_variance_constraints

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

9 years agometrics: add --detect-covariance
Jean Privat [Fri, 6 Feb 2015 01:09:22 +0000 (08:09 +0700)]
metrics: add --detect-covariance

Signed-off-by: Jean Privat <jean@pryen.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: remove magic numbers from reactors.
Alexandre Terrasa [Fri, 6 Feb 2015 16:39:04 +0000 (17:39 +0100)]
contrib/nitrpg: remove magic numbers from reactors.

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

9 years agocontrib/nitrpg: clean stats display in panels
Alexandre Terrasa [Thu, 5 Feb 2015 00:50:51 +0000 (01:50 +0100)]
contrib/nitrpg: clean stats display in panels

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: also reward player for merged commits.
Alexandre Terrasa [Fri, 6 Feb 2015 17:26:07 +0000 (18:26 +0100)]
contrib/nitrpg: also reward player for merged commits.

9 years agocontrib/nitrpg: do stats on players
Alexandre Terrasa [Fri, 6 Feb 2015 22:29:48 +0000 (23:29 +0100)]
contrib/nitrpg: do stats on players

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

9 years agocontrib/nitrpg: do not save Game for all received events
Alexandre Terrasa [Fri, 6 Feb 2015 22:29:35 +0000 (23:29 +0100)]
contrib/nitrpg: do not save Game for all received events

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

9 years agocontrib/nitrpg: do stats on merged commits
Alexandre Terrasa [Fri, 6 Feb 2015 22:24:51 +0000 (23:24 +0100)]
contrib/nitrpg: do stats on merged commits

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

9 years agocontrib/nitrpg: move statistics to GameEntity
Alexandre Terrasa [Thu, 5 Feb 2015 00:46:59 +0000 (01:46 +0100)]
contrib/nitrpg: move statistics to GameEntity

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

9 years agocontrib/nitrpg: extends GameStats API with Counter
Alexandre Terrasa [Fri, 6 Feb 2015 22:23:58 +0000 (23:23 +0100)]
contrib/nitrpg: extends GameStats API with Counter

Also makes it redef `game` like other GameEntity.

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

9 years agomisc: update README on info for the Nit omnifunc
Alexis Laferrière [Thu, 5 Feb 2015 21:20:17 +0000 (16:20 -0500)]
misc: update README on info for the Nit omnifunc

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

9 years agomisc/vim: use the metadata files for a better autocompletion
Alexis Laferrière [Wed, 4 Feb 2015 17:01:57 +0000 (12:01 -0500)]
misc/vim: use the metadata files for a better autocompletion

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

9 years agonitpick: generate metadata files for the Vim plugin
Alexis Laferrière [Wed, 4 Feb 2015 17:01:24 +0000 (12:01 -0500)]
nitpick: generate metadata files for the Vim plugin

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

9 years agotest_test_phase: count projects, classdefs and methods
Jean Privat [Thu, 5 Feb 2015 14:38:02 +0000 (21:38 +0700)]
test_test_phase: count projects, classdefs and methods

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

9 years agomodelbuilder: add `check_subtype` and `check_sametype`
Jean Privat [Thu, 5 Feb 2015 14:29:26 +0000 (21:29 +0700)]
modelbuilder: add `check_subtype` and `check_sametype`

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

9 years agomisc/vim: always use the standard library for autocompletion
Alexis Laferrière [Wed, 4 Feb 2015 11:03:06 +0000 (06:03 -0500)]
misc/vim: always use the standard library for autocompletion

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

9 years agoc_src: regenerate
Jean Privat [Fri, 6 Feb 2015 11:50:27 +0000 (18:50 +0700)]
c_src: regenerate

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

9 years agomkcsrc: temporally disable stacktrace (libunwind) for c_src
Jean Privat [Fri, 6 Feb 2015 11:49:34 +0000 (18:49 +0700)]
mkcsrc: temporally disable stacktrace (libunwind) for c_src

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

9 years agoMerge: Generalize instance creation service so FFI can use it
Jean Privat [Fri, 6 Feb 2015 01:14:55 +0000 (08:14 +0700)]
Merge: Generalize instance creation service so FFI can use it

Move up instance creation from ANew to AbstractCompilerVisitor so they can be used from the FFI implementation. Allows to call extern constructors of extern classes from extern code, and fix #1145.

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

9 years agoMerge: GitHub merge: some improvements
Jean Privat [Fri, 6 Feb 2015 01:14:49 +0000 (08:14 +0700)]
Merge: GitHub merge: some improvements

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

9 years agoMerge: Makefile: initial make use --semi-global
Jean Privat [Fri, 6 Feb 2015 01:14:36 +0000 (08:14 +0700)]
Merge: Makefile: initial make use --semi-global

The produced tools in bin/ should be faster to use then.

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

9 years agoMerge: Global for filenames
Jean Privat [Fri, 6 Feb 2015 01:14:25 +0000 (08:14 +0700)]
Merge: Global for filenames

This PR remove the remaining big variability for nitc when generating separate files: the path of nit module in runtime error messages.
When compiling a same module but from different current working directories, the relative path of the module changed. Thus causing unnecessary difference in the generated C source code that made ccache unhappy.

Before
~~~
$ ccache -C
$ time nitc src/nitc.nit
user 2m8.264s
$ cd src
$ time nitc nitc.nit
user 2m8.676s
~~~

After
~~~
$ ccache -C
$ time nitc src/nitc.nit
user 2m9.180s
$ cd src
$ time nitc nitc.nit
user 0m9.812s
~~~

Note: some files are still different after the PR

* main.c because it contains the real filepath
* c_function_hash.c same
* _ffi.? because the pragma lines indicate the original relative file

Note 2: `.nit_compile` directories are still created by default in the current directory and let unclean. cf #792

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

9 years agoMerge: String memory fixes
Jean Privat [Fri, 6 Feb 2015 01:14:19 +0000 (08:14 +0700)]
Merge: String memory fixes

Another step towards the closure of #1106 and #69, this PR removes several calls to `malloc` in `lib/standard` C code and replaces them by some of the solutions proposed in #1106 to handle the allocation of Strings.

@xymus: Your review is more than welcome since we're dealing with extern code, it might be a good time to specify and document how to properly allocate extern data structures to avoid leaking code such as the ones we had.

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

9 years agoMerge: nitdoc: introduces phases
Jean Privat [Fri, 6 Feb 2015 01:14:13 +0000 (08:14 +0700)]
Merge: nitdoc: introduces phases

This serie of commit introduces the concept of DocPhase.

The first commit introduces new concepts that are used by the other commits to move code.

For each phase, related code is extracted from `doc_pages` to the corresponding `doc_phases`.
No code is actually deleted from `doc_pages` between steps. The complete module is deleted at the end.

Refactoring is kept at a minimal level in this PR (just enough to get compatibility between old `doc_model` and new `doc_phases`).
Some hacks are used to preserve a minimum of differences in the generated HTML.

Further commits will continue the cleaning / refactoring but also change the outputed HTML, so I prefer wait for a new PR.
Demo (wait for Jenkins): http://gresil.org/jenkins/job/CI-nitdoc/

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

9 years agotests: test calling extern constructors from extern code
Alexis Laferrière [Thu, 5 Feb 2015 15:11:54 +0000 (10:11 -0500)]
tests: test calling extern constructors from extern code

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

9 years agonitc: fix calling extern constructors from extern code in separate compiler
Alexis Laferrière [Thu, 5 Feb 2015 14:59:55 +0000 (09:59 -0500)]
nitc: fix calling extern constructors from extern code in separate compiler

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

9 years agoniti: Fixed method NativeString::copy_to in intern_call
Lucas Bajolet [Thu, 5 Feb 2015 15:53:02 +0000 (10:53 -0500)]
niti: Fixed method NativeString::copy_to in intern_call

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

9 years agolib/standard/time: Fixed String-related memory leak
Lucas Bajolet [Tue, 3 Feb 2015 21:47:39 +0000 (16:47 -0500)]
lib/standard/time: Fixed String-related memory leak

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

9 years agolib/standard/string: Removed Float.to_precision_native
Lucas Bajolet [Tue, 3 Feb 2015 20:53:01 +0000 (15:53 -0500)]
lib/standard/string: Removed Float.to_precision_native

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

9 years agolib/standard/string: Fixed leaking Int.to_s method
Lucas Bajolet [Mon, 2 Feb 2015 18:16:44 +0000 (13:16 -0500)]
lib/standard/string: Fixed leaking Int.to_s method

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

9 years agomodelize: move resolve_mtype to modelbuilder_base.nit
Jean Privat [Thu, 5 Feb 2015 14:25:46 +0000 (21:25 +0700)]
modelize: move resolve_mtype to modelbuilder_base.nit

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

9 years agogithub_merge: show cover letter after successful merge.
Jean Privat [Thu, 5 Feb 2015 07:03:25 +0000 (14:03 +0700)]
github_merge: show cover letter after successful merge.

If the merge fails, the cover letter will be shown during the commit,
so no need to show it before.

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

9 years agogithub_merge: do not crash if the mergeable status is unknown
Jean Privat [Thu, 5 Feb 2015 06:59:35 +0000 (13:59 +0700)]
github_merge: do not crash if the mergeable status is unknown

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

9 years agogithub_merge: always to a merge commit (--no-ff)
Jean Privat [Thu, 5 Feb 2015 06:57:56 +0000 (13:57 +0700)]
github_merge: always to a merge commit (--no-ff)

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

9 years agoMerge: loader: get_mgroup look in path
Jean Privat [Thu, 5 Feb 2015 06:47:14 +0000 (13:47 +0700)]
Merge: loader: get_mgroup look in path

Was asked by @xymus in #1134 to be able to do `nitls -M standard`

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

9 years agoMerge: contrib: Introduce nitrpg
Jean Privat [Thu, 5 Feb 2015 06:46:56 +0000 (13:46 +0700)]
Merge: contrib: Introduce nitrpg

We have been talking about this a long ago. I made some demos, merged the full Github API stack...

Tonight is the nigth!

In this first PR we introduce some game basics and just enough to show how the game is supposed to work.
You can run it as this but the game only rewards new pull requests and +1 comments.
Further PR will introduce more capabilities like Github history reload, achievements, experience...

The game is separated into two tools:

* `listener` is the Github hook that capture all the github events on a repo.
* `web` is a Nitcorn client that display the game as a HTML website.

Four first commits are from #1141, please disregard.

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

9 years agoMakefile: initial make use --semi-global
Jean Privat [Thu, 5 Feb 2015 02:40:06 +0000 (09:40 +0700)]
Makefile: initial make use --semi-global

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

9 years agonitdoc: remove unused module `doc_pages`
Alexandre Terrasa [Wed, 4 Feb 2015 20:17:00 +0000 (21:17 +0100)]
nitdoc: remove unused module `doc_pages`

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

9 years agonitdoc: adapt `doc_model` to avoid diff with new phases
Alexandre Terrasa [Wed, 4 Feb 2015 20:18:35 +0000 (21:18 +0100)]
nitdoc: adapt `doc_model` to avoid diff with new phases

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

9 years agonitdoc: introduce IndexingPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:16:22 +0000 (21:16 +0100)]
nitdoc: introduce IndexingPhase

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

9 years agonitdoc: introduce RenderHTMLPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:15:51 +0000 (21:15 +0100)]
nitdoc: introduce RenderHTMLPhase

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

9 years agonitdoc: introduce IntroRedefListPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:13:06 +0000 (21:13 +0100)]
nitdoc: introduce IntroRedefListPhase

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

9 years agonitdoc: introduce InheritanceListsPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:09:27 +0000 (21:09 +0100)]
nitdoc: introduce InheritanceListsPhase

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

9 years agonitdoc: introduce GraphsPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:08:09 +0000 (21:08 +0100)]
nitdoc: introduce GraphsPhase

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

9 years agonitdoc: introduce POSetPhase
Alexandre Terrasa [Wed, 4 Feb 2015 20:06:25 +0000 (21:06 +0100)]
nitdoc: introduce POSetPhase

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