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: /** The state of a try statement. */
07:
08: public class TryState {
09: /** The surrounding TryState, if any. */
10: TryState previous;
11:
12: /** The label for the code following the entire try-statement. */
13: Label end_label;
14:
15: /** If this "try" has a "finally", the Label of the "finally" sub-routine. */
16: Label finally_subr;
17:
18: /** Used for the return address of the finally subroutine (if any). */
19: Variable finally_ret_addr;
20:
21: /** Non-null if we need a temporary to save the result. */
22: Variable saved_result;
23:
24: /** If the SP > 0 when we entered the try, the stack is saved here. */
25: Variable[] savedStack;
26:
27: Label start_try;
28: Label end_try;
29:
30: /** If we are inside a try, the type of variable matched. */
31: ClassType try_type;
32:
33: /** Only used in emitWithCleanupStart mode. */
34: Type[] savedTypes;
35:
36: public TryState(CodeAttr code) {
37: previous = code.try_stack;
38: code.try_stack = this;
39: start_try = code.getLabel();
40: }
41:
42: }
|