Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java @ 9839:b360b05aa996
Quick fix for BranchProbabilityNode.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 16 May 2013 14:33:35 +0200 |
parents | 8b7996916df6 |
children | 494b818b527c |
rev | line source |
---|---|
7659
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 package com.oracle.truffle.api.nodes; |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 /** |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 * An exception thrown to model control flow in a Truffle interpreter. The Truffle optimizer has |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 * special knowledge of this exception class for performance optimizations. |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 */ |
7666
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
29 public class ControlFlowException extends RuntimeException { |
7659
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 private static final long serialVersionUID = 3676602078425211386L; |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 /** |
7665
386b00821c66
Fix comment.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7659
diff
changeset
|
34 * Creates an exception thrown to model control flow. |
7659
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 */ |
7666
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
36 public ControlFlowException() { |
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
37 } |
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
38 |
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
39 /** |
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
40 * For performance reasons, this exception does not record any stack trace information. |
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
41 */ |
7731
8b7996916df6
Make fillInStackTrace final and non-synchronized in exceptions that do not need stack trace.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7666
diff
changeset
|
42 @SuppressWarnings("sync-override") |
7666
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
43 @Override |
7731
8b7996916df6
Make fillInStackTrace final and non-synchronized in exceptions that do not need stack trace.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7666
diff
changeset
|
44 public final Throwable fillInStackTrace() { |
7666
31540ca73e81
Remove ControlFlowException in SimpleLanguage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7665
diff
changeset
|
45 return null; |
7659
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 } |
5a63675be8ca
Introduce ControlFlowException class in Truffle.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 } |