nit.git
8 years agonitmetrics: migrate to `model_utils`
Alexandre Terrasa [Fri, 22 May 2015 00:25:25 +0000 (20:25 -0400)]
nitmetrics: migrate to `model_utils`

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

8 years agonitserial: remove dependency to `model_utils`
Alexandre Terrasa [Fri, 22 May 2015 00:24:47 +0000 (20:24 -0400)]
nitserial: remove dependency to `model_utils`

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

8 years agotest_neo: migrate to `model_collect`
Alexandre Terrasa [Fri, 22 May 2015 00:23:52 +0000 (20:23 -0400)]
test_neo: migrate to `model_collect`

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

8 years agouml: remove useless repeated type in redef
Alexandre Terrasa [Fri, 22 May 2015 00:23:34 +0000 (20:23 -0400)]
uml: remove useless repeated type in redef

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

8 years agouml: migrate to `model_collect`
Alexandre Terrasa [Fri, 22 May 2015 00:23:13 +0000 (20:23 -0400)]
uml: migrate to `model_collect`

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

8 years agomodel: introduce `model_collect` to collect and filter things from a `Model`
Alexandre Terrasa [Mon, 25 May 2015 15:44:56 +0000 (11:44 -0400)]
model: introduce `model_collect` to collect and filter things from a `Model`

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

8 years agomodel_utils: move shortcuts to `MClassKind` in `model`
Alexandre Terrasa [Thu, 21 May 2015 22:32:27 +0000 (18:32 -0400)]
model_utils: move shortcuts to `MClassKind` in `model`

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

8 years agomodel_utils: move `MEntityNameSorter` to `model_base`.
Alexandre Terrasa [Thu, 21 May 2015 22:22:29 +0000 (18:22 -0400)]
model_utils: move `MEntityNameSorter` to `model_base`.

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

8 years agomodel_utils: remove unused method `imported_mclasses`
Alexandre Terrasa [Thu, 21 May 2015 22:00:14 +0000 (18:00 -0400)]
model_utils: remove unused method `imported_mclasses`

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

8 years agomodel_utils: remove unused `in_nesting_*` methods
Alexandre Terrasa [Thu, 21 May 2015 21:55:15 +0000 (17:55 -0400)]
model_utils: remove unused `in_nesting_*` methods

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

8 years agomodel_utils: move concerns ranking to doc/
Alexandre Terrasa [Tue, 26 May 2015 15:57:22 +0000 (11:57 -0400)]
model_utils: move concerns ranking to doc/

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

8 years agonitdoc: fix typo in `doc_poset` comment
Alexandre Terrasa [Thu, 28 May 2015 15:54:54 +0000 (11:54 -0400)]
nitdoc: fix typo in `doc_poset` comment

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

8 years agonitdoc: simplify DefinitionListArticle
Alexandre Terrasa [Thu, 28 May 2015 15:54:30 +0000 (11:54 -0400)]
nitdoc: simplify DefinitionListArticle

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

8 years agonitdoc: remove useless class ImportationListSection
Alexandre Terrasa [Thu, 28 May 2015 15:35:26 +0000 (11:35 -0400)]
nitdoc: remove useless class ImportationListSection

This class was used to customize the generation of this particular section and limit the diff with the original nitdoc output.

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

8 years agonitdoc: remove useless class InheritanceListSection
Alexandre Terrasa [Thu, 28 May 2015 15:22:48 +0000 (11:22 -0400)]
nitdoc: remove useless class InheritanceListSection

This class was used to customize the generation of this particular section and limit the diff with the original nitdoc output.

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

8 years agonitdoc: remove useless class IntrosRedefsSection
Alexandre Terrasa [Thu, 28 May 2015 15:18:49 +0000 (11:18 -0400)]
nitdoc: remove useless class IntrosRedefsSection

This class was used to customize the generation of this particular section and limit the diff with the original nitdoc output.

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

8 years agonitdoc: fix typo in `DefinitionListArticle` comment
Alexandre Terrasa [Thu, 28 May 2015 15:07:14 +0000 (11:07 -0400)]
nitdoc: fix typo in `DefinitionListArticle` comment

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

8 years agonitdoc: remove useless class ConstructorsSection
Alexandre Terrasa [Thu, 28 May 2015 15:06:56 +0000 (11:06 -0400)]
nitdoc: remove useless class ConstructorsSection

This class was used to customize the generation of this particular section and limit the diff with the original nitdoc output.

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

8 years agonitdoc: remove useless class ProjectsSection
Alexandre Terrasa [Thu, 28 May 2015 15:04:35 +0000 (11:04 -0400)]
nitdoc: remove useless class ProjectsSection

This class was used to customize the generation of this particular section and limit the diff with the original nitdoc output.

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

8 years agonitdoc: factorize list article into `MEntitiesListArticle`
Alexandre Terrasa [Tue, 26 May 2015 23:37:40 +0000 (19:37 -0400)]
nitdoc: factorize list article into `MEntitiesListArticle`

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

8 years agonitdoc: move `DocComposite::is_toc_hidden` to `doc_base`
Alexandre Terrasa [Tue, 26 May 2015 23:25:40 +0000 (19:25 -0400)]
nitdoc: move `DocComposite::is_toc_hidden` to `doc_base`

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

8 years agonitdoc: introduce `DocComposite::is_hidden` services in `doc_base`
Alexandre Terrasa [Tue, 26 May 2015 21:31:22 +0000 (17:31 -0400)]
nitdoc: introduce `DocComposite::is_hidden` services in `doc_base`

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

8 years agonitdoc: move `DocComposite::toc_title` in `doc_base`
Alexandre Terrasa [Tue, 26 May 2015 21:04:00 +0000 (17:04 -0400)]
nitdoc: move `DocComposite::toc_title` in `doc_base`

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

8 years agonitdoc: introduce pretty printing of composite tree
Alexandre Terrasa [Fri, 22 May 2015 07:09:47 +0000 (03:09 -0400)]
nitdoc: introduce pretty printing of composite tree

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

8 years agonitdoc: move `DocComposite::title` to `doc_base`
Alexandre Terrasa [Fri, 29 May 2015 23:05:46 +0000 (19:05 -0400)]
nitdoc: move `DocComposite::title` to `doc_base`

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

8 years agonitdoc: replace `group:` prefix id by `.group` suffix
Alexandre Terrasa [Tue, 26 May 2015 20:44:58 +0000 (16:44 -0400)]
nitdoc: replace `group:` prefix id by `.group` suffix

Because some HTML/JS tools do not like `:` in ids...

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

8 years agonitdoc: replace `concern:` prefix id by `.concern` suffix
Alexandre Terrasa [Tue, 26 May 2015 20:43:33 +0000 (16:43 -0400)]
nitdoc: replace `concern:` prefix id by `.concern` suffix

Because some HTML/JS tools do not like `:` in ids...

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

8 years agonitdoc: replace `article:` prefix id by `.article` suffix
Alexandre Terrasa [Tue, 26 May 2015 20:40:32 +0000 (16:40 -0400)]
nitdoc: replace `article:` prefix id by `.article` suffix

Because some HTML/JS tools do not like `:` in ids...

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

8 years agonitdoc: replace `section:` prefix id by `.section` suffix
Alexandre Terrasa [Tue, 26 May 2015 20:30:32 +0000 (16:30 -0400)]
nitdoc: replace `section:` prefix id by `.section` suffix

Because some HTML/JS tools do not like `:` in ids...

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

8 years agonitdoc: move `DocComposite::id` to `doc_base`
Alexandre Terrasa [Fri, 29 May 2015 23:02:35 +0000 (19:02 -0400)]
nitdoc: move `DocComposite::id` to `doc_base`

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

8 years agotests: update serialization tests for nitg-e
Alexis Laferrière [Fri, 29 May 2015 14:57:56 +0000 (10:57 -0400)]
tests: update serialization tests for nitg-e

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

8 years agolib/serialization: update README with serialize scopes and with noserialize
Alexis Laferrière [Fri, 29 May 2015 10:29:32 +0000 (06:29 -0400)]
lib/serialization: update README with serialize scopes and with noserialize

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

8 years agolib: update doc to refer to the `serialize` annotation
Alexis Laferrière [Fri, 29 May 2015 01:16:23 +0000 (21:16 -0400)]
lib: update doc to refer to the `serialize` annotation

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

8 years agolib/a_star: update to use `serialize` instead of `auto_serializable`
Alexis Laferrière [Fri, 29 May 2015 01:15:53 +0000 (21:15 -0400)]
lib/a_star: update to use `serialize` instead of `auto_serializable`

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

8 years agolib/more_collections & bucketed_game: declare `serialize` at the module level
Alexis Laferrière [Fri, 29 May 2015 01:14:24 +0000 (21:14 -0400)]
lib/more_collections & bucketed_game: declare `serialize` at the module level

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

8 years agotests: update expected results of deserialization tests
Alexis Laferrière [Fri, 29 May 2015 01:01:54 +0000 (21:01 -0400)]
tests: update expected results of deserialization tests

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

8 years agotests: test double declaration of serialize on class defs
Alexis Laferrière [Fri, 29 May 2015 00:57:02 +0000 (20:57 -0400)]
tests: test double declaration of serialize on class defs

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

8 years agotests: test `serialize` on attributes
Alexis Laferrière [Fri, 29 May 2015 00:56:43 +0000 (20:56 -0400)]
tests: test `serialize` on attributes

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

8 years agotests: test `noserialize` and `serialize` at different levels
Alexis Laferrière [Fri, 29 May 2015 00:56:10 +0000 (20:56 -0400)]
tests: test `noserialize` and `serialize` at different levels

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

8 years agotests: test the `serialize` annotation
Alexis Laferrière [Fri, 29 May 2015 00:52:20 +0000 (20:52 -0400)]
tests: test the `serialize` annotation

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

8 years agotests: test `noserialize` with the `lazy` annotation
Alexis Laferrière [Fri, 29 May 2015 00:51:56 +0000 (20:51 -0400)]
tests: test `noserialize` with the `lazy` annotation

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

8 years agolib/serialization: declare the `serialize` and the `noserialize` annotations
Alexis Laferrière [Fri, 29 May 2015 00:51:12 +0000 (20:51 -0400)]
lib/serialization: declare the `serialize` and the `noserialize` annotations

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

8 years agosrc/serialization: redirect detection of the `serialize` annotation on AModule
Alexis Laferrière [Fri, 29 May 2015 00:50:46 +0000 (20:50 -0400)]
src/serialization: redirect detection of the `serialize` annotation on AModule

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

8 years agosrc/serialization: generate methods with per attribute serialization
Alexis Laferrière [Fri, 29 May 2015 00:49:16 +0000 (20:49 -0400)]
src/serialization: generate methods with per attribute serialization

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

8 years agosrc/serialization: detect serialize from class, module and attributes
Alexis Laferrière [Fri, 29 May 2015 00:47:05 +0000 (20:47 -0400)]
src/serialization: detect serialize from class, module and attributes

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

8 years agosrc/serialization: detect incoherence in nested serialize annotations
Alexis Laferrière [Fri, 29 May 2015 01:11:36 +0000 (21:11 -0400)]
src/serialization: detect incoherence in nested serialize annotations

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

8 years agosrc/serialization: move adding the `Serializable` super class at the nclassdef
Alexis Laferrière [Fri, 29 May 2015 00:43:42 +0000 (20:43 -0400)]
src/serialization: move adding the `Serializable` super class at the nclassdef

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

8 years agosrc/serialization: detect more errors on serialize/noserialize annotations
Alexis Laferrière [Fri, 29 May 2015 00:41:50 +0000 (20:41 -0400)]
src/serialization: detect more errors on serialize/noserialize annotations

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

8 years agosrc/serialization: intro a service to detect the `noserialize` annotation
Alexis Laferrière [Fri, 29 May 2015 00:41:02 +0000 (20:41 -0400)]
src/serialization: intro a service to detect the `noserialize` annotation

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

8 years agosrc/serialization: intro a service to detect the `serialize` annotation
Alexis Laferrière [Sun, 24 May 2015 17:26:26 +0000 (13:26 -0400)]
src/serialization: intro a service to detect the `serialize` annotation

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

8 years agolib/socket: fix call to enlarge with actual buffer usage
Alexis Laferrière [Fri, 29 May 2015 16:39:06 +0000 (12:39 -0400)]
lib/socket: fix call to enlarge with actual buffer usage

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

8 years agolib/socket: support reading string with null bytes
Alexis Laferrière [Fri, 29 May 2015 14:48:42 +0000 (10:48 -0400)]
lib/socket: support reading string with null bytes

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

8 years agolib/socket: fix enlarge buffer when size is at 0
Alexis Laferrière [Fri, 29 May 2015 16:29:50 +0000 (12:29 -0400)]
lib/socket: fix enlarge buffer when size is at 0

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

8 years agolib/standard: remove the only `attr-in-refinement` warning
Jean Privat [Fri, 29 May 2015 16:23:21 +0000 (12:23 -0400)]
lib/standard: remove the only `attr-in-refinement` warning

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

8 years agomodelize: ask that attributes in refinements are either noautoninit or have a value
Jean Privat [Fri, 29 May 2015 16:21:13 +0000 (12:21 -0400)]
modelize: ask that attributes in refinements are either noautoninit or have a value

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

8 years agobootstrap: active cleaning of remaining useless files
Jean Privat [Fri, 29 May 2015 14:39:09 +0000 (10:39 -0400)]
bootstrap: active cleaning of remaining useless files

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

8 years agotests: compile dir is `nit_compile`, and cleannit
Jean Privat [Fri, 29 May 2015 02:06:10 +0000 (22:06 -0400)]
tests: compile dir is `nit_compile`, and cleannit

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

8 years agoMakefile&gitignore: remove .nit_compile
Jean Privat [Fri, 29 May 2015 02:04:54 +0000 (22:04 -0400)]
Makefile&gitignore: remove .nit_compile

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

8 years agosrc: remove remaining references to .nit_compile
Jean Privat [Fri, 29 May 2015 02:04:03 +0000 (22:04 -0400)]
src: remove remaining references to .nit_compile

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

8 years agoman: document compilation directory for nitc
Jean Privat [Thu, 28 May 2015 15:17:24 +0000 (11:17 -0400)]
man: document compilation directory for nitc

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

8 years agotests: Updated test for byte literals
Lucas Bajolet [Wed, 27 May 2015 17:21:40 +0000 (13:21 -0400)]
tests: Updated test for byte literals

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

8 years agocompiler: Updated toolchain for proper byte literal support
Lucas Bajolet [Wed, 27 May 2015 17:39:38 +0000 (13:39 -0400)]
compiler: Updated toolchain for proper byte literal support

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

8 years agoparser: Regenerated for u8 suffix support
Lucas Bajolet [Wed, 27 May 2015 17:20:49 +0000 (13:20 -0400)]
parser: Regenerated for u8 suffix support

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

8 years agoparser: Added u8 suffix for byte literal values
Lucas Bajolet [Wed, 27 May 2015 17:20:21 +0000 (13:20 -0400)]
parser: Added u8 suffix for byte literal values

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

8 years agocompiler: remove the compilation directory unless explicitely set
Jean Privat [Thu, 28 May 2015 15:08:46 +0000 (11:08 -0400)]
compiler: remove the compilation directory unless explicitely set

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

8 years agoabstract_compiler: introduce root_compile_dir for platforms that need them
Jean Privat [Fri, 29 May 2015 14:31:48 +0000 (10:31 -0400)]
abstract_compiler: introduce root_compile_dir for platforms that need them

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

8 years agoabstract_compiler: attach compiler and toolchain
Jean Privat [Fri, 29 May 2015 14:21:32 +0000 (10:21 -0400)]
abstract_compiler: attach compiler and toolchain

The role of the Compiler is to know how to compile Nit programs in C.
The role of the Toolchain is to know where to save C file and how to compile them

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

8 years agotests: Added test for Byte data type
Lucas Bajolet [Fri, 29 May 2015 14:07:31 +0000 (10:07 -0400)]
tests: Added test for Byte data type

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

8 years agolib/standard: Introduce Byte type in kernel
Lucas Bajolet [Tue, 26 May 2015 20:36:07 +0000 (16:36 -0400)]
lib/standard: Introduce Byte type in kernel

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

8 years agosrc/nitserial: do not use private classes when invisible
Alexis Laferrière [Sun, 24 May 2015 21:41:36 +0000 (17:41 -0400)]
src/nitserial: do not use private classes when invisible

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

8 years agotests: update error messages on exact call on null
Jean Privat [Fri, 29 May 2015 13:02:19 +0000 (09:02 -0400)]
tests: update error messages on exact call on null

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 agocompiler: rename compilation dir as `nit_compile`
Jean Privat [Thu, 28 May 2015 14:27:01 +0000 (10:27 -0400)]
compiler: rename compilation dir as `nit_compile`

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

fix rename

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>