nit.git
11 years agonitc: remove a warning on casts on MMTypeFormal
Jean Privat [Tue, 6 Nov 2012 19:03:05 +0000 (14:03 -0500)]
nitc: remove a warning on casts on MMTypeFormal

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

11 years agoMerge branch 'clean_model'
Jean Privat [Tue, 6 Nov 2012 20:34:39 +0000 (15:34 -0500)]
Merge branch 'clean_model'

11 years agomodel: remove a lot of casts to MGenericType
Jean Privat [Tue, 6 Nov 2012 05:26:42 +0000 (00:26 -0500)]
model: remove a lot of casts to MGenericType

Since the generalization of MGenericType::arguments,
MGenericType do not introduce specific methods anymore.
Therefore, there is no point to require specific type or casts in clients.

This simplify the code since now a MClass, a MClassDef and a MClassType
can all be used to designate an entity, generic or not.

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

11 years agomodel: promote MGenericType::arguments to MClassType
Jean Privat [Tue, 6 Nov 2012 05:05:43 +0000 (00:05 -0500)]
model: promote MGenericType::arguments to MClassType

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

11 years agomodel: use in_hierarchy instead of flatten_mclass_hierarchy
Jean Privat [Tue, 6 Nov 2012 05:02:25 +0000 (00:02 -0500)]
model: use in_hierarchy instead of flatten_mclass_hierarchy

When appropriate, use

    myclass.in_hierarchy(mymodule)

instead of

    mymodule.flatten_mclass_hierarchy[myclass]

That is easier to read and understand.

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

11 years agomodel: add MClass::in_hierarchy
Jean Privat [Tue, 6 Nov 2012 04:49:09 +0000 (23:49 -0500)]
model: add MClass::in_hierarchy

More usable than MModule::flatten_mclass_hierarchy.

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

11 years agomodel: fix bug where order of classes produces buggy models
Jean Privat [Tue, 6 Nov 2012 04:47:58 +0000 (23:47 -0500)]
model: fix bug where order of classes produces buggy models

The problem was a caching of a non-final information.
collect_things visit the mclassdefs of the module but they may not all
be analyzed (ie. their super-types not all identified)

To solve this we build the model in one more pass:

 - a pass to assign the super-types to each mclassdef
 - a pass to build the mclassdef hierarchy

a test file is added to prevent regressions.

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

11 years agobench: add bintrees as a run_compiler bench
Jean Privat [Sat, 27 Oct 2012 01:26:51 +0000 (21:26 -0400)]
bench: add bintrees as a run_compiler bench

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

11 years agonitg: implement class_name as a compiler service
Jean Privat [Wed, 31 Oct 2012 09:28:49 +0000 (05:28 -0400)]
nitg: implement class_name as a compiler service

Thus, the separate compiler could implement it its own way.

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

11 years agonitg: implement is_same_type as a compiler service
Jean Privat [Wed, 31 Oct 2012 09:11:29 +0000 (05:11 -0400)]
nitg: implement is_same_type as a compiler service

Thus, the separate compiler could implement it its own way.

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

11 years agonitg: fix visibility so global_compiler do not need to be intruded
Jean Privat [Wed, 31 Oct 2012 08:47:06 +0000 (04:47 -0400)]
nitg: fix visibility so global_compiler do not need to be intruded

TODO: A real separation of concern is still required.

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

11 years agonitg: implement Char#+ and Char#-
Jean Privat [Tue, 30 Oct 2012 20:17:40 +0000 (16:17 -0400)]
nitg: implement Char#+ and Char#-

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

11 years agoMerge branch 'at/nitg--separate'
Jean Privat [Tue, 30 Oct 2012 20:16:40 +0000 (16:16 -0400)]
Merge branch 'at/nitg--separate'

11 years agonitgs: detect uninitialized attribute
Jean Privat [Tue, 30 Oct 2012 20:06:14 +0000 (16:06 -0400)]
nitgs: detect uninitialized attribute

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

11 years agonitgs: workaround for primitive attributes
Jean Privat [Tue, 30 Oct 2012 19:56:01 +0000 (15:56 -0400)]
nitgs: workaround for primitive attributes

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

11 years agonitgs: add VirtualRuntimeFunction for method on primitive
Jean Privat [Tue, 30 Oct 2012 19:53:50 +0000 (15:53 -0400)]
nitgs: add VirtualRuntimeFunction for method on primitive

Such a method are just stored in the VFT

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

11 years agonitgs: use the real type of self in SeparateRuntimeFunction
Jean Privat [Tue, 30 Oct 2012 19:32:30 +0000 (15:32 -0400)]
nitgs: use the real type of self in SeparateRuntimeFunction

this changes nothing but improves robustness.

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

11 years agonitgs: add BOX functions, primitive instances and fix autobox
Jean Privat [Tue, 30 Oct 2012 19:29:26 +0000 (15:29 -0400)]
nitgs: add BOX functions, primitive instances and fix autobox

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

11 years agonigs: fix class field in instance: it is names class and is const
Jean Privat [Tue, 30 Oct 2012 19:27:34 +0000 (15:27 -0400)]
nigs: fix class field in instance: it is names class and is const

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

11 years agonitgs: move structure to the .h
Jean Privat [Tue, 30 Oct 2012 19:26:55 +0000 (15:26 -0400)]
nitgs: move structure to the .h

This is not pretty but it makes things work.

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

11 years agonitgsep: use mtype.c_name instead of mclass.name as C symbols
Jean Privat [Tue, 30 Oct 2012 19:23:58 +0000 (15:23 -0400)]
nitgsep: use mtype.c_name instead of mclass.name as C symbols

c_name includes name mangling.

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

11 years agonitg: fix a missing ; in GlobalCompilerVisitor::autobox
Jean Privat [Tue, 30 Oct 2012 19:20:36 +0000 (15:20 -0400)]
nitg: fix a missing ; in GlobalCompilerVisitor::autobox

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

11 years agonitg: factorize logic of AbstractRuntimeFunction::c_name
Jean Privat [Tue, 30 Oct 2012 18:13:39 +0000 (14:13 -0400)]
nitg: factorize logic of AbstractRuntimeFunction::c_name

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

11 years agonitg: rename RuntimeFunction to AbstractRuntimeFunction
Jean Privat [Tue, 30 Oct 2012 18:12:23 +0000 (14:12 -0400)]
nitg: rename RuntimeFunction to AbstractRuntimeFunction

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

11 years agonitg sep: refactoring of coloring fonctionnalities
Alexandre Terrasa [Tue, 30 Oct 2012 14:11:54 +0000 (10:11 -0400)]
nitg sep: refactoring of coloring fonctionnalities

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

11 years agonitg --separate: generate C for call and attributes
Alexandre Terrasa [Sat, 27 Oct 2012 01:49:56 +0000 (21:49 -0400)]
nitg --separate: generate C for call and attributes

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

11 years agolib: Fixes NONITCNI imports
Alexandre Terrasa [Sat, 27 Oct 2012 01:49:50 +0000 (21:49 -0400)]
lib: Fixes NONITCNI imports

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

11 years agoseparate_compiler: add properties coloration
Alexandre Terrasa [Fri, 12 Oct 2012 21:50:50 +0000 (17:50 -0400)]
separate_compiler: add properties coloration

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

11 years agobench: add "nitc --global" and "nitg --separate" to bench_steps
Jean Privat [Fri, 26 Oct 2012 18:07:47 +0000 (14:07 -0400)]
bench: add "nitc --global" and "nitg --separate" to bench_steps

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

11 years agobench: add options and usage
Jean Privat [Fri, 26 Oct 2012 17:49:27 +0000 (13:49 -0400)]
bench: add options and usage

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

11 years agobench: plot histograms with errorbars
Jean Privat [Fri, 26 Oct 2012 03:20:11 +0000 (23:20 -0400)]
bench: plot histograms with errorbars

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

11 years agobench: select which benches to run on the command line
Jean Privat [Fri, 26 Oct 2012 03:19:22 +0000 (23:19 -0400)]
bench: select which benches to run on the command line

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

11 years agobench: gitignore generated files
Jean Privat [Thu, 25 Oct 2012 19:15:14 +0000 (15:15 -0400)]
bench: gitignore generated files

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

11 years agobench: name generated executables with .bin
Jean Privat [Thu, 25 Oct 2012 19:14:46 +0000 (15:14 -0400)]
bench: name generated executables with .bin

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

11 years agobench: add shoot as a bench
Jean Privat [Thu, 25 Oct 2012 18:40:20 +0000 (14:40 -0400)]
bench: add shoot as a bench

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

11 years agodoc: fix makefile according to latest git version
Alexis Laferrière [Tue, 25 Sep 2012 01:45:26 +0000 (21:45 -0400)]
doc: fix makefile according to latest git version

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

11 years agolib: adds setenv to environ module
Alexis Laferrière [Tue, 4 Sep 2012 11:13:12 +0000 (07:13 -0400)]
lib: adds setenv to environ module

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

11 years agosyntax: removes test "constructor must be invoked before"
Alexis Laferrière [Mon, 25 Jun 2012 22:43:23 +0000 (18:43 -0400)]
syntax: removes test "constructor must be invoked before"

It detected false negatives and raised errors. Example in
test file test_multi_init_user.

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

11 years agoseparate_options: improves separate options (.nit.args files) handling
Alexis Laferrière [Wed, 11 Jul 2012 16:44:16 +0000 (12:44 -0400)]
separate_options: improves separate options (.nit.args files) handling

- Reports errors in .nit.args files as fatal errors
- Correctly report module name in errors
- Adds error test

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

11 years agotests: add ./examples/leapfrog/leapfrog.nit ../examples/shoot/shoot_logic.nit
Jean Privat [Thu, 25 Oct 2012 15:18:47 +0000 (11:18 -0400)]
tests: add ./examples/leapfrog/leapfrog.nit ../examples/shoot/shoot_logic.nit

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

11 years agoexample: add example/shoot/shot_logic.nit
Jean Privat [Thu, 25 Oct 2012 15:18:09 +0000 (11:18 -0400)]
example: add example/shoot/shot_logic.nit

Currently it can be used as a benchmark.

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

11 years agolib: move game.nit as lib/scene2d.nit
Jean Privat [Thu, 25 Oct 2012 14:57:50 +0000 (10:57 -0400)]
lib: move game.nit as lib/scene2d.nit

Update the game leapfrog to use it.

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

11 years agolib: move poll_in from curses to file
Jean Privat [Tue, 3 Jul 2012 23:40:38 +0000 (19:40 -0400)]
lib: move poll_in from curses to file

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

11 years agolib: move nanosleep from curses to time
Jean Privat [Tue, 3 Jul 2012 23:29:29 +0000 (19:29 -0400)]
lib: move nanosleep from curses to time

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

11 years agolib: move curses to lib/
Jean Privat [Tue, 3 Jul 2012 22:43:07 +0000 (18:43 -0400)]
lib: move curses to lib/

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

11 years agoleapfrog: add curses.nit.args
Jean Privat [Tue, 3 Jul 2012 22:41:01 +0000 (18:41 -0400)]
leapfrog: add curses.nit.args

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

11 years agoleapfrog: extract the curses leapfrog-backend in its own module
Jean Privat [Tue, 3 Jul 2012 22:12:38 +0000 (18:12 -0400)]
leapfrog: extract the curses leapfrog-backend in its own module

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

11 years agoexamples: add a simple leapfrog game
Jean Privat [Wed, 6 Jun 2012 19:31:12 +0000 (15:31 -0400)]
examples: add a simple leapfrog game

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

11 years agoniti: new option --discover-call-trace to debug niti executions
Jean Privat [Thu, 25 Oct 2012 14:32:26 +0000 (10:32 -0400)]
niti: new option --discover-call-trace to debug niti executions

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

11 years agoniti: implements native/extern Float#-, rand, cos, sin, atan2 and pi
Jean Privat [Wed, 18 Jul 2012 18:47:55 +0000 (14:47 -0400)]
niti: implements native/extern Float#-, rand, cos, sin, atan2 and pi

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

11 years agoniti: add Instance#to_f
Jean Privat [Wed, 18 Jul 2012 18:46:23 +0000 (14:46 -0400)]
niti: add Instance#to_f

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

11 years agoMerge branch 'pass_tests'
Jean Privat [Mon, 22 Oct 2012 21:29:58 +0000 (17:29 -0400)]
Merge branch 'pass_tests'

11 years agotests: disable --soso for nitg and niti
Jean Privat [Thu, 18 Oct 2012 22:20:49 +0000 (18:20 -0400)]
tests: disable --soso for nitg and niti

All tests should pass without for now.

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

11 years agotests: make runs tests for niti and nitg
Jean Privat [Wed, 17 Oct 2012 13:46:15 +0000 (09:46 -0400)]
tests: make runs tests for niti and nitg

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

11 years agomake builds bin/nitg and bin/nit
Jean Privat [Wed, 17 Oct 2012 13:33:19 +0000 (09:33 -0400)]
make builds bin/nitg and bin/nit

While they are still incomplete, they are usefull enough.

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

11 years agotests: update the sav/ for nitg ang niti
Jean Privat [Tue, 16 Oct 2012 20:01:44 +0000 (16:01 -0400)]
tests: update the sav/ for nitg ang niti

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

11 years agotests: run engine with NIT_NO_STACK=1
Jean Privat [Wed, 17 Oct 2012 20:57:54 +0000 (16:57 -0400)]
tests: run engine with NIT_NO_STACK=1

Runtime error of engine will not dump the stack trace.

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

11 years agotests: always put stdout before stderr
Jean Privat [Sat, 20 Oct 2012 08:58:35 +0000 (04:58 -0400)]
tests: always put stdout before stderr

Thus, warnings in the interpreter will be in at the same place
in the compiler.

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

11 years agomodel: exit(1) on get_primitive_class
Jean Privat [Mon, 22 Oct 2012 20:12:14 +0000 (16:12 -0400)]
model: exit(1) on get_primitive_class

Code must be cleaner to avoid printing error in model.nit

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

11 years agonew model: move force_get_primitive_method to modelbuilder
Jean Privat [Mon, 22 Oct 2012 19:44:17 +0000 (15:44 -0400)]
new model: move force_get_primitive_method to modelbuilder

The point is to be able to deals with errors in a more correct ay.

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

11 years agonitg&niti: do not crash on invalid arity
Jean Privat [Mon, 22 Oct 2012 18:45:09 +0000 (14:45 -0400)]
nitg&niti: do not crash on invalid arity

Issue a "NOT YET IMPLEMENTED" instead

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

11 years agomodelbuilder: do not crash if nclassdef.mclass is not defined
Jean Privat [Mon, 22 Oct 2012 18:22:08 +0000 (14:22 -0400)]
modelbuilder: do not crash if nclassdef.mclass is not defined

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

11 years agolib: fix "--" handling in opts
Jean Privat [Wed, 17 Oct 2012 20:22:33 +0000 (16:22 -0400)]
lib: fix "--" handling in opts

For some unknown reason, 8d335db5 removed the line.

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

11 years agomodelbuilder: check inherited signature arity before trying to inherit the type of...
Jean Privat [Wed, 17 Oct 2012 20:24:56 +0000 (16:24 -0400)]
modelbuilder: check inherited signature arity before trying to inherit the type of the parameters

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

11 years agomodebuilder: fix some error messages
Jean Privat [Wed, 17 Oct 2012 20:23:45 +0000 (16:23 -0400)]
modebuilder: fix some error messages

Add "Error" to messages and avoid using warning for real errors.

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

11 years agonitg: fix a "NOT YET IMPLEMENTED" message
Jean Privat [Tue, 16 Oct 2012 20:02:14 +0000 (16:02 -0400)]
nitg: fix a "NOT YET IMPLEMENTED" message

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

11 years agotests: cleanup .gitignore
Jean Privat [Tue, 16 Oct 2012 17:38:00 +0000 (13:38 -0400)]
tests: cleanup .gitignore

all temporary result files must be generated in out/

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

11 years agotests: tests_icode.sh generates files in out/
Jean Privat [Tue, 16 Oct 2012 17:37:17 +0000 (13:37 -0400)]
tests: tests_icode.sh generates files in out/

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

11 years agotests: make Object an interface to avoid constructor conflict
Jean Privat [Tue, 16 Oct 2012 17:21:57 +0000 (13:21 -0400)]
tests: make Object an interface to avoid constructor conflict

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

11 years agotests: suppr a depreciated test
Jean Privat [Tue, 16 Oct 2012 17:32:18 +0000 (13:32 -0400)]
tests: suppr a depreciated test

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

11 years agotests: add options --[no]soso
Jean Privat [Tue, 16 Oct 2012 17:14:37 +0000 (13:14 -0400)]
tests: add options --[no]soso

the options --soso et --nososo enable/disable the sosoing.
When disabled, soso are considered a big fail.

By default, --soso is disabled for nitc and activated for nitg and niti

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

11 years agotests: update sav file broken by 5c50ab8
Jean Privat [Tue, 16 Oct 2012 15:37:21 +0000 (11:37 -0400)]
tests: update sav file broken by 5c50ab8

Those tests where broken because of a silent sosoing.

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

11 years agotests: accepts various sav/* files
Jean Privat [Tue, 16 Oct 2012 15:27:17 +0000 (11:27 -0400)]
tests: accepts various sav/* files

Multiple save files can be accepted as valid.

Specific result for an engine goes to sav/$engine/
Expected failures (fixmes) goes to sav/fixme/ or sav/$engine/fixme/

All result files are experted to have a .res extension (old .sav and
.fail extensions are still sometime accepted for compatibility)

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

11 years agotests: can add a file $engine.skip to skip many tests
Jean Privat [Tue, 16 Oct 2012 04:05:51 +0000 (00:05 -0400)]
tests: can add a file $engine.skip to skip many tests

*.skip files can be used to indicate patterns of files that should be
skipped for the given engine.

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

11 years agonitg: add libraries *after* objects that use them
Jean Privat [Thu, 11 Oct 2012 02:44:35 +0000 (22:44 -0400)]
nitg: add libraries *after* objects that use them

Same bug play again. See commits 60311423da4a and e926c569d7d6.

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

11 years agoMerge 'separate_nitg'
Jean Privat [Thu, 11 Oct 2012 02:40:34 +0000 (22:40 -0400)]
Merge 'separate_nitg'

11 years agonitg: ad hoc separate compiler stub module
Jean Privat [Wed, 26 Sep 2012 19:45:07 +0000 (15:45 -0400)]
nitg: ad hoc separate compiler stub module

separate_compiler refines global_compiler to add a simulated separate
compilation process.
A new option --separate is also added to nitg.

Currently this does not even generate a valid C code for
examples/hello_world.nit but C for ests/base_simple3.nit is valid
(but nonfunctional).

Many parts are missing, especially the computation of tables and the
implementation of the main OO mechanisms.

The short therm usage of this code is to help the evaluation of subtyping
implementations of OO language.
Eventually, the code could be the base of a cleaner naive separate
compiler (in order to replace the current nitc).

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

11 years agoMerge branch 'alexandre/inf7741'
Jean Privat [Tue, 2 Oct 2012 20:02:12 +0000 (16:02 -0400)]
Merge branch 'alexandre/inf7741'

11 years agonit: Add incremental typing to interpretor
Alexandre Terrasa [Tue, 2 Oct 2012 16:12:27 +0000 (12:12 -0400)]
nit: Add incremental typing to interpretor
tests: Update test for Nit

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

11 years agonit: introduce interpretor type test with dynamic loading
Alexandre Terrasa [Tue, 2 Oct 2012 16:03:44 +0000 (12:03 -0400)]
nit: introduce interpretor type test with dynamic loading

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

11 years agonit: clean run_naive_interpretor method
Alexandre Terrasa [Tue, 2 Oct 2012 16:03:08 +0000 (12:03 -0400)]
nit: clean run_naive_interpretor method

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

11 years agolib: Math::Int add binaries operations and, or, xor
Alexandre Terrasa [Mon, 1 Oct 2012 19:36:31 +0000 (15:36 -0400)]
lib: Math::Int add binaries operations and, or, xor

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

11 years agoMerge remote-tracking branch 'origin/pu/clean_nitg'
Jean Privat [Tue, 2 Oct 2012 09:41:11 +0000 (05:41 -0400)]
Merge remote-tracking branch 'origin/pu/clean_nitg'

11 years agoMerge remote-tracking branch 'origin/pu/opts'
Jean Privat [Tue, 2 Oct 2012 09:40:01 +0000 (05:40 -0400)]
Merge remote-tracking branch 'origin/pu/opts'

11 years agonitg: add GlobalCompilerVisitor::monomorphic_send
Jean Privat [Wed, 26 Sep 2012 19:13:12 +0000 (15:13 -0400)]
nitg: add GlobalCompilerVisitor::monomorphic_send

Can be used for send when the dynamic type is known.
The implementation just do the selection then call
GlobalCompilerVisitor::call

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

11 years agonitg: split run_global_compiler to write_and_make
Jean Privat [Wed, 26 Sep 2012 15:45:46 +0000 (11:45 -0400)]
nitg: split run_global_compiler to write_and_make

The point is to separate the generation of the C code to its effective
writing on disk on its compilation

A future separate compiler may reuse the writing-and-compilation part.

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

11 years agoopts: get_errors function instead of check_errors.
Alexandre Pennetier [Tue, 26 Jun 2012 20:23:18 +0000 (16:23 -0400)]
opts: get_errors function instead of check_errors.

11 years agoopts: handling for packed short options
Alexandre Pennetier [Mon, 11 Jun 2012 21:01:26 +0000 (17:01 -0400)]
opts: handling for packed short options

Signed-off-by: Alexandre Pennetier <alexandre.pennetier@me.com>

11 years agoopts: errors gathered into OptionContext class
Alexandre Pennetier [Mon, 11 Jun 2012 20:57:52 +0000 (16:57 -0400)]
opts: errors gathered into OptionContext class

Signed-off-by: Alexandre Pennetier <alexandre.pennetier@me.com>

11 years agoopts: error when unexpected value for an enum
Alexandre Pennetier [Mon, 11 Jun 2012 20:46:32 +0000 (16:46 -0400)]
opts: error when unexpected value for an enum

Signed-off-by: Alexandre Pennetier <alexandre.pennetier@me.com>

11 years agoopts: error when lack of a mandatory parameter
Alexandre Pennetier [Mon, 11 Jun 2012 20:43:14 +0000 (16:43 -0400)]
opts: error when lack of a mandatory parameter

Signed-off-by: Alexandre Pennetier <alexandre.pennetier@me.com>

11 years agoopts: error when lack of a mandatory option
Alexandre Pennetier [Fri, 21 Sep 2012 19:06:14 +0000 (15:06 -0400)]
opts: error when lack of a mandatory option

Signed-off-by: Alexandre Pennetier <alexandre.pennetier@me.com>

11 years agonitg: do not use RuntimeVariable#mtype when we have better
Jean Privat [Fri, 24 Aug 2012 15:47:20 +0000 (11:47 -0400)]
nitg: do not use RuntimeVariable#mtype when we have better

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

11 years agonitg: generate BOX_xxx to factorize code
Jean Privat [Fri, 24 Aug 2012 13:22:45 +0000 (09:22 -0400)]
nitg: generate BOX_xxx to factorize code

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

11 years agonitg: generated main returns 0 on success
Jean Privat [Thu, 23 Aug 2012 13:46:49 +0000 (09:46 -0400)]
nitg: generated main returns 0 on success

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

11 years agonitg: warn conflicting propdefs on GlobalCompilerVisitor#send
Jean Privat [Thu, 23 Aug 2012 02:24:39 +0000 (22:24 -0400)]
nitg: warn conflicting propdefs on GlobalCompilerVisitor#send

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

11 years agonitg: correctly handle the calls == and != on a nullable receiver
Jean Privat [Thu, 23 Aug 2012 02:13:21 +0000 (22:13 -0400)]
nitg: correctly handle the calls == and != on a nullable receiver

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

11 years agonitg: use mcasttype instead of mtype in autoadapt
Jean Privat [Thu, 23 Aug 2012 02:11:50 +0000 (22:11 -0400)]
nitg: use mcasttype instead of mtype in autoadapt

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

11 years agonitg: use CustomizedRuntimeFunction#c_name instead of copying it
Jean Privat [Wed, 22 Aug 2012 17:46:52 +0000 (13:46 -0400)]
nitg: use CustomizedRuntimeFunction#c_name instead of copying it

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

11 years agonitg: do not treat new_var on MNullType distinctly
Jean Privat [Wed, 22 Aug 2012 17:33:31 +0000 (13:33 -0400)]
nitg: do not treat new_var on MNullType distinctly

This part of code dates from a time where mtype was a MClassType
instead of a MType.

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