Package se.krka.kahlua.vm
Class Coroutine
java.lang.Object
se.krka.kahlua.vm.Coroutine
public class Coroutine
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description KahluaTable
environment
java.lang.Object[]
objectStack
java.lang.String
stackTrace
-
Constructor Summary
Constructors Constructor Description Coroutine()
Coroutine(Platform platform, KahluaTable environment)
Coroutine(Platform platform, KahluaTable environment, KahluaThread thread)
-
Method Summary
Modifier and Type Method Description void
addStackTrace(LuaCallFrame frame)
boolean
atBottom()
void
cleanCallFrames(LuaCallFrame callerFrame)
void
closeUpvalues(int closeIndex)
LuaCallFrame
currentCallFrame()
void
destroy()
UpValue
findUpvalue(int scanIndex)
LuaCallFrame
getCallFrame(int index)
LuaCallFrame[]
getCallframeStack()
int
getCallframeTop()
java.lang.String
getCurrentStackTrace(int level, int count, int haltAt)
java.lang.Object
getObjectFromStack(int n)
int
getObjectStackSize()
Coroutine
getParent()
LuaCallFrame
getParent(int level)
LuaCallFrame
getParentCallframe()
LuaCallFrame
getParentNoAssert(int level)
Platform
getPlatform()
java.lang.String
getStatus()
KahluaThread
getThread()
int
getTop()
boolean
isDead()
void
popCallFrame()
LuaCallFrame
pushNewCallFrame(LuaClosure closure, JavaFunction javaFunction, int localBase, int returnBase, int nArguments, boolean fromLua, boolean insideCoroutine)
void
resume(Coroutine parent)
void
setCallFrameStackTop(int newTop)
void
setTop(int newTop)
void
stackClear(int startIndex, int endIndex)
void
stackCopy(int startIndex, int destIndex, int len)
static void
yieldHelper(LuaCallFrame callFrame, LuaCallFrame argsCallFrame, int nArguments)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
environment
-
stackTrace
public java.lang.String stackTrace -
objectStack
public java.lang.Object[] objectStack
-
-
Constructor Details
-
Coroutine
public Coroutine() -
Coroutine
-
Coroutine
-
-
Method Details
-
getParent
-
pushNewCallFrame
public final LuaCallFrame pushNewCallFrame(LuaClosure closure, JavaFunction javaFunction, int localBase, int returnBase, int nArguments, boolean fromLua, boolean insideCoroutine) -
popCallFrame
public void popCallFrame() -
setCallFrameStackTop
public final void setCallFrameStackTop(int newTop) -
setTop
public final void setTop(int newTop) -
stackCopy
public final void stackCopy(int startIndex, int destIndex, int len) -
stackClear
public final void stackClear(int startIndex, int endIndex) -
closeUpvalues
public final void closeUpvalues(int closeIndex) -
findUpvalue
-
getObjectFromStack
public java.lang.Object getObjectFromStack(int n) -
getObjectStackSize
public int getObjectStackSize() -
getParentCallframe
-
currentCallFrame
-
getTop
public int getTop() -
getParent
-
getParentNoAssert
-
getCurrentStackTrace
public java.lang.String getCurrentStackTrace(int level, int count, int haltAt) -
cleanCallFrames
-
addStackTrace
-
isDead
public boolean isDead() -
getPlatform
-
getStatus
public java.lang.String getStatus() -
atBottom
public boolean atBottom() -
getCallframeTop
public int getCallframeTop() -
getCallframeStack
-
getCallFrame
-
yieldHelper
-
resume
-
getThread
-
destroy
public void destroy()
-