src/jdk/nashorn/internal/ir/TryNode.java

changeset 57
59970b70ebb5
parent 16
69a4f0363d0f
child 96
e478708faa22
equal deleted inserted replaced
56:755404d7d189 57:59970b70ebb5
54 private Label exit; 54 private Label exit;
55 55
56 /** Exception symbol. */ 56 /** Exception symbol. */
57 private Symbol exception; 57 private Symbol exception;
58 58
59 /** Catchall exception for finally expansion, where applicable */
60 private Symbol finallyCatchAll;
61
59 /** 62 /**
60 * Constructor 63 * Constructor
61 * 64 *
62 * @param source the source 65 * @param source the source
63 * @param token token 66 * @param token token
182 public void setException(final Symbol exception) { 185 public void setException(final Symbol exception) {
183 this.exception = exception; 186 this.exception = exception;
184 } 187 }
185 188
186 /** 189 /**
190 * Get the catch all symbol for this try block
191 * @return catch all symbol
192 */
193 public Symbol getFinallyCatchAll() {
194 return this.finallyCatchAll;
195 }
196
197 /**
198 * If a finally block exists, the synthetic catchall needs another symbol to
199 * store its throwable
200 * @param finallyCatchAll a symbol for the finally catch all exception
201 */
202 public void setFinallyCatchAll(final Symbol finallyCatchAll) {
203 this.finallyCatchAll = finallyCatchAll;
204 }
205
206 /**
187 * Get the exit label for this try block 207 * Get the exit label for this try block
188 * @return exit label 208 * @return exit label
189 */ 209 */
190 public Label getExit() { 210 public Label getExit() {
191 return exit; 211 return exit;

mercurial