Class Coroutine

java.lang.Object
se.krka.kahlua.vm.Coroutine

public class Coroutine
extends java.lang.Object
  • Field Details

    • environment

      public KahluaTable environment
    • stackTrace

      public java.lang.String stackTrace
    • objectStack

      public java.lang.Object[] objectStack
  • Constructor Details

  • Method Details

    • getParent

      public Coroutine 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

      public final UpValue findUpvalue​(int scanIndex)
    • getObjectFromStack

      public java.lang.Object getObjectFromStack​(int n)
    • getObjectStackSize

      public int getObjectStackSize()
    • getParentCallframe

      public LuaCallFrame getParentCallframe()
    • currentCallFrame

      public final LuaCallFrame currentCallFrame()
    • getTop

      public int getTop()
    • getParent

      public LuaCallFrame getParent​(int level)
    • getParentNoAssert

      public LuaCallFrame getParentNoAssert​(int level)
    • getCurrentStackTrace

      public java.lang.String getCurrentStackTrace​(int level, int count, int haltAt)
    • cleanCallFrames

      public void cleanCallFrames​(LuaCallFrame callerFrame)
    • addStackTrace

      public void addStackTrace​(LuaCallFrame frame)
    • isDead

      public boolean isDead()
    • getPlatform

      public Platform getPlatform()
    • getStatus

      public java.lang.String getStatus()
    • atBottom

      public boolean atBottom()
    • getCallframeTop

      public int getCallframeTop()
    • getCallframeStack

      public LuaCallFrame[] getCallframeStack()
    • getCallFrame

      public LuaCallFrame getCallFrame​(int index)
    • yieldHelper

      public static void yieldHelper​(LuaCallFrame callFrame, LuaCallFrame argsCallFrame, int nArguments)
    • resume

      public void resume​(Coroutine parent)
    • getThread

      public KahluaThread getThread()
    • destroy

      public void destroy()