Jean Privat [Wed, 10 Jun 2015 01:46:52 +0000 (21:46 -0400)]
Merge: Add some collections for java/collections.nit
This PR complete the java collections : ``` int[], short[], long[], boolean[], byte[], char[] ```
Pull-Request: #1435
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: ArthurDelamare <arthur.delamare@viacesi.fr>
Jean Privat [Wed, 10 Jun 2015 01:46:42 +0000 (21:46 -0400)]
Merge: Attribute and autoinit annotations
A big set of loosely coupled but related changed on the annotations on attributes and methods.
Here is a summary of the changes on the user-side:
* No more special case for the kind of classes, so you can use `autoinit` in interfaces.
* Explicit annotation `autoinit` is understood on attributes and is the default on value-less concrete attribute.
* Abstract attributes are `noautoinit` by default, if `autoinit` is given, it is applied on the setter. This way abstract attributes are basically just a couple of getter-setter. close #1311
This way there is less special cases and behaviors. Still more work is required to finish #1322.
Pull-Request: #1433
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Wed, 10 Jun 2015 01:46:34 +0000 (21:46 -0400)]
Merge: nitvm: Basic blocks generation and SSA-algorithm
This PR introduces a SSA-algorithm implementation in the nitvm.
First, basic blocks are generated. A basic block is a sequence of instructions without a jump inside.
In this version, basic blocks are generated from the AST and so they contain only the first instruction and the last one.
Then, SSA-algorithm (Single-Static Assignment) is implemented. In SSA algorithm, variables are renamed to have only one assignment per variable.
Each time an assignment is made, a new version of a variable is made.
Some variables (phi-functions) have several assignment and so, several dependances.
The basic block generation and SSA are computed for each method in a lazy way in the nitvm.
The main objective of SSA is to give the dependances for each variable (this will be used in further PR).
This module also collect all object-mechanisms sites during the visit of methods.
Pull-Request: #1425
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Wed, 10 Jun 2015 01:46:20 +0000 (21:46 -0400)]
Merge: example: add 24 game task of Rosetta code
Rosetta code example of 24 game
<http://rosettacode.org/wiki/24_game>
Pull-Request: #1372
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 10 Jun 2015 01:46:14 +0000 (21:46 -0400)]
Merge: file: fix `simplify_path` behavior for path starting with `.`.
Before this PR `./` was simplified in `/` which was wrong.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #1368
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 10 Jun 2015 01:46:08 +0000 (21:46 -0400)]
Merge: Date Lib
les fonctions ce trouve dans le module date_f.nit.
Pull-Request: #1100
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>
Julien Pagès [Wed, 3 Jun 2015 18:35:06 +0000 (20:35 +0200)]
nitvm: Using SSA module in the nitvm
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Julien Pagès [Fri, 29 May 2015 13:57:53 +0000 (15:57 +0200)]
nitvm: A method compile offers a unique entry point for compilation-like mechanisms
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Alexandre Terrasa [Tue, 9 Jun 2015 17:20:34 +0000 (13:20 -0400)]
file: fix `simplify_path` behavior for path starting with `.`.
Before this PR `./` was simplified as `/` which is wrong.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Wed, 3 Jun 2015 15:23:39 +0000 (11:23 -0400)]
tests: add base_attr_annot.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 14:24:41 +0000 (10:24 -0400)]
tests: add base_attr_abstract[34].nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 27 May 2015 15:21:49 +0000 (11:21 -0400)]
tests: update other tests related to init with setters
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 27 May 2015 15:31:45 +0000 (11:31 -0400)]
tests: add base_init_setter.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 27 May 2015 15:21:01 +0000 (11:21 -0400)]
tests: update base_attr_abstract[12].nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 15:24:55 +0000 (11:24 -0400)]
modelize: remove restriction on concrete class in intializer collect
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 14:04:55 +0000 (10:04 -0400)]
modelize: error/warning if explicit autoinit on attributes
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 29 May 2015 16:05:42 +0000 (12:05 -0400)]
modelize: error in `autoinit` is used in class refinement
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 29 May 2015 16:05:17 +0000 (12:05 -0400)]
modelize: move `autoinit` management on method into AMethPropdef
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 27 May 2015 13:28:06 +0000 (09:28 -0400)]
modelize: rely on `AAttrPropdef::mreadpropdef` to be the main property
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 27 May 2015 13:27:12 +0000 (09:27 -0400)]
modelize: add `AAttrPropdef::mtype` to factorize the type access
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 8 Jun 2015 15:03:10 +0000 (11:03 -0400)]
Merge: FFI clean up
Pull-Request: #1442
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Mon, 8 Jun 2015 14:40:35 +0000 (10:40 -0400)]
src/nitni: fix doc of `is_cprimitive`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 8 Jun 2015 10:05:21 +0000 (06:05 -0400)]
Merge: Fix support for Byte in the FFI
Pull-Request: #1441
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)]
Merge: More keep going
This improve the robustness of tools when given --keep-going.
Tools like nitpick, that have --keep-going by default, are more robust and collect more errors.
Moreover, the compiler can now compile simple programs with instructions that fail during the typing phase (most errors like unknown method or bad type).
These instructions are compiled with a run time error instead so the program is still expected to behave in an reliable way.
~~~nit
print 1
fail now
print 2
~~~
~~~sh
$ nitc kg.nit --keep-going
kg.nit:2,1--4: Error: method or variable `fail` unknown in `Sys`.
$ ./kg
1
Runtime error: FATAL: bad statement executed. (kg.nit:1)
~~~
One usage would be to force `c_src` to compile things even if it lags behind.
Pull-Request: #1440
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Mon, 8 Jun 2015 10:05:05 +0000 (06:05 -0400)]
Merge: Warn useless do block
Warn useless do block, like
~~~nit
loop do
print 1
end
~~~
Close #1437
Pull-Request: #1438
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 8 Jun 2015 10:05:00 +0000 (06:05 -0400)]
Merge: Love contrib
One day, a package manager will simplify the installation and the maintenance of third-party projects, libraries and programs in Nit, so that `import foo` will import the project `foo` if installed.
Noways, `contrib` is used as a placeholder for some independent projects that are not mainly a library (or borderline). However, the nature of the Nit language, especially the refinement of class blurry the difference between libraries and programs and make it conceivable to extends an existing program by refining it (or just reuse its base libraries).
However, `import foo` will not work if foo is in contrib, this issue has two current workarounds:
* the user use `-I` with some relative path location in the Makefile, that is not practical because it should be used on each tools thus broke basic manual commands (like nitc on the command line) and automatic commands (like vim+nitpick).
* the project just move itself to lib/ so that client can easily import it, but this is hard to conceptualize for some project like `nitiwiki`
The easy solution to solve this issue is to add `contrib` to the libpath.
Note: the loader still has to be rewritten to be less buggy, more simple and saner. cf #1250
Pull-Request: #1436
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexis Laferrière [Fri, 5 Jun 2015 20:58:05 +0000 (16:58 -0400)]
src: prepare `MType::cname_blind` to be more customizable
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 5 Jun 2015 20:58:31 +0000 (16:58 -0400)]
src/c_tools: don't declare the functions in the header
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 5 Jun 2015 22:31:52 +0000 (18:31 -0400)]
src/java FFI: lib/jvm.nit already specify ldflags
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 5 Jun 2015 17:47:59 +0000 (13:47 -0400)]
src: fix support of Byte in the FFI
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 6 Jun 2015 10:56:58 +0000 (06:56 -0400)]
tests: test Byte with the FFI
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 6 Jun 2015 10:56:31 +0000 (06:56 -0400)]
tests: update style of test_ffi_c_primitives
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 5 Jun 2015 19:55:45 +0000 (15:55 -0400)]
tests: add test_keep_going.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 5 Jun 2015 19:53:20 +0000 (15:53 -0400)]
rta: do not visit broken NExpr
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 5 Jun 2015 19:52:55 +0000 (15:52 -0400)]
rta: do no visit borken method
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 5 Jun 2015 19:27:39 +0000 (15:27 -0400)]
compiler: skip compilation of broken methods
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 4 Jun 2015 02:34:24 +0000 (22:34 -0400)]
transform: skip transformation of broken expr
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 4 Jun 2015 02:33:41 +0000 (22:33 -0400)]
typing: improve reliability of `is_typed`.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 4 Jun 2015 02:32:21 +0000 (22:32 -0400)]
phase: continue the phase if errors occur.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 27 May 2015 20:05:41 +0000 (16:05 -0400)]
compiler: runtime error (instead of noop) on dead/invalid code
Signed-off-by: Jean Privat <jean@pryen.org>
Julien Pagès [Sun, 31 May 2015 17:28:31 +0000 (19:28 +0200)]
nitvm: SSA modules also gives all object-mechanisms sites after the computation
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Julien Pagès [Wed, 29 Apr 2015 15:10:36 +0000 (17:10 +0200)]
nitvm: Utility class for printing basic blocks and SSA to dot files
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Julien Pagès [Mon, 1 Jun 2015 13:14:49 +0000 (15:14 +0200)]
nitvm: Computation of SSA-algorithm after the basic block generation
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Julien Pagès [Thu, 23 Apr 2015 15:14:43 +0000 (17:14 +0200)]
nitvm: The position of a Variable in the environment is writable
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Julien Pagès [Mon, 1 Jun 2015 13:13:46 +0000 (15:13 +0200)]
nitvm: Generation of basic blocks from an AST
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Julien Pagès [Mon, 1 Jun 2015 10:27:30 +0000 (12:27 +0200)]
nitvm: Class Basic block for preparing SSA
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Arthur Delamare [Thu, 21 May 2015 19:35:08 +0000 (15:35 -0400)]
example: add 24 game task of Rosetta code
Signed-off-by: Arthur Delamare <arthur.delamare@viacesi.fr>
Mehdi [Wed, 3 Jun 2015 18:12:23 +0000 (14:12 -0400)]
Add some collections for java/collections.nit
Signed-off-by: Mehdi <overpex@gmail.com>
Jean Privat [Thu, 4 Jun 2015 10:35:16 +0000 (06:35 -0400)]
Merge: Opportunity: Adds total number of participants to a meetup
As requested in #1431, this PR adds the total number of participants in a Meetup, as a number aside from the Total, like:
`Total(nb)`
Closes #1431
Pull-Request: #1432
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 4 Jun 2015 10:35:10 +0000 (06:35 -0400)]
Merge: Floats in exponent notation
As a new addition to the parser, as requested in #1261, literal floating-point values in exponent notation.
Pull-Request: #1427
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 4 Jun 2015 10:34:57 +0000 (06:34 -0400)]
Merge: Portable stack-traces
Most detection of the availability of libunwind and the flags to use is moved at the C compilation time (in the Makefile) instead at the Nit compilation time.
Moreover, if libunwind is not available, then stacktraces are just disabled (instead of aborting).
Another advantage is that the generated C is more portable and can be compiled in a different system.
Thus, this will help cross-compilation and should even enable the bootstrap on libunwind-less system like raspberrypi once c_src is regenerated (cf #1149).
The option `--stacktrace` is also replaced with a simpler `--no-stacktrace` for people that want to disable it completely at C-compile time.
Close #1357 and an item in #864.
Pull-Request: #1419
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 4 Jun 2015 10:34:34 +0000 (06:34 -0400)]
Merge: Loose Tokens
Another step to simplify the clients of AST: loose tokens.
Some tokens, correctly lexed by the lexer, are discarded by the parser because of (thanks to?) sablecc transformations. Mainly comments and new-lines (EOL) are lost but some other tokens might be also discarded (currently, commas and dots are still lost).
Previously, the full sequence of tokens can still be accessed trough `next_token` and `prev_token` but this mean that tools like nitprettty and nitlight have to maintain two cursors, one on the AST and one on this linked list of tokens and try to keep these two cursors synchronized.
This PR names the concept of *loose* tokens that are lexed tokens but absent from the AST, and attach to each (non-loose) token in the AST a list of loose tokens that precede it (`prev_looses`) and that follow it (`next_looses`).
This way, a visit on the AST can be used to also easily process all the tokens from the source.
Future PRs will try to use this new thing to improve/simplify/whatever nitpretty and nitlight.
Pull-Request: #1346
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 4 Jun 2015 10:34:02 +0000 (06:34 -0400)]
mksrc: remove --stacktrace
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 4 Jun 2015 00:58:25 +0000 (20:58 -0400)]
tests: update error message when module not found
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 23:40:14 +0000 (19:40 -0400)]
tests: add base_do_block.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 23:39:48 +0000 (19:39 -0400)]
frontend: warn useless `do` blocks
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 18:47:48 +0000 (14:47 -0400)]
loader: teach it to search in src subdirectories
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 18:26:12 +0000 (14:26 -0400)]
loader: add contrib to the default path of projects
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 18:25:39 +0000 (14:25 -0400)]
loader: use join_path to search the lib directory
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 00:42:03 +0000 (20:42 -0400)]
parser: ComputeProdLocationVisitor also compute *_looses tokens
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 00:41:13 +0000 (20:41 -0400)]
parser: the parent of EOF is Start
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 14 May 2015 23:18:15 +0000 (19:18 -0400)]
parser: ComputeProdLocationVisitor remember the last token instead of the location
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 14 May 2015 23:17:11 +0000 (19:17 -0400)]
parser: add `is_loose`, `prev_looses` and `next_looses`
Signed-off-by: Jean Privat <jean@pryen.org>
fixup loos in nodes
Lucas Bajolet [Wed, 3 Jun 2015 15:38:50 +0000 (11:38 -0400)]
tests: Updated test_float for new literals
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 3 Jun 2015 15:37:41 +0000 (11:37 -0400)]
parser: Regenerated for new floats
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 3 Jun 2015 15:37:24 +0000 (11:37 -0400)]
parser: Updated to support float with exponent part
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 3 Jun 2015 15:28:48 +0000 (11:28 -0400)]
Opportunity: Adds total number of participants to a meetup
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 3 Jun 2015 02:00:06 +0000 (22:00 -0400)]
Merge: Manage errors on reading binary data
Pull-Request: #1430
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 02:00:01 +0000 (22:00 -0400)]
Merge: Better error handling in Socket
Errors on both finding a host by its name and on connection are reported with all available details as an `Error`.
Pull-Request: #1428
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 01:58:38 +0000 (21:58 -0400)]
Merge: Fix for Android
Pull-Request: #1429
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 3 Jun 2015 01:58:32 +0000 (21:58 -0400)]
Merge: Native Types
Since we plan on conforming with UTF-8, chars can no longer be of C char type, this PR changes the internal representation of a Char to become capable of holding an arbitrary Unicode code point.
Since chars become unsigned entities, and since NativeString will hold Byte values soon, its c type has been changed to unsigned char* as preparation for the migration
This is all related and necessary for #1262.
Pull-Request: #1407
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Jean Privat <jean@pryen.org>
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>
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>
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>
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>
Alexis Laferrière [Tue, 2 Jun 2015 15:32:10 +0000 (11:32 -0400)]
lib/binary: document behavior when reading binary data with a pending error
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 1 Jun 2015 13:05:06 +0000 (09:05 -0400)]
lib/binary: protect `read_string` from stream errors
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 30 May 2015 17:46:37 +0000 (13:46 -0400)]
lib/binary: redirect 32 bits endianess functions on Android
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 30 May 2015 17:45:42 +0000 (13:45 -0400)]
lib/mnit_android: fix `Int::next_pow`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 2 Jun 2015 15:03:21 +0000 (11:03 -0400)]
lib/socket: set `last_error` on connection failed
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 2 Jun 2015 11:33:04 +0000 (07:33 -0400)]
lib/socket: set `last_error` on failed hostname lookups
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 2 Jun 2015 15:01:17 +0000 (11:01 -0400)]
lib/socket: intro `HErrno::to_s`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 2 Jun 2015 12:44:33 +0000 (08:44 -0400)]
lib/socket: wrap h_errno to report error on gethostbyname
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 2 Jun 2015 12:44:01 +0000 (08:44 -0400)]
lib/socket: move gethostbyname to Sys and use light FFI
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Lucas Bajolet [Mon, 1 Jun 2015 18:03:56 +0000 (14:03 -0400)]
compiler: Changed types of Char to uint32_t and NativeString to unsigned char*
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Tue, 2 Jun 2015 10:43:05 +0000 (06:43 -0400)]
Merge: Correct scope in assert else
Easy fix in scope.nit, most of the time was spend writing the test file.
Close #1422
Pull-Request: #1423
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 2 Jun 2015 10:42:59 +0000 (06:42 -0400)]
Merge: nitx: add hierarchy lookup commands
This PR introduce 4 commands to explore class hierarchies:
* `parents:` for direct parents
* `ancestors`: for all inherited classes
* `children:` for known direct children
* `descendants:` for all the known descandants classes
Also fixes #1420
Pull-Request: #1421
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 2 Jun 2015 10:42:54 +0000 (06:42 -0400)]
Merge: Removed intern dependencies from abstract to flat strings
As @privat suggested, here's the PR that cleans the abstract Text class of the string block, this will serve as prelude for the integration of #1400
Pull-Request: #1412
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Lucas Bajolet [Wed, 27 May 2015 18:01:35 +0000 (14:01 -0400)]
lib/standard/string: Added new factory to Buffer abstract class
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Wed, 27 May 2015 18:02:19 +0000 (14:02 -0400)]
lib/standard/string: Removed flatten method on String, was never used
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Mon, 1 Jun 2015 14:47:36 +0000 (10:47 -0400)]
version 0.7.5
Signed-off-by: Jean Privat <jean@pryen.org>
MehdiAit [Tue, 13 Jan 2015 15:15:51 +0000 (10:15 -0500)]
lib: add module date
Signed-off-by: MehdiAit <overpex@gmail.com>
Julien Pagès [Sun, 31 May 2015 17:45:29 +0000 (19:45 +0200)]
nitvm: Allow to set some attributes in Variable class
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Jean Privat [Sun, 31 May 2015 01:47:38 +0000 (21:47 -0400)]
tests: add base_scope.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 31 May 2015 01:45:33 +0000 (21:45 -0400)]
scope: the `else` of the assert is a scoped block
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 30 May 2015 12:15:42 +0000 (08:15 -0400)]
Merge: Kill `model_utils`
This PR removes the so hated module `model_utils`:
* Useful services are kept in a new module `model::model_collect` that allows to collect and filter things from a `Model`.
* Clients are migrated from `model_utils` to `model_collect` one by one. Misc functionalities used only by one client are moved in the client.
Fixes #710
Pull-Request: #1376
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Alexandre Terrasa [Sat, 30 May 2015 01:35:47 +0000 (21:35 -0400)]
nitx: add hierarchies commands
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 30 May 2015 01:35:15 +0000 (21:35 -0400)]
nitx: display MEntitiesListArticle in console templates
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 30 May 2015 01:34:22 +0000 (21:34 -0400)]
nitx: make help message prettier
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 30 May 2015 01:33:37 +0000 (21:33 -0400)]
nitx: make console composites use `doc_base` titles
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>