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

10 years agolib/egl: add EGLConfigAttribs::caveat and related services
Alexis Laferrière [Thu, 3 Apr 2014 15:23:02 +0000 (11:23 -0400)]
lib/egl: add EGLConfigAttribs::caveat and related services

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

10 years agotests: migrate tests using Char::+|- and Int::succ|prec
Alexis Laferrière [Thu, 3 Apr 2014 12:54:38 +0000 (08:54 -0400)]
tests: migrate tests using Char::+|- and Int::succ|prec

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

10 years agolib/egl: fix type cast and warnings
Alexis Laferrière [Thu, 3 Apr 2014 15:21:44 +0000 (11:21 -0400)]
lib/egl: fix type cast and warnings

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

10 years agoballz: rename to `ballz_android` so tests can check it
Jean Privat [Thu, 3 Apr 2014 13:01:38 +0000 (09:01 -0400)]
ballz: rename to `ballz_android` so tests can check it

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

10 years agoMerge: Improvements to Moles
Jean Privat [Thu, 3 Apr 2014 12:51:59 +0000 (08:51 -0400)]
Merge: Improvements to Moles

* Make it playable and somewhat fun.
* Adds traps (after a while Groundhogs are looking for vengeance!)
* Use cuter images!
* Adapt the scale according to screen size on Android. The core module `moles` still use the image resolution as reference.

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

10 years agolib: intro Number::zero and Number::is_zero
Alexis Laferrière [Sat, 15 Mar 2014 23:00:47 +0000 (19:00 -0400)]
lib: intro Number::zero and Number::is_zero

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

10 years agolib: move up to_f and to_i in Number
Alexis Laferrière [Sat, 15 Mar 2014 23:00:24 +0000 (19:00 -0400)]
lib: move up to_f and to_i in Number

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

10 years agonitg & niti: remove intern methods succ, prec and Char::+|-
Alexis Laferrière [Thu, 3 Apr 2014 01:28:07 +0000 (21:28 -0400)]
nitg & niti: remove intern methods succ, prec and Char::+|-

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

10 years agolib: intro the Numeric class
Alexis Laferrière [Sat, 15 Mar 2014 23:09:41 +0000 (19:09 -0400)]
lib: intro the Numeric class

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

10 years agoc_src: update with new intern methods
Alexis Laferrière [Thu, 3 Apr 2014 01:39:37 +0000 (21:39 -0400)]
c_src: update with new intern methods

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

10 years agonitg & niti: add intern methods `successor` and `predecessor`
Alexis Laferrière [Thu, 3 Apr 2014 01:22:57 +0000 (21:22 -0400)]
nitg & niti: add intern methods `successor` and `predecessor`

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

10 years agotests: add github_search_for_jni to testfull.sh
Alexis Laferrière [Thu, 3 Apr 2014 00:28:03 +0000 (20:28 -0400)]
tests: add github_search_for_jni to testfull.sh

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

10 years agocontrib: intro of a script to find projects using the JNI on github
Alexis Laferrière [Wed, 2 Apr 2014 21:21:13 +0000 (17:21 -0400)]
contrib: intro of a script to find projects using the JNI on github

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

10 years agolib/curl: add support for setting the user agent
Alexis Laferrière [Wed, 2 Apr 2014 20:50:35 +0000 (16:50 -0400)]
lib/curl: add support for setting the user agent

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

10 years agolib/curl: prevent C warnings on callbacks
Alexis Laferrière [Wed, 19 Mar 2014 15:34:08 +0000 (11:34 -0400)]
lib/curl: prevent C warnings on callbacks

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

10 years agojson grammar: fix support for empty strings
Alexis Laferrière [Wed, 2 Apr 2014 20:49:02 +0000 (16:49 -0400)]
json grammar: fix support for empty strings

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

10 years agolib/simple_json_reader: display better error messages on malformed input
Alexis Laferrière [Wed, 2 Apr 2014 20:48:28 +0000 (16:48 -0400)]
lib/simple_json_reader: display better error messages on malformed input

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

10 years agoffi: move a lot of code and services from AModule to MModule
Jean Privat [Wed, 2 Apr 2014 18:35:33 +0000 (14:35 -0400)]
ffi: move a lot of code and services from AModule to MModule

AModule is not the right class to do or store model related things.
Migrating these services simplify the code.

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

10 years agocompiler_ffi: remove `uses_legacy_ni` since it is unused now
Jean Privat [Wed, 2 Apr 2014 14:50:59 +0000 (10:50 -0400)]
compiler_ffi: remove `uses_legacy_ni` since it is unused now

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

10 years agotests: remove some forgotten old nitni files
Jean Privat [Wed, 2 Apr 2014 14:15:19 +0000 (10:15 -0400)]
tests: remove some forgotten old nitni files

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

10 years agoabstract_compiler: add `AModule::collect_linker_libs` to be refined in compiler_ffi
Jean Privat [Wed, 2 Apr 2014 14:10:17 +0000 (10:10 -0400)]
abstract_compiler: add `AModule::collect_linker_libs` to be refined in compiler_ffi

This separate `abstract_compiler` from `common_ffi` since the last link
`c_linker_options` is now removed.

One other great separation of concern!

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

10 years agonitg: move `import compiler_ffi` to nitg
Jean Privat [Wed, 2 Apr 2014 13:52:25 +0000 (09:52 -0400)]
nitg: move `import compiler_ffi` to nitg

separate and global do not depends on ffi things (since `cname_blind` is
no more used in these modules).
Thus only the main module require `compiler_ffi` to provide ffi.

This is some great separation of concerns!

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

10 years agonitg: use ctype instead of cname_blind in autobox
Jean Privat [Wed, 2 Apr 2014 13:51:24 +0000 (09:51 -0400)]
nitg: use ctype instead of cname_blind in autobox

I am not sure of why `cname_blind` was used originally.
If the point is just to allow unsafe pointer substitution, then `ctype`
should be enough.

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

10 years agoabstract_compiler: provide empty implementation for `finalize_{ffi,nitni}`
Jean Privat [Wed, 2 Apr 2014 13:44:24 +0000 (09:44 -0400)]
abstract_compiler: provide empty implementation for `finalize_{ffi,nitni}`

Thus, the toolchain can call them without having to check if ffi
is enabled or the module compliant.

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

10 years agoabstract_compiler: compile extern bodies without special cases.
Jean Privat [Wed, 2 Apr 2014 13:35:32 +0000 (09:35 -0400)]
abstract_compiler: compile extern bodies without special cases.

Because ExternCFile implements now the right methods, there is no need
of additional `isa` tests.

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

10 years agosrc: implements abstract methods of ExternCFile
Jean Privat [Wed, 2 Apr 2014 13:33:18 +0000 (09:33 -0400)]
src: implements abstract methods of ExternCFile

`makefile_rule_name` and `makefile_rule_content` are let undefined
because unused.
The next commit will use them.

Also, document them.

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

10 years agomove ExternFile to c_tools
Jean Privat [Wed, 2 Apr 2014 00:06:57 +0000 (20:06 -0400)]
move ExternFile to c_tools

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

10 years agosrc: remove separate_options.nit
Jean Privat [Wed, 2 Apr 2014 13:14:27 +0000 (09:14 -0400)]
src: remove separate_options.nit

Was an ersatz from the old nitd

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

10 years agomoles: lower difficulty
Alexis Laferrière [Wed, 2 Apr 2014 13:03:38 +0000 (09:03 -0400)]
moles: lower difficulty

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

10 years agomoles: add rules to Makefile; android-install and pngs
Alexis Laferrière [Tue, 1 Apr 2014 23:23:14 +0000 (19:23 -0400)]
moles: add rules to Makefile; android-install and pngs

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

10 years agomoles: add traps!
Alexis Laferrière [Tue, 1 Apr 2014 23:21:12 +0000 (19:21 -0400)]
moles: add traps!

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

10 years agomoles: add signs
Alexis Laferrière [Tue, 1 Apr 2014 22:34:33 +0000 (18:34 -0400)]
moles: add signs

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

10 years agomoles: add details to holes
Alexis Laferrière [Tue, 1 Apr 2014 21:28:05 +0000 (17:28 -0400)]
moles: add details to holes

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

10 years agomoles: use a darker background color
Alexis Laferrière [Tue, 1 Apr 2014 21:27:12 +0000 (17:27 -0400)]
moles: use a darker background color

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

10 years agomoles: improve spacing of holes
Alexis Laferrière [Tue, 1 Apr 2014 21:26:47 +0000 (17:26 -0400)]
moles: improve spacing of holes

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

10 years agomoles: set scale according to screen resolution on Android
Alexis Laferrière [Tue, 1 Apr 2014 20:36:13 +0000 (16:36 -0400)]
moles: set scale according to screen resolution on Android

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

10 years agomoles: enable setting scale by platform
Alexis Laferrière [Tue, 1 Apr 2014 20:35:55 +0000 (16:35 -0400)]
moles: enable setting scale by platform

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

10 years agomoles: make number of rows and columns customizable by platform
Alexis Laferrière [Tue, 1 Apr 2014 17:31:27 +0000 (13:31 -0400)]
moles: make number of rows and columns customizable by platform

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

10 years agomoles: fix order of columns and rows
Alexis Laferrière [Tue, 1 Apr 2014 17:30:33 +0000 (13:30 -0400)]
moles: fix order of columns and rows

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

10 years agomoles: cuter images
Alexis Laferrière [Tue, 1 Apr 2014 16:55:19 +0000 (12:55 -0400)]
moles: cuter images

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

10 years agomoles: empty or hit moles do not intercept taps
Alexis Laferrière [Tue, 1 Apr 2014 16:54:21 +0000 (12:54 -0400)]
moles: empty or hit moles do not intercept taps

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

10 years agomoles: improve display scaling
Alexis Laferrière [Tue, 1 Apr 2014 16:52:59 +0000 (12:52 -0400)]
moles: improve display scaling

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

10 years agomoles: improve the documentation
Alexis Laferrière [Tue, 1 Apr 2014 15:22:59 +0000 (11:22 -0400)]
moles: improve the documentation

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

10 years agomoles: improve coding style of mnit_moles
Alexis Laferrière [Tue, 1 Apr 2014 15:19:52 +0000 (11:19 -0400)]
moles: improve coding style of mnit_moles

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

10 years agomnit/numbers: fix use image scale
Alexis Laferrière [Tue, 1 Apr 2014 22:34:12 +0000 (18:34 -0400)]
mnit/numbers: fix use image scale

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

10 years agoMerge: Android Sensors + mnit_ballz
Jean Privat [Tue, 1 Apr 2014 19:03:11 +0000 (15:03 -0400)]
Merge: Android Sensors + mnit_ballz

Adding support for the basics android sensors:
accelerometer, magnetic field, gyroscope, light and proximity

and add mnit_ballz, an app testing theses sensors

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

10 years agonitgs: opt_direct_call_monomorph call `before_send` to deal with special cases
Jean Privat [Fri, 28 Mar 2014 13:03:59 +0000 (09:03 -0400)]
nitgs: opt_direct_call_monomorph call `before_send` to deal with special cases

Thus null receiver and other special case are correctly handled in the
optimized path.

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