Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/OptimizationFailedException.java @ 21648:610d76a131cd
Merge with 4c146c9367b639ca173f0b0381804b4f50aca822
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Sun, 31 May 2015 17:23:14 -0700 |
parents | afbb8100ac92 |
children |
rev | line source |
---|---|
17078
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
1 /* |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
4 * |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. Oracle designates this |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
8 * particular file as subject to the "Classpath" exception as provided |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
9 * by Oracle in the LICENSE file that accompanied this code. |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
10 * |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
15 * accompanied this code). |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
16 * |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License version |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
20 * |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
22 * or visit www.oracle.com if you need additional information or have any |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
23 * questions. |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
24 */ |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
25 package com.oracle.truffle.api; |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
26 |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
27 public class OptimizationFailedException extends RuntimeException { |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
28 |
18165
afbb8100ac92
Truffle: CallTarget to RootCallTaget in OptimizationFailedException.
Chris Seaton <chris.seaton@oracle.com>
parents:
17598
diff
changeset
|
29 private final RootCallTarget callTarget; |
17079
b06b4dee86d5
Truffle: keep the RootNode in OptimizationFailedException, so you can figure out what it was that failed.
Chris Seaton <chris.seaton@oracle.com>
parents:
17078
diff
changeset
|
30 |
18165
afbb8100ac92
Truffle: CallTarget to RootCallTaget in OptimizationFailedException.
Chris Seaton <chris.seaton@oracle.com>
parents:
17598
diff
changeset
|
31 public OptimizationFailedException(Throwable cause, RootCallTarget callTarget) { |
17078
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
32 super(cause); |
17598
a3464d86b5d2
Truffle: OptimizationFailedException references the CallTarget instead of the RootNode.
Chris Seaton <chris.seaton@oracle.com>
parents:
17079
diff
changeset
|
33 this.callTarget = callTarget; |
17079
b06b4dee86d5
Truffle: keep the RootNode in OptimizationFailedException, so you can figure out what it was that failed.
Chris Seaton <chris.seaton@oracle.com>
parents:
17078
diff
changeset
|
34 } |
b06b4dee86d5
Truffle: keep the RootNode in OptimizationFailedException, so you can figure out what it was that failed.
Chris Seaton <chris.seaton@oracle.com>
parents:
17078
diff
changeset
|
35 |
18165
afbb8100ac92
Truffle: CallTarget to RootCallTaget in OptimizationFailedException.
Chris Seaton <chris.seaton@oracle.com>
parents:
17598
diff
changeset
|
36 public RootCallTarget getCallTarget() { |
17598
a3464d86b5d2
Truffle: OptimizationFailedException references the CallTarget instead of the RootNode.
Chris Seaton <chris.seaton@oracle.com>
parents:
17079
diff
changeset
|
37 return callTarget; |
17078
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
38 } |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
39 |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
40 private static final long serialVersionUID = -8797188744430210785L; |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
41 |
c4b1cf38002b
Truffle: TruffleCompilationExceptionsAreThrown option to get OptimizationFailedException on compiler error.
Chris Seaton <chris.seaton@oracle.com>
parents:
diff
changeset
|
42 } |