Package co.paralleluniverse.fibers
Class Stack
- java.lang.Object
-
- co.paralleluniverse.fibers.Stack
-
- All Implemented Interfaces:
java.io.Serializable
public final class Stack extends java.lang.Object implements java.io.Serializable
Internal Class - DO NOT USE! (Public so that instrumented code can access it) ANY CHANGE IN THIS CLASS NEEDS TO BE SYNCHRONIZED WITHInstrumentMethod
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
boolean
isFirstInStackOrPushed()
called when nextMethodEntry returns 0int
nextMethodEntry()
called at the beginning of a methodvoid
popMethod(int slots)
void
postRestore()
void
preemptionPoint(int type)
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
pushMethod(int entry, int numSlots)
Called before a method is called.
-
-
-
Field Detail
-
MAX_ENTRY
public static final int MAX_ENTRY
- See Also:
- Constant Field Values
-
MAX_SLOTS
public static final int MAX_SLOTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStack
public static Stack getStack()
-
nextMethodEntry
public final int nextMethodEntry()
called at the beginning of a method- Returns:
- the entry point of this method
-
isFirstInStackOrPushed
public final boolean isFirstInStackOrPushed()
called when nextMethodEntry returns 0
-
pushMethod
public final void pushMethod(int entry, int numSlots)
Called before a method is called.- Parameters:
entry
- the entry point in the current method for resumenumSlots
- the number of required stack slots for storing the state of the current method
-
popMethod
public final void popMethod(int slots)
-
postRestore
public final void postRestore() throws SuspendExecution, java.lang.InterruptedException
- Throws:
SuspendExecution
java.lang.InterruptedException
-
preemptionPoint
public final void preemptionPoint(int type) throws SuspendExecution
- Throws:
SuspendExecution
-
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)
-
-