Jean Privat [Fri, 30 Nov 2012 20:26:54 +0000 (15:26 -0500)]
nitg-erase: reduce duplication with nitg-sep
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 30 Nov 2012 20:25:41 +0000 (15:25 -0500)]
nitg: use new_visitor instead of new XXXCompilerVisitor
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 30 Nov 2012 21:12:10 +0000 (16:12 -0500)]
nitg-erase: update sav/nitg.sav (option --erasure)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 30 Nov 2012 18:50:31 +0000 (13:50 -0500)]
Merge remote-tracking branch 'alexandre/at/erasure'
Alexandre Terrasa [Fri, 30 Nov 2012 03:48:54 +0000 (22:48 -0500)]
nitg-erase: nitg with erased generic types
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Thu, 29 Nov 2012 21:42:26 +0000 (16:42 -0500)]
nitg: call bugtype on unexpected empty concrete type
The idea is to not execute silently dead code.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 21:36:33 +0000 (16:36 -0500)]
nitg: check NPE on attribute access and call
NPE must also be checked on value with an empty concrete type.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 21:42:15 +0000 (16:42 -0500)]
nitg: check null receiver if MNullableType or if MNullType
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 21:34:55 +0000 (16:34 -0500)]
nitg: Visitor::send skip if the primitive receiver is dead
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 21:32:57 +0000 (16:32 -0500)]
nitg: promote check_recv_notnull to nitg
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 17:26:29 +0000 (12:26 -0500)]
nitg: explicit NOT YET IMPLEMENTED at runtime for nitni
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 17:02:34 +0000 (12:02 -0500)]
nitg: C comment CustomizedRuntimeFunction indicate the type of "self"
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 16:22:03 +0000 (11:22 -0500)]
nitg: type_test handle MNullType the same way than MNullableType
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 15:17:49 +0000 (10:17 -0500)]
poset: implements "has" to avoid using the NaiveCollection implementation
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 14:55:55 +0000 (09:55 -0500)]
tests: cleanup sav/ files for nitg&niti
Some result files are useless or misplaced.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 14:08:10 +0000 (09:08 -0500)]
tests: nitg can compile empty modules
create a new method compile_main_function to factorize the work
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 13:32:29 +0000 (08:32 -0500)]
nitg: generate a runtime error on on ADeferredMethPropdef
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 04:20:10 +0000 (23:20 -0500)]
nitg: add type-checks on covariant parameters
The compilation of a MMethodDef will add required type checks before
compiling the body of the method.
The type checks are implemented trough v.type_test so this patch
is compatible with other engines.
problem: most nitg-sep tests become [todo] since virtual type tests
are not implemented is the engine but become mandatory in many methods
of Comparable.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 04:08:33 +0000 (23:08 -0500)]
nitg: type_test assert that the cast-type was detected by RTA
This add nothing but might help to find a breakage of RTA or nitg.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 04:06:34 +0000 (23:06 -0500)]
rta: consider type tests for covariant signatures
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 17:01:27 +0000 (12:01 -0500)]
rta: forgot to call Array#with_native on ASuperstringExpr
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 29 Nov 2012 02:17:41 +0000 (21:17 -0500)]
nitg-sep: implements correctly class_name_string
1- do use the parameter instead of the string "self".
2- do not get the value at declaration time but at statement time.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 24 Nov 2012 05:28:02 +0000 (00:28 -0500)]
Merge remote-tracking branch 'alexandre/at/sep' into wip
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>