Jean Privat [Wed, 21 Nov 2012 15:15:18 +0000 (10:15 -0500)]
gitignore nit* in bin/
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Wed, 21 Nov 2012 00:27:28 +0000 (19:27 -0500)]
nitg-sep: coloring handles empty modules
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Wed, 21 Nov 2012 00:17:36 +0000 (19:17 -0500)]
nitg-sep: move struct instances declarations to header file
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Tue, 20 Nov 2012 23:33:34 +0000 (18:33 -0500)]
Merge branch 'master' of https://github.com/privat/nit into jp/sep
Alexandre Terrasa [Tue, 20 Nov 2012 23:26:17 +0000 (18:26 -0500)]
nitg-sep: handles native arrays
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Tue, 20 Nov 2012 23:26:00 +0000 (18:26 -0500)]
nitg-sep: change generation order
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Tue, 20 Nov 2012 23:25:02 +0000 (18:25 -0500)]
nitg: extract native array definition and allocation from AInterMethPropdef
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Tue, 20 Nov 2012 23:23:32 +0000 (18:23 -0500)]
nitg-sep: fix attributes coloration
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Tue, 20 Nov 2012 16:35:45 +0000 (11:35 -0500)]
tests: add 2 missing sav/ files for base_var_assignment_flow
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 20 Nov 2012 16:25:51 +0000 (11:25 -0500)]
tests: add 3 old uncommitted tests
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 20 Nov 2012 16:16:08 +0000 (11:16 -0500)]
nitg-sep: deals with NULL in type_test
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 20 Nov 2012 16:07:20 +0000 (11:07 -0500)]
nitg-sep: explicit NYI for type_test on a unmanaged MType subclasses
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 20 Nov 2012 15:33:18 +0000 (10:33 -0500)]
nitg-sep: implements is_same_type_test
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 20 Nov 2012 15:33:06 +0000 (10:33 -0500)]
nitg-sep: implements equal_test for boxed primitives
the code is ugly but will fit for the moment.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 20 Nov 2012 03:52:08 +0000 (22:52 -0500)]
nitg: adapt signature to the declared ones in AExternMethPropdef and AExternInitPropdef
Since the generated C require specific type, must ensure that
runtimevariables have the correct C type.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 17 Nov 2012 05:30:04 +0000 (00:30 -0500)]
nitg-s: recv in NEW_ is a C local variable
Bug introduced in commit
f1f9d8b8c467dc63a62ba65db645a14f120a85ed
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 17 Nov 2012 05:28:36 +0000 (00:28 -0500)]
tests: reflect the moving the selection of methods from nitg to typing
See commit
a0e49d37128a8f1fb260736e30c67cb91fe336e9.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 17 Nov 2012 05:23:08 +0000 (00:23 -0500)]
Merge remote-tracking branch 'alexandre/at/sep' into wip
Conflicts:
src/separate_compiler.nit
src/typing.nit
Jean Privat [Sat, 17 Nov 2012 05:14:22 +0000 (00:14 -0500)]
nitg-s: add documentation in C on sends and attr accesses
This helps reading the C code.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 17 Nov 2012 05:13:09 +0000 (00:13 -0500)]
nitg-s: C signatures of virtual functions must match the introduction
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 17 Nov 2012 04:51:05 +0000 (23:51 -0500)]
nitg: use the real selfvar instead of "self"
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Tue, 13 Nov 2012 21:08:15 +0000 (16:08 -0500)]
nitg-sep: fix undead type list from init nodes
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Tue, 13 Nov 2012 20:51:12 +0000 (15:51 -0500)]
nitg: implement NativeArray as a boxed direct array
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 13 Nov 2012 20:42:28 +0000 (15:42 -0500)]
nitg-sep: convert virtual signature to the intro one
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Tue, 13 Nov 2012 20:30:33 +0000 (15:30 -0500)]
nitg-sep: fix linearization of properties inheritance
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Tue, 13 Nov 2012 20:29:57 +0000 (15:29 -0500)]
nitg-sep: change types structures, unanchored type can now be instanciated thanks to self definition
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Tue, 13 Nov 2012 12:20:26 +0000 (07:20 -0500)]
tests: run nitg on compilers and tools
It may be slow but it prevents breakage.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 13 Nov 2012 05:14:54 +0000 (00:14 -0500)]
tests: fix a test; Object#== is not intern
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 13 Nov 2012 05:13:49 +0000 (00:13 -0500)]
nitg-s: test if receiver is null on method send
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 13 Nov 2012 04:31:54 +0000 (23:31 -0500)]
nitg: allow CompilerVisitor::current_node to be any node
This allow better location message on implicit stuffs (eg. free accessor)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 13 Nov 2012 04:21:20 +0000 (23:21 -0500)]
nitg: implements isset
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 13 Nov 2012 01:29:20 +0000 (20:29 -0500)]
typing: simplify resolve_signature_for to factorize more code.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Tue, 13 Nov 2012 01:01:05 +0000 (20:01 -0500)]
typing: change abort to assert in ASendExpr
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Tue, 13 Nov 2012 00:57:54 +0000 (19:57 -0500)]
typing: move iterator methods selection from nitg to typing
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Fri, 9 Nov 2012 06:39:37 +0000 (01:39 -0500)]
modelbuilder: detect invalid generic type (non conform with bounds)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 9 Nov 2012 05:59:16 +0000 (00:59 -0500)]
model: make MClass::intro public
It is better than write `mclassdefs.first`.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 9 Nov 2012 04:46:09 +0000 (23:46 -0500)]
modelbuilder: error when a class defines a property more than once
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 8 Nov 2012 21:35:19 +0000 (16:35 -0500)]
modelbuilder: stop building a property on 'redef' error
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 8 Nov 2012 19:22:07 +0000 (14:22 -0500)]
modelbuilder: error when a module defines a class more than once
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 8 Nov 2012 19:19:13 +0000 (14:19 -0500)]
modelbuilder: fix recursive model building
Put the build flags just after checking them.
Otherwise if we escape the body, the flags will never be set.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 8 Nov 2012 10:17:28 +0000 (05:17 -0500)]
nitg-s: bound Coloring on Object, not nullable Object
Note that both the old ans new model failed to catch it.
However the new model refused to compile.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 7 Nov 2012 16:08:44 +0000 (11:08 -0500)]
Merge remote-tracking branch 'alexandre/at/sep' into wip
Conflicts:
src/separate_compiler.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Wed, 7 Nov 2012 15:55:50 +0000 (10:55 -0500)]
nitg-sep: add test type against formal parameter type
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Tue, 6 Nov 2012 21:52:09 +0000 (16:52 -0500)]
nitg-s: implements a basic SeparateCompilerVisitor::equal_test
comparison of 2 boxed values still fails
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 6 Nov 2012 21:25:59 +0000 (16:25 -0500)]
tests: count [todo] separately
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 6 Nov 2012 21:23:01 +0000 (16:23 -0500)]
nitg-s: aborts with NOT YET IMPLEMENTED on TODO stuff
Signed-off-by: Jean Privat <jean@pryen.org>
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>
Jean Privat [Tue, 6 Nov 2012 20:34:39 +0000 (15:34 -0500)]
Merge branch 'clean_model'
Alexandre Terrasa [Tue, 6 Nov 2012 20:01:12 +0000 (15:01 -0500)]
nitg-sep: refactor coloring
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
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>
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>
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>
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>
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>
Alexandre Terrasa [Fri, 2 Nov 2012 04:33:58 +0000 (00:33 -0400)]
nitg-sep: generic subtyping using heterogeneous tables
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
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>
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>
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>
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>
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>
Jean Privat [Tue, 30 Oct 2012 20:16:40 +0000 (16:16 -0400)]
Merge branch 'at/nitg--separate'
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jean Privat [Mon, 22 Oct 2012 21:29:58 +0000 (17:29 -0400)]
Merge branch 'pass_tests'