Jean Privat [Fri, 28 Feb 2014 13:57:37 +0000 (08:57 -0500)]
nitg-s: add hardening_live_open_type and hardening_cast_type
with --hardening, add additional runtime-test on type resolution and
type checks.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 27 Feb 2014 21:21:47 +0000 (16:21 -0500)]
rta: store real types in live_cast_type
The separate compiler need to distinguish if the target is nullable or not.
So do not un-nullable cast types.
rta_metrics.nit is also updated to deal with the change of the static
type of the attribute.
nitg-g is also modified to use the new correct the RTA information
(this remove a workaround)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 24 Feb 2014 22:49:20 +0000 (17:49 -0500)]
Merge branch 'c_ffi_alive_again'
Last of the serie
Jean Privat [Mon, 24 Feb 2014 20:53:46 +0000 (15:53 -0500)]
Merge remote-tracking branch 'alexis/deserialization'
Adds deserialization support to serialization framework and the Json
implementation. Also fix wrongful use of `' '` for chars in
generated
Json.
Merged to prevent bug with nitdoc and duplicate modules.
To be done next:
* Support for generic types
* Separate the json_serialization services in 2: pure json and json
* for
deserialization.
* Support NativeArray or its users
Alexis Laferrière [Fri, 7 Feb 2014 21:33:29 +0000 (16:33 -0500)]
tests: skip test_json for nitg-g
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 3 Feb 2014 17:42:35 +0000 (12:42 -0500)]
niti: import common_ffi module to support some FFI phases
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 3 Feb 2014 16:57:06 +0000 (11:57 -0500)]
lib/realtime: use c_linker_option in realtime module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:17:58 +0000 (15:17 -0500)]
example: update and fix the extern_methods example
The implementation of the method foo wrongfully called its C self.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 8 Dec 2013 02:41:25 +0000 (21:41 -0500)]
lib/socket: fix missing FFI imports in socket
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 20 Jan 2014 14:51:14 +0000 (09:51 -0500)]
lib/sdl: use c_compiler_option annotations
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 29 Nov 2013 16:08:41 +0000 (11:08 -0500)]
lib/sqlite3: use pkgconfig in sqlite3
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 20 Jan 2014 14:54:40 +0000 (09:54 -0500)]
lib/json: make SequenceRead jsonable instead of Sequence
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 20 Jan 2014 14:54:57 +0000 (09:54 -0500)]
lib/json: fix missing FFI imports
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 18 Oct 2013 17:24:40 +0000 (13:24 -0400)]
lib/json: use pkgconfig in json module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 18 Oct 2013 17:23:42 +0000 (13:23 -0400)]
lib/curses: use pkgconfig in curses module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 29 Nov 2013 16:04:52 +0000 (11:04 -0500)]
lib/curl: adds missing FFI import
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 6 Oct 2013 14:16:43 +0000 (10:16 -0400)]
lib/curl: use pkgconfig in curl module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 21 Sep 2013 05:50:30 +0000 (01:50 -0400)]
lib/gtk: use the pkgconfig annotation in GTK module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 19 Oct 2013 15:11:26 +0000 (11:11 -0400)]
tests: adds tests for the annotations "c_?_options"
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 24 Feb 2014 20:53:12 +0000 (15:53 -0500)]
Merge commit 'b7e675f'
Partially fixes issue #276 and add the test to exhibit the remaining bad
behavior of the issue
Jean Privat [Mon, 24 Feb 2014 15:55:20 +0000 (10:55 -0500)]
Merge branch 'use_more_callsite'
CallSite is a great data-class to store various information on a call
site.
This series generalizes its usage in some place, and remove a old
depreciated API.
This uniformization and cleanup will be useful in future work, like
call-site optimizations and the new constructors
Jean Privat [Mon, 24 Feb 2014 15:49:37 +0000 (10:49 -0500)]
tests: add base_attr_init_val_int.nit
This is used to show the current bad behavior of uninitialized primitive
types.
See issue #276
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 24 Feb 2014 15:44:20 +0000 (10:44 -0500)]
RTA: force primitive types to be alive
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 24 Feb 2014 13:59:34 +0000 (08:59 -0500)]
Merge remote-tracking branch 'lucas/string_integration'
Part of String refactor, adds a new "chars" method on strings, should be
preferred to the old way of calling Collection services on Strings and
Buffers.
Alexis Laferrière [Sat, 22 Feb 2014 16:45:20 +0000 (11:45 -0500)]
Merge branch 'privat' into deserialization
Alexis Laferrière [Sat, 22 Feb 2014 15:26:03 +0000 (10:26 -0500)]
tests: use a Char in test_deserialization
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 22 Feb 2014 15:19:31 +0000 (10:19 -0500)]
lib/json_serialization: fix support for Char
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 22 Feb 2014 15:20:21 +0000 (10:20 -0500)]
lib/json_serialization: remove use of \b in Nit strings
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Feb 2014 18:02:09 +0000 (13:02 -0500)]
phase/serialization: detect unsupported case until it is supported
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 20 Feb 2014 17:22:14 +0000 (12:22 -0500)]
phase/serialization: fix test_serialization_redef to suport basic deserialization
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 3 Feb 2014 03:59:30 +0000 (22:59 -0500)]
lib/simple_json_reader: unprotect special char in strings
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 2 Feb 2014 22:53:48 +0000 (17:53 -0500)]
tests: add deserialization test
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 21 Feb 2014 20:33:53 +0000 (15:33 -0500)]
tests: update RTA tests to relates the change in rta module
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 19:56:44 +0000 (14:56 -0500)]
typing: remove depreciated API and rely only on callsites
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 19:55:09 +0000 (14:55 -0500)]
niti: use callsite to do the interpretation
Instead of the old API
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 19:54:17 +0000 (14:54 -0500)]
rta: use callsites to do the analysis
This is also simpler than using the deprecated API
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 19:52:51 +0000 (14:52 -0500)]
typing: use a callsite to store "super init call"
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 19:12:13 +0000 (14:12 -0500)]
Merge branch 'fix_param_check'
Jean Privat [Fri, 21 Feb 2014 19:11:56 +0000 (14:11 -0500)]
Merge branch 'fix_mkcsrc'
merge 407771f (#269) broke the regeneration of c_src
(because of hard coded ".nit_compile" path)
This series fixes the issue, and provide a script usable by Jenkins
to ensure that this does not occurs again.
This also highlight that the reviews of #269 where insufficient
and/or motivated by something else than code quality :)
Jean Privat [Fri, 21 Feb 2014 16:58:58 +0000 (11:58 -0500)]
src: new script full_bootstrap
Used to check that mkcsrc is not broken
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 16:57:10 +0000 (11:57 -0500)]
mkcsrc: remove and replace old c_src
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 16:24:28 +0000 (11:24 -0500)]
compiler_ffi: use `compile_dir` instead of hard-coded ".nit_compile"
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 16:23:53 +0000 (11:23 -0500)]
abstact_compiler: add `ModelBuilder::compile_dir`
So each part do not have to retrieve it from opt_compile_dir
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 14:43:09 +0000 (09:43 -0500)]
Merge remote-tracking branch 'lucas/local_redef_fix'
Jean Privat [Fri, 21 Feb 2014 14:42:32 +0000 (09:42 -0500)]
Merge branch 'fix_lookup_definitions'
Jean Privat [Fri, 21 Feb 2014 14:07:29 +0000 (09:07 -0500)]
tests: update sav and remove some fixme.
It means that #271 was already known but nobody cared :(
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 14:05:08 +0000 (09:05 -0500)]
modelize_properties: improve error messages
So that the original propdef is shown
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 21 Feb 2014 14:04:08 +0000 (09:04 -0500)]
modelize_property: fix the check of the types of parameters in a redef
COMP101 brownbag bug where someone mistake 'or' and 'and'
Fixes #271
Reported-by: Julien Pagès <julien.m.pages@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sat, 1 Feb 2014 19:09:14 +0000 (14:09 -0500)]
phases: add support for deserialization
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Lucas Bajolet [Thu, 20 Feb 2014 15:45:05 +0000 (10:45 -0500)]
nitg: Fixed modelize_property to print an error when two redefs of the same method occur locally.
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Tue, 18 Feb 2014 20:26:59 +0000 (15:26 -0500)]
model: select_most_specific behave correctly when given comparable propdefs
Keep all occurences of comparable but distinct propdefs.
This case should not occurs in sane usage of the function.
But having a good behavior is good nevertheless.
Reported-by: Lucas Bajolet <lucas.bajolet@hotmail.com
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 18 Feb 2014 20:16:01 +0000 (15:16 -0500)]
model: factorize `select_most_specific` from `lookup_*_definitions`
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sat, 19 Oct 2013 03:42:32 +0000 (23:42 -0400)]
nitg/ffi: adds the annotations c_[copiler|linker]_option
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 30 Jan 2014 20:58:51 +0000 (15:58 -0500)]
tests: add tests for the pkgconfig annotation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 21 Sep 2013 18:03:18 +0000 (14:03 -0400)]
nitg/ffi: adds the pkgconfig annotation to detect required C compilation flags
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 17 Feb 2014 19:40:30 +0000 (14:40 -0500)]
Merge branch 'ffi_core' into merge_ffi
Alexis Laferrière [Wed, 29 Jan 2014 16:01:55 +0000 (11:01 -0500)]
nitg: detect if a compiler supports the FFI
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 17 Feb 2014 19:11:26 +0000 (14:11 -0500)]
nitg: activate support for the FFI in nitg
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Conflicts:
src/abstract_compiler.nit
src/separate_compiler.nit
Alexis Laferrière [Wed, 29 Jan 2014 21:14:47 +0000 (16:14 -0500)]
nitg-g: support cast between subtypes of Pointer
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 19:19:45 +0000 (14:19 -0500)]
nitg: intro the compiler_ffi module to support the FFI in nitg
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 19:19:04 +0000 (14:19 -0500)]
nitg: intro the common_ffi module and support for the C language
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 15 Nov 2013 21:07:07 +0000 (16:07 -0500)]
nitg: intro the nitni module
Offers services defining the tailored API used by the FFI.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 17 Feb 2014 19:08:11 +0000 (14:08 -0500)]
Merge branch 'ffi_libupdate' into merge_ffi
Alexis Laferrière [Fri, 29 Nov 2013 16:08:27 +0000 (11:08 -0500)]
lib: update json module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:20:21 +0000 (15:20 -0500)]
lib: update the callback_monkey example to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:16:32 +0000 (15:16 -0500)]
lib: update sort_downloads to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:16:19 +0000 (15:16 -0500)]
lib: update the socket module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:16:10 +0000 (15:16 -0500)]
lib: update the curses module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:16:02 +0000 (15:16 -0500)]
lib: update the signal module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 17 Feb 2014 15:46:48 +0000 (10:46 -0500)]
lib: update mnit module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Thu, 28 Nov 2013 20:15:24 +0000 (15:15 -0500)]
lib: update gtk3_4 module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 20:15:03 +0000 (15:15 -0500)]
lib: update curl module to the latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 16:41:12 +0000 (11:41 -0500)]
lib: update sqlite3 module to latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 28 Nov 2013 16:40:28 +0000 (11:40 -0500)]
lib: update md5 module to latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 9 Nov 2013 02:15:18 +0000 (21:15 -0500)]
lib: update the json module to latest FFI spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 27 Nov 2013 15:10:39 +0000 (10:10 -0500)]
tests: update FFI tests to latest spec
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 31 Aug 2013 12:07:03 +0000 (08:07 -0400)]
lib: update standard library to latest FFI spec
At this commit, nitg can be compiled using nitg compiled from Nit in
the previous commit.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 17 Feb 2014 18:39:58 +0000 (13:39 -0500)]
c_src: update for new ffi syntax
Signed-off-by: Jean Privat <jean@pryen.org>
Lucas Bajolet [Mon, 17 Feb 2014 16:08:35 +0000 (11:08 -0500)]
stdlib/strings: Temporary removal of Ropes from stdlib.
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Mon, 17 Feb 2014 15:42:44 +0000 (10:42 -0500)]
Merge branch 'prepare-ffi-migration' into merge_ffi
Lucas Bajolet [Mon, 17 Feb 2014 15:39:26 +0000 (10:39 -0500)]
stdlib/strings: Removed usage of Strings as SequenceRead by using chars.
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Alexis Laferrière [Fri, 19 Jul 2013 18:20:36 +0000 (14:20 -0400)]
model: rta uses its visitor only to visit FFI extern methods
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 19 Oct 2013 17:49:42 +0000 (13:49 -0400)]
tests: remove native interface tests
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 29 Jan 2014 16:03:21 +0000 (11:03 -0500)]
src: delete old ffi and native_interface code
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 31 Jan 2014 14:47:46 +0000 (09:47 -0500)]
tests: fix sav file for test_for_times
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 17 Feb 2014 14:12:15 +0000 (09:12 -0500)]
Merge branch 'enlarge_ffi_syntax' into merge_ffi
Alexandre Terrasa [Sat, 15 Feb 2014 02:48:47 +0000 (18:48 -0800)]
doc: added comment for metrics::inheritance_metrics::InheritanceMetricsPhase
Alexandre Terrasa <alexandre@moz-code.org>
Lucas Bajolet [Thu, 16 Jan 2014 17:32:22 +0000 (12:32 -0500)]
stdlib/strings: Removed from_substring constructor (replaced by with_infos)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 14 Feb 2014 21:18:11 +0000 (16:18 -0500)]
stdlib/strings: Added view on the chars of String and Buffer class to abstract them from the Collection model
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Fri, 14 Feb 2014 18:13:40 +0000 (13:13 -0500)]
parser: regenerate files
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 14 Feb 2014 18:13:13 +0000 (13:13 -0500)]
parser: extern stuff accepts types and dot
For compatibility with existing code:
* dot is optional to keep compatibility with existing code.
* The language of types include the language of classid.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 14 Feb 2014 18:09:39 +0000 (13:09 -0500)]
parser: drop qualification in annotations
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 14 Feb 2014 16:26:34 +0000 (11:26 -0500)]
Merge branch 'long_string'
fix long strings with alternation of " and {
example of now accepted strings
~~~
a = """<field="{{{value}}}">"""
~~~
However, I am not sure how existing colorers (see the misc/ directory)
behave.
reported-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 13 Feb 2014 15:16:24 +0000 (10:16 -0500)]
tests: add test_string_triple2.nit
for complex mixing of { and "
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 13 Feb 2014 15:15:52 +0000 (10:15 -0500)]
parser: regenerate table for long strings
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 13 Feb 2014 15:15:31 +0000 (10:15 -0500)]
parser: improve long string when mixing " and {
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 12 Feb 2014 21:05:22 +0000 (16:05 -0500)]
c_src: remove git attribute `diff` on generated files
So diffs and stats will not be polluted by meaningless changes
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 12 Feb 2014 19:31:42 +0000 (14:31 -0500)]
Merge branch 'rta_not_mandatory'
Jean Privat [Wed, 12 Feb 2014 19:31:18 +0000 (14:31 -0500)]
Merge branch 'calculator' of https://github.com/BlackMinou/nit
Chanoir [Wed, 12 Feb 2014 18:38:14 +0000 (13:38 -0500)]
Merge pull request #1 from xymus/calculator
Small fixes for the calculator example and gtk lib