# HG changeset patch # User Josef Eisl # Date 1397742464 -7200 # Node ID 593f7d0a6f50f1314358df6ad424976c1c7671db # Parent 2f97d638c7af85f2864d0843e156fd2e5ba4a621 GraalGraphInternalError: improve method names and documentation. diff -r 2f97d638c7af -r 593f7d0a6f50 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java --- 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); } diff -r 2f97d638c7af -r 593f7d0a6f50 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/GraalGraphInternalError.java --- 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; diff -r 2f97d638c7af -r 593f7d0a6f50 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java --- 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; diff -r 2f97d638c7af -r 593f7d0a6f50 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/ComputeImmediateDominator.java --- 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); } } diff -r 2f97d638c7af -r 593f7d0a6f50 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java --- 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); } }