Merge: separate_compiler: remove the use of weak symbols.
[nit.git] / src / nitserial.nit
index db70d4c..2a416ef 100644 (file)
@@ -18,7 +18,7 @@
 #
 # Executing on the module `game_logic` will create the module `game_logic_serial`
 # in the local directory. Mixing the generated module to the main module with
-# `nitg game_logic.nit -m game_logic_serial` will create a program supporting
+# `nitc game_logic.nit -m game_logic_serial` will create a program supporting
 # deserialization of all generic types visible from the main module.
 #
 # Because the generation is limited to the visible types, a module author might want
@@ -27,7 +27,6 @@ module nitserial
 
 import frontend
 import rapid_type_analysis
-import model_utils
 import template
 
 # A Nit module
@@ -94,7 +93,7 @@ end
 
 redef class MClassType
        redef fun is_visible_from(mmodule) do
-               return mmodule.is_visible(mclass.intro_mmodule, public_visibility)
+               return mmodule.is_visible(mclass.intro_mmodule, mclass.visibility)
        end
 end
 
@@ -153,7 +152,7 @@ for mmodule in mmodules do
        else if module_path.has_suffix(".nit") then
                module_name = module_path.basename(".nit")
        else
-               module_name = module_path.basename("")
+               module_name = module_path.basename
                module_path += ".nit"
        end
 
@@ -215,7 +214,7 @@ redef class Deserializer
 
                for mtype in rta.live_types do
                        # We are only interested in instanciated generics, subtypes of Serializable
-                       # and which are visibles.
+                       # and which are visible.
                        if mtype isa MGenericType and
                           mtype.is_subtype(m, null, serializable_type) and
                           mtype.is_visible_from(mmodule) and