nitvm: Creation of a directory vm/ for the vm files
authorJulien Pagès <julien.projet@gmail.com>
Mon, 16 Mar 2015 12:23:03 +0000 (13:23 +0100)
committerJulien Pagès <julien.projet@gmail.com>
Mon, 23 Mar 2015 17:51:42 +0000 (18:51 +0100)
Signed-off-by: Julien Pagès <julien.projet@gmail.com>

src/nit.nit
src/nitvm.nit
src/vm/variables_numbering.nit [moved from src/variables_numbering.nit with 99% similarity]
src/vm/virtual_machine.nit [moved from src/vm.nit with 99% similarity]
src/vm/vm.nit [new file with mode: 0644]
src/vm/vm_optimizations.nit [moved from src/vm_optimizations.nit with 99% similarity]

index 13f8c59..5a74d48 100644 (file)
@@ -21,8 +21,6 @@ import interpreter
 import frontend
 import parser_util
 import vm
-import vm_optimizations
-import variables_numbering
 
 # Create a tool context to handle options and paths
 var toolcontext = new ToolContext
index 1fef7a4..088cd92 100644 (file)
@@ -18,8 +18,6 @@
 module nitvm
 
 import vm
-import vm_optimizations
-import variables_numbering
 import frontend
 
 # Create a tool context to handle options and paths
similarity index 99%
rename from src/variables_numbering.nit
rename to src/vm/variables_numbering.nit
index 1190fab..4de0eb4 100644 (file)
@@ -17,7 +17,7 @@
 # Handle all numbering operations related to local variables in the Nit virtual machine
 module variables_numbering
 
-import vm
+import virtual_machine
 
 redef class VirtualMachine
 
similarity index 99%
rename from src/vm.nit
rename to src/vm/virtual_machine.nit
index 97069cf..b33e7f8 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Implementation of the Nit virtual machine
-module vm
+module virtual_machine
 
 import interpreter::naive_interpreter
 import perfect_hashing
@@ -177,7 +177,6 @@ class VirtualMachine super NaiveInterpreter
                recv.vtable = recv.mtype.as(MClassType).mclass.vtable
        end
 
-
        # Initialize the internal representation of an object (its attribute values)
        # `init_instance` is the initial value of attributes
        private fun init_internal_attributes(init_instance: Instance, size: Int): Pointer
diff --git a/src/vm/vm.nit b/src/vm/vm.nit
new file mode 100644 (file)
index 0000000..4027a15
--- /dev/null
@@ -0,0 +1,22 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2015 Julien Pagès <julien.pages@lirmm.fr>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Entry point of all vm components
+module vm
+
+import virtual_machine
+import vm_optimizations
+import variables_numbering
similarity index 99%
rename from src/vm_optimizations.nit
rename to src/vm/vm_optimizations.nit
index f657786..6f3c201 100644 (file)
@@ -17,7 +17,7 @@
 # Optimization of the nitvm
 module vm_optimizations
 
-import vm
+import virtual_machine
 
 redef class VirtualMachine