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.SerializableInternal 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 doublegetDouble(int idx)floatgetFloat(int idx)intgetInt(int idx)longgetLong(int idx)java.lang.ObjectgetObject(int idx)static StackgetStack()booleanisFirstInStackOrPushed()called when nextMethodEntry returns 0intnextMethodEntry()called at the beginning of a methodvoidpopMethod(int slots)voidpostRestore()voidpreemptionPoint(int type)static voidpush(double value, Stack s, int idx)static voidpush(float value, Stack s, int idx)static voidpush(int value, Stack s, int idx)static voidpush(long value, Stack s, int idx)static voidpush(java.lang.Object value, Stack s, int idx)voidpushMethod(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:
SuspendExecutionjava.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)
-
-