niti: change some visibility to avoid unnecessary intrude imports
authorJean Privat <jean@pryen.org>
Wed, 1 Oct 2014 17:34:44 +0000 (13:34 -0400)
committerJean Privat <jean@pryen.org>
Wed, 1 Oct 2014 17:34:44 +0000 (13:34 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/interpreter/debugger.nit
src/interpreter/naive_interpreter.nit
src/vm.nit

index a7d8912..586c04c 100644 (file)
@@ -1432,7 +1432,7 @@ redef class ANode
 
        # Breaks automatically when encountering an error
        # Permits the injunction of commands before crashing
-       redef private fun fatal(v: NaiveInterpreter, message: String)
+       redef fun fatal(v: NaiveInterpreter, message: String)
        do
                if v isa Debugger then
                        print "An error was encountered, the program will stop now."
index 36d82f8..5a3ef59 100644 (file)
@@ -53,7 +53,7 @@ redef class ModelBuilder
 end
 
 # The visitor that interprets the Nit Program by walking on the AST
-private class NaiveInterpreter
+class NaiveInterpreter
        # The modelbuilder that know the AST and its associations with the model
        var modelbuilder: ModelBuilder
 
@@ -608,7 +608,7 @@ class PrimitiveInstance[E: Object]
 end
 
 # Information about local variables in a running method
-private class Frame
+class Frame
        # The current visited node
        # The node is stored by frame to keep a stack trace
        var current_node: ANode
@@ -618,13 +618,13 @@ private class Frame
        # Arguments of the method (the first is the receiver)
        var arguments: Array[Instance]
        # Mapping between a variable and the current value
-       var map: Map[Variable, Instance] = new HashMap[Variable, Instance]
+       private var map: Map[Variable, Instance] = new HashMap[Variable, Instance]
 end
 
 redef class ANode
        # Aborts the program with a message
        # `v` is used to know if a colored message is displayed or not
-       private fun fatal(v: NaiveInterpreter, message: String)
+       fun fatal(v: NaiveInterpreter, message: String)
        do
                if v.modelbuilder.toolcontext.opt_no_color.value == true then
                        sys.stderr.write("Runtime error: {message} ({location.file.filename}:{location.line_start})\n")
index 6d9e0d5..0779a6a 100644 (file)
@@ -17,7 +17,7 @@
 # Implementation of the Nit virtual machine
 module vm
 
-intrude import interpreter::naive_interpreter
+import interpreter::naive_interpreter
 import model_utils
 import perfect_hashing