Mercurial > hg > truffle
changeset 15196:593f7d0a6f50
GraalGraphInternalError: improve method names and documentation.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 17 Apr 2014 15:47:44 +0200 |
parents | 2f97d638c7af |
children | 06bfcf5f941d ff0283a98b7a |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java graal/com.oracle.graal.graph/src/com/oracle/graal/graph/GraalGraphInternalError.java graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/ComputeImmediateDominator.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java |
diffstat | 5 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Thu Apr 17 15:44:13 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Thu Apr 17 15:47:44 2014 +0200 @@ -214,7 +214,7 @@ try { doRoot((ValueNode) instr); } catch (GraalInternalError e) { - throw GraalGraphInternalError.addContext(e, instr); + throw GraalGraphInternalError.transformAndAddContext(e, instr); } catch (Throwable e) { throw new GraalGraphInternalError(e).addContext(instr); }
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/GraalGraphInternalError.java Thu Apr 17 15:44:13 2014 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/GraalGraphInternalError.java Thu Apr 17 15:47:44 2014 +0200 @@ -25,7 +25,7 @@ import com.oracle.graal.compiler.common.*; /** - * This error represents a conditions that should never occur during normal operation. + * This error is the graph/node aware extension of GraalInternalError. */ public class GraalGraphInternalError extends GraalInternalError { @@ -105,13 +105,13 @@ } /** - * Adds a graph to the context of the given GraalInternalError. + * Transform a GraalInternalError into a GraalGraphInternalError and add a graph to the context. * * @param e the previous error * @param newGraph the graph which is in a incorrect state, if the verification error was not * caused by a specific node */ - public static GraalGraphInternalError addContext(GraalInternalError e, Graph newGraph) { + public static GraalGraphInternalError transformAndAddContext(GraalInternalError e, Graph newGraph) { GraalGraphInternalError graphError; if (e instanceof GraalGraphInternalError) { graphError = (GraalGraphInternalError) e; @@ -122,13 +122,13 @@ } /** - * Adds a node to the context of the given GraalInternalError. + * Transform a GraalInternalError into a GraalGraphInternalError and add a node to the context. * * @param e the previous error * @param newNode the node which is in a incorrect state, if the verification error was caused * by a node */ - public static GraalGraphInternalError addContext(GraalInternalError e, Node newNode) { + public static GraalGraphInternalError transformAndAddContext(GraalInternalError e, Node newNode) { GraalGraphInternalError graphError; if (e instanceof GraalGraphInternalError) { graphError = (GraalGraphInternalError) e;
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Thu Apr 17 15:44:13 2014 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Thu Apr 17 15:47:44 2014 +0200 @@ -840,7 +840,7 @@ throw new GraalInternalError(t); } } catch (GraalInternalError e) { - throw GraalGraphInternalError.addContext(e, node).addContext(this); + throw GraalGraphInternalError.transformAndAddContext(e, node).addContext(this); } } return true;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/ComputeImmediateDominator.java Thu Apr 17 15:44:13 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/ComputeImmediateDominator.java Thu Apr 17 15:47:44 2014 +0200 @@ -64,7 +64,7 @@ } return dominator; } catch (Throwable t) { - throw GraalGraphInternalError.addContext(new GraalInternalError(t).addContext("Could not find a dominator"), dominated); + throw GraalGraphInternalError.transformAndAddContext(new GraalInternalError(t).addContext("Could not find a dominator"), dominated); } }
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Thu Apr 17 15:44:13 2014 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Thu Apr 17 15:47:44 2014 +0200 @@ -121,7 +121,7 @@ } } } catch (GraalInternalError e) { - throw GraalGraphInternalError.addContext(e, node); + throw GraalGraphInternalError.transformAndAddContext(e, node); } }