# HG changeset patch
# User Miguel Garcia
# Date 1398771148 -7200
# Node ID 3af4870a67e49a00b3097ede55eef745c62136b7
# Parent e9029a026dc97a5bc6c54df96eddc1139f946fae
[flow-sensitive] renaming: downcasted -> downcast
diff -r e9029a026dc9 -r 3af4870a67e4 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java Tue Apr 29 14:33:09 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java Tue Apr 29 13:32:28 2014 +0200
@@ -121,7 +121,7 @@
if (w == null) {
/*
- * If there's no witness, attempting `downcasted(subject)` is futile.
+ * If there's no witness, attempting `downcast(subject)` is futile.
*/
visitCheckCastNodeLackingWitness(checkCast);
return;
@@ -146,7 +146,7 @@
if (toType.isInterface()) {
return;
}
- assert reasoner.downcasted(subject) == subject;
+ assert reasoner.downcast(subject) == subject;
lowerCheckCastAnchorFriendlyWay(checkCast, subject);
}
@@ -288,18 +288,18 @@
ValueNode subject;
if (checkCast.object() instanceof CheckCastNode) {
- subject = reasoner.downcasted(checkCast);
+ subject = reasoner.downcast(checkCast);
if (subject == checkCast) {
- subject = reasoner.downcasted(checkCast.object());
+ subject = reasoner.downcast(checkCast.object());
}
} else {
- subject = reasoner.downcasted(checkCast.object());
+ subject = reasoner.downcast(checkCast.object());
}
ObjectStamp subjectStamp = (ObjectStamp) subject.stamp();
ResolvedJavaType subjectType = subjectStamp.type();
- // TODO move this check to downcasted()
+ // TODO move this check to downcast()
assert !precisionLoss(checkCast.object(), subject);
/*
@@ -316,7 +316,7 @@
}
/*
- * At this point, `downcasted()` might or might not have delivered a more precise value. If
+ * At this point, `downcast()` might or might not have delivered a more precise value. If
* more precise, it wasn't precise enough to conform to `toType`. Even so, for the
* `toType.isInterface()` case (dealt with below) we'll replace the checkCast's input with
* that value (its class-stamp being more precise than the original).
diff -r e9029a026dc9 -r 3af4870a67e4 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Tue Apr 29 14:33:09 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Tue Apr 29 13:32:28 2014 +0200
@@ -51,8 +51,8 @@
* This class implements a simple partial evaluator that recursively reduces a given
* {@link com.oracle.graal.nodes.calc.FloatingNode} into a simpler one based on the current state.
* Such evaluator comes handy when visiting a {@link com.oracle.graal.nodes.FixedNode} N, just
- * before updating the state for N. At the pre-state, an {@link EquationalReasoner
- * EquationalReasoner} can be used to reduce N's inputs (actually only those inputs of Value and
+ * before updating the state for N. At the pre-state, an {@link EquationalReasoner}
+ * can be used to reduce N's inputs (actually only those inputs of Value and
* Condition {@link com.oracle.graal.graph.InputType InputType}). For an explanation of where it's
* warranted to replace "old input" with "reduced input", see the inline comments in method
* {@link EquationalReasoner#deverbosify(com.oracle.graal.graph.Node n) deverbosify(Node n)}
@@ -253,13 +253,13 @@
* the cases above. One sure way to achieve that is with `rememberSubstitution(old, new)`
*/
if (v instanceof ValueProxy) {
- return downcasted(v);
+ return downcast(v);
}
if (n instanceof FloatingNode) {
/*
* `deverbosifyFloatingNode()` will drill down over floating inputs, when that not
- * possible anymore it resorts to calling `downcasted()`. Thus it's ok to take the
+ * possible anymore it resorts to calling `downcast()`. Thus it's ok to take the
* `deverbosifyFloatingNode()` route first, as no downcasting opportunity will be
* missed.
*/
@@ -267,7 +267,7 @@
}
if (FlowUtil.hasLegalObjectStamp(v)) {
- return downcasted(v);
+ return downcast(v);
}
return n;
@@ -339,7 +339,7 @@
* No input has changed doesn't imply there's no witness to refine the
* floating-object value.
*/
- ValueNode d = downcasted(f);
+ ValueNode d = downcast(f);
return d;
} else {
return f;
@@ -356,7 +356,7 @@
/**
* In case of doubt (on whether a reduction actually triggered) it's always ok to invoke "
- * rememberSubstitution(f, downcasted(f))
": this method records a map entry only if
+ * rememberSubstitution(f, downcast(f))
": this method records a map entry only if
* pre-image and image differ.
*
* @return the image of the substitution (ie, the second argument) unmodified.
@@ -515,7 +515,7 @@
}
/**
- * It's always ok to use "downcasted(object)
" instead of " object
"
+ * It's always ok to use "downcast(object)
" instead of " object
"
* because this method re-wraps the argument in a {@link com.oracle.graal.nodes.PiNode} only if
* the new stamp is strictly more refined than the original.
*
@@ -534,7 +534,7 @@
* the unmodified argument otherwise.
*
*/
- ValueNode downcasted(final ValueNode object) {
+ ValueNode downcast(final ValueNode object) {
// -------------------------------------------------
// actions based only on the stamp of the input node
@@ -711,7 +711,7 @@
* the reason being that the state abstraction can be updated only at fixed nodes).
* As a result, the witness for a (PiNode, PiArrayNode, UnsafeCastNode, or GuardedValueNode)
* may be less precise than the proxy's stamp. We don't want to lose such precision,
- * thus downcasted(proxy) == proxy
in such cases.
+ * thus downcast(proxy) == proxy
in such cases.
*
*
*
@@ -833,7 +833,7 @@
*/
private ValueNode downcastedTypeProfileProxyNode(TypeProfileProxyNode envelope) {
ValueNode payload = envelope.getOriginalNode();
- ValueNode d = downcasted(payload);
+ ValueNode d = downcast(payload);
if (payload != d) {
TypeProfileProxyNode changed = (TypeProfileProxyNode) envelope.copyWithInputs();
added.add(changed);
@@ -869,7 +869,7 @@
while (innerMost instanceof CheckCastNode) {
innerMost = ((CheckCastNode) innerMost).object();
}
- ValueNode deepest = downcasted(innerMost);
+ ValueNode deepest = downcast(innerMost);
ResolvedJavaType deepestType = ((ObjectStamp) deepest.stamp()).type();
if ((deepestType != null && deepestType.equals(toType)) || FlowUtil.isMorePrecise(deepestType, toType)) {
assert !w.knowsBetterThan(deepest);
@@ -877,7 +877,7 @@
}
}
- ValueNode subject = downcasted(checkCast.object());
+ ValueNode subject = downcast(checkCast.object());
ObjectStamp subjectStamp = (ObjectStamp) subject.stamp();
ResolvedJavaType subjectType = subjectStamp.type();
diff -r e9029a026dc9 -r 3af4870a67e4 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Tue Apr 29 14:33:09 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Tue Apr 29 13:32:28 2014 +0200
@@ -222,7 +222,7 @@
assert io.type() != null;
Witness w = state.typeInfo(payload);
if (w != null && w.isNonNull() && isEqualOrMorePrecise(w.type(), io.type())) {
- ValueNode d = reasoner.downcasted(payload);
+ ValueNode d = reasoner.downcast(payload);
removeGuardingPiNode(envelope, d);
return true;
}
@@ -318,7 +318,7 @@
warnAboutOutOfTheBlueGuardingPiNode(envelope);
}
- ValueNode d = reasoner.downcasted(payload);
+ ValueNode d = reasoner.downcast(payload);
if (d == null) {
return false;
}
diff -r e9029a026dc9 -r 3af4870a67e4 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Tue Apr 29 14:33:09 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Tue Apr 29 13:32:28 2014 +0200
@@ -112,7 +112,7 @@
* standardize on one of them, and drop the other? Because the {@link #typeRefinements} eagerly
* aggregates information for easier querying afterwards, e.g. when producing a "downcasted"
* value (which involves building a {@link com.oracle.graal.nodes.PiNode}, see
- * {@link EquationalReasoner#downcasted(com.oracle.graal.nodes.ValueNode) downcasted()}
+ * {@link EquationalReasoner#downcast(com.oracle.graal.nodes.ValueNode) downcast()}
*
*
*/