Module

Module

package neko-vm

Available on macro, 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.

Constructor

new (m:ModuleHandle)

Variables

m:ModuleHandle

The abstract handle.

name:String

Methods

codeSize ():Int

Returns the codeSize of the Module.

execute ():Dynamic

Execute 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 ():Dynamic

The 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):Dynamic

Get a Module global value.

globalsCount ():Int

Returns the number of globals in this Module global table.

loader ():Loader

Returns the Loader that this Module was loaded with-

setExport (name:String, value:Dynamic):Void

Set a value in the Module export table.

setGlobal (n:Int, v:Dynamic):Void

Set a Module global value.

toString ():String

Static methods

static local ():Module

Returns the local Module, which is the one in which this method is included-

static read (i:Input, l:Loader):Module

Reads a module from an Input by using the given Loader- The module is initialized but has not yet been executed-

static readBytes (b:Bytes, loader:Loader):Module

Reads a module from Bytes using the given Loader- The module is initialized but has not yet been executed-

static readGlobalsNames (i:Input):Array<String>

Extract the globals names from the given module

static readPath (name:String, path:Array<String>, loader:Loader):Module

Reads a module from a name and using the specified seach path and loader- The module is initialized but has not yet been executed-

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/neko/vm/Module.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部