Class Instruction
An execution path of the virtual machine is just a sequence of instructions stored in FormCalc's virtual code space. Each sequence is terminated with an Stop instruction, to represent the end of an execution path.
All instructions have a common interface, consisting of: a the FormCalc YYPARSENAME. Since the FormCalc virtual machine is a stack machine, i.e., its fetches its operand(s) from a runtime stack, and pushes its result back onto the runtime stack, most instructions are single word instructions. A few instructions, like Load, In, Out and Call are multi-word instructions -- some of their operands are stored in the words following the opcode. Other instructions, like If, For and While, also multi-word instructions, contain control flow information to the different execution paths inherent of conditional and iterative instructions.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandebugBreakPoint(int nScriptID, int nLine, boolean bSet) Set or clear a debug break-point.booleandebugCommand(com.adobe.xfa.formcalc.CalcParser oParser, int eCmd) Set internal state to enable either step-over, step-into or step-out.
-
Method Details
-
debugBreakPoint
public boolean debugBreakPoint(int nScriptID, int nLine, boolean bSet) Set or clear a debug break-point. It sets or clears a flag in the moDebugLineNo array, which is an array of line numbers parallel to the moCodeBase array.- Parameters:
nLine- line of source code.bSet- true to set a break-point, false to clear it.- Returns:
- true if successful.
-
debugCommand
public boolean debugCommand(com.adobe.xfa.formcalc.CalcParser oParser, int eCmd) Set internal state to enable either step-over, step-into or step-out. The debug-mode execution loop calls the debug host's Stopped method when mnDebugStopAtStackDepth is greater than or equal to the current stack depth.- Parameters:
oParser- the FormCalc parser.eCmd- a value of the CalcDebugCommand enum representing step-over, step-into or step-out.- Returns:
- true if successful.
-