modulebuilder: remove protection for multiple loading of AST
authorJean Privat <jean@pryen.org>
Fri, 7 Feb 2014 14:40:14 +0000 (09:40 -0500)
committerJean Privat <jean@pryen.org>
Fri, 7 Feb 2014 14:40:14 +0000 (09:40 -0500)
The protection is now only in the `identify_file` method

Signed-off-by: Jean Privat <jean@pryen.org>

src/modelbuilder.nit

index 76a22e3..c9e5603 100644 (file)
@@ -423,9 +423,6 @@ class ModelBuilder
                return getcwd.join_path(path).simplify_path
        end
 
-       # loaded module by absolute path
-       private var loaded_nmodules = new HashMap[String, AModule]
-
        # Try to load a module AST using a path.
        # Display an error if there is a problem (IO / lexer / parser) and return null
        fun load_module_ast(filename: String): nullable AModule
@@ -439,11 +436,6 @@ class ModelBuilder
                        return null
                end
 
-               var module_path = module_absolute_path(filename)
-               if loaded_nmodules.keys.has(module_path) then
-                       return loaded_nmodules[module_path]
-               end
-
                self.toolcontext.info("load module {filename}", 2)
 
                # Load the file
@@ -463,7 +455,6 @@ class ModelBuilder
                        return null
                end
 
-               loaded_nmodules[module_path] = nmodule
                return nmodule
        end