nitvm: Migrating some init to new-style constructors and fixe a missing doc warning
authorJulien Pagès <julien.projet@gmail.com>
Fri, 5 Dec 2014 20:56:03 +0000 (15:56 -0500)
committerJulien Pagès <julien.projet@gmail.com>
Fri, 5 Dec 2014 20:58:30 +0000 (15:58 -0500)
Signed-off-by: Julien Pagès <julien.projet@gmail.com>

src/vm.nit

index 3494602..4d54f54 100644 (file)
@@ -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