nit.git
14 years agosyntax: refuse return in default closure definition
Jean Privat [Tue, 26 Jan 2010 18:53:09 +0000 (13:53 -0500)]
syntax: refuse return in default closure definition

Such a return can be seen ambiguous.
Users have to use break or continue.

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

14 years agometamodel: lazily compute global properties
Jean Privat [Fri, 22 Jan 2010 22:27:38 +0000 (17:27 -0500)]
metamodel: lazily compute global properties

has_global_property and has_global_property_by_name perform a look-up
global_properties calls inherit_global_properties if needed
inherit_global_properties is made private

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

14 years agosyntax: do not inherit and check all local properties
Jean Privat [Fri, 22 Jan 2010 22:11:18 +0000 (17:11 -0500)]
syntax: do not inherit and check all local properties

In Nit, the majority of conflicts are silent.

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

14 years agoanalysis: improve alocate_register_slots
Jean Privat [Thu, 21 Jan 2010 21:30:21 +0000 (16:30 -0500)]
analysis: improve alocate_register_slots

Use better data structure (no more hash*) and detect loop/closure nesting.

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

14 years agoanalysis: simplify icode inlining
Jean Privat [Thu, 21 Jan 2010 21:27:27 +0000 (16:27 -0500)]
analysis: simplify icode inlining

Permit unbounded nested inlining. The only restriction is that an
iroutine cannot be inlined in itself.

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

14 years agoanalysis: inline Int::enumerate_*
Jean Privat [Tue, 19 Jan 2010 13:44:09 +0000 (08:44 -0500)]
analysis: inline Int::enumerate_*

They should have been inlined a long time ago.

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

14 years agosyntax: type error when using superstrings with nullables
Jean Privat [Mon, 18 Jan 2010 18:13:50 +0000 (13:13 -0500)]
syntax: type error when using superstrings with nullables

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

14 years agosyntax: fix code using superstrings with nullables
Jean Privat [Mon, 18 Jan 2010 18:13:21 +0000 (13:13 -0500)]
syntax: fix code using superstrings with nullables

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

14 years agosyntax: remove reachability test in ABreakExpr
Jean Privat [Mon, 18 Jan 2010 17:09:39 +0000 (12:09 -0500)]
syntax: remove reachability test in ABreakExpr

Since unreachable statements are no more visited.

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

14 years agosyntax: do not nest variable context in ABlockExpr
Jean Privat [Mon, 18 Jan 2010 17:00:38 +0000 (12:00 -0500)]
syntax: do not nest variable context in ABlockExpr

They are already nested in parent nodes (in case of one-liner for instance).

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

14 years agosyntax: allow 'null == x' and 'null != x'
Jean Privat [Fri, 15 Jan 2010 20:49:37 +0000 (15:49 -0500)]
syntax: allow 'null == x' and 'null != x'

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

14 years agosyntax: track exits context in do blocks
Jean Privat [Fri, 15 Jan 2010 20:13:26 +0000 (15:13 -0500)]
syntax: track exits context in do blocks

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

14 years agosyntax: remove VariableContex::stype=
Jean Privat [Fri, 15 Jan 2010 19:43:53 +0000 (14:43 -0500)]
syntax: remove VariableContex::stype=

Make VariableContext less mutable thus simplify merging code.

Fix also a type_evolution test that were wrong.

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

14 years agosyntax: stmts after loops without breaks are unreashables
Jean Privat [Thu, 14 Jan 2010 16:43:05 +0000 (11:43 -0500)]
syntax: stmts after loops without breaks are unreashables

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

14 years agosyntax: prepare stmts following loops to be unreachable
Jean Privat [Thu, 14 Jan 2010 16:34:27 +0000 (11:34 -0500)]
syntax: prepare stmts following loops to be unreachable

Add dummy breaks and aborts in order to be able to bootstrap once
statements following loops without breaks are set unreachable.

Once c_src is updated, these dummy statements should be removed.

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

14 years agosyntax: unreachable statements are errors
Jean Privat [Wed, 13 Jan 2010 22:14:25 +0000 (17:14 -0500)]
syntax: unreachable statements are errors

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

14 years agotests: remove static dead code
Jean Privat [Wed, 13 Jan 2010 16:36:05 +0000 (11:36 -0500)]
tests: remove static dead code

Prepare for the error (currently it is a warning)

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

14 years agosyntax: while/loop exit type evolution
Jean Privat [Tue, 12 Jan 2010 20:31:56 +0000 (15:31 -0500)]
syntax: while/loop exit type evolution

Implementation requires that variable contexts on breaks are collected
and merged.

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

14 years agosyntax: fix type evolution on non nullable type
Jean Privat [Tue, 12 Jan 2010 19:51:01 +0000 (14:51 -0500)]
syntax: fix type evolution on non nullable type

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

14 years agosyntax: comparing a variable with null makes it evolve to null
Jean Privat [Fri, 8 Jan 2010 22:09:04 +0000 (17:09 -0500)]
syntax: comparing a variable with null makes it evolve to null

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

14 years agosyntax: merge nullable information on type evolution
Jean Privat [Fri, 8 Jan 2010 19:45:57 +0000 (14:45 -0500)]
syntax: merge nullable information on type evolution

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

14 years agosyntax: prevent segfault on null types
Jean Privat [Thu, 7 Jan 2010 21:48:24 +0000 (16:48 -0500)]
syntax: prevent segfault on null types

Errors on: method calls, attribute access.
Warnings on: null-null comparisons, null casted to non nullable.

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

14 years agosyntax: untyped local variables are 'nullable Object'
Jean Privat [Thu, 7 Jan 2010 19:57:02 +0000 (14:57 -0500)]
syntax: untyped local variables are 'nullable Object'

This partially reverts commit 220823e713cef8915241679a614fbfb53ddaece0
"syntax: allow untyped variable declaration".

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

14 years agosyntax: real variable type evolution on IfexprExpr
Jean Privat [Fri, 8 Jan 2010 21:56:12 +0000 (16:56 -0500)]
syntax: real variable type evolution on IfexprExpr

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

14 years agosyntax: fix variable context merge on unreashable branches
Jean Privat [Fri, 8 Jan 2010 19:46:52 +0000 (14:46 -0500)]
syntax: fix variable context merge on unreashable branches

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

14 years agonitdoc: correctly display the package path before the package name
Jean Privat [Fri, 8 Jan 2010 22:20:48 +0000 (17:20 -0500)]
nitdoc: correctly display the package path before the package name

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

14 years agoparser: fix comment in Makefile
Jean Privat [Thu, 7 Jan 2010 18:58:50 +0000 (13:58 -0500)]
parser: fix comment in Makefile

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

14 years agocompile: add program arguments passed to C compiler; gcc's -l, -L, -I and -c
Alexis Laferrière [Fri, 18 Dec 2009 04:13:55 +0000 (23:13 -0500)]
compile: add program arguments passed to C compiler; gcc's -l, -L, -I and -c

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: rename program argument no_cc to no-cc for consistency
Alexis Laferrière [Fri, 18 Dec 2009 04:05:01 +0000 (23:05 -0500)]
compile: rename program argument no_cc to no-cc for consistency

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotests: add some basic tests for dead method removal/cha/rta
Jean-Sebastien Gelinas [Mon, 7 Dec 2009 05:10:19 +0000 (00:10 -0500)]
tests: add some basic tests for dead method removal/cha/rta

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotests: rename the 'all' target to 'separate' and create a new 'all' target
Jean-Sebastien Gelinas [Sat, 5 Dec 2009 21:17:25 +0000 (16:17 -0500)]
tests: rename the 'all' target to 'separate' and create a new 'all' target

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotests: add a 'icode' target to the Makefile
Jean-Sebastien Gelinas [Sat, 5 Dec 2009 21:14:10 +0000 (16:14 -0500)]
tests: add a 'icode' target to the Makefile

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotests: add a script to test ICode generation
Jean-Sebastien Gelinas [Sat, 5 Dec 2009 21:03:12 +0000 (16:03 -0500)]
tests: add a script to test ICode generation

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: remove '--dump', replaced by '--output-format icode'
Jean-Sebastien Gelinas [Fri, 4 Dec 2009 06:16:07 +0000 (01:16 -0500)]
compile: remove '--dump', replaced by '--output-format icode'

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: add 'icode' as output type
Jean-Sebastien Gelinas [Fri, 4 Dec 2009 06:14:11 +0000 (01:14 -0500)]
compile: add 'icode' as output type

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoicode: add a way to output icodes without line numbers and/or locations
Jean-Sebastien Gelinas [Fri, 4 Dec 2009 01:39:20 +0000 (20:39 -0500)]
icode: add a way to output icodes without line numbers and/or locations

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: add a way to choose generated output format
Jean-Sebastien Gelinas [Thu, 3 Dec 2009 20:30:22 +0000 (15:30 -0500)]
compile: add a way to choose generated output format

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add logs to dead method removal optimization
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 21:55:01 +0000 (17:55 -0400)]
analysis: add logs to dead method removal optimization

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add logs for 'out of init getter tests' optimization
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 21:27:16 +0000 (17:27 -0400)]
analysis: add logs for 'out of init getter tests' optimization

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add 'dump_global_optimizations_information' to generate logs about optimiza...
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 21:22:19 +0000 (17:22 -0400)]
analysis: add 'dump_global_optimizations_information' to generate logs about optimizations

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add an optimization to remove 'getter' tests when called outside an init
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 21:20:18 +0000 (17:20 -0400)]
analysis: add an optimization to remove 'getter' tests when called outside an init

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add implementation for reachable methods from initializers analysis
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 20:05:08 +0000 (16:05 -0400)]
analysis: add implementation for reachable methods from initializers analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add logs for reachable from init analysis
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 19:33:33 +0000 (15:33 -0400)]
analysis: add logs for reachable from init analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add an analysis to know if a method/iroutine is reachable from an init
Jean-Sebastien Gelinas [Wed, 21 Oct 2009 19:13:40 +0000 (15:13 -0400)]
analysis: add an analysis to know if a method/iroutine is reachable from an init

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: fix RTA implementation for inherited methods
Jean-Sebastien Gelinas [Wed, 28 Oct 2009 03:26:47 +0000 (23:26 -0400)]
analysis: fix RTA implementation for inherited methods

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add support for 'Inline__' in RTA
Jean-Sebastien Gelinas [Tue, 24 Nov 2009 23:45:03 +0000 (18:45 -0500)]
analysis: add support for 'Inline__' in RTA

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: inline getters/setters before analysis
Jean-Sebastien Gelinas [Mon, 23 Nov 2009 06:00:03 +0000 (01:00 -0500)]
analysis: inline getters/setters before analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: split optimization in two groups: pre and post analysis
Jean-Sebastien Gelinas [Mon, 23 Nov 2009 05:09:33 +0000 (00:09 -0500)]
analysis: split optimization in two groups: pre and post analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add logs to reachable as init analysis
Jean-Sebastien Gelinas [Sat, 21 Nov 2009 21:53:36 +0000 (16:53 -0500)]
analysis: add logs to reachable as init analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add the implementation of the reachable as initializer analysis
Jean-Sebastien Gelinas [Sat, 21 Nov 2009 20:40:50 +0000 (15:40 -0500)]
analysis: add the implementation of the reachable as initializer analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: add an analysis to find reachable init (used as init)
Jean-Sebastien Gelinas [Sat, 21 Nov 2009 00:34:07 +0000 (19:34 -0500)]
analysis: add an analysis to find reachable init (used as init)

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: generate tables only for live local classes
Jean-Sebastien Gelinas [Mon, 21 Sep 2009 21:11:00 +0000 (17:11 -0400)]
compile: generate tables only for live local classes

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotests: fix error_class_glob.fail
Jean-Sebastien Gelinas [Tue, 24 Nov 2009 21:32:56 +0000 (16:32 -0500)]
tests: fix error_class_glob.fail

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: fix RTA to say that at least primitive types are always instantiated (even...
Jean-Sebastien Gelinas [Mon, 21 Sep 2009 21:10:06 +0000 (17:10 -0400)]
analysis: fix RTA to say that at least primitive types are always instantiated (even if we don't see a main class/method)

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoparser: remove useless methods from generated parser code
Jean-Sebastien Gelinas [Sun, 20 Sep 2009 15:06:23 +0000 (11:06 -0400)]
parser: remove useless methods from generated parser code

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add log information about instantiated and not instantiated types
Jean-Sebastien Gelinas [Sun, 20 Sep 2009 14:50:04 +0000 (10:50 -0400)]
tools: add log information about instantiated and not instantiated types

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add log information about reachable and unreachable methods
Jean-Sebastien Gelinas [Fri, 18 Sep 2009 19:54:15 +0000 (15:54 -0400)]
tools: add log information about reachable and unreachable methods

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: use 'with_each_iroutines' to go through iroutines in method removal algorithm
Jean-Sebastien Gelinas [Fri, 18 Sep 2009 19:47:26 +0000 (15:47 -0400)]
compile: use 'with_each_iroutines' to go through iroutines in method removal algorithm

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoanalysis: refine with_each_live_local_classes in Instantiated Type Analysis since...
Jean-Sebastien Gelinas [Mon, 21 Sep 2009 21:10:43 +0000 (17:10 -0400)]
analysis: refine with_each_live_local_classes in Instantiated Type Analysis since we have more information

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: generate logs in a selected directory
Jean-Sebastien Gelinas [Sun, 20 Sep 2009 14:48:01 +0000 (10:48 -0400)]
tools: generate logs in a selected directory

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add a 'global' compilation target to the tests makefile
Jean-Sebastien Gelinas [Mon, 23 Nov 2009 23:07:13 +0000 (18:07 -0500)]
tools: add a 'global' compilation target to the tests makefile

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: don't print stack for tests that fail, fix saves
Jean-Sebastien Gelinas [Tue, 24 Nov 2009 06:21:03 +0000 (01:21 -0500)]
tools: don't print stack for tests that fail, fix saves

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add a env. variable to remove runtime stack showing
Jean-Sebastien Gelinas [Mon, 23 Nov 2009 23:06:31 +0000 (18:06 -0500)]
tools: add a env. variable to remove runtime stack showing

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add a function to go through every classes in the program
Jean-Sebastien Gelinas [Fri, 18 Sep 2009 20:47:02 +0000 (16:47 -0400)]
tools: add a function to go through every classes in the program

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add a function to go through every methods in a program
Jean-Sebastien Gelinas [Fri, 18 Sep 2009 19:50:16 +0000 (15:50 -0400)]
tools: add a function to go through every methods in a program

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: add a function to go through every IRoutines in a program
Jean-Sebastien Gelinas [Fri, 18 Sep 2009 19:08:44 +0000 (15:08 -0400)]
tools: add a function to go through every IRoutines in a program

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agoicode: inline foreign icloscall and ihasclos
Jean Privat [Tue, 15 Sep 2009 15:22:37 +0000 (11:22 -0400)]
icode: inline foreign icloscall and ihasclos

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

14 years agonitdoc: workaround for a broken assertion
Jean Privat [Tue, 15 Sep 2009 14:53:55 +0000 (10:53 -0400)]
nitdoc: workaround for a broken assertion

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

14 years agooptimize: add a callgraph builder: RTA
Jean-Sebastien Gelinas [Thu, 20 Aug 2009 20:56:53 +0000 (16:56 -0400)]
optimize: add a callgraph builder: RTA

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agooptimize: add a callgraph builder: CHA
Jean-Sebastien Gelinas [Tue, 11 Aug 2009 18:40:15 +0000 (14:40 -0400)]
optimize: add a callgraph builder: CHA

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agooptimize: add a dead method removal optimization
Jean-Sebastien Gelinas [Thu, 13 Aug 2009 17:54:36 +0000 (13:54 -0400)]
optimize: add a dead method removal optimization

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agooptimize: add optimization basis
Jean-Sebastien Gelinas [Wed, 19 Aug 2009 18:59:07 +0000 (14:59 -0400)]
optimize: add optimization basis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agolib: add value_name to OptionEnum to get the selected name
Jean-Sebastien Gelinas [Thu, 3 Sep 2009 20:44:33 +0000 (16:44 -0400)]
lib: add value_name to OptionEnum to get the selected name

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agotools: fix gccx with: .nit_compile[0-9] and GC
Jean-Sebastien Gelinas [Wed, 2 Sep 2009 21:33:25 +0000 (17:33 -0400)]
tools: fix gccx with: .nit_compile[0-9] and GC

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: move table computation after all global analysis
Jean-Sebastien Gelinas [Tue, 8 Sep 2009 15:30:29 +0000 (11:30 -0400)]
compile: move table computation after all global analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: move some class processing to program to do it before analysis
Jean-Sebastien Gelinas [Tue, 8 Sep 2009 15:29:57 +0000 (11:29 -0400)]
compile: move some class processing to program to do it before analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: remove ClassSorter, use sort with block instead
Jean-Sebastien Gelinas [Tue, 8 Sep 2009 15:28:56 +0000 (11:28 -0400)]
compile: remove ClassSorter, use sort with block instead

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: move MMLocalClass::compare to AbstractMetamodel and rename to total_order_co...
Jean-Sebastien Gelinas [Tue, 8 Sep 2009 15:27:22 +0000 (11:27 -0400)]
compile: move MMLocalClass::compare to AbstractMetamodel and rename to total_order_compare

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agolib: add Array::sort !cmp
Jean Privat [Fri, 4 Sep 2009 18:12:17 +0000 (14:12 -0400)]
lib: add Array::sort !cmp

Also add a test.

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

14 years agoparser: accepts "print a[b]"
Jean Privat [Fri, 4 Sep 2009 17:50:10 +0000 (13:50 -0400)]
parser: accepts "print a[b]"

However, why "print [a, b]" is refused remains to be investigated.

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

14 years agocompile: add command line option to disable SFT optimization
Jean-Sebastien Gelinas [Thu, 27 Aug 2009 19:59:50 +0000 (15:59 -0400)]
compile: add command line option to disable SFT optimization

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: when in global compilation, compile to _glob instead of _sep
Jean-Sebastien Gelinas [Thu, 27 Aug 2009 21:08:25 +0000 (17:08 -0400)]
compile: when in global compilation, compile to _glob instead of _sep

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: move 'global' option to program instead of compiling_base
Jean-Sebastien Gelinas [Thu, 27 Aug 2009 21:07:38 +0000 (17:07 -0400)]
compile: move 'global' option to program instead of compiling_base

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: add ToolContext to Program
Jean-Sebastien Gelinas [Thu, 27 Aug 2009 18:33:12 +0000 (14:33 -0400)]
compile: add ToolContext to Program

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: rename do_global_analysis to do_global_table_analysis
Jean-Sebastien Gelinas [Wed, 26 Aug 2009 21:04:31 +0000 (17:04 -0400)]
compile: rename do_global_analysis to do_global_table_analysis

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agocompile: move management and generation of iroutines in MMLocalClass to Program
Jean-Sebastien Gelinas [Fri, 21 Aug 2009 19:29:53 +0000 (15:29 -0400)]
compile: move management and generation of iroutines in MMLocalClass to Program

Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

14 years agodoc: teach doc/advanced_options about NIT_GC_OPTION
Jean Privat [Mon, 31 Aug 2009 21:36:11 +0000 (17:36 -0400)]
doc: teach doc/advanced_options about NIT_GC_OPTION

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

14 years agomisc: remove Sci-Fi example/various/glob.nit
Jean Privat [Mon, 31 Aug 2009 21:33:27 +0000 (17:33 -0400)]
misc: remove Sci-Fi example/various/glob.nit

Will be reintroduced when needed.

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

14 years agonitdoc: show closure in signatures
Jean Privat [Mon, 31 Aug 2009 21:32:02 +0000 (17:32 -0400)]
nitdoc: show closure in signatures

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

14 years agoversion: v0.3.1-git
Jean Privat [Fri, 28 Aug 2009 17:08:35 +0000 (13:08 -0400)]
version: v0.3.1-git

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

14 years agoversion: v0.3 v0.3
Jean Privat [Fri, 28 Aug 2009 17:07:33 +0000 (13:07 -0400)]
version: v0.3

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

14 years agogc: disable boehm by default
Jean Privat [Fri, 28 Aug 2009 17:01:46 +0000 (13:01 -0400)]
gc: disable boehm by default

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

14 years agogc: add 'help' option to list all available GC
Jean Privat [Fri, 28 Aug 2009 17:00:54 +0000 (13:00 -0400)]
gc: add 'help' option to list all available GC

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

14 years agogc: show default GC on warnings
Jean Privat [Fri, 28 Aug 2009 17:00:02 +0000 (13:00 -0400)]
gc: show default GC on warnings

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

14 years agogc: default to nitgc when boehm is not available
Jean Privat [Fri, 28 Aug 2009 16:06:45 +0000 (12:06 -0400)]
gc: default to nitgc when boehm is not available

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

14 years agosyntax: warn on 'while true do' and suggests 'loop'
Jean Privat [Fri, 28 Aug 2009 15:40:39 +0000 (11:40 -0400)]
syntax: warn on 'while true do' and suggests 'loop'

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

14 years agosrc: use 'loop' for infinite loop and do-until-like
Jean Privat [Fri, 28 Aug 2009 15:40:01 +0000 (11:40 -0400)]
src: use 'loop' for infinite loop and do-until-like

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

14 years agoicode: shortcut in icode generation of 'for x in [y..z]'
Jean Privat [Wed, 26 Aug 2009 16:28:45 +0000 (12:28 -0400)]
icode: shortcut in icode generation of 'for x in [y..z]'

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

14 years agolib: add Int::enumerate_*
Jean Privat [Wed, 26 Aug 2009 15:50:10 +0000 (11:50 -0400)]
lib: add Int::enumerate_*

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

14 years agoicode: inline Array::iterate
Jean Privat [Mon, 17 Aug 2009 18:47:34 +0000 (14:47 -0400)]
icode: inline Array::iterate

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