package neko.vm
Available on neko
A Neko Module represent a execution unit for the Neko Virtual Machine. Each compiled .n bytecode file is a module once loaded by the NekoVM.
staticlocal():ModuleReturns the local Module, which is the one in which this method is included.
staticread(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.
staticreadBytes(b:Bytes, loader:Loader):ModuleReads a module from Bytes using the given Loader. The module is initialized but has not yet been executed.
staticreadGlobalsNames(i:Input):Array<String>Extract the globals names from the given module
staticreadPath(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.
new(m:ModuleHandle)m:ModuleHandleThe abstract handle.
name:StringcodeSize():IntReturns the codeSize of the Module.
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.
exportsTable():DynamicThe raw export table.
getExports():Map<String, Dynamic>Each Module has an export table which can be useful to transfert values between modules.
getGlobal(n:Int):DynamicGet a Module global value.
globalsCount():IntReturns the number of globals in this Module global table.
loader():LoaderReturns the Loader that this Module was loaded with.
setExport(name:String, value:Dynamic):VoidSet a value in the Module export table.
setGlobal(n:Int, v:Dynamic):VoidSet a Module global value.
toString():String
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/neko/vm/Module.html