From b8f31d34c4c7d4684640abee430c8b30493eebbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julien=20Pag=C3=A8s?= Date: Mon, 16 Mar 2015 13:23:03 +0100 Subject: [PATCH] nitvm: Creation of a directory vm/ for the vm files MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julien Pagès --- src/nit.nit | 2 -- src/nitvm.nit | 2 -- src/{ => vm}/variables_numbering.nit | 2 +- src/{vm.nit => vm/virtual_machine.nit} | 3 +-- src/vm/vm.nit | 22 ++++++++++++++++++++++ src/{ => vm}/vm_optimizations.nit | 2 +- 6 files changed, 25 insertions(+), 8 deletions(-) rename src/{ => vm}/variables_numbering.nit (99%) rename src/{vm.nit => vm/virtual_machine.nit} (99%) create mode 100644 src/vm/vm.nit rename src/{ => vm}/vm_optimizations.nit (99%) diff --git a/src/nit.nit b/src/nit.nit index 13f8c59..5a74d48 100644 --- a/src/nit.nit +++ b/src/nit.nit @@ -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 diff --git a/src/nitvm.nit b/src/nitvm.nit index 1fef7a4..088cd92 100644 --- a/src/nitvm.nit +++ b/src/nitvm.nit @@ -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 diff --git a/src/variables_numbering.nit b/src/vm/variables_numbering.nit similarity index 99% rename from src/variables_numbering.nit rename to src/vm/variables_numbering.nit index 1190fab..4de0eb4 100644 --- a/src/variables_numbering.nit +++ b/src/vm/variables_numbering.nit @@ -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 diff --git a/src/vm.nit b/src/vm/virtual_machine.nit similarity index 99% rename from src/vm.nit rename to src/vm/virtual_machine.nit index 97069cf..b33e7f8 100644 --- a/src/vm.nit +++ b/src/vm/virtual_machine.nit @@ -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 index 0000000..4027a15 --- /dev/null +++ b/src/vm/vm.nit @@ -0,0 +1,22 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Copyright 2015 Julien Pagès +# +# 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 diff --git a/src/vm_optimizations.nit b/src/vm/vm_optimizations.nit similarity index 99% rename from src/vm_optimizations.nit rename to src/vm/vm_optimizations.nit index f657786..6f3c201 100644 --- a/src/vm_optimizations.nit +++ b/src/vm/vm_optimizations.nit @@ -17,7 +17,7 @@ # Optimization of the nitvm module vm_optimizations -import vm +import virtual_machine redef class VirtualMachine -- 1.7.9.5