Jean Privat [Sat, 24 Nov 2012 04:55:17 +0000 (23:55 -0500)]
nitg: allow casts on primitive types
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 24 Nov 2012 04:00:30 +0000 (23:00 -0500)]
tests: fix uninitialized attribute test_gen and test_boxing
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 24 Nov 2012 03:34:14 +0000 (22:34 -0500)]
tests: barf on the absence of Object is an acceptable outcome in base_no_object.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 24 Nov 2012 03:33:10 +0000 (22:33 -0500)]
nitg-sep: detect null receiver on attribute access
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 24 Nov 2012 03:32:31 +0000 (22:32 -0500)]
tests: force Object on some tests.
What is the behavior on the absence of Object
is not something tested in those.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Sat, 24 Nov 2012 03:28:44 +0000 (22:28 -0500)]
tests: fix previously broken test base_attr_gen_alt1
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Sat, 24 Nov 2012 03:25:33 +0000 (22:25 -0500)]
nitg-sep: clean type_test_method
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Sat, 24 Nov 2012 03:25:12 +0000 (22:25 -0500)]
nitg-sep: make livetype retrieving recursive
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Sat, 24 Nov 2012 03:15:23 +0000 (22:15 -0500)]
nitg: enlarge visibility of global_compiler::MType::c_name_cache
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Fri, 23 Nov 2012 22:59:24 +0000 (17:59 -0500)]
nitg-sep: autobox primitive types before subtyping test
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Fri, 23 Nov 2012 22:03:52 +0000 (17:03 -0500)]
Merge branch 'master' of https://github.com/privat/nit into jp/sep
Alexandre Terrasa [Fri, 23 Nov 2012 21:58:50 +0000 (16:58 -0500)]
nitg-sep: check table color bounds
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Fri, 23 Nov 2012 21:17:57 +0000 (16:17 -0500)]
tests: count fixme as todo
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 23 Nov 2012 21:17:02 +0000 (16:17 -0500)]
tests: delete specific skip files
Move all skip rules to the $engine.skip file
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Fri, 23 Nov 2012 03:59:47 +0000 (22:59 -0500)]
tests: move base_class_name from fixme to res
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Fri, 23 Nov 2012 03:59:11 +0000 (22:59 -0500)]
tests: move base_attr_gen_alt1 from fail to res
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Fri, 23 Nov 2012 03:46:15 +0000 (22:46 -0500)]
nitg-sep: handle send with varargs
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 23 Nov 2012 03:44:18 +0000 (22:44 -0500)]
nitg: extract varargize into its own method
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 23 Nov 2012 02:49:50 +0000 (21:49 -0500)]
nit-seg: global instances must be declared "extern" in the .h file
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 22 Nov 2012 20:33:38 +0000 (15:33 -0500)]
nitg-sep: workaround for covariant return type
Just force to use VIRTUAL function in order to force the implementations to
respond to the original signature from the introduction.
More work need to be done to cleanup and simplify the stuff.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Fri, 23 Nov 2012 01:32:39 +0000 (20:32 -0500)]
nitg-sep: make glob_sys global
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Fri, 23 Nov 2012 01:32:01 +0000 (20:32 -0500)]
nitg-sep: classnames
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Thu, 22 Nov 2012 22:02:08 +0000 (17:02 -0500)]
Merge branch 'master' of https://github.com/privat/nit into jp/master
Alexandre Terrasa [Thu, 22 Nov 2012 20:35:05 +0000 (15:35 -0500)]
nitg-sep: dirty workaround for NativeString
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Thu, 22 Nov 2012 20:34:36 +0000 (15:34 -0500)]
nitg-sep: fix FTs tables generation and selection
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Alexandre Terrasa [Thu, 22 Nov 2012 20:32:03 +0000 (15:32 -0500)]
nitg-sep: coloring handles empty modules
Signed-off-by: Alexandre Terrasa <alexadre@moz-code.org>
Jean Privat [Wed, 21 Nov 2012 18:36:25 +0000 (13:36 -0500)]
rta: limit the depth of types to avoid infinite loops
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 21 Nov 2012 16:04:40 +0000 (11:04 -0500)]
tests: factorize compare_to_result
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 21 Nov 2012 15:46:02 +0000 (10:46 -0500)]
tests: expected failures are flagged as "fixme" not as "failed"
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 21 Nov 2012 15:10:46 +0000 (10:10 -0500)]
tests: add other new and uncommited tests
Signed-off-by: Jean Privat <jean@pryen.org>
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>