nit.git
9 years agoMerge: null as receiver
Jean Privat [Thu, 8 Jan 2015 02:49:57 +0000 (21:49 -0500)]
Merge: null as receiver

Accepts literal `null` as a receiver of `==`, `!=` and `is_same_instance`.

This could help to finish #1041

Does people need other methods of Object available for `null`?

Pull-Request: #1082
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoMerge: Less fixme and todo
Jean Privat [Thu, 8 Jan 2015 02:49:52 +0000 (21:49 -0500)]
Merge: Less fixme and todo

Looked at http://jenkins.gresil.org/jenkins/job/nit/tasks and did some work.

Pull-Request: #1077
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

9 years agoMerge: jwrapper: use the latest Java collections and other updates
Jean Privat [Wed, 7 Jan 2015 02:07:11 +0000 (21:07 -0500)]
Merge: jwrapper: use the latest Java collections and other updates

Simplify a lot the code, but will strike a single item from the TODO list #794.

@Freddrickk j'efface toute la logique de gestion des arrays car #1079 wrap les array Java. Est-ce que j'ai ai trop enlevé, ou oublié?

Pull-Request: #1083
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Frédéric Vachon <fredvac@gmail.com>

9 years agoMerge: No abort() on bad execvp
Jean Privat [Wed, 7 Jan 2015 02:06:59 +0000 (21:06 -0500)]
Merge: No abort() on bad execvp

When a bad command is passed to Process, the child-process will `C-abort()`, displaying frightening messages on the screen and causing confusion to the user.
Instead, just `_exit(127)` to terminate the child silently and let the parent do its things.

TODO better error management to not lose the error of the failed `execvp` system call.

Pull-Request: #1074
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: Tools works with groups
Jean Privat [Wed, 7 Jan 2015 02:05:51 +0000 (21:05 -0500)]
Merge: Tools works with groups

Make Nit tools more POLA when projects (or groups) are given on the command line.

eg. people using `nitunit ../lib/mylib` may expect that all the unit tests of the lib are executed, not just those from the default module `../lib/mylib/mylib.nit` (that often is basically an empty bottom module)

So this PR introduces `parse_full` in the loader that loads and returns all the modules of given groups, then adapt most tools to use `parse_full`.

No more crazy shell pipelines with `nitls` or `find` to use nitunit, nitpick and other on all the modules of your libs or programs.

Pull-Request: #1070
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agotests: yet another update of sav/test_new_native_alt1.res
Jean Privat [Sun, 4 Jan 2015 03:28:56 +0000 (22:28 -0500)]
tests: yet another update of sav/test_new_native_alt1.res

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

9 years agocomplier: `--direct-call-monomorph` works with constructors without initializers
Jean Privat [Sun, 4 Jan 2015 03:25:26 +0000 (22:25 -0500)]
complier: `--direct-call-monomorph` works with constructors without initializers

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

9 years agocompiler: fix the signature of `add_extern`
Jean Privat [Sat, 3 Jan 2015 21:48:37 +0000 (16:48 -0500)]
compiler: fix the signature of `add_extern`

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

9 years agoloader: having no `module` clause is not a warning
Jean Privat [Sat, 3 Jan 2015 21:37:41 +0000 (16:37 -0500)]
loader: having no `module` clause is not a warning

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

9 years agocontrib/jwrapper: update README and remove TODO list as it is now on github
Alexis Laferrière [Tue, 6 Jan 2015 00:17:02 +0000 (19:17 -0500)]
contrib/jwrapper: update README and remove TODO list as it is now on github

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

9 years agocontrib/jwrapper: do not add `redef type SELF...` to generated extern classes
Alexis Laferrière [Tue, 6 Jan 2015 00:04:00 +0000 (19:04 -0500)]
contrib/jwrapper: do not add `redef type SELF...` to generated extern classes

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

9 years agocontrib/jwrapper: search for more extern classes
Alexis Laferrière [Tue, 6 Jan 2015 00:02:39 +0000 (19:02 -0500)]
contrib/jwrapper: search for more extern classes

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

9 years agocontrib/jwrapper: default name of Java primitive arrays are Java?Array
Alexis Laferrière [Tue, 6 Jan 2015 00:19:06 +0000 (19:19 -0500)]
contrib/jwrapper: default name of Java primitive arrays are Java?Array

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

9 years agocontrib/jwrapper: remove hack to copy arrays
Alexis Laferrière [Mon, 5 Jan 2015 19:50:25 +0000 (14:50 -0500)]
contrib/jwrapper: remove hack to copy arrays

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

9 years agoMerge: Reject arrays of null
Jean Privat [Tue, 6 Jan 2015 02:02:23 +0000 (21:02 -0500)]
Merge: Reject arrays of null

The type `Array[null]` is not exprimable directly, and this is a good thing because it is and useless type and is broken in the compilers (except with `--erasure` for obvious reasons). However, it was still possible to create such a buggy type with literal arrays. eg `[null, null]`.

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

9 years agoMerge: Do compilation
Jean Privat [Tue, 6 Jan 2015 02:02:18 +0000 (21:02 -0500)]
Merge: Do compilation

refactorization: do in the Compiler classes what was in the ModelBuilder

Just add a method `AbstractCompiler::do_compiling` that contains what the various `ModelBuilder::run_*_compiler` where doing.
This simplifies `separate_erasure_compiler` since most the the code is just inherited.
The specific type handling code is moved into a separate method `compile_types`

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

9 years agoMerge: Lazy semantize
Jean Privat [Tue, 6 Jan 2015 02:02:04 +0000 (21:02 -0500)]
Merge: Lazy semantize

Prof of concept for lazy semantic analysis of the bodies of methods.
It means that the bodies of methods can be analysed only at the first request of the associated AST node.

It is disabled by default (see bellow) but can be enabled with --sloppy

It may improves the speed of some tools, especially the interpreter (and the VM).

For `nit hello_world.nit`.
before: 0m0.260s
after (lazy): 0m0.188s
explication: `standard` remains mostly unanalysed

For `nit nit.nit`
before: 0m1.824s
after: 0m1.060s
explication: `src/` and libs remain mostly unanalysed

For `nit nit.nit ../tests/base_simple3.nit`
before: 0m3.868s
after: 0m3.464s
explication: still some parts of `src/` and libs not analysed

However. there is some issues that remains

* `nitc` will crash with it because coloration is done before `super` are collected
* there is not always a gain, most tools need the full analysis of each method, thus doing the analysis in a lazy way can only degrade the performances.
* this could allow the interpreter to happily execute (or the compiler to compile) statically invalid programs. Eg. a bad identifier in a unused method will be undetected with the lazy approach.
* testing in `tests/` will be difficult because the error messages will change (see previous point)

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

9 years agotools: use `parse_full` in nitdoc, nitlight, nitmetrics, nitpick, nituml, and nitunit
Jean Privat [Sun, 28 Dec 2014 05:30:34 +0000 (00:30 -0500)]
tools: use `parse_full` in nitdoc, nitlight, nitmetrics, nitpick, nituml, and nitunit

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

9 years agoMerge: Support for Java arrays, Java libs on Android and Google Cardboard head tracking
Jean Privat [Mon, 5 Jan 2015 21:29:15 +0000 (16:29 -0500)]
Merge: Support for Java arrays, Java libs on Android and Google Cardboard head tracking

Use the same approach to copy the "libs" dir to the Android project than the "res" dir.

Extern Java types for primitive arrays is a bit tricky to convert to JNI format. For example, `Object[]` in Java is represented by `[Ljava.lang.Object;` in JNI format, and `int[]` is `[I`.

Add some primitive Java arrays, will add more as needed. Will also need to update jwrapper to use those.

The last commit hints at my next demo. It is mostly generated with jwrapper.

Pull-Request: #1079
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: Better & playable Chainz of Friendz on Android, and offer landscape & portrait...
Jean Privat [Mon, 5 Jan 2015 21:26:23 +0000 (16:26 -0500)]
Merge: Better & playable Chainz of Friendz on Android, and offer landscape & portrait configs

Based on #1075, so ignore the first 4 commits.

@privat You will like this one.

Credits for the artwork of Friends were missing. Sam Hocevar's name still appeared in each source file because he also created the licence used by Friendz.

Manage zooming in Friendz itselt (this service may be extracted later) and clean up all reference to Mnit automatic zoom.

Still TODO:
* Saving progress using the data_store.
* Deactivate fullscreen mode, but it causes issues with Mnit inputs.
* Somehow adapt the width of the background image or content to the device aspect ratio.

Pull-Request: #1076
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: More OpenGL ES 2.0 features
Jean Privat [Mon, 5 Jan 2015 21:24:18 +0000 (16:24 -0500)]
Merge: More OpenGL ES 2.0 features

Pull-Request: #1072
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoandroid: add the Google cardboard support module
Alexis Laferrière [Sun, 4 Jan 2015 08:00:14 +0000 (03:00 -0500)]
android: add the Google cardboard support module

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

9 years agoandroid: copy user libs folder to the android project
Alexis Laferrière [Fri, 26 Dec 2014 20:01:48 +0000 (15:01 -0500)]
android: copy user libs folder to the android project

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

9 years agolib/java: add some Java collections
Alexis Laferrière [Sun, 4 Jan 2015 07:19:06 +0000 (02:19 -0500)]
lib/java: add some Java collections

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

9 years agocontrib/friendz: do not show a cursor
Alexis Laferrière [Mon, 5 Jan 2015 18:17:16 +0000 (13:17 -0500)]
contrib/friendz: do not show a cursor

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

9 years agocontrib/friendz: use the correct next level on "continue"
Alexis Laferrière [Mon, 5 Jan 2015 18:17:01 +0000 (13:17 -0500)]
contrib/friendz: use the correct next level on "continue"

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

9 years agocontrib/friendz: use `app:data_store` to keep best scores
Alexis Laferrière [Mon, 5 Jan 2015 17:42:23 +0000 (12:42 -0500)]
contrib/friendz: use `app:data_store` to keep best scores

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

9 years agocontrib/friendz: gitignore and clean the res folder
Alexis Laferrière [Mon, 5 Jan 2015 16:31:04 +0000 (11:31 -0500)]
contrib/friendz: gitignore and clean the res folder

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

9 years agoMerge: no_warning: modules without a module clause do not cause `missing-doc`
Jean Privat [Mon, 5 Jan 2015 16:14:53 +0000 (11:14 -0500)]
Merge: no_warning: modules without a module clause do not cause `missing-doc`

Rationale: the presence of a `module` clause is a good heuristic to
discriminate quick and dirty prototypes from nice and clean modules

Pull-Request: #1078
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: Android: extract input_events and clean up
Jean Privat [Mon, 5 Jan 2015 16:14:51 +0000 (11:14 -0500)]
Merge: Android: extract input_events and clean up

Extract `input_events` from `android_app` so it is independant of the display part of Mnit. It now relies only on `mnit_input`, which will probably be kept around for Gamnit.

The extraction has been organized in three commits for easier review:
* Extract the code with minimal modifications.
* Update the style of the new module (this may be the first module that used the FFI, its style was outdated).
* Improve the doc and fix warnings in the new module.

Pull-Request: #1075
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: Less CC warnings
Jean Privat [Mon, 5 Jan 2015 16:14:43 +0000 (11:14 -0500)]
Merge: Less CC warnings

Fix two warnings in the C code.

Pull-Request: #1073
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agotests: add base_null.nit
Jean Privat [Mon, 5 Jan 2015 03:02:18 +0000 (22:02 -0500)]
tests: add base_null.nit

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

9 years agoseparate_compiler: `shortcut_equate` works on `is_same_instance`
Jean Privat [Mon, 5 Jan 2015 03:01:20 +0000 (22:01 -0500)]
separate_compiler: `shortcut_equate` works on `is_same_instance`

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

9 years agotyping&engines: accept `is_same_instance` on `null`
Jean Privat [Mon, 5 Jan 2015 03:00:27 +0000 (22:00 -0500)]
typing&engines: accept `is_same_instance` on `null`

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

9 years agorta: `live_targets` do not crash when the receiver is null
Jean Privat [Mon, 5 Jan 2015 02:55:06 +0000 (21:55 -0500)]
rta: `live_targets` do not crash when the receiver is null

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

9 years agocompiler: accept `null` as a *maybenull* receiver
Jean Privat [Mon, 5 Jan 2015 02:54:01 +0000 (21:54 -0500)]
compiler: accept `null` as a *maybenull* receiver

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

9 years agotyping: accept `null` as a receiver for some methods of Object
Jean Privat [Mon, 5 Jan 2015 02:52:00 +0000 (21:52 -0500)]
typing: accept `null` as a receiver for some methods of Object

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

9 years agotyping: remove useless error on null receiver. `get_method` already do it.
Jean Privat [Mon, 5 Jan 2015 02:22:26 +0000 (21:22 -0500)]
typing: remove useless error on null receiver. `get_method` already do it.

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

9 years agocompiler: create var in `shortcut_equate` only if needed
Jean Privat [Mon, 5 Jan 2015 02:18:19 +0000 (21:18 -0500)]
compiler: create var in `shortcut_equate` only if needed

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

9 years agotests: extends base_array to test `[null, null]`
Jean Privat [Sun, 4 Jan 2015 21:40:13 +0000 (16:40 -0500)]
tests: extends base_array to test `[null, null]`

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

9 years agotyping: reject literal arrays made of `null` (because they are untypable)
Jean Privat [Sun, 4 Jan 2015 21:39:28 +0000 (16:39 -0500)]
typing: reject literal arrays made of `null` (because they are untypable)

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

9 years agoJava FFI: support array in extern types
Alexis Laferrière [Sun, 4 Jan 2015 07:16:09 +0000 (02:16 -0500)]
Java FFI: support array in extern types

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

9 years agomnit: completely remove `mnit_zoom`
Alexis Laferrière [Sat, 3 Jan 2015 18:15:12 +0000 (13:15 -0500)]
mnit: completely remove `mnit_zoom`

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

9 years agocontrib/friendz: manage zoom at the application level
Alexis Laferrière [Sat, 3 Jan 2015 18:04:46 +0000 (13:04 -0500)]
contrib/friendz: manage zoom at the application level

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

9 years agomnit: update all clients of `mnit_android` with custom orientations
Alexis Laferrière [Sat, 3 Jan 2015 17:45:49 +0000 (12:45 -0500)]
mnit: update all clients of `mnit_android` with custom orientations

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

9 years agono_warning: modules without a module clause do not cause `missing-doc` warnings
Jean Privat [Sat, 3 Jan 2015 22:03:38 +0000 (17:03 -0500)]
no_warning: modules without a module clause do not cause `missing-doc` warnings

Rationale: the presence of a `module` clause is a good heuristic to
discriminate quick and dirty prototypes from nice and clean modules

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

9 years agoloader: make `mmodule2nmodule` private
Jean Privat [Sat, 3 Jan 2015 21:36:19 +0000 (16:36 -0500)]
loader: make `mmodule2nmodule` private

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

9 years agosrc: client of `mmodule2nmodule` now use `mmodule2node`
Jean Privat [Sat, 3 Jan 2015 21:35:32 +0000 (16:35 -0500)]
src: client of `mmodule2nmodule` now use `mmodule2node`

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

9 years agoloader: new method `ModelBuilder::mmodule2node` to protect the access to `mmodule2nmo...
Jean Privat [Sat, 3 Jan 2015 21:34:09 +0000 (16:34 -0500)]
loader: new method `ModelBuilder::mmodule2node` to protect the access to `mmodule2nmodule`

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

9 years agolib/array: remove unused&deprecated `Arrray::intern_items`
Jean Privat [Sat, 3 Jan 2015 21:33:05 +0000 (16:33 -0500)]
lib/array: remove unused&deprecated `Arrray::intern_items`

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

9 years agoandroid: extract landscape and portrait configs from `android_app`
Alexis Laferrière [Sat, 3 Jan 2015 17:44:41 +0000 (12:44 -0500)]
android: extract landscape and portrait configs from `android_app`

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

9 years agocontrib/friends: add icon for Android
Alexis Laferrière [Sat, 3 Jan 2015 16:49:55 +0000 (11:49 -0500)]
contrib/friends: add icon for Android

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

9 years agocontrib/friendz: give credit to Sam Hocevar for the artwork
Alexis Laferrière [Sat, 3 Jan 2015 16:49:34 +0000 (11:49 -0500)]
contrib/friendz: give credit to Sam Hocevar for the artwork

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

9 years agoandroid: add `AndroidPointerEvent::just_went_down` for `friendz`
Alexis Laferrière [Sat, 3 Jan 2015 16:49:07 +0000 (11:49 -0500)]
android: add `AndroidPointerEvent::just_went_down` for `friendz`

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

9 years agoandroid: add doc and fix warnings in `input_events`
Alexis Laferrière [Sat, 3 Jan 2015 01:04:54 +0000 (20:04 -0500)]
android: add doc and fix warnings in `input_events`

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

9 years agoandroid: update style of `input_events`
Alexis Laferrière [Tue, 30 Dec 2014 02:23:17 +0000 (21:23 -0500)]
android: update style of `input_events`

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

9 years agoandroid: extract Android input events from `mnit_android`
Alexis Laferrière [Fri, 19 Dec 2014 01:06:37 +0000 (20:06 -0500)]
android: extract Android input events from `mnit_android`

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

9 years agoversion 0.7 v0.7
Jean Privat [Sat, 3 Jan 2015 02:23:50 +0000 (21:23 -0500)]
version 0.7

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

9 years agotests: update sav/error_annot_c_compiler_alt6.res
Jean Privat [Fri, 2 Jan 2015 23:42:06 +0000 (18:42 -0500)]
tests: update sav/error_annot_c_compiler_alt6.res

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

9 years agolib/glesv2: update example
Alexis Laferrière [Fri, 2 Jan 2015 21:30:15 +0000 (16:30 -0500)]
lib/glesv2: update example

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

9 years agolib/glesv2: intro features related to glEnable and glDisable
Alexis Laferrière [Fri, 2 Jan 2015 20:55:47 +0000 (15:55 -0500)]
lib/glesv2: intro features related to glEnable and glDisable

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

9 years agolib/glesv2: intro `read_pixels`
Alexis Laferrière [Fri, 2 Jan 2015 20:52:41 +0000 (15:52 -0500)]
lib/glesv2: intro `read_pixels`

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

9 years agolib/glesv2: intro `blend_func` and `depth_func`
Alexis Laferrière [Fri, 2 Jan 2015 20:51:34 +0000 (15:51 -0500)]
lib/glesv2: intro `blend_func` and `depth_func`

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

9 years agotests: update test_exec.nit
Jean Privat [Fri, 2 Jan 2015 22:01:50 +0000 (17:01 -0500)]
tests: update test_exec.nit

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

9 years agolib/exec: if `execvp` fails, just `_exit` instead of `abort()`
Jean Privat [Fri, 2 Jan 2015 22:01:17 +0000 (17:01 -0500)]
lib/exec: if `execvp` fails, just `_exit` instead of `abort()`

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

9 years agolib/glesv2: intro depth_range, depth_mask, polygon_offset & line_width
Alexis Laferrière [Fri, 2 Jan 2015 20:50:40 +0000 (15:50 -0500)]
lib/glesv2: intro depth_range, depth_mask, polygon_offset & line_width

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

9 years agolib/glesv2: add some doc to `GLError`
Alexis Laferrière [Fri, 2 Jan 2015 20:49:07 +0000 (15:49 -0500)]
lib/glesv2: add some doc to `GLError`

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

9 years agolib/glesv2: intro some glTexParameter related features
Alexis Laferrière [Fri, 2 Jan 2015 21:26:11 +0000 (16:26 -0500)]
lib/glesv2: intro some glTexParameter related features

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

9 years agolib/glesv2: intro culling related features
Alexis Laferrière [Fri, 2 Jan 2015 20:41:29 +0000 (15:41 -0500)]
lib/glesv2: intro culling related features

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

9 years agolib/glesv2: use `GLES` to cleanly organize top level services
Alexis Laferrière [Fri, 2 Jan 2015 20:39:32 +0000 (15:39 -0500)]
lib/glesv2: use `GLES` to cleanly organize top level services

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

9 years agolib/glesv2: intro GLEnum and subclass GLError and GLFloatDataType
Alexis Laferrière [Fri, 2 Jan 2015 20:35:23 +0000 (15:35 -0500)]
lib/glesv2: intro GLEnum and subclass GLError and GLFloatDataType

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

9 years agolib/glesv2: simplify implementation of `GLShader::source=`
Alexis Laferrière [Fri, 2 Jan 2015 16:24:46 +0000 (11:24 -0500)]
lib/glesv2: simplify implementation of `GLShader::source=`

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

9 years agocompiler: erasure use `ctype_extern` to box stuff
Jean Privat [Fri, 2 Jan 2015 20:57:45 +0000 (15:57 -0500)]
compiler: erasure use `ctype_extern` to box stuff

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

9 years agogc_chooser: avoid `undeclared gc_register_finalizer` by correctly declaring it
Jean Privat [Fri, 2 Jan 2015 20:56:58 +0000 (15:56 -0500)]
gc_chooser: avoid `undeclared gc_register_finalizer` by correctly declaring it

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

9 years agoMerge: Minor Modifications to GTK3
Jean Privat [Mon, 29 Dec 2014 01:20:17 +0000 (20:20 -0500)]
Merge: Minor Modifications to GTK3

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

9 years agoMerge: Optimize `Array::add_all`
Jean Privat [Sun, 28 Dec 2014 14:48:16 +0000 (09:48 -0500)]
Merge: Optimize `Array::add_all`

Calls to `Array::add_all` were a noticable bottleneck in gammit, so I optimized it. The opimization is even more efficient when adding Arrays to Arrays, compared to adding Sequences to Arrays. It is general enough that it could be useful in the standard library (but I could also keep it in gammit if you prefer).

Speeds up the benchmark program by about 60%, with even better effects when adding larger arrays.

We could probably optimize this further at the NativeArray level but it looked more error prone.

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

9 years agoloader: add `parse_full` to load all their modules when groups are given.
Jean Privat [Sun, 28 Dec 2014 05:29:42 +0000 (00:29 -0500)]
loader: add `parse_full` to load all their modules when groups are given.

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

9 years agotests: update line number in sav file of `test_new_native_alt1`
Alexis Laferrière [Sat, 27 Dec 2014 23:04:04 +0000 (18:04 -0500)]
tests: update line number in sav file of `test_new_native_alt1`

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

9 years agolib/standard: optimize `Array::add_all`
Alexis Laferrière [Tue, 23 Dec 2014 03:35:51 +0000 (22:35 -0500)]
lib/standard: optimize `Array::add_all`

The number of instructions to run `bench_add_all` was at 42 mIr, and
after optimization at 17 mIr.

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

9 years agotests: intro a bench test for Array::add_all
Alexis Laferrière [Tue, 23 Dec 2014 03:33:22 +0000 (22:33 -0500)]
tests: intro a bench test for Array::add_all

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

9 years agolib/gtk: fix import from `GtkEntry::text`
Alexis Laferrière [Mon, 22 Dec 2014 06:58:22 +0000 (01:58 -0500)]
lib/gtk: fix import from `GtkEntry::text`

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

9 years agolib/gtk: add `GtkWidget::destroy|show|hide` and avoid conflicts
Alexis Laferrière [Sat, 27 Dec 2014 17:50:11 +0000 (12:50 -0500)]
lib/gtk: add `GtkWidget::destroy|show|hide` and avoid conflicts

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

9 years agolib/gtk: add `GtkBox` to containers hierarchy
Alexis Laferrière [Sun, 21 Dec 2014 15:45:52 +0000 (10:45 -0500)]
lib/gtk: add `GtkBox` to containers hierarchy

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

9 years agophase: make `phases_list` lazy because of run_phases_on_npropdef
Jean Privat [Sat, 27 Dec 2014 04:40:58 +0000 (23:40 -0500)]
phase: make `phases_list` lazy because of run_phases_on_npropdef

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

9 years agophase: new option --sloppy for lazy semantic analysis
Jean Privat [Sat, 27 Dec 2014 03:59:18 +0000 (22:59 -0500)]
phase: new option --sloppy for lazy semantic analysis

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

9 years agomodelize: `mpropdef2node` and `collect_attr_propdef` can process npropdef lazily
Jean Privat [Fri, 19 Dec 2014 17:07:12 +0000 (12:07 -0500)]
modelize: `mpropdef2node` and `collect_attr_propdef` can process npropdef lazily

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

9 years agophase: add `semantize_is_lazy` flag to enable the separate analysis of npropdefs
Jean Privat [Fri, 19 Dec 2014 16:43:45 +0000 (11:43 -0500)]
phase: add `semantize_is_lazy` flag to enable the separate analysis of npropdefs

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

9 years agocompiler: move compilation stuff from modelbuilder to the compiler
Jean Privat [Sat, 27 Dec 2014 03:43:00 +0000 (22:43 -0500)]
compiler: move compilation stuff from modelbuilder to the compiler

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

9 years agocompiler: do not crash on fallback ffi with `extern` without a string
Jean Privat [Sat, 27 Dec 2014 03:34:38 +0000 (22:34 -0500)]
compiler: do not crash on fallback ffi with `extern` without a string

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

9 years agoMerge: neo_doxygen: Enhance description handling
Jean Privat [Thu, 25 Dec 2014 02:42:46 +0000 (21:42 -0500)]
Merge: neo_doxygen: Enhance description handling

* Document the implicit nodes.
* Prepare `DocListener` for translation of the Doxygen’s markup. #1059 must be fixed before we do anything else.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

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

9 years agoMerge: lib/socket: fix, update style and intro features
Jean Privat [Wed, 24 Dec 2014 01:22:16 +0000 (20:22 -0500)]
Merge: lib/socket: fix, update style and intro features

This is a pretty big update to the `socket` module. It appeared to be broken. Did someone test it since the last modifications to streams and read_line?

* Update and cleanup the style in the first 3 or 4 commits.
* Fix (some of) what was broken.
* Revamp the API with a distinction between listening sockets and stream sockets (making it closer to Ruby and C#). This is the most important commit "lib/socket: distinguish `TCPServer` from `TCPStream`".
* Intro additionnal features used by Mineit: non-blocking `TCPServer` sockets and `TCPStream::flush`.

Still to do:
* Add `Error` support to the API.
* Rename `socket_c` to `native_socket`.
* Fix `SocketObserver` and underlying C implementation.

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

9 years agolib/socket: update socket clients
Alexis Laferrière [Mon, 22 Dec 2014 16:27:38 +0000 (11:27 -0500)]
lib/socket: update socket clients

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

9 years agolib/socket: add an easier server example
Alexis Laferrière [Mon, 22 Dec 2014 04:40:04 +0000 (23:40 -0500)]
lib/socket: add an easier server example

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

9 years agolib/socket: update examples to the latest API
Alexis Laferrière [Mon, 22 Dec 2014 03:38:18 +0000 (22:38 -0500)]
lib/socket: update examples to the latest API

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

9 years agolib/socket: minimal update to `SocketObserver` API and note some problems
Alexis Laferrière [Mon, 22 Dec 2014 03:37:50 +0000 (22:37 -0500)]
lib/socket: minimal update to `SocketObserver` API and note some problems

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

9 years agolib/socket: intro `flush` and `blocking=`
Alexis Laferrière [Mon, 22 Dec 2014 02:42:32 +0000 (21:42 -0500)]
lib/socket: intro `flush` and `blocking=`

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

9 years agolib/socket: distinguish `TCPServer` from `TCPStream`
Alexis Laferrière [Mon, 22 Dec 2014 02:42:10 +0000 (21:42 -0500)]
lib/socket: distinguish `TCPServer` from `TCPStream`

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

9 years agoMerge: neo_doxygen: location does not need noe4j
Jean Privat [Tue, 23 Dec 2014 02:39:46 +0000 (21:39 -0500)]
Merge: neo_doxygen: location does not need noe4j

Found this while investigating #936 with @xymus

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

9 years agoMerge: More no warning
Jean Privat [Tue, 23 Dec 2014 02:39:40 +0000 (21:39 -0500)]
Merge: More no warning

* process no_wargning before analysing classes
* test_suites are automatically no_warning("missing-doc")
* add no_warning in generated files

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

9 years agolib/socket: intro `NativeSocket::non_blocking` and `tcp_nodelay`
Alexis Laferrière [Mon, 22 Dec 2014 02:38:14 +0000 (21:38 -0500)]
lib/socket: intro `NativeSocket::non_blocking` and `tcp_nodelay`

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