Enum DispatchResult
- java.lang.Object
-
- java.lang.Enum<DispatchResult>
-
- com.tonic.analysis.execution.dispatch.DispatchResult
-
- All Implemented Interfaces:
Serializable,Comparable<DispatchResult>
public enum DispatchResult extends Enum<DispatchResult>
Outcome of dispatching a single instruction, directing the interpreter's next action.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ATHROWAnathrowwas executed; the thrown reference is on the stack and needs handler lookup.BRANCHControl transfers to the branch target the dispatcher left on the context.CHECKCASTA cast check was performed; the dispatcher already applied it, so no follow-up is needed.CONTINUEThe instruction finished in place and the program counter already advanced; nothing more is owed by the interpreter.FIELD_GETA field read is pending and must be serviced against the heap before execution resumes.FIELD_PUTA field write is pending and must be serviced against the heap before execution resumes.INSTANCEOFA type test was performed; the dispatcher already pushed its result.INVOKEA call was reached; the interpreter must resolve the target and push a new frame.NEW_ARRAYAn array must be allocated, covering the primitive, reference, and multi-dimensional forms.NEW_OBJECTAn instance must be allocated for the pendingnew, before its constructor runs.RETURNThe current frame completes and hands its return value, if any, to the caller.THROWThe interpreter must raise an exception it detected itself, such as a division by zero, rather than one the code threw explicitly.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DispatchResultvalueOf(String name)Returns the enum constant of this type with the specified name.static DispatchResult[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTINUE
public static final DispatchResult CONTINUE
The instruction finished in place and the program counter already advanced; nothing more is owed by the interpreter.
-
BRANCH
public static final DispatchResult BRANCH
Control transfers to the branch target the dispatcher left on the context.
-
INVOKE
public static final DispatchResult INVOKE
A call was reached; the interpreter must resolve the target and push a new frame.
-
RETURN
public static final DispatchResult RETURN
The current frame completes and hands its return value, if any, to the caller.
-
THROW
public static final DispatchResult THROW
The interpreter must raise an exception it detected itself, such as a division by zero, rather than one the code threw explicitly.
-
ATHROW
public static final DispatchResult ATHROW
Anathrowwas executed; the thrown reference is on the stack and needs handler lookup.
-
FIELD_GET
public static final DispatchResult FIELD_GET
A field read is pending and must be serviced against the heap before execution resumes.
-
FIELD_PUT
public static final DispatchResult FIELD_PUT
A field write is pending and must be serviced against the heap before execution resumes.
-
NEW_OBJECT
public static final DispatchResult NEW_OBJECT
An instance must be allocated for the pendingnew, before its constructor runs.
-
NEW_ARRAY
public static final DispatchResult NEW_ARRAY
An array must be allocated, covering the primitive, reference, and multi-dimensional forms.
-
CHECKCAST
public static final DispatchResult CHECKCAST
A cast check was performed; the dispatcher already applied it, so no follow-up is needed.
-
INSTANCEOF
public static final DispatchResult INSTANCEOF
A type test was performed; the dispatcher already pushed its result.
-
-
Method Detail
-
values
public static DispatchResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DispatchResult c : DispatchResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DispatchResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-