Merge: introduces `MGroup::default_mmodule`
authorJean Privat <jean@pryen.org>
Fri, 19 Sep 2014 19:11:14 +0000 (15:11 -0400)
committerJean Privat <jean@pryen.org>
Fri, 19 Sep 2014 19:11:14 +0000 (15:11 -0400)
There is no reason that "the module of a group that has the same name than the group and that is implicitly designated in importations when only the group's name is given" is not a concept of the model with a simple name name and a fully specified semantic.

A step toward #721 and maybe a help for #693

Pull-Request: #753
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

14 files changed:
src/compiler/android_platform.nit
src/compiler/compiler_ffi.nit
src/compiler/separate_compiler.nit
src/ffi/c.nit [moved from src/common_ffi/c.nit with 100% similarity]
src/ffi/c_compiler_options.nit [moved from src/common_ffi/c_compiler_options.nit with 100% similarity]
src/ffi/cpp.nit [moved from src/common_ffi/cpp.nit with 99% similarity]
src/ffi/extern_classes.nit [moved from src/common_ffi/extern_classes.nit with 100% similarity]
src/ffi/extra_java_files.nit [moved from src/common_ffi/extra_java_files.nit with 100% similarity]
src/ffi/ffi.nit [moved from src/common_ffi/common_ffi.nit with 99% similarity]
src/ffi/ffi_base.nit [moved from src/common_ffi/ffi_base.nit with 100% similarity]
src/ffi/header_dependency.nit [moved from src/common_ffi/header_dependency.nit with 98% similarity]
src/ffi/java.nit [moved from src/common_ffi/java.nit with 99% similarity]
src/ffi/pkgconfig.nit [moved from src/common_ffi/pkgconfig.nit with 100% similarity]
src/model/model.nit

index c06a374..6fec966 100644 (file)
@@ -19,8 +19,8 @@ module android_platform
 
 import platform
 import abstract_compiler
-import common_ffi
-intrude import common_ffi::extra_java_files
+import ffi
+intrude import ffi::extra_java_files
 import android_annotations
 
 redef class ToolContext
index 331955e..37689d8 100644 (file)
@@ -18,7 +18,7 @@
 module compiler_ffi
 
 intrude import abstract_compiler
-intrude import common_ffi
+intrude import ffi
 import nitni
 
 redef class MModule
index 43d06c2..1032c21 100644 (file)
@@ -1101,13 +1101,13 @@ class SeparateCompilerVisitor
                return table_send(mmethod, arguments, mmethod.const_color)
        end
 
-       # Handel common special cases before doing the effective method invocation
+       # Handle common special cases before doing the effective method invocation
        # This methods handle the `==` and `!=` methods and the case of the null receiver.
        # Note: a { is open in the generated C, that enclose and protect the effective method invocation.
        # Client must not forget to close the } after them.
        #
        # The value returned is the result of the common special cases.
-       # If not null, client must compine it with the result of their own effective method invocation.
+       # If not null, client must compile it with the result of their own effective method invocation.
        #
        # If `before_send` can shortcut the whole message sending, a dummy `if(0){`
        # is generated to cancel the effective method invocation that will follow
similarity index 100%
rename from src/common_ffi/c.nit
rename to src/ffi/c.nit
similarity index 99%
rename from src/common_ffi/cpp.nit
rename to src/ffi/cpp.nit
index 06f8f25..f75c100 100644 (file)
@@ -63,7 +63,7 @@ class CPPLanguage
                var indirection_sig = mproperty.build_csignature(mclass_type, mmodule, "___cpp_impl_mid", long_signature, internal_call_context)
 
                ## In C file (__ffi.c)
-               
+
                # Declare the indirection function in C
                ecc.body_decl.add("{indirection_sig};\n")
 
similarity index 99%
rename from src/common_ffi/common_ffi.nit
rename to src/ffi/ffi.nit
index 814c882..a418616 100644 (file)
@@ -17,7 +17,7 @@
 # FFI concers common between the compilers and the interpreter.
 # Offers services to compile modules using foreign code. Mainly allows
 # to wrap foreign code in Nit methods.
-module common_ffi
+module ffi
 
 import modelbuilder
 
similarity index 98%
rename from src/common_ffi/header_dependency.nit
rename to src/ffi/header_dependency.nit
index de247e5..485ba1f 100644 (file)
@@ -53,7 +53,7 @@ redef class MModule
 
                        # does the super module has inherited dependancies?
                        var hd = m.header_dependencies
-                       if not hd.is_empty then 
+                       if not hd.is_empty then
                                header_dependencies.add_all(hd)
                        end
 
similarity index 99%
rename from src/common_ffi/java.nit
rename to src/ffi/java.nit
index d3a7b68..7be54ce 100644 (file)
@@ -408,7 +408,7 @@ redef class NitniCallback
 
        # Returns the list of C functions to link with extern Java methods, as required
        # to enable this callback from Java code.
-       # 
+       #
        # Return used by `MModule::ensure_linking_callback_methods`
        #
        # TODO we return an Array to support cast and other features like that
@@ -462,7 +462,7 @@ redef class MType
        private fun jni_type: String do return "jint"
 
        # JNI short type name (for signatures)
-       # 
+       #
        # Is used by `MMethod::build_jni_format` to pass a Java method signature
        # to the JNI function `GetStaticMetodId`.
        private fun jni_format: String do return "I"
@@ -543,7 +543,7 @@ end
 
 redef class MMethod
        # Returns the JNI signature format of this Nit method
-       # 
+       #
        # Example: a Nity signature `(Bool, Int, Float, JavaString)` is represented by
        # the JNI format `(ZIDLjava/lang/string;)V"
        private fun build_jni_format(recv_mtype: MClassType, from_mmodule: MModule): String
index 6d5aa9c..e0d941a 100644 (file)
@@ -1245,8 +1245,8 @@ end
 # The type associated the a formal parameter generic type of a class
 #
 # Each parameter type is associated to a specific class.
-# It's mean that all refinements of a same class "share" the parameter type,
-# but that a generic subclass has its on parameter types.
+# It means that all refinements of a same class "share" the parameter type,
+# but that a generic subclass has its own parameter types.
 #
 # However, in the sense of the meta-model, a parameter type of a class is
 # a valid type in a subclass. The "in the sense of the meta-model" is