KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > bytecode > TryState


1 // Copyright (c) 1997 Per M.A. Bothner.
2
// This is free software; for terms and warranty disclaimer see ./COPYING.
3

4 package gnu.bytecode;
5
6 /** The state of a try statement. */
7
8 public class TryState {
9   /** 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   {
38     previous = code.try_stack;
39     code.try_stack = this;
40     start_try = code.getLabel();
41   }
42
43 }
44
Popular Tags