01: // Copyright (c) 1997 Per M.A. Bothner.
02: // This is free software; for terms and warranty disclaimer see ./COPYING.
03:
04: package gnu.bytecode;
05:
06: import java.io.*;
07:
08: /** The state of a try statement. */
09:
10: public class TryState {
11: /** The surrounding TryState, if any. */
12: public final TryState previous;
13:
14: /** The label for the code following the entire try-statement. */
15: Label end_label;
16:
17: /** If this "try" has a "finally", the Label of the "finally" sub-routine. */
18: public Label finally_subr;
19:
20: /** Used for the return address of the finally subroutine (if any). */
21: Variable finally_ret_addr;
22:
23: /** Non-null if we need a temporary to save the result. */
24: Variable saved_result;
25:
26: /** If the SP > 0 when we entered the try, the stack is saved here. */
27: Variable[] savedStack;
28:
29: int start_pc;
30: int end_pc;
31:
32: /** If we are inside a try, the type of variable matched. */
33: ClassType try_type;
34:
35: public TryState(CodeAttr code) {
36: previous = code.try_stack;
37: code.try_stack = this;
38: start_pc = code.PC;
39: }
40:
41: }
|