Class OpcodeDispatcher
- java.lang.Object
-
- com.tonic.analysis.execution.dispatch.OpcodeDispatcher
-
public final class OpcodeDispatcher extends Object
Interpreter core that executes one bytecode instruction per call against a frame, deferring invokes, field access, and allocation to the dispatch context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpcodeDispatcher.DispatchResultOutcome of a dispatch step, directing the interpreter's next action.
-
Constructor Summary
Constructors Constructor Description OpcodeDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpcodeDispatcher.DispatchResultdispatch(StackFrame frame, DispatchContext context)Executes the frame's current instruction, mutating its stack, locals, and PC.
-
-
-
Method Detail
-
dispatch
public OpcodeDispatcher.DispatchResult dispatch(StackFrame frame, DispatchContext context)
Executes the frame's current instruction, mutating its stack, locals, and PC.- Parameters:
frame- the frame whose current instruction is executedcontext- services for constant resolution and pending-operation handoff- Returns:
- how the interpreter should proceed
- Throws:
IllegalStateException- if no instruction exists at the frame's PCUnsupportedOperationException- for jsr/ret or unimplemented opcodes
-
-