nit.git
8 years agomksrc: remove --stacktrace
Jean Privat [Thu, 4 Jun 2015 10:34:02 +0000 (06:34 -0400)]
mksrc: remove --stacktrace

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

8 years agoman: document `--no-stacktrace` and `NIT_NO_STACK` in nitc.1
Jean Privat [Wed, 3 Jun 2015 01:54:14 +0000 (21:54 -0400)]
man: document `--no-stacktrace` and `NIT_NO_STACK` in nitc.1

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

8 years agocompiler: replace the option `--stacktrace` with a simpler `--no-stacktrace`
Jean Privat [Wed, 3 Jun 2015 01:31:29 +0000 (21:31 -0400)]
compiler: replace the option `--stacktrace` with a simpler `--no-stacktrace`

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

8 years agocompiler: protect the stacktrace-aware C code with the preprocessor
Jean Privat [Wed, 3 Jun 2015 01:30:45 +0000 (21:30 -0400)]
compiler: protect the stacktrace-aware C code with the preprocessor

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

8 years agocompiler: generate C stacktrace-awareness iff the platform supports it
Jean Privat [Wed, 3 Jun 2015 01:28:41 +0000 (21:28 -0400)]
compiler: generate C stacktrace-awareness iff the platform supports it

Do not rely on the option `--stacktrace`,
so that the decision to uhave them could be deported at the C compile-time

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

8 years agoMerge: introduce plain_to_s
Jean Privat [Fri, 29 May 2015 01:49:02 +0000 (21:49 -0400)]
Merge: introduce plain_to_s

In order to have a more POLA `to_s` on collections, it is required that a new method with the old behavior is provided for clients that need it (especially the interpreter that use it for superstrings).

the compiler use `native_to_s` for superstrings but `c_src/nitg` still use `to_s` on array, so a regeneration of the bootstrap is required before changing the behavior of `to_s` on collections.

Pull-Request: #1385
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agotests: update sav/nitserial_args1.res because change in RTA
Jean Privat [Thu, 28 May 2015 00:21:23 +0000 (20:21 -0400)]
tests: update sav/nitserial_args1.res because change in RTA

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

8 years agolib/standard/string: introduce (an use) `plain_to_s`
Jean Privat [Sun, 24 May 2015 02:32:39 +0000 (22:32 -0400)]
lib/standard/string: introduce (an use) `plain_to_s`

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

8 years agoMerge: Nitg-g new NativeArray fix
Jean Privat [Fri, 29 May 2015 01:40:09 +0000 (21:40 -0400)]
Merge: Nitg-g new NativeArray fix

This is a bug that was discovered during the push of #1403.

What happens is that since NativeArrays work only with boxed values, the copy_to operation could write data beyond its intended boundaries, hence corrupting random memory.

If you execute the test bundled with the PR, on my machine, with `--hardening` on, you get this error:
`BTD BUG: Dynamic type is Sys, static type is Array[Byte]`

What happens here is that the `dest` of the `memmove` was in a emplacement before the `Array[Byte]` itself, due to its length and because the `memmove` used val* as sizeof value, it rewrote the classid of `self`, hence changing its dynamic type effectively from `Array[Byte]` to `Sys`, which produces the typing bug.

If left too long to execute, or in an unlucky memory layout, it simply segfaulted.

The behaviour of NEW_NativeArray henceforth is that it will reserve space for n `val*` instead of the `ctype` of the values.

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

8 years agoMerge: Annotation lateinit
Jean Privat [Fri, 29 May 2015 01:38:43 +0000 (21:38 -0400)]
Merge: Annotation lateinit

#857 introduced `autoinit` on attributes that has a default value to initialize them latter.

This is a rarely used feature. It is also not POLA because it overloads the name `autoinit` that has a different meaning on methods cf #1308.

Thus in order to polaize the spec, the annotation is renamed `lateinit`. So close #1308.
Note: maybe the annotation will just be removed in a future PR, this one is a last attempt to keep it.

Related to #1322; required by #1311

Pull-Request: #1409
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

8 years agoMerge: Advice on useless repeated types
Jean Privat [Fri, 29 May 2015 01:38:22 +0000 (21:38 -0400)]
Merge: Advice on useless repeated types

With this PR, nitpick and other tools are able to suggest to remove useless types in signature redefinition with the option `-W`.

Example:

~~~nit
class A
fun foo(a: Bool) do end
end

class B
super A

redef fun foo(a: Bool) do end
end
~~~

~~~
$ nitc test.nit -W
test.nit:8,19--22: Warning: useless type repetition on parameter `a` for redefined method `foo` (useless-signature)
redef fun foo(a: Bool) do end
                 ^
Errors: 0. Warnings: 1.
~~~

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

8 years agotests: Basic test for the allocation of NativeArray with short native values
Lucas Bajolet [Thu, 28 May 2015 21:10:31 +0000 (17:10 -0400)]
tests: Basic test for the allocation of NativeArray with short native values

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

8 years agonitg-g: Fix allocation of NativeArray
Lucas Bajolet [Thu, 28 May 2015 21:09:27 +0000 (17:09 -0400)]
nitg-g: Fix allocation of NativeArray

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

8 years agotests: fix tests with repeated types warnings
Alexandre Terrasa [Thu, 28 May 2015 20:22:03 +0000 (16:22 -0400)]
tests: fix tests with repeated types warnings

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

8 years agoMerge: contrib/header_static: a cog in the toolchains to generate Objcwrapper
Jean Privat [Thu, 28 May 2015 20:14:33 +0000 (16:14 -0400)]
Merge: contrib/header_static: a cog in the toolchains to generate Objcwrapper

### Filters preprocessed C-like header files to remove static code and keep their signatures.

This tool is used in the process of parsing header files to extract
information on the declared services (the functions and structures).
This information is then used to generate bindings for Nit code
to access these services.

The C header sometimes contains static code. It deletes static code of
headers, but keep their signatures. This tool is an extension of
header_keeper. It searches the keyword static to identify
the static code, and ignore the code into their brackets. The result is
printed to sdtout.

~~~sh
cat Pre-Processed/CGGeometry.h | header_static Pre-Processed/CGGeometry.h > Pre-Processed/static_header.h
~~~

This module can also be used as a library.
The main service is the method `header_static`

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

8 years agoMerge: nitdoc: introduce useful services
Jean Privat [Thu, 28 May 2015 20:14:28 +0000 (16:14 -0400)]
Merge: nitdoc: introduce useful services

Some services needed for next PRs

No diff to HTML output

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

8 years agolib/json: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:27:37 +0000 (17:27 -0400)]
lib/json: remove useless types

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

8 years agolib/nitcorn: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:27:30 +0000 (17:27 -0400)]
lib/nitcorn: remove useless types

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

8 years agolib/socket: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:27:22 +0000 (17:27 -0400)]
lib/socket: remove useless types

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

8 years agolib/template: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:27:09 +0000 (17:27 -0400)]
lib/template: remove useless types

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

8 years agolib/string_experimentations: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:26:57 +0000 (17:26 -0400)]
lib/string_experimentations: remove useless types

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

8 years agolib/curl: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:25:41 +0000 (17:25 -0400)]
lib/curl: remove useless types

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

8 years agolib/sqlite: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:25:33 +0000 (17:25 -0400)]
lib/sqlite: remove useless types

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

8 years agolib/geometry: remove useless types
Alexandre Terrasa [Thu, 21 May 2015 21:25:20 +0000 (17:25 -0400)]
lib/geometry: remove useless types

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

8 years agolib/neo4j: remove useless types
Alexandre Terrasa [Tue, 26 May 2015 04:15:03 +0000 (00:15 -0400)]
lib/neo4j: remove useless types

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

8 years agolib/sax: remove useless types
Alexandre Terrasa [Tue, 26 May 2015 04:18:18 +0000 (00:18 -0400)]
lib/sax: remove useless types

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

8 years agolib/standard: remove useless repeated types in `standard`
Alexandre Terrasa [Thu, 28 May 2015 13:55:46 +0000 (09:55 -0400)]
lib/standard: remove useless repeated types in `standard`

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

8 years agotests: test advice for useless repeated type in redef
Alexandre Terrasa [Mon, 25 May 2015 15:30:56 +0000 (11:30 -0400)]
tests: test advice for useless repeated type in redef

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

8 years agomodel: check useless repeated types in signatures
Alexandre Terrasa [Wed, 20 May 2015 00:30:36 +0000 (20:30 -0400)]
model: check useless repeated types in signatures

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

8 years agonitpick: fix a typo in comments
Alexandre Terrasa [Wed, 20 May 2015 00:30:05 +0000 (20:30 -0400)]
nitpick: fix a typo in comments

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

8 years agonitdoc: check multiple page with same id
Alexandre Terrasa [Fri, 22 May 2015 01:39:03 +0000 (21:39 -0400)]
nitdoc: check multiple page with same id

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

8 years agonitdoc: introduce `Page::title` and `Page::id` in `doc_base`
Alexandre Terrasa [Thu, 14 May 2015 01:23:22 +0000 (21:23 -0400)]
nitdoc: introduce `Page::title` and `Page::id` in `doc_base`

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

8 years agonitdoc: introduce `mentities_by_namespace` lookup service in DocModel
Alexandre Terrasa [Thu, 14 May 2015 06:24:00 +0000 (02:24 -0400)]
nitdoc: introduce `mentities_by_namespace` lookup service in DocModel

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

8 years agonitdoc: introduce `mentities_by_name` lookup service in DocModel
Alexandre Terrasa [Tue, 26 May 2015 18:19:02 +0000 (14:19 -0400)]
nitdoc: introduce `mentities_by_name` lookup service in DocModel

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

8 years agoMerge: Correct warn on noautoinit
Jean Privat [Thu, 28 May 2015 00:19:25 +0000 (20:19 -0400)]
Merge: Correct warn on noautoinit

Move the analysis of the class annotation `noautoinit` after the inheritance of initializers so the warning is correct, thus fixes #1350

The main commit is mainly moving the code in the same method.

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

8 years agoMerge: Rename the visit function of minilang example.
Jean Privat [Thu, 28 May 2015 00:19:17 +0000 (20:19 -0400)]
Merge: Rename the visit function of minilang example.

This PR rename the visit function of the ```minilang.nit``` file. The previous name was incoherent with the module purpose.

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

8 years agoMerge: Use self in the FFI
Jean Privat [Thu, 28 May 2015 00:19:09 +0000 (20:19 -0400)]
Merge: Use self in the FFI

As requested by everyone, replace the id `recv` by `self` in all Nit FFIs, and their users.

This PR must be integrated before regenerating c_src and using the light FFI in bootstrap critical code.

There is a few commits to update the style of files that caused white space errors.

Pull-Request: #1399
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agoMerge: Improve internal mechanisms of the nitvm
Jean Privat [Thu, 28 May 2015 00:19:00 +0000 (20:19 -0400)]
Merge: Improve internal mechanisms of the nitvm

This PR fixes a bug that was hidden in the nitvm for a too long time, the recursion in class loading was bad and is now corrected.

Then a more accurate mechanism is introduce to deal with positions of methods and attributes in internal structures of classes and objects.
When a method dispatch is performed, this mechanism allows to ask precisely for a class the position of a block of methods (or attributes). This should increase the proportion of object mechanisms "compiled" in an efficient way.

Finally, the class loading is optimized: an indirectly loaded class is not fully constructed and allocated.
Instead, its identifier is computed to allow subtyping tests.

For now, these more accurate mechanisms need recompilations of callsite. This sould be done in further PR.

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

8 years agoMerge: Markdown location
Jean Privat [Thu, 28 May 2015 00:18:53 +0000 (20:18 -0400)]
Merge: Markdown location

Introduce location in markdown parser so tools can easily retrieve the original position of a block or a token in the input file/string.

Commits:
* 2d139eb introduces de Location concept and update the parser
* fda150d isn't interesting since it only update signature in the test file
* dacc7ba adds some test suites for the locations

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

8 years agoMerge: contrib/header_static: a cog in the toolchains to generate Objcwrapper
Jean Privat [Thu, 28 May 2015 00:18:39 +0000 (20:18 -0400)]
Merge: contrib/header_static: a cog in the toolchains to generate Objcwrapper

### Filters preprocessed C-like header files to remove static code and keep their signatures.

This tool is used in the process of parsing header files to extract
information on the declared services (the functions and structures).
This information is then used to generate bindings for Nit code
to access these services.

The C header sometimes contains static code. It deletes static code of
headers, but keep their signatures. This tool is an extension of
header_keeper. It searches the keyword static to identify
the static code, and ignore the code into their brackets. The result is
printed to sdtout.

~~~sh
cat Pre-Processed/CGGeometry.h | header_static Pre-Processed/CGGeometry.h > Pre-Processed/static_header.h
~~~

This module can also be used as a library.
The main service is the method `header_static`

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

8 years agotests: update tests for lateinit
Jean Privat [Wed, 27 May 2015 16:56:12 +0000 (12:56 -0400)]
tests: update tests for lateinit

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

8 years agomodelize: rename annotation `autoinit` on attributes as `lateinit`
Jean Privat [Wed, 27 May 2015 16:55:50 +0000 (12:55 -0400)]
modelize: rename annotation `autoinit` on attributes as `lateinit`

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

8 years agotests: add alt to base_init_autoinit3 to check warning on `noautoinit`
Jean Privat [Wed, 27 May 2015 15:52:51 +0000 (11:52 -0400)]
tests: add alt to base_init_autoinit3 to check warning on `noautoinit`

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

8 years agomodelize: `noautoinit` check inherited initializes before warning
Jean Privat [Wed, 27 May 2015 15:51:53 +0000 (11:51 -0400)]
modelize: `noautoinit` check inherited initializes before warning

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

8 years agocontrib/header_static: a cog in the toolchains to generate ObjCwrapper
Arthur Delamare [Mon, 25 May 2015 20:04:18 +0000 (16:04 -0400)]
contrib/header_static: a cog in the toolchains to generate ObjCwrapper

Signed-off-by: Arthur Delamare <arthur.delamare@viacesi.fr>

8 years agoFix incoherent name function in minilang
Mehdi [Wed, 27 May 2015 13:25:50 +0000 (09:25 -0400)]
Fix incoherent name function in minilang

Signed-off-by: Mehdi <overpex@gmail.com>

8 years agoMerge: sepcomp: fix hardening related to the instantiation of dead types
Jean Privat [Wed, 27 May 2015 10:12:32 +0000 (06:12 -0400)]
Merge: sepcomp: fix hardening related to the instantiation of dead types

The bug was revelated by #1385

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

8 years agoMerge: `Int::times`: clean nitunit and expose negative behavior
Jean Privat [Wed, 27 May 2015 00:55:15 +0000 (20:55 -0400)]
Merge: `Int::times`: clean nitunit and expose negative behavior

I tried to use `Int::times` but the nitunit wasn't clear enough on the expected behavior.

Thanks at @BlackMinou for is moral support on this.

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

8 years agoMerge: Rename all REAMDE to README.md
Jean Privat [Wed, 27 May 2015 00:55:03 +0000 (20:55 -0400)]
Merge: Rename all REAMDE to README.md

Close #1382

Pull-Request: #1383
Reviewed-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

8 years agoMerge: Intro an unrolled linked list, and fix `List::insert`
Jean Privat [Wed, 27 May 2015 00:54:56 +0000 (20:54 -0400)]
Merge: Intro an unrolled linked list, and fix `List::insert`

An unrolled list is a sequence implemented by a linked list of arrays.

I use this list for a very long FIFO. `Array::shift` is very slow and a large `List` can create too many small nodes for the GC.

The test compares the behavior of `UnrolledList` with `List` on random data sets. It allowed me to find a bug in `List::insert`.

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

8 years agoMerge: Binary/Octal literal Ints
Jean Privat [Wed, 27 May 2015 00:54:46 +0000 (20:54 -0400)]
Merge: Binary/Octal literal Ints

For long now we could express an `Int` in both decimal and hexadecimal form, however binary and octal forms were lacking.

This PR fixes it.

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

8 years agotests: remove utf_noindex_tests
Alexis Laferrière [Tue, 26 May 2015 22:37:41 +0000 (18:37 -0400)]
tests: remove utf_noindex_tests

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

8 years agotests: update expected results of nitpretty on the FFI
Alexis Laferrière [Tue, 26 May 2015 20:18:55 +0000 (16:18 -0400)]
tests: update expected results of nitpretty on the FFI

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

8 years agolib: update more libs to use `self`
Alexis Laferrière [Tue, 26 May 2015 18:29:06 +0000 (14:29 -0400)]
lib: update more libs to use `self`

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

8 years agotests: update tests using the FFI
Alexis Laferrière [Mon, 25 May 2015 19:44:47 +0000 (15:44 -0400)]
tests: update tests using the FFI

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

8 years agolib/mongodb: fix invalid FFI code
Alexis Laferrière [Tue, 26 May 2015 20:24:36 +0000 (16:24 -0400)]
lib/mongodb: fix invalid FFI code

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

8 years agolib: update other libs to use `self` from C and C++ code
Alexis Laferrière [Tue, 26 May 2015 15:53:46 +0000 (11:53 -0400)]
lib: update other libs to use `self` from C and C++ code

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

8 years agolib/java: update to use `self` from Java code
Alexis Laferrière [Mon, 25 May 2015 19:30:11 +0000 (15:30 -0400)]
lib/java: update to use `self` from Java code

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

8 years agolib/standard: update to use `self` in C code
Alexis Laferrière [Mon, 25 May 2015 19:29:35 +0000 (15:29 -0400)]
lib/standard: update to use `self` in C code

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

8 years agolib/standard: update style of doc and fix whitespace in `bitset`
Alexis Laferrière [Mon, 25 May 2015 19:29:02 +0000 (15:29 -0400)]
lib/standard: update style of doc and fix whitespace in `bitset`

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

8 years agolib/ios: update Objective-C code to use `self`
Alexis Laferrière [Tue, 26 May 2015 12:23:35 +0000 (08:23 -0400)]
lib/ios: update Objective-C code to use `self`

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

8 years agolib/cocoa: update Objective-C code to use `self`
Alexis Laferrière [Mon, 25 May 2015 19:26:02 +0000 (15:26 -0400)]
lib/cocoa: update Objective-C code to use `self`

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

8 years agolib/gtk: update to use `self` from C code
Alexis Laferrière [Mon, 25 May 2015 19:25:32 +0000 (15:25 -0400)]
lib/gtk: update to use `self` from C code

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

8 years agolib/android: clean up whitespace errors in `bundle`
Alexis Laferrière [Tue, 26 May 2015 18:34:57 +0000 (14:34 -0400)]
lib/android: clean up whitespace errors in `bundle`

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

8 years agolib/android: update to use `self` in Java code
Alexis Laferrière [Mon, 25 May 2015 19:24:54 +0000 (15:24 -0400)]
lib/android: update to use `self` in Java code

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

8 years agonitvm: Optimize the loading of classes
Julien Pagès [Thu, 21 May 2015 14:29:34 +0000 (16:29 +0200)]
nitvm: Optimize the loading of classes

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

8 years agonitvm: Deleting absolute offset for properties
Julien Pagès [Wed, 13 May 2015 13:28:29 +0000 (15:28 +0200)]
nitvm: Deleting absolute offset for properties

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

8 years agonitvm: Optimizing subtyping tests with new mechanisms
Julien Pagès [Tue, 26 May 2015 09:32:15 +0000 (11:32 +0200)]
nitvm: Optimizing subtyping tests with new mechanisms

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

8 years agonitvm: The positions of methods and attributes are now more accurate
Julien Pagès [Tue, 26 May 2015 13:06:19 +0000 (15:06 +0200)]
nitvm: The positions of methods and attributes are now more accurate

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

8 years agonitvm: Bug fixe in the recursion of class loading
Julien Pagès [Tue, 5 May 2015 15:16:29 +0000 (17:16 +0200)]
nitvm: Bug fixe in the recursion of class loading

Signed-off-by: Julien Pagès <julien.projet@gmail.com>

8 years agosepcomp: fix hardening related to the instantiation of dead types
Jean Privat [Tue, 26 May 2015 18:43:16 +0000 (14:43 -0400)]
sepcomp: fix hardening related to the instantiation of dead types

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

8 years agoRename REAMDE to README.md
Jean Privat [Tue, 26 May 2015 17:52:49 +0000 (13:52 -0400)]
Rename REAMDE to README.md

And a small whitespace fix

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

8 years agotests: update sav of nitserial to latest changes
Alexis Laferrière [Tue, 26 May 2015 17:16:45 +0000 (13:16 -0400)]
tests: update sav of nitserial to latest changes

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

8 years agolib/android: fix style of `shared_preferences_api10|11.nit`
Alexis Laferrière [Mon, 25 May 2015 19:23:47 +0000 (15:23 -0400)]
lib/android: fix style of `shared_preferences_api10|11.nit`

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

8 years agoexamples: fix style of FFI examples
Alexis Laferrière [Mon, 25 May 2015 19:39:32 +0000 (15:39 -0400)]
examples: fix style of FFI examples

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

8 years agoexamples: update FFI examples to use `self`
Alexis Laferrière [Mon, 25 May 2015 19:20:32 +0000 (15:20 -0400)]
examples: update FFI examples to use `self`

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

8 years agocontrib: update contribs to use `self` in FFI
Alexis Laferrière [Mon, 25 May 2015 19:19:51 +0000 (15:19 -0400)]
contrib: update contribs to use `self` in FFI

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

8 years agocontrib/jwrapper: generate FFI code using `self`
Alexis Laferrière [Mon, 25 May 2015 19:19:38 +0000 (15:19 -0400)]
contrib/jwrapper: generate FFI code using `self`

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

8 years agosrc: update Java and C++ FFI to use `self`
Alexis Laferrière [Mon, 25 May 2015 19:18:51 +0000 (15:18 -0400)]
src: update Java and C++ FFI to use `self`

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

8 years agosrc: update core FFI to use `self` instead of `recv` in C
Alexis Laferrière [Mon, 25 May 2015 19:18:26 +0000 (15:18 -0400)]
src: update core FFI to use `self` instead of `recv` in C

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

8 years agotests: Added tests for literal bases
Lucas Bajolet [Mon, 25 May 2015 20:34:58 +0000 (16:34 -0400)]
tests: Added tests for literal bases

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

8 years agosrc/literal: Support for the new binary and octal literals
Lucas Bajolet [Mon, 25 May 2015 20:33:09 +0000 (16:33 -0400)]
src/literal: Support for the new binary and octal literals

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

8 years agosrc/parser: Regenerated parser
Lucas Bajolet [Mon, 25 May 2015 20:32:51 +0000 (16:32 -0400)]
src/parser: Regenerated parser

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

8 years agosrc/parser: Updated grammar and parser_nodes
Lucas Bajolet [Mon, 25 May 2015 20:32:39 +0000 (16:32 -0400)]
src/parser: Updated grammar and parser_nodes

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

8 years agolib/standard/string: Added to_oct and to_bin functions to Text
Lucas Bajolet [Mon, 25 May 2015 20:13:14 +0000 (16:13 -0400)]
lib/standard/string: Added to_oct and to_bin functions to Text

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

8 years agoMerge: Binary over network
Jean Privat [Tue, 26 May 2015 10:12:35 +0000 (06:12 -0400)]
Merge: Binary over network

Add services to write strings in binary streams and better support for binary in network modules.

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

8 years agoMerge: nitx: finish migration to new nitdoc architecture
Jean Privat [Tue, 26 May 2015 10:12:01 +0000 (06:12 -0400)]
Merge: nitx: finish migration to new nitdoc architecture

`nitx` is now part of the `doc` group using the same architecture as `nitdoc`.

This PR also add two new features:
* locate calls to a MProperty
* search pieces of code

Fixes #262

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

8 years agoMerge: Nitiwiki next
Jean Privat [Tue, 26 May 2015 12:37:54 +0000 (08:37 -0400)]
Merge: Nitiwiki next

Some fixes for `nitiwiki`.

Preparing for nitlanguage.org migration from ikiwiki to nitiwiki.

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

8 years agoMerge: Apply serialization in calculator, a_star, more_collections, Couple and Container
Jean Privat [Tue, 26 May 2015 10:09:51 +0000 (06:09 -0400)]
Merge: Apply serialization in calculator, a_star, more_collections, Couple and Container

Use `auto_serialize` in the calculator example, and remove the old custom JSON serialization.

The `a_star` module needed special care and could not rely only on `auto_serialize`. This was to avoid serializing graphs as a deep tree, instead we serialize the nodes first, then the links and we rebuild the graph at deserialization.

Besides that, more collections support the serialization.

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

8 years agoMerge: File and Bytes
Jean Privat [Tue, 26 May 2015 10:09:33 +0000 (06:09 -0400)]
Merge: File and Bytes

A bit of a fix in the context of issues #1267 and #1262.

The bytes module has a `ByteBuffer` class, while it is still working with `Int` at the moment, when Nit correctly supports `Bytes`, we can change it to a real `ByteBuffer`

This class is highly recommended when working with byte streams and collections.

As such, file operations are related to this module since most of the operations are working on bytes, what they mean is up to the end-user to figure.

Pull-Request: #1309
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

8 years agolib/markdown: add MDLocation tests
Alexandre Terrasa [Tue, 26 May 2015 02:44:33 +0000 (22:44 -0400)]
lib/markdown: add MDLocation tests

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

8 years agolib/markdown: fix tests
Alexandre Terrasa [Tue, 26 May 2015 02:44:09 +0000 (22:44 -0400)]
lib/markdown: fix tests

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

8 years agolib/markdown: introduce MDLocation
Alexandre Terrasa [Tue, 26 May 2015 02:43:44 +0000 (22:43 -0400)]
lib/markdown: introduce MDLocation

MDLocation is defined on MDBlocks and Tokens to help tool retrieve the location of an element in the original input.

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

8 years agorange: better nitunit on `Int::times`
Alexandre Terrasa [Mon, 25 May 2015 16:20:09 +0000 (12:20 -0400)]
range: better nitunit on `Int::times`

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

8 years agolib/serialization: intro the shortcut `CachingSerializer::link`
Alexis Laferrière [Mon, 25 May 2015 15:42:08 +0000 (11:42 -0400)]
lib/serialization: intro the shortcut `CachingSerializer::link`

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

8 years agolib/serialization: intro DuplexCache
Alexis Laferrière [Mon, 25 May 2015 15:41:45 +0000 (11:41 -0400)]
lib/serialization: intro DuplexCache

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

8 years agolib/serialization: extract caches from json_serialization
Alexis Laferrière [Sat, 23 May 2015 19:31:50 +0000 (15:31 -0400)]
lib/serialization: extract caches from json_serialization

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

8 years agotests: test UnrolledList
Alexis Laferrière [Fri, 22 May 2015 15:37:23 +0000 (11:37 -0400)]
tests: test UnrolledList

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

8 years agolib/more_collections: intro `UnrolledLinkList`
Alexis Laferrière [Thu, 21 May 2015 17:08:18 +0000 (13:08 -0400)]
lib/more_collections: intro `UnrolledLinkList`

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

8 years agorange: remove white space in license
Alexandre Terrasa [Mon, 25 May 2015 16:20:26 +0000 (12:20 -0400)]
range: remove white space in license

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