de.matthiasmann.continuations
Class Stack

java.lang.Object
  extended by de.matthiasmann.continuations.Stack
All Implemented Interfaces:
java.io.Serializable

public final class Stack
extends java.lang.Object
implements java.io.Serializable

Internal Class - DO NOT USE ! Needs to be public so that instrumented code can access it. ANY CHANGE IN THIS CLASS NEEDS TO BE SYNCHRONIZED WITH InstrumentMethod

See Also:
Serialized Form

Field Summary
static SuspendExecution exception_instance_not_for_user_code
          sadly this need to be here
 
Method Summary
 double getDouble(int idx)
           
 float getFloat(int idx)
           
 int getInt(int idx)
           
 long getLong(int idx)
           
 java.lang.Object getObject(int idx)
           
static Stack getStack()
           
 int nextMethodEntry()
          called at the begin of a method
 void popMethod(int numObjSlots)
          Called at the end of a method - undoes the effects of nextMethodEntry()
static void push(double value, Stack s, int idx)
           
static void push(float value, Stack s, int idx)
           
static void push(int value, Stack s, int idx)
           
static void push(long value, Stack s, int idx)
           
static void push(java.lang.Object value, Stack s, int idx)
           
 void pushMethodAndReserveSpace(int entry, int numSlots)
          Called before a method is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exception_instance_not_for_user_code

public static SuspendExecution exception_instance_not_for_user_code
sadly this need to be here

Method Detail

getStack

public static Stack getStack()

pushMethodAndReserveSpace

public final void pushMethodAndReserveSpace(int entry,
                                            int numSlots)
Called before a method is called.

Parameters:
entry - the entry point in the method for resume
numSlots - the number of required stack slots for storing the state

popMethod

public final void popMethod(int numObjSlots)
Called at the end of a method - undoes the effects of nextMethodEntry()

Parameters:
numObjSlots - number of Object slots to clear

nextMethodEntry

public final int nextMethodEntry()
called at the begin of a method

Returns:
the entry point of this method

push

public static void push(int value,
                        Stack s,
                        int idx)

push

public static void push(float value,
                        Stack s,
                        int idx)

push

public static void push(long value,
                        Stack s,
                        int idx)

push

public static void push(double value,
                        Stack s,
                        int idx)

push

public static void push(java.lang.Object value,
                        Stack s,
                        int idx)

getInt

public final int getInt(int idx)

getFloat

public final float getFloat(int idx)

getLong

public final long getLong(int idx)

getDouble

public final double getDouble(int idx)

getObject

public final java.lang.Object getObject(int idx)