nit.git
10 years agorta: add_monomorphic_send mark the mproperty as live
Jean Privat [Mon, 7 Apr 2014 14:49:05 +0000 (10:49 -0400)]
rta: add_monomorphic_send mark the mproperty as live

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

10 years agorta: guard `add_send` with a specific set, instead of overusing `live_methods`.
Jean Privat [Tue, 22 Apr 2014 13:29:02 +0000 (09:29 -0400)]
rta: guard `add_send` with a specific set, instead of overusing `live_methods`.

Eg. a monomorph method could be live, without being subject to try_send.

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

10 years agotransform: do not detach things while itering
Jean Privat [Wed, 26 Mar 2014 07:48:19 +0000 (03:48 -0400)]
transform: do not detach things while itering

This invalidates the underlying iterator.

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

10 years agosrc: cleanup useless importation
Jean Privat [Mon, 7 Apr 2014 14:39:46 +0000 (10:39 -0400)]
src: cleanup useless importation

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

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/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 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 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>

10 years agonitgs: extract `before_send` from `table_send`
Jean Privat [Fri, 28 Mar 2014 13:02:20 +0000 (09:02 -0400)]
nitgs: extract `before_send` from `table_send`

This isolate all the locally specific behaviors in a helper function

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

10 years agonitgs: add option --invocation-metrics to count things dynamically
Jean Privat [Fri, 28 Mar 2014 01:14:13 +0000 (21:14 -0400)]
nitgs: add option --invocation-metrics to count things dynamically

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

10 years agobenchs: add --inline-some-methods and --direct-call-monomorph to bench_nitg-s_options...
Jean Privat [Thu, 27 Mar 2014 20:34:41 +0000 (16:34 -0400)]
benchs: add --inline-some-methods and --direct-call-monomorph to bench_nitg-s_options-faster

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

10 years agobenchs: add --no-gcc-directive to bench_nitg-s_options-slower
Jean Privat [Thu, 27 Mar 2014 20:36:06 +0000 (16:36 -0400)]
benchs: add --no-gcc-directive to bench_nitg-s_options-slower

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

10 years agobenchs: protect mangle groups of options in `bench_nitg*_options`
Jean Privat [Thu, 27 Mar 2014 18:37:45 +0000 (14:37 -0400)]
benchs: protect mangle groups of options in `bench_nitg*_options`

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

10 years agonitgs: add --direct-call-monomorph and --inline-some-methods
Jean Privat [Thu, 27 Mar 2014 20:33:56 +0000 (16:33 -0400)]
nitgs: add --direct-call-monomorph and --inline-some-methods

These code-generation-level global optimizations allow the separate
compiler to:

* first, use a direct call, instead of a VFT call when RTA gives inform
  that a callsite is monomorph (and that the receiver is a nonnull
  non parametric type)
* second, to inline static call when the mmethoddef is tagged accordingly
  (we reuse the `can_inline` service of the global compiler)

**DISCLAMER**
The point of these optimizations is to evaluate some extreme optimizations,
thus to bound the gain of much less aggressive optimizations.
Real direct call and inlining optimizations SHOULD be applied on the AST
or (some intermediate code level) to be combinable with other optimizations.

Some numbers for `nitg --separate nitg.nit`:

# base (no option)
total number of invocations: 45833
invocations by VFT send:     34556 (75.39%)
invocations by direct call:  9955 (21.72%)
invocations by inlinning:    1322 (2.88%)
user time 0m10.2s

# with --direct-call-monomorph
total number of invocations: 45833
invocations by VFT send:     9259 (20.20%)
invocations by direct call:  35199 (76.79%)
invocations by inlinning:    1375 (3.00%)
user 0m10.1s

# with --direct-call-monomorph and --inline-some-methods
total number of invocations: 46657
invocations by VFT send:     9701 (20.79%)
invocations by direct call:  26239 (56.23%)
invocations by inlinning:    10717 (22.96%)
user 0m10.0s

Discussion about the number:
Something is fishy, while there is a high reduction of VFT or direct calls,
there is no real gain in CPU time. Points to investigate:

* the optimized invocations are not in the hot path
  TODO gather dynamic numbers
* my CPU is very efficient when dealing with direct call and indirect calls
  TODO test on pratchett
* some issues with the measurements or with the measurer
  TODO go to sleep

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

10 years agonitg-s: use is_intern instead of crazy AST stuff
Jean Privat [Thu, 27 Mar 2014 19:34:24 +0000 (15:34 -0400)]
nitg-s: use is_intern instead of crazy AST stuff

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

10 years agomodel: add `MMethodDef::is_intern`
Jean Privat [Wed, 19 Mar 2014 13:39:20 +0000 (09:39 -0400)]
model: add `MMethodDef::is_intern`

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

10 years agonitg-s: collect static statistics about the invocation mechanism used
Jean Privat [Thu, 27 Mar 2014 19:29:04 +0000 (15:29 -0400)]
nitg-s: collect static statistics about the invocation mechanism used

They are displayed on `-v -v`.

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

10 years agoversion 0.6.4 v0.6.5
Jean Privat [Tue, 1 Apr 2014 12:44:45 +0000 (08:44 -0400)]
version 0.6.4

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

10 years agoexamples: Adding mnit_ballz, a game using android_sensor API
Romain Chanoir [Tue, 25 Mar 2014 17:32:59 +0000 (13:32 -0400)]
examples: Adding mnit_ballz, a game using android_sensor API

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

10 years agomnit_android: changes android_app to support android_sensor
Romain Chanoir [Tue, 25 Mar 2014 17:31:41 +0000 (13:31 -0400)]
mnit_android: changes android_app to support android_sensor

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

10 years agomigration: update pep8analyis to latest Nit spec
Alexis Laferrière [Mon, 31 Mar 2014 19:36:25 +0000 (15:36 -0400)]
migration: update pep8analyis to latest Nit spec

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

10 years agocontrib/pep8analysis: minor clean up
Alexis Laferrière [Mon, 31 Mar 2014 19:35:50 +0000 (15:35 -0400)]
contrib/pep8analysis: minor clean up

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

10 years agolib: make Iterators iterable
Alexis Laferrière [Mon, 31 Mar 2014 19:35:17 +0000 (15:35 -0400)]
lib: make Iterators iterable

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

10 years agoMerge branch 'privat' into contrib-pep8analysis
Alexis Laferrière [Mon, 31 Mar 2014 19:27:33 +0000 (15:27 -0400)]
Merge branch 'privat' into contrib-pep8analysis

10 years agoMerge: Incremental Improvements to Dino
Jean Privat [Mon, 31 Mar 2014 18:25:39 +0000 (14:25 -0400)]
Merge: Incremental Improvements to Dino

Many minor changes...

* Fixes the infamous exploit of running around the cavemen to group them on a single point!
* You will now know you score!
* A dead dino is no longer a murderous dino
* Bushes!

Pull-Request: #374

10 years agodino: javelins on ground have different angles
Alexis Laferrière [Tue, 18 Feb 2014 14:15:00 +0000 (09:15 -0500)]
dino: javelins on ground have different angles

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

10 years agodino: reset level after death
Alexis Laferrière [Wed, 12 Feb 2014 15:07:20 +0000 (10:07 -0500)]
dino: reset level after death

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

10 years agodino: draw a darker background
Alexis Laferrière [Wed, 12 Feb 2014 14:11:10 +0000 (09:11 -0500)]
dino: draw a darker background

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

10 years agodino: break items on ground when run over
Alexis Laferrière [Wed, 12 Feb 2014 00:08:17 +0000 (19:08 -0500)]
dino: break items on ground when run over

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

10 years agodino: add bushes!
Alexis Laferrière [Mon, 31 Mar 2014 01:59:34 +0000 (21:59 -0400)]
dino: add bushes!

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

10 years agodino: keep track of the score and display it
Alexis Laferrière [Tue, 11 Feb 2014 15:55:08 +0000 (10:55 -0500)]
dino: keep track of the score and display it

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

10 years agodino: add digits to assets
Alexis Laferrière [Tue, 11 Feb 2014 15:50:41 +0000 (10:50 -0500)]
dino: add digits to assets

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

10 years agodino: set rand seed at the number of cavemen
Alexis Laferrière [Tue, 11 Feb 2014 15:52:09 +0000 (10:52 -0500)]
dino: set rand seed at the number of cavemen

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

10 years agodino: each caveman has a random speed
Alexis Laferrière [Mon, 10 Feb 2014 15:24:38 +0000 (10:24 -0500)]
dino: each caveman has a random speed

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

10 years agodino: each caveman flee in different angles
Alexis Laferrière [Mon, 10 Feb 2014 15:04:34 +0000 (10:04 -0500)]
dino: each caveman flee in different angles

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

10 years agodino: each caveman has a predisposition for a hunting pattern
Alexis Laferrière [Mon, 10 Feb 2014 15:04:07 +0000 (10:04 -0500)]
dino: each caveman has a predisposition for a hunting pattern

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

10 years agodino: cavemen do not get run over by dead dino
Alexis Laferrière [Mon, 10 Feb 2014 15:02:57 +0000 (10:02 -0500)]
dino: cavemen do not get run over by dead dino

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

10 years agodino: display text under the hearts
Alexis Laferrière [Tue, 11 Feb 2014 15:54:47 +0000 (10:54 -0500)]
dino: display text under the hearts

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

10 years agodino: move down hearts according to platform
Alexis Laferrière [Mon, 31 Mar 2014 01:53:46 +0000 (21:53 -0400)]
dino: move down hearts according to platform

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

10 years agomnit_android: Adding android_sensor module
Romain Chanoir [Tue, 25 Mar 2014 17:31:08 +0000 (13:31 -0400)]
mnit_android: Adding android_sensor module

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

10 years agomnit_android: Adding SensorEvent in input_event module
Romain Chanoir [Tue, 25 Mar 2014 17:30:33 +0000 (13:30 -0400)]
mnit_android: Adding SensorEvent in input_event module

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

10 years agoMerge: CallSite on AFor and ARange
Jean Privat [Fri, 28 Mar 2014 22:13:12 +0000 (18:13 -0400)]
Merge: CallSite on AFor and ARange

Use CallSite to resolve and type some implicit services.
Subsequent phases will like them!

Currenlty: all the AFor and ARange services are converted and tools updated.
TODO: Array and SuperString

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

10 years agotests: update error messages
Jean Privat [Fri, 28 Mar 2014 00:37:31 +0000 (20:37 -0400)]
tests: update error messages

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

10 years agolib/sha1: fix nitunit
Jean Privat [Fri, 28 Mar 2014 00:08:46 +0000 (20:08 -0400)]
lib/sha1: fix nitunit

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

10 years agoMerge: lib: added sha1 on String
Jean Privat [Fri, 28 Mar 2014 00:04:47 +0000 (20:04 -0400)]
Merge: lib: added sha1 on String

Added function to compute the SHA-1 of a String in both its Binary and to hex form.

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

10 years agonitg: Use gcc special attributes and directives.
Jean Privat [Thu, 27 Mar 2014 16:58:24 +0000 (12:58 -0400)]
nitg: Use gcc special attributes and directives.

`noreturn` tags `show_backtrace` as no return
ie. `__attribute__ ((noreturn))`

`likely` tags runtime error checks with `unlikely`
ie. `__builtin_expect((x),0)`

These special C annotations can be disabled with --no-gcc-directive
The additional `--no-gcc-directive correct-likely` invert the
`__builtin_expect` target.

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

10 years agolib: added sha1 on String
Lucas Bajolet [Thu, 27 Mar 2014 20:33:42 +0000 (16:33 -0400)]
lib: added sha1 on String

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

10 years agoMerge: Fix visibility importation
Jean Privat [Thu, 27 Mar 2014 20:15:28 +0000 (16:15 -0400)]
Merge: Fix visibility importation

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

10 years agoMerge: Opt disable phase
Jean Privat [Thu, 27 Mar 2014 17:44:17 +0000 (13:44 -0400)]
Merge: Opt disable phase

`--disable-phase` to disable phase and broke tools :)

The point is to improve testing and comparison with and without specific (optional) phases

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

10 years agoMerge branch 'strings'
Jean Privat [Thu, 27 Mar 2014 06:25:49 +0000 (02:25 -0400)]
Merge branch 'strings'

10 years agoMerge: Callgraph
Jean Privat [Thu, 27 Mar 2014 01:04:53 +0000 (21:04 -0400)]
Merge: Callgraph

Quick patches so that RTA can give two new pieces of information.

1. what are the live CallSites? `RTA::live_callsites`
2. for each live CallSite, what are the live targets (MMethodDef) `RTA::live_targets`

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