Module
class neko.vm.ModuleAvailable in nekoA Neko Module represent a execution unit for the Neko Virtual Machine. Each compiled
.n bytecode file is a module once loaded by the NekoVM.
var m : ModuleHandleThe abstract handle.
var name(accessor,accessor) : StringReturns the Module name. This is the name that the Module was loaded with by the Loader.
function new( m : ModuleHandle ) : Void
function codeSize() : IntReturns the codeSize of the Module.
function execute() : DynamicExecute a module and returns its result (the latest evaluated expression). A module can be executed several times but its globals are only initialized once the first time the Module is loaded.
function exportsTable() : DynamicThe raw export table.
function getExports() : StringMap<Dynamic>Each Module has an export table which can be useful to transfert values between modules.
function getGlobal( n : Int ) : DynamicGet a Module global value.
function globalsCount() : IntReturns the number of globals in this Module global table.
function loader() : LoaderReturns the Loader that this Module was loaded with.s
function setExport( name : String, value : Dynamic ) : VoidSet a value in the Module export table.
function setGlobal( n : Int, v : Dynamic ) : VoidSet a Module global value.
function toString() : String
static function local() : ModuleReturns the local Module, which is the one in which this method is included.
static function read( i : Input, l : Loader ) : ModuleReads a module from an Input by using the given Loader. The module is initialized but has not yet been executed.
static function readBytes( b : Bytes, loader : Loader ) : ModuleReads a module from Bytes using the given Loader. The module is initialized but has not yet been executed.
static function readGlobalsNames( i : Input ) : Array<String>Extract the globals names from the given module
static function readPath( name : String, path : Array<String>, loader : Loader ) : ModuleReads a module from a name and using the specified seach path and loader. The module is initialized but has not yet been executed.
version #19267, modified 2013-05-08 11:10:38 by api
0 comment