From a37344f3d5ef8a0e94012b4d19c1f127f1325f09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julien=20Pag=C3=A8s?= Date: Fri, 5 Dec 2014 15:56:03 -0500 Subject: [PATCH] nitvm: Migrating some init to new-style constructors and fixe a missing doc warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julien Pagès --- src/vm.nit | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vm.nit b/src/vm.nit index 3494602..4d54f54 100644 --- a/src/vm.nit +++ b/src/vm.nit @@ -45,9 +45,9 @@ class VirtualMachine super NaiveInterpreter var memory_manager: MemoryManager = new MemoryManager # The unique instance of the `MInit` value - var initialization_value: Instance + var initialization_value: Instance is noinit - init(modelbuilder: ModelBuilder, mainmodule: MModule, arguments: Array[String]) + init do var init_type = new MInitType(mainmodule.model) initialization_value = new MutableInstance(init_type) @@ -627,6 +627,8 @@ end # Redef to associate an `Instance` to its `VTable` redef class Instance + + # Associate a runtime instance to its virtual table which contains methods, types etc. var vtable: nullable VTable end @@ -635,10 +637,6 @@ class MInitType super MType redef var model: Model - protected init(model: Model) - do - self.model = model - end redef fun to_s do return "InitType" redef fun as_nullable do return self -- 1.7.9.5