本文整理汇总了Java中org.luaj.vm2.lib.DebugLib类的典型用法代码示例。如果您正苦于以下问题:Java DebugLib类的具体用法?Java DebugLib怎么用?Java DebugLib使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DebugLib类属于org.luaj.vm2.lib包,在下文中一共展示了DebugLib类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onStartOfLuaInstruction
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/**
* This is a really ugly way of generating the branch instruction.
* Every Lua instruction is assigned one label, so jumping is possible.
*
* If debugging is enabled, then this will call {@link DebugLib#debugBytecode(int, Varargs, int)}.
*
* @param pc The current Lua program counter
*/
public void onStartOfLuaInstruction(int pc) {
Label currentLabel = branchDestinations[pc];
main.visitLabel(currentLabel);
if (p.lineinfo != null && p.lineinfo.length > pc) {
int newLine = p.lineinfo[pc];
if (newLine != line) {
line = newLine;
main.visitLineNumber(line, currentLabel);
}
}
if (DebugLib.DEBUG_ENABLED) {
main.visitVarInsn(ALOAD, debugStateSlot);
main.visitVarInsn(ALOAD, debugInfoSlot);
constantOpcode(main, pc);
main.visitInsn(ACONST_NULL);
main.visitInsn(ICONST_M1);
METHOD_BYTECODE.inject(main);
}
}
开发者ID:SquidDev,项目名称:luaj.luajc,代码行数:31,代码来源:JavaBuilder.java
示例2: getLocalCompiler
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
private Globals getLocalCompiler() {
Globals user_globals = new Globals();
user_globals.load(new JseBaseLib());
user_globals.load(new PackageLib());
user_globals.load(new Bit32Lib());
user_globals.load(new TableLib());
user_globals.load(new StringLib());
user_globals.load(new JseMathLib());
user_globals.load(new DebugLib());
sethook = user_globals.get("debug").get("sethook");
user_globals.set("debug", LuaValue.NIL);
return user_globals;
}
开发者ID:hamilton-lima,项目名称:robolucha,代码行数:16,代码来源:LuaVM.java
示例3: enableDebug
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
@Override
public void enableDebug() {
LuaTable env = getGlobals();
if (env != null) {
env.load(new DebugLib());
}
}
开发者ID:SquidDev-CC,项目名称:CCTweaks-Lua,代码行数:8,代码来源:LuaJFactory.java
示例4: createSandboxedGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
private Globals createSandboxedGlobals() {
Globals result = new Globals();
result.load(new JseBaseLib());
result.load(new PackageLib());
result.load(new Bit32Lib());
result.load(new TableLib());
result.load(new StringLib());
result.load(new JseMathLib());
result.load(new DebugLib());
result.set("debug", LuaValue.NIL);
return result;
}
开发者ID:mini2Dx,项目名称:miniscript,代码行数:13,代码来源:LuaScriptExecutorPool.java
示例5: LuaInstance
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
public LuaInstance() throws AerospikeException {
globals.load(new JseBaseLib());
globals.load(new PackageLib());
//globals.load(new Bit32Lib()); // not needed for 5.1 compatibility
globals.load(new TableLib());
globals.load(new StringLib());
globals.load(new CoroutineLib());
globals.load(new JseMathLib());
globals.load(new JseIoLib());
globals.load(new JseOsLib());
globals.load(new LuajavaLib());
globals.load(new DebugLib());
LuaTable packageTable = (LuaTable)globals.get("package");
loadedTable = (LuaTable)packageTable.get("loaded");
globals.load(new LuaBytesLib(this));
globals.load(new LuaListLib(this));
globals.load(new LuaMapLib(this));
globals.load(new LuaStreamLib(this));
LuaC.install(globals);
load("compat52", true);
load("as", true);
load("stream_ops", true);
load("aerospike", true);
globals.load(new LuaAerospikeLib(this));
}
开发者ID:otrimegistro,项目名称:aerospikez,代码行数:31,代码来源:LuaInstance.java
示例6: generateGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/**
* Internal method.
*
* <p>Generates a {@link Globals} object with all Lua
* and Undertailor libraries loaded, used for all Lua
* operations of Undertailor.</p>
*/
private Globals generateGlobals() {
Globals returned = new Globals();
LoadState.install(returned);
LuaC.install(returned);
// core Lua libraries
returned.load(new JseBaseLib());
returned.load(new PackageLib());
returned.load(new DebugLib());
returned.load(new Bit32Lib());
returned.load(new TableLib());
returned.load(new StringLib());
returned.load(new JseMathLib());
returned.load(new JseOsLib());
// undertailor libraries
returned.load(new BaseLib(this));
returned.load(new OsLib());
returned.load(new GameLib(undertailor));
returned.load(new ColorsLib());
returned.load(new TextsLib(undertailor));
returned.load(new MetaLib());
// Clean the globals.
LuaValue lib = returned.get("os");
if (lib.istable()) {
lib.set("execute", LuaValue.NIL);
lib.set("exit", LuaValue.NIL);
lib.set("remove", LuaValue.NIL);
lib.set("rename", LuaValue.NIL);
lib.set("setlocale", LuaValue.NIL);
lib.set("tmpname", LuaValue.NIL);
}
returned.set("load", LuaValue.NIL);
returned.set("loadfile", LuaValue.NIL);
returned.set("collectgarbage", LuaValue.NIL);
returned.set("debug", LuaValue.NIL);
returned.set("package", LuaValue.NIL);
return returned;
}
开发者ID:Xemiru,项目名称:Undertailor,代码行数:51,代码来源:ScriptManager.java
示例7: debugGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/** Create standard globals including the {@link debug} library.
*
* @return Table of globals initialized with the standard JSE and debug libraries
* @see #standardGlobals()
* @see JsePlatform
* @see JmePlatform
* @see DebugLib
*/
public static Globals debugGlobals() {
Globals globals = standardGlobals();
globals.load(new DebugLib());
return globals;
}
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:14,代码来源:JsePlatform.java
示例8: debugGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/**
* Create standard globals including the {@link DebugLib} library.
*
* @return Table of globals initialized with the standard JSE and debug libraries
* @see #standardGlobals()
* @see org.luaj.vm2.lib.jse.JsePlatform
* @see org.luaj.vm2.lib.jme.JmePlatform
* @see DebugLib
*/
public static Globals debugGlobals() {
Globals globals = standardGlobals();
globals.load(new DebugLib());
return globals;
}
开发者ID:hsllany,项目名称:HtmlNative,代码行数:15,代码来源:JsePlatform.java
示例9: debugGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/** Create standard globals including the {@link DebugLib} library.
*
* @return Table of globals initialized with the standard JSE and debug libraries
* @see #standardGlobals()
* @see JsePlatform
* @see org.luaj.vm2.lib.jme.JmePlatform
* @see DebugLib
*/
public static Globals debugGlobals() {
Globals globals = standardGlobals();
globals.load(new DebugLib());
return globals;
}
开发者ID:nekocode,项目名称:Hubs,代码行数:14,代码来源:JsePlatform.java
示例10: debugGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/** Create standard globals including the {@link debug} library.
*
* @return Table of globals initialized with the standard JSE and debug libraries
* @see #standardGlobals()
* @see JsePlatform
* @see JmePlatform
* @see DebugLib
*/
public static Globals debugGlobals() {
Globals globals = standardGlobals();
globals.load(new DebugLib());
return globals;
}
开发者ID:Cephrus,项目名称:Elite-Armageddon,代码行数:14,代码来源:JsePlatform.java
示例11: debugGlobals
import org.luaj.vm2.lib.DebugLib; //导入依赖的package包/类
/** Create standard globals including the {@link debug} library.
*
* @return Table of globals initialized with the standard JSE and debug libraries
* @see #standarsGlobals()
* @see JsePlatform
* @see JmePlatform
* @see DebugLib
*/
public static Globals debugGlobals() {
Globals globals = standardGlobals();
globals.load(new DebugLib());
return globals;
}
开发者ID:gnosygnu,项目名称:luaj_xowa,代码行数:14,代码来源:JmePlatform.java
注:本文中的org.luaj.vm2.lib.DebugLib类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论