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

next commit will introduce AHexIntExpr

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

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

`extern class` + dotted extern call notations.

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

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

So simplify the grammar.

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

10 years agoparser: allow top-level methods between class definitions
Jean Privat [Tue, 15 Apr 2014 13:28:41 +0000 (09:28 -0400)]
parser: allow top-level methods between class definitions

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

10 years agoparser: parentheses in `.as` are optional
Jean Privat [Tue, 15 Apr 2014 13:26:56 +0000 (09:26 -0400)]
parser: parentheses in `.as` are optional

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

10 years agoparser: add 'public' keyword
Jean Privat [Tue, 15 Apr 2014 13:26:01 +0000 (09:26 -0400)]
parser: add 'public' keyword

to reserve it :)

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

10 years agotests: remove usage of old-style getters and setters
Jean Privat [Tue, 15 Apr 2014 13:22:19 +0000 (09:22 -0400)]
tests: remove usage of old-style getters and setters

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

10 years agolib: remove usage of old-style getters and setters
Jean Privat [Tue, 15 Apr 2014 12:59:55 +0000 (08:59 -0400)]
lib: remove usage of old-style getters and setters

old-style attributes are still available but getters and setters are manual.
This encourage the use of new-style attributes.

Support for old style attributes will be removed eventually.

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

10 years agosyntax: remove last usages of `=` in one liner function
Jean Privat [Tue, 15 Apr 2014 12:57:22 +0000 (08:57 -0400)]
syntax: remove last usages of `=` in one liner function

This optional syntax is largely unused and no so KISS.
I will drop it in a future grammar.

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

10 years agoffi: update code with last syntax
Jean Privat [Tue, 15 Apr 2014 12:52:43 +0000 (08:52 -0400)]
ffi: update code with last syntax

use `extern class` and dotted notation for extern call and casts.

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

10 years agoMerge: Qualified import
Jean Privat [Thu, 10 Apr 2014 20:41:57 +0000 (16:41 -0400)]
Merge: Qualified import

Enable `import foo::bar`

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

10 years agoMerge: Clean generated parser
Jean Privat [Thu, 10 Apr 2014 15:13:50 +0000 (11:13 -0400)]
Merge: Clean generated parser

This series reduce the size of the generated parser.

* First, factorize generated clones (the first commit)
* Second, reduce inlining in the grammar (the other commits)

This was a tidy process because each slight modification in the grammar yields to numerous conflicts often
difficult to understand. But the results worth the pain:

Time of `nitg nitg.nit`
before: 0m10.784s
after: 0m7.956s
gain: 26%

Number of subclasses of `ReduceAction`
before: 780
after: 376
gain: 52%

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

10 years agonitg-g: use nitstack by default
Jean Privat [Thu, 10 Apr 2014 12:37:35 +0000 (08:37 -0400)]
nitg-g: use nitstack by default

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

10 years agoMerge: Gperf fix
Jean Privat [Thu, 10 Apr 2014 12:36:33 +0000 (08:36 -0400)]
Merge: Gperf fix

Since gperf was slow, better replace it with a slow to call solution at
runtime but fast to generate, it's not like we'll be generating
stacktraces often in the life cycle of a program.

Surprisingly enough, even on nitg, the stacktrace does not take long
to generate, which is a good thing.

For comparison :

~~~
$ time nitg nitg.nit --stacktrace libunwind
user 0m19.720s

$ time nitg nitg.nit --stacktrace nitstack
user 0m19.820s
~~~

Pull-Request: #387
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge: Fix nitdbg_websocket_server
Jean Privat [Thu, 10 Apr 2014 12:32:30 +0000 (08:32 -0400)]
Merge: Fix nitdbg_websocket_server

Regression tests did not catch that `nitdbg_websocket_server` was broken.
Fix that

Pull-Request: #390

10 years agonitunit: updade usage of get_mmodule_by_name
Jean Privat [Wed, 9 Apr 2014 21:56:34 +0000 (17:56 -0400)]
nitunit: updade usage of get_mmodule_by_name

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

10 years agotest: test qualified importations
Jean Privat [Wed, 9 Apr 2014 20:36:42 +0000 (16:36 -0400)]
test: test qualified importations

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

10 years agomodelbuilder: use qualified name in imports to import things
Jean Privat [Wed, 9 Apr 2014 20:35:54 +0000 (16:35 -0400)]
modelbuilder: use qualified name in imports to import things

    import foo::bar

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

10 years agomodelbuilder: split `search_mmodule_by_name` from `get_mmodule_by_name`
Jean Privat [Wed, 9 Apr 2014 20:35:10 +0000 (16:35 -0400)]
modelbuilder: split `search_mmodule_by_name` from `get_mmodule_by_name`

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

10 years agomodelbuilder: search_module_in_paths return ModulePath
Jean Privat [Wed, 9 Apr 2014 20:34:17 +0000 (16:34 -0400)]
modelbuilder: search_module_in_paths return ModulePath

Instead of a simple String

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

10 years agotests: add sav/nitdbg_websocket_server.res
Jean Privat [Wed, 9 Apr 2014 20:10:57 +0000 (16:10 -0400)]
tests: add sav/nitdbg_websocket_server.res

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

10 years agonitdbg_websocket_server: fix write
Jean Privat [Wed, 9 Apr 2014 20:10:30 +0000 (16:10 -0400)]
nitdbg_websocket_server: fix write

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

10 years agomodelbuilder: get_mmodule_by_name get a mgroup as context
Jean Privat [Wed, 9 Apr 2014 19:01:15 +0000 (15:01 -0400)]
modelbuilder: get_mmodule_by_name get a mgroup as context

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

10 years agoMerge: lib/socket: Bugfix
Jean Privat [Wed, 9 Apr 2014 18:08:07 +0000 (14:08 -0400)]
Merge: lib/socket: Bugfix

Bug introduced in pull request #377, in the read function of FFSocket, a free is called on a static variable, which provokes a warning and probably bugs at runtime.

Pull-Request: #389

10 years agonitg: Removed references to gperf in documentation and code
Lucas Bajolet [Wed, 9 Apr 2014 17:50:11 +0000 (13:50 -0400)]
nitg: Removed references to gperf in documentation and code

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

10 years agonitg: Overridden gperf since it was slow to generate.
Lucas Bajolet [Wed, 9 Apr 2014 15:50:32 +0000 (11:50 -0400)]
nitg: Overridden gperf since it was slow to generate.

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

10 years agoMerge: Streamable and Pattern update
Jean Privat [Wed, 9 Apr 2014 15:50:22 +0000 (11:50 -0400)]
Merge: Streamable and Pattern update

Upgrade on Streamable and Pattern, they will now work with any kind of Text instead of just String.

Pull-Request: #373
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/socket: Bugfix, tried to free a static variable, this provoked a warning when...
Lucas Bajolet [Tue, 8 Apr 2014 19:33:10 +0000 (15:33 -0400)]
lib/socket: Bugfix, tried to free a static variable, this provoked a warning when compiling.

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

10 years agoparser: regenerate with changes in the grammar and file generation
Jean Privat [Wed, 9 Apr 2014 14:47:54 +0000 (10:47 -0400)]
parser: regenerate with changes in the grammar and file generation

Before:

~~~~
$ time nitg nitg.nit
user 0m10.784s
$ wc parser/parser.nit
29702  93153 922785
$ grep 'super ReduceAction' parser/parser.nit -c
780
~~~~

After:

~~~~
$ time nitg nitg.nit
user 0m7.956s
$ wc parser/parser.nit
10660  32841 319408
$ grep 'super ReduceAction' parser/parser.nit -c
376
~~~~

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

10 years agoparser: new nullable production `typing_o`
Jean Privat [Wed, 9 Apr 2014 15:03:19 +0000 (11:03 -0400)]
parser: new nullable production `typing_o`

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

10 years agoparser: new production `qclassid` to factorize `qualified? classid`
Jean Privat [Wed, 9 Apr 2014 15:02:48 +0000 (11:02 -0400)]
parser: new production `qclassid` to factorize `qualified? classid`

See previous commit for details.

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

10 years agoparser: new production `qid` to factorize `qualified? id`
Jean Privat [Wed, 9 Apr 2014 15:01:42 +0000 (11:01 -0400)]
parser: new production `qid` to factorize `qualified? id`

`qid` is still transformed into an simple `id` (thus the qualified is lost).
Latter the qualification should be preserved in the AST.

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

10 years agoparser: accepts `kwredef` in front of importation clauses
Jean Privat [Wed, 9 Apr 2014 14:59:42 +0000 (10:59 -0400)]
parser: accepts `kwredef` in front of importation clauses

OK, this is crazy.
The point is to avoid the inlining of the production `redef`.
Because `redef` is used a lot, the gain worth the crazyness.

TODO: catch the usage of `redef` and crash after parsing.

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

10 years agoparser: remove useless production `writable2`
Jean Privat [Wed, 9 Apr 2014 14:56:29 +0000 (10:56 -0400)]
parser: remove useless production `writable2`

just accepts visibility in all versions

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

10 years agoparser: new nullable production `qualified_o`
Jean Privat [Wed, 9 Apr 2014 14:54:44 +0000 (10:54 -0400)]
parser: new nullable production `qualified_o`

Somme `qualified?` remain (yet) because of conflicts, see next commits.

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

10 years agoparser: new nullable production `extern_code_block_o`
Jean Privat [Wed, 9 Apr 2014 14:52:06 +0000 (10:52 -0400)]
parser: new nullable production `extern_code_block_o`

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

10 years agoparser: new nullable production `annotations_o`
Jean Privat [Wed, 9 Apr 2014 14:51:48 +0000 (10:51 -0400)]
parser: new nullable production `annotations_o`

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

10 years agoparser: production `annotation_withend` is nullable
Jean Privat [Wed, 9 Apr 2014 14:39:23 +0000 (10:39 -0400)]
parser: production `annotation_withend` is nullable

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

10 years agoparser: production `params` is nullable
Jean Privat [Wed, 9 Apr 2014 14:38:04 +0000 (10:38 -0400)]
parser: production `params` is nullable

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

10 years agoparser: production `extern_calls` is nullable
Jean Privat [Wed, 9 Apr 2014 14:37:07 +0000 (10:37 -0400)]
parser: production `extern_calls` is nullable

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

10 years agoparser: new nullable production `string_o` to factorize `string?`
Jean Privat [Wed, 9 Apr 2014 14:33:05 +0000 (10:33 -0400)]
parser: new nullable production `string_o` to factorize `string?`

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

10 years agoparser: new nullable production `kwend_o` to factorize `kwend?`
Jean Privat [Wed, 9 Apr 2014 14:32:15 +0000 (10:32 -0400)]
parser: new nullable production `kwend_o` to factorize `kwend?`

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

10 years agoparser: production `formaldefs` is nullable
Jean Privat [Wed, 9 Apr 2014 14:31:14 +0000 (10:31 -0400)]
parser: production `formaldefs` is nullable

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

10 years agoparser: production `implicit_main_class` is nullable
Jean Privat [Wed, 9 Apr 2014 14:30:52 +0000 (10:30 -0400)]
parser: production `implicit_main_class` is nullable

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

10 years agoparser: clean and factorize services in parser_prod
Jean Privat [Wed, 9 Apr 2014 15:05:02 +0000 (11:05 -0400)]
parser: clean and factorize services in parser_prod

Mainly, generalize cloned services in the class ANodes
Also rationalize the generated nit code.

The diff seems big because some reindentation

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

10 years agostdlib/streams: Streamable now working on any Text type instead of just String.
Lucas Bajolet [Mon, 7 Apr 2014 16:09:30 +0000 (12:09 -0400)]
stdlib/streams: Streamable now working on any Text type instead of just String.

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

10 years agostdlib/pattern: Rendered Pattern compatible with all Text representations instead...
Lucas Bajolet [Tue, 8 Apr 2014 21:21:09 +0000 (17:21 -0400)]
stdlib/pattern: Rendered Pattern compatible with all Text representations instead of just String.

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

10 years agoMerge: nitg: use libunwind instead of gperf by default for stacktraces
Jean Privat [Tue, 8 Apr 2014 18:37:22 +0000 (14:37 -0400)]
Merge: nitg: use libunwind instead of gperf by default for stacktraces

f54e52e activate gperf by default, but gperf is in fact quite slow.
It was unnoticed since time regressions are
tracked by valgrind (and gperf was unmonitored because run in a subprocess).

However, the effect was noticeable:

~~~
$ time nitg nitg.nit --stacktrace gperf
user 1m13.377s

$ time nitg nitg.nit --stacktrace libunwind
user 0m14.189s
~~~

Pull-Request: #386

10 years agonitg: use libunwind instead of gperf by default for stacktraces
Jean Privat [Tue, 8 Apr 2014 18:12:58 +0000 (14:12 -0400)]
nitg: use libunwind instead of gperf by default for stacktraces

f54e52e activate gperf by default, but gperf is in fact quite slow.
It was unnoticed since time regressions are
tracked by valgrind (and gperf was unmonitored because run in a subprocess).

However, the effect was noticeable:

~~~
$ time nitg nitg.nit --stacktrace gperf
user 1m13.377s

$ time nitg nitg.nit --stacktrace libunwind
user 0m14.189s
~~~

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

10 years agotests: update base_gen_reassign for nitg-e
Jean Privat [Tue, 8 Apr 2014 15:52:08 +0000 (11:52 -0400)]
tests: update base_gen_reassign for nitg-e

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

10 years agoMerge: Numeric, a super-class to Int and Float
Jean Privat [Fri, 4 Apr 2014 19:22:56 +0000 (15:22 -0400)]
Merge: Numeric, a super-class to Int and Float

Will be used by my implementation of the Bentley-Ottmann algorithm,
allowing to be used on either Int or Float. Could also be used to
revamp the API of mnit::Display and to implement QuadTree.

Pull-Request: #344
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Julien Pagès <julien.m.pages@gmail.com

10 years agoMerge: nitg: activate nit-stacktrace by default
Jean Privat [Mon, 7 Apr 2014 20:42:24 +0000 (16:42 -0400)]
Merge: nitg: activate nit-stacktrace by default

The C stack-trace only is unreadable for most users.

The dependence on gperf is fine since it is packaged if Debian.
the option `--stacktrace` can be used to override the default behavior.

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

10 years agoMerge: Websockets
Jean Privat [Mon, 7 Apr 2014 18:56:51 +0000 (14:56 -0400)]
Merge: Websockets

Added support for Websockets in lib, fixed a few issues with Sockets.
Also added a Websocket compatible version of the debugger.

Closes #206
Closes #204
Pull-Request: #377
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agointerpreter: Fix, removed a useless condition in call.
Lucas Bajolet [Fri, 4 Apr 2014 15:13:58 +0000 (11:13 -0400)]
interpreter: Fix, removed a useless condition in call.

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

10 years agolib/socket: Added more documentation on Socket class, also fixed a visibility issue...
Lucas Bajolet [Mon, 7 Apr 2014 15:32:52 +0000 (11:32 -0400)]
lib/socket: Added more documentation on Socket class, also fixed a visibility issue on a constructor

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

10 years agodebugger: Added Websocket compatible implementation of the debugger.
Lucas Bajolet [Wed, 2 Apr 2014 21:08:14 +0000 (17:08 -0400)]
debugger: Added Websocket compatible implementation of the debugger.

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

10 years agolib/websocket: Added sample code for a Websocket server
Lucas Bajolet [Fri, 4 Apr 2014 18:27:57 +0000 (14:27 -0400)]
lib/websocket: Added sample code for a Websocket server

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

10 years agolib/websockets: Added basic support for Websockets
Lucas Bajolet [Fri, 4 Apr 2014 18:23:08 +0000 (14:23 -0400)]
lib/websockets: Added basic support for Websockets

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

10 years agolib/standard: Added errno and strerror bindings to stdlib.
Lucas Bajolet [Mon, 7 Apr 2014 17:56:57 +0000 (13:56 -0400)]
lib/standard: Added errno and strerror bindings to stdlib.

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

10 years agolib/sockets: Improved and fixed bugs in implementation of read in a Socket.
Lucas Bajolet [Mon, 7 Apr 2014 17:55:57 +0000 (13:55 -0400)]
lib/sockets: Improved and fixed bugs in implementation of read in a Socket.

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

10 years agoMerge: Extract sdl, mnit_display and mnit_input from mnit
Jean Privat [Mon, 7 Apr 2014 17:37:47 +0000 (13:37 -0400)]
Merge: Extract sdl, mnit_display and mnit_input from mnit

This is the beginning of the division of mnitt into a portable application framework (paninit) and the game framework (gammit). For now, allows to write an SDL application without all of the portable part of mnit.

Also solves problems as noted in #236.

#193 will be fixed after the numerics are merged.

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

10 years agolib/socket: Added sockopts to socket lib
Lucas Bajolet [Mon, 7 Apr 2014 15:23:11 +0000 (11:23 -0400)]
lib/socket: Added sockopts to socket lib

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

10 years agolib/socket: Changed error handling with sockets
Lucas Bajolet [Mon, 7 Apr 2014 15:04:09 +0000 (11:04 -0400)]
lib/socket: Changed error handling with sockets

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

10 years agoMerge: Contrib: Github search tool to find JNI using projects
Jean Privat [Mon, 7 Apr 2014 12:39:54 +0000 (08:39 -0400)]
Merge: Contrib: Github search tool to find JNI using projects

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

10 years agotests: fix fixme/sav of base_gen_reassign for nitg-e (after merge)
Alexis Laferrière [Fri, 4 Apr 2014 21:06:39 +0000 (17:06 -0400)]
tests: fix fixme/sav of base_gen_reassign for nitg-e (after merge)

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

10 years agoMerge branch 'privat' into numbers
Alexis Laferrière [Fri, 4 Apr 2014 21:04:59 +0000 (17:04 -0400)]
Merge branch 'privat' into numbers

10 years agoMerge: lib/string: some cleaning, doc and unit tests
Jean Privat [Fri, 4 Apr 2014 20:26:42 +0000 (16:26 -0400)]
Merge: lib/string: some cleaning, doc and unit tests

An important point is the generalization of services from
StringCharView to Sequences, and the privatization of StringCharView.

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

10 years agolib: clean up .args
Alexis Laferrière [Fri, 4 Apr 2014 20:07:08 +0000 (16:07 -0400)]
lib: clean up .args

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

10 years agoballz: do not use --no-stacktrace in Makefile
Jean Privat [Fri, 4 Apr 2014 20:05:54 +0000 (16:05 -0400)]
ballz: do not use --no-stacktrace in Makefile

The option is renamed but is useless anyway since plateform takes care of
these things nowadays.

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

10 years agonitg: merge `-no-stacktrace` and `-nit-stacktrace` into a single `--stacktrace`
Jean Privat [Fri, 4 Apr 2014 20:04:12 +0000 (16:04 -0400)]
nitg: merge `-no-stacktrace` and `-nit-stacktrace` into a single `--stacktrace`

And make `gperf` the default (expect for nitg-g)

The C stack-trace only is unreadable for most users.

The dependence on gperf is fine since it is packaged if Debian.
The option `--stacktrace libunwind` disables it.
The option `--stacktrace none` disables the whole stacktrace.

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

10 years agosrc/comp: force at least on entry in the trace-hashmap.
Jean Privat [Wed, 26 Mar 2014 00:08:41 +0000 (20:08 -0400)]
src/comp: force at least on entry in the trace-hashmap.

If there is no entry, `gperf` produce an error and the make fail.

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

10 years agotests: adds sav for sdl, mnit_display, mnit_inputs
Alexis Laferrière [Fri, 4 Apr 2014 19:23:11 +0000 (15:23 -0400)]
tests: adds sav for sdl, mnit_display, mnit_inputs

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

10 years agolib/sdl & opengles1: fix pkgconfig usage
Alexis Laferrière [Fri, 4 Apr 2014 17:41:09 +0000 (13:41 -0400)]
lib/sdl & opengles1: fix pkgconfig usage

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

10 years agolib/sdl: move sdl out of mnit_linux
Alexis Laferrière [Fri, 4 Apr 2014 17:40:50 +0000 (13:40 -0400)]
lib/sdl: move sdl out of mnit_linux

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

10 years agolib: move mnit::display|input out of mnit
Alexis Laferrière [Fri, 4 Apr 2014 19:12:42 +0000 (15:12 -0400)]
lib: move mnit::display|input out of mnit

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

10 years agolib/sdl: fix implementation of SDLImage::is_ok
Alexis Laferrière [Fri, 4 Apr 2014 16:59:25 +0000 (12:59 -0400)]
lib/sdl: fix implementation of SDLImage::is_ok

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

10 years agolib/sdl: do not specify extern types in sub classes
Alexis Laferrière [Fri, 4 Apr 2014 16:58:47 +0000 (12:58 -0400)]
lib/sdl: do not specify extern types in sub classes

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

10 years agolib/sdl: remove unused SDLImage::partial
Alexis Laferrière [Fri, 4 Apr 2014 16:55:50 +0000 (12:55 -0400)]
lib/sdl: remove unused SDLImage::partial

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

10 years agolib/sdl: remove empty SDLRectangle::destroy (we have free)
Alexis Laferrière [Fri, 4 Apr 2014 16:51:31 +0000 (12:51 -0400)]
lib/sdl: remove empty SDLRectangle::destroy (we have free)

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

10 years agolib/sdl: fix coding style
Alexis Laferrière [Fri, 4 Apr 2014 16:46:33 +0000 (12:46 -0400)]
lib/sdl: fix coding style

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

10 years agomodel: fix all extern classes are sub classes of Pointer
Alexis Laferrière [Fri, 4 Apr 2014 17:31:10 +0000 (13:31 -0400)]
model: fix all extern classes are sub classes of Pointer

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

10 years agotests: fix fixme/sav of nitg-g and nitg-e for base_gen_reassign
Alexis Laferrière [Fri, 4 Apr 2014 19:15:58 +0000 (15:15 -0400)]
tests: fix fixme/sav of nitg-g and nitg-e for base_gen_reassign

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

10 years agolib/string: privatize `StringCharView` and cie.
Jean Privat [Fri, 4 Apr 2014 15:38:08 +0000 (11:38 -0400)]
lib/string: privatize `StringCharView` and cie.

Since there is no additional services in `StringCharView`, then exposing
the classes just add unneeded complexity.

`Text::chars` and cie. could just returns abtract Seuquence types.

Also remove the less useful virtual type `SELFVIEW`.

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

10 years agolibs/collection: implements `reverse_iterator` in Array and List
Jean Privat [Fri, 4 Apr 2014 15:30:19 +0000 (11:30 -0400)]
libs/collection: implements `reverse_iterator` in Array and List

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

10 years agolib/collection: generalize `reverse?_iterator_from?` to SequenceRead
Jean Privat [Fri, 4 Apr 2014 15:29:41 +0000 (11:29 -0400)]
lib/collection: generalize `reverse?_iterator_from?` to SequenceRead

Those services could be useful in all Sequence, not only in StringCharView

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

10 years agolib/string: remove `StringCharView:has` and `StringCharView#==`
Jean Privat [Fri, 4 Apr 2014 15:03:45 +0000 (11:03 -0400)]
lib/string: remove `StringCharView:has` and `StringCharView#==`

These redefinitions are equivalent with the default implementation.
So, let the default implementation in place.

If profiling shows that the default implementation are inefficient, then
really faster redefinitions (without iterators for instance) could be
provided latter.

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

10 years agolib/strings: remove redefinition `FlatString#[]`
Jean Privat [Fri, 4 Apr 2014 14:32:22 +0000 (10:32 -0400)]
lib/strings: remove redefinition `FlatString#[]`

Since `[]` is deprecated in strings (in favor of `.chars[]`), there
is no point of a fast implementation in FlatString.

Note that, `FlatStringCharView#[]` is already the fast path
(and is made faster by factorizing a field access)

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

10 years agolib/string: fast implem for reverse
Jean Privat [Fri, 4 Apr 2014 13:44:53 +0000 (09:44 -0400)]
lib/string: fast implem for reverse

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

10 years agolib/string: teach clients to use non deprecated services.
Jean Privat [Fri, 4 Apr 2014 13:36:30 +0000 (09:36 -0400)]
lib/string: teach clients to use non deprecated services.

Mostly, this mean using `chars`.

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

10 years agolib/string: StringCharView is no more comparable
Jean Privat [Fri, 4 Apr 2014 12:57:12 +0000 (08:57 -0400)]
lib/string: StringCharView is no more comparable

Comparing text has only a clear meaning on a text, not on a sequence of
char.

Basically, I think that StringCharView should be private because

* it simplifies the API ; and one wants to aim a simple API for the Text class
* there should be no real services that a StringCharView can do but a
  Sequence[Char] cannot; thus no real gain to type things with the former

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

10 years agolib/string: some cleaning, doc and unit tests
Jean Privat [Fri, 4 Apr 2014 02:02:02 +0000 (22:02 -0400)]
lib/string: some cleaning, doc and unit tests

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

10 years agoMerge: contrib-pep8analysis
Jean Privat [Fri, 4 Apr 2014 15:14:26 +0000 (11:14 -0400)]
Merge: contrib-pep8analysis

Importation and update of the pep8project

Pull-Request: #250

10 years agotests: skip tests that fail because of #375
Jean Privat [Fri, 4 Apr 2014 13:57:47 +0000 (09:57 -0400)]
tests: skip tests that fail because of #375

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

10 years agoMerge: Some FFI cleanup
Jean Privat [Fri, 4 Apr 2014 13:51:31 +0000 (09:51 -0400)]
Merge: Some FFI cleanup

These commits try to clean and isolate the FFI API from the
compilation engines.

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

10 years agoMerge: Config related services in EGL
Jean Privat [Fri, 4 Apr 2014 12:40:00 +0000 (08:40 -0400)]
Merge: Config related services in EGL

Allows to know what you get in the available display configurations.

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

10 years agoMerge: Nitgs optims
Jean Privat [Thu, 3 Apr 2014 20:06:32 +0000 (16:06 -0400)]
Merge: Nitgs optims

Some optimizations on the nitg-s side (low level).

Some use the new call-graph mechanism.

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

10 years agoffi: remove old Cproproc symbol NONITCNI
Jean Privat [Thu, 3 Apr 2014 19:57:11 +0000 (15:57 -0400)]
ffi: remove old Cproproc symbol NONITCNI

was used to disable the old nitni of the old compiler

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

10 years agoffi: merge `finalize_ffi` and `finalize_nitni`
Jean Privat [Thu, 3 Apr 2014 19:14:06 +0000 (15:14 -0400)]
ffi: merge `finalize_ffi` and `finalize_nitni`

Also, the creation of the visitor in done on the ffi side.

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

10 years agolib/egl: add EGLConfigAttribs.buffer|blue|green|red|depth|stencil_size
Alexis Laferrière [Thu, 3 Apr 2014 16:56:19 +0000 (12:56 -0400)]
lib/egl: add EGLConfigAttribs.buffer|blue|green|red|depth|stencil_size

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

10 years agolib/egl: add EGLConfigAttribs::conformant and related services
Alexis Laferrière [Thu, 3 Apr 2014 16:39:02 +0000 (12:39 -0400)]
lib/egl: add EGLConfigAttribs::conformant and related services

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