# HG changeset patch
# User Doug Simon
# Date 1398695706 -7200
# Node ID 7a5c345434932ec89e546a46ad54bb3b032cf6c9
# Parent 2ca44250eee39e25ad91bcb35988799833e3410a# Parent 5dcf0ae606f37c2c51eea73e9bb3afbf8fb74c2a
Merge.
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/stack/StackIntrospection.java
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/stack/StackIntrospection.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/stack/StackIntrospection.java Mon Apr 28 16:35:06 2014 +0200
@@ -27,7 +27,7 @@
public interface StackIntrospection {
/**
- * Accesses the current stack, returning a collection of {@long InspectedFrame}s that can be
+ * Accesses the current stack, returning a collection of {@link InspectedFrame}s that can be
* used to inspect the stack frames' contents.
*
* @param initialMethods if this is non-{@code null}, then the stack trace will start at these
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Mon Apr 28 16:35:06 2014 +0200
@@ -29,12 +29,11 @@
import com.oracle.graal.compiler.common.spi.*;
/**
- * Describes the possible values of a {@link ValueNode} that produces an int or long result.
+ * Describes the possible values of a node that produces an int or long result.
*
* The description consists of (inclusive) lower and upper bounds and up (may be set) and down
* (always set) bit-masks.
*/
-@SuppressWarnings("javadoc")
public class IntegerStamp extends PrimitiveStamp {
private final long lowerBound;
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/PrimitiveStamp.java
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/PrimitiveStamp.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/PrimitiveStamp.java Mon Apr 28 16:35:06 2014 +0200
@@ -23,9 +23,8 @@
package com.oracle.graal.compiler.common.type;
/**
- * Describes the possible values of a {@link ValueNode} that produces a primitive value as result.
+ * Type describing primitive values.
*/
-@SuppressWarnings("javadoc")
public abstract class PrimitiveStamp extends Stamp {
private final int bits;
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java Mon Apr 28 16:35:06 2014 +0200
@@ -26,7 +26,7 @@
import com.oracle.graal.compiler.common.spi.*;
/**
- * A stamp is the basis for a type system over the nodes in a graph.
+ * A stamp is the basis for a type system.
*/
public abstract class Stamp {
@@ -57,13 +57,12 @@
public abstract PlatformKind getPlatformKind(PlatformKindTool tool);
/**
- * Returns the union of this stamp and the given stamp. Typically used to create stamps for
- * {@link ValuePhiNode}s.
+ * Returns the union of this stamp and the given stamp. Typically used to create stamps for phi
+ * nodes.
*
* @param other The stamp that will enlarge this stamp.
* @return The union of this stamp and the given stamp.
*/
- @SuppressWarnings("javadoc")
public abstract Stamp meet(Stamp other);
/**
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchGenerator.java
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchGenerator.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/match/MatchGenerator.java Mon Apr 28 16:35:06 2014 +0200
@@ -26,10 +26,11 @@
/**
* Code generator for complex match patterns.
- *
- * @returns null if the match can't be generated or a {@link ComplexMatchResult} that can be
- * evaluated during LIR generation to produce the final LIR value.
*/
public interface MatchGenerator {
+ /**
+ * @returns null if the match can't be generated or a {@link ComplexMatchResult} that can be
+ * evaluated during LIR generation to produce the final LIR value.
+ */
ComplexMatchResult match(NodeLIRBuilder gen);
}
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java Mon Apr 28 16:35:06 2014 +0200
@@ -240,14 +240,20 @@
private final PhaseContext context;
private final SchedulePhase schedule;
+ private final int iteration;
private Round(int iteration, PhaseContext context) {
- super("LoweringIteration" + iteration);
+ this.iteration = iteration;
this.context = context;
this.schedule = new SchedulePhase();
}
@Override
+ protected CharSequence createName() {
+ return "LoweringIteration" + iteration;
+ }
+
+ @Override
public void run(StructuredGraph graph) {
schedule.apply(graph, false);
processBlock(schedule.getCFG().getStartBlock(), graph.createNodeBitMap(), null);
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/BaseReduction.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/BaseReduction.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/BaseReduction.java Mon Apr 28 16:35:06 2014 +0200
@@ -49,7 +49,7 @@
* This class makes available little more than a few fields and a few utility methods used
* throughout the remaining components making up control-flow sensitive reductions.
*
- * */
+ */
public abstract class BaseReduction extends PostOrderNodeIterator {
protected static final DebugMetric metricCheckCastRemoved = Debug.metric("CheckCastRemoved");
@@ -70,7 +70,7 @@
*
* @see State#impossiblePath()
* @see com.oracle.graal.phases.common.cfs.FlowSensitiveReduction#finished()
- * */
+ */
public static class PostponedDeopt {
private final boolean goesBeforeFixed;
@@ -105,7 +105,7 @@
* argument, will be done once we're done traversing the graph.
*
* @see #finished()
- * */
+ */
void addDeoptBefore(FixedWithNextNode fixed, DeoptimizationReason deoptReason) {
add(new PostponedDeopt(true, fixed, deoptReason));
}
@@ -115,7 +115,7 @@
* argument, will be done once we're done traversing the graph.
*
* @see #finished()
- * */
+ */
void addDeoptAfter(FixedWithNextNode fixed, DeoptimizationReason deoptReason) {
add(new PostponedDeopt(false, fixed, deoptReason));
}
@@ -131,7 +131,7 @@
* Doing so, in turn, requires this subclass of
* {@link com.oracle.graal.graph.spi.CanonicalizerTool}.
*
- * */
+ */
public final class Tool implements CanonicalizerTool {
private final PhaseContext context;
@@ -159,7 +159,7 @@
* Postpone
* {@link com.oracle.graal.nodes.util.GraphUtil#tryKillUnused(com.oracle.graal.graph.Node)}
* until {@link FlowSensitiveReduction#finished()} for the reasons covered there.
- * */
+ */
@Override
public void removeIfUnused(Node node) {
// GraphUtil.tryKillUnused(node);
@@ -207,7 +207,7 @@
* reported as such.
*
*
- * */
+ */
protected static boolean precisionLoss(ValueNode input, ValueNode output) {
ObjectStamp inputStamp = (ObjectStamp) input.stamp();
ObjectStamp outputStamp = (ObjectStamp) output.stamp();
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CastCheckExtractor.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CastCheckExtractor.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CastCheckExtractor.java Mon Apr 28 16:35:06 2014 +0200
@@ -31,7 +31,7 @@
/**
* @see #extract(com.oracle.graal.nodes.LogicNode)
- * */
+ */
class CastCheckExtractor {
public final ResolvedJavaType type;
@@ -57,7 +57,7 @@
/**
* This method detects whether the argument realizes the CheckCast pattern. If so, distills and
* returns the essentials of such check, otherwise returns null.
- * */
+ */
static CastCheckExtractor extract(LogicNode cond) {
if (!(cond instanceof ShortCircuitOrNode)) {
return null;
@@ -76,7 +76,7 @@
/**
* Porcelain method.
- * */
+ */
public static boolean isInstanceOfCheckOn(LogicNode cond, ValueNode subject) {
if (!(cond instanceof InstanceOfNode)) {
return false;
diff -r 5dcf0ae606f3 -r 7a5c34543493 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 Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/CheckCastReduction.java Mon Apr 28 16:35:06 2014 +0200
@@ -42,7 +42,7 @@
*
*
* @see #visitCheckCastNode(com.oracle.graal.nodes.java.CheckCastNode)
- * */
+ */
public abstract class CheckCastReduction extends GuardingPiReduction {
public CheckCastReduction(FixedNode start, State initialState, PhaseContext context) {
@@ -67,7 +67,7 @@
*
* Precondition: the inputs (ie, object) hasn't been deverbosified yet.
*
- * */
+ */
protected final void visitCheckCastNode(CheckCastNode checkCast) {
/*
@@ -139,7 +139,7 @@
* @see #lowerCheckCastAnchorFriendlyWay(com.oracle.graal.nodes.java.CheckCastNode,
* com.oracle.graal.nodes.ValueNode)
*
- * */
+ */
private void visitCheckCastNodeLackingWitness(CheckCastNode checkCast) {
final ValueNode subject = checkCast.object();
final ResolvedJavaType toType = checkCast.type();
@@ -170,7 +170,7 @@
*
* @see #visitCheckCastNode(com.oracle.graal.nodes.java.CheckCastNode)
*
- * */
+ */
public void lowerCheckCastAnchorFriendlyWay(CheckCastNode checkCast, ValueNode subject) {
ValueNode originalCheckCastObject = checkCast.object();
@@ -268,7 +268,7 @@
/**
* Porcelain method.
- * */
+ */
public static boolean isTypeOfWitnessBetter(Witness w, ObjectStamp stamp) {
if (w == null) {
return false;
@@ -281,7 +281,7 @@
* Please note in this method "subject" refers to the downcasted input to the checkCast.
*
* @see #visitCheckCastNode(com.oracle.graal.nodes.java.CheckCastNode)
- * */
+ */
private void visitCheckCastNodeWithWitness(CheckCastNode checkCast) {
final ResolvedJavaType toType = checkCast.type();
diff -r 5dcf0ae606f3 -r 7a5c34543493 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 Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Mon Apr 28 16:35:06 2014 +0200
@@ -111,7 +111,7 @@
* {@link #added} grows during a run of
* {@link com.oracle.graal.phases.common.cfs.FlowSensitiveReductionPhase
* FlowSensitiveReductionPhase}, and doesn't survive across runs.
- * */
+ */
public void forceState(State s) {
state = s;
substs.clear();
@@ -285,7 +285,7 @@
* Usage: must be called only from {@link #deverbosify(com.oracle.graal.graph.Node)
* deverbosify(Node)}.
*
- * */
+ */
public Node deverbosifyFloatingNode(final FloatingNode n) {
assert n != null : "Should have been caught in deverbosify()";
@@ -360,7 +360,7 @@
* pre-image and image differ.
*
* @return the image of the substitution (ie, the second argument) unmodified.
- * */
+ */
private M rememberSubstitution(ValueNode from, M to) {
assert from != null && to != null;
if (from == to) {
@@ -597,7 +597,7 @@
* {@link com.oracle.graal.phases.common.cfs.FlowSensitiveReductionPhase} that assert no
* type-precision gets lost. Thus the need to fix-up on our own, as done here.
*
- * */
+ */
private static void fixupTypeProfileStamp(ValueNode object) {
if (!(object instanceof TypeProfileProxyNode)) {
return;
@@ -625,7 +625,7 @@
*
* The resulting node might not have been in the graph already.
*
- * */
+ */
private PiNode wrapInPiNode(ValueNode payload, GuardingNode anchor, ObjectStamp newStamp, boolean remember) {
try (Debug.Scope s = Debug.scope("Downcast", payload)) {
assert payload != anchor : payload.graph().toString();
@@ -782,7 +782,7 @@
*
*
* @see #downcastedValueProxy
- * */
+ */
public ValueNode downcastedGuardingPiNode(GuardingPiNode envelope, Witness w) {
assert envelope != w.guard().asNode() : "The stamp of " + envelope + " would lead to downcasting with that very same GuardingPiNode as guard.";
return downcastedUtil(envelope, w);
@@ -814,7 +814,7 @@
*
*
* @see #downcastedValueProxy
- * */
+ */
private ValueNode downcastedPiNodeOrPiArrayNode(PiNode envelope, Witness w) {
return downcastedUtil(envelope, w);
}
@@ -830,7 +830,7 @@
*
*
* @see #downcastedValueProxy
- * */
+ */
private ValueNode downcastedTypeProfileProxyNode(TypeProfileProxyNode envelope) {
ValueNode payload = envelope.getOriginalNode();
ValueNode d = downcasted(payload);
@@ -859,7 +859,7 @@
* Re-wrap the checkCast in a type-refining {@link com.oracle.graal.nodes.PiNode PiNode} only if
* the downcasted scrutinee does not conform to the checkCast's target-type.
*
- * */
+ */
private ValueNode downcastedCheckCastNode(CheckCastNode checkCast, Witness w) {
final ResolvedJavaType toType = checkCast.type();
@@ -899,7 +899,7 @@
* to hold an updated stamp) provided the argument's stamp can be strictly refined, and returns
* it.
*
- * */
+ */
private ValueNode downcastedUtil(ValueNode subject, Witness w) {
ObjectStamp originalStamp = (ObjectStamp) subject.stamp();
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FixedGuardReduction.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FixedGuardReduction.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FixedGuardReduction.java Mon Apr 28 16:35:06 2014 +0200
@@ -35,7 +35,7 @@
*
*
* @see #visitFixedGuardNode(com.oracle.graal.nodes.FixedGuardNode)
- * */
+ */
public abstract class FixedGuardReduction extends CheckCastReduction {
public FixedGuardReduction(FixedNode start, State initialState, PhaseContext context) {
@@ -190,7 +190,7 @@
/**
* Porcelain method.
- * */
+ */
private void markFixedGuardNodeAlwaysFails(FixedGuardNode f) {
metricFixedGuardNodeRemoved.increment();
state.impossiblePath();
@@ -204,7 +204,7 @@
*
* The `replacement` guard must be such that it implies the `old` guard.
*
- * */
+ */
private void removeFixedGuardNode(FixedGuardNode old, GuardingNode replacement) {
if (replacement == null) {
return;
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowSensitiveReduction.java Mon Apr 28 16:35:06 2014 +0200
@@ -61,7 +61,7 @@
* @see com.oracle.graal.phases.common.cfs.GuardingPiReduction
* @see com.oracle.graal.phases.common.cfs.FixedGuardReduction
*
- * */
+ */
public class FlowSensitiveReduction extends FixedGuardReduction {
public FlowSensitiveReduction(FixedNode start, State initialState, PhaseContext context) {
@@ -111,7 +111,7 @@
* Checking if they aren't in use, proceeding to remove them in that case.
*
*
- * */
+ */
@Override
public void finished() {
if (!postponedDeopts.isEmpty()) {
@@ -177,7 +177,7 @@
* TODO When tracking integer-stamps, the state at each successor of a TypeSwitchNode should
* track an integer-stamp for the LoadHubNode (meet over the constants leading to that
* successor). However, are LoadHubNode-s shared frequently enough?
- * */
+ */
private void registerTypeSwitchNode(TypeSwitchNode typeSwitch, BeginNode begin) {
if (typeSwitch.value() instanceof LoadHubNode) {
LoadHubNode loadHub = (LoadHubNode) typeSwitch.value();
@@ -252,7 +252,7 @@
*
*
* @return whether any reduction was performed on the inputs of the arguments.
- * */
+ */
public boolean deverbosifyInputsInPlace(ValueNode parent) {
boolean changed = false;
for (ValueNode i : FlowUtil.distinctValueAndConditionInputs(parent)) {
@@ -276,7 +276,7 @@
* @return the original parent if no updated took place, a copy-on-write version of it
* otherwise.
*
- * */
+ */
private MethodCallTargetNode deverbosifyInputsCopyOnWrite(MethodCallTargetNode parent) {
MethodCallTargetNode changed = null;
for (ValueNode i : FlowUtil.distinctValueAndConditionInputs(parent)) {
@@ -442,7 +442,7 @@
*
* Precondition: the input (ie, object) hasn't been deverbosified yet.
*
* Precondition: inputs haven't been deverbosified yet.
*
- * */
+ */
private void visitInvoke(Invoke invoke) {
if (invoke.asNode().stamp() instanceof IllegalStamp) {
return; // just to be safe
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowUtil.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowUtil.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/FlowUtil.java Mon Apr 28 16:35:06 2014 +0200
@@ -61,7 +61,7 @@
/**
* @return whether the first argument is strictly more precise than the second.
- * */
+ */
public static boolean isMorePrecise(ResolvedJavaType a, ResolvedJavaType b) {
if (a == null) {
return false;
@@ -132,7 +132,7 @@
* An IllegalStamp should never happen. In contrast, !isLegal() values could happen due to dead
* code not yet removed, or upon some non-sideeffecting instructions floating out of a dead
* branch.
- * */
+ */
public static boolean isLegalObjectStamp(Stamp s) {
return isObjectStamp(s) && s.isLegal();
}
@@ -162,7 +162,7 @@
* a score of 1. In all other cases (non-comparable, or supertype) the score is -1.
*
* @return whether the first argument is strictly more precise than the second.
- * */
+ */
public static boolean isMorePrecise(ObjectStamp a, ObjectStamp b) {
int d0 = MINUS(a.alwaysNull(), b.alwaysNull());
if (d0 == -1) {
@@ -234,7 +234,7 @@
/**
* Returns (preserving order) the ValueNodes without duplicates found among the argument's
* direct inputs.
- * */
+ */
@SuppressWarnings("unchecked")
public static List distinctValueAndConditionInputs(Node n) {
ArrayList result = null;
@@ -275,7 +275,7 @@
* Start situation: the parent node has oldInput among its (direct) inputs. After
* this method has run, all such occurrences have been replaced with newInput. In
* case that makes oldInput disconnected, it is removed from the graph.
- * */
+ */
public static void replaceInPlace(Node parent, Node oldInput, Node newInput) {
assert parent != null;
assert parent.inputs().contains(oldInput);
diff -r 5dcf0ae606f3 -r 7a5c34543493 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 Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/GuardingPiReduction.java Mon Apr 28 16:35:06 2014 +0200
@@ -39,7 +39,7 @@
*
*
* @see #visitGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
- * */
+ */
public abstract class GuardingPiReduction extends BaseReduction {
public GuardingPiReduction(FixedNode start, State initialState, PhaseContext context) {
@@ -75,7 +75,7 @@
* Precondition: the condition hasn't been deverbosified yet.
*
*
- * */
+ */
protected final void visitGuardingPiNode(GuardingPiNode envelope) {
if (!FlowUtil.hasLegalObjectStamp(envelope)) {
@@ -181,7 +181,7 @@
*
* @see #visitGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
*
- * */
+ */
private boolean tryRemoveGuardingPiNode(GuardingPiNode envelope) {
LogicNode cond = envelope.condition();
@@ -251,7 +251,7 @@
* non-null.
*
* @see #tryRemoveGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
- * */
+ */
private boolean tryRemoveGuardingPiNodeNonNullCond(GuardingPiNode envelope) {
ValueNode payload = envelope.object();
@@ -306,7 +306,7 @@
*
* @see #tryRemoveGuardingPiNode(com.oracle.graal.nodes.GuardingPiNode)
*
- * */
+ */
private boolean tryRemoveGuardingPiNodeCheckCastCond(GuardingPiNode envelope, ResolvedJavaType toType) {
assert toType != null;
ValueNode payload = envelope.object();
@@ -353,7 +353,7 @@
/**
* Porcelain method.
- * */
+ */
private void removeGuardingPiNode(GuardingPiNode envelope, ValueNode replacement) {
assert !precisionLoss(envelope, replacement);
metricGuardingPiNodeRemoved.increment();
diff -r 5dcf0ae606f3 -r 7a5c34543493 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 Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Mon Apr 28 16:35:06 2014 +0200
@@ -80,7 +80,7 @@
*
*
*
- * */
+ */
int versionNr = 0;
boolean isUnreachable = false;
@@ -91,7 +91,7 @@
* detect an "impossible path" could be shaved off.
*
* @see com.oracle.graal.phases.common.cfs.BaseReduction.PostponedDeopt
- * */
+ */
void impossiblePath() {
isUnreachable = true;
metricImpossiblePathDetected.increment();
@@ -115,7 +115,7 @@
* {@link EquationalReasoner#downcasted(com.oracle.graal.nodes.ValueNode) downcasted()}
*
*
- * */
+ */
private IdentityHashMap typeRefinements;
IdentityHashMap knownNull;
@@ -143,7 +143,7 @@
/**
* @return A new list containing only those states that are reachable.
- * */
+ */
private static ArrayList reachableStates(List states) {
ArrayList result = new ArrayList<>(states);
Iterator iter = result.iterator();
@@ -346,7 +346,7 @@
}
/**
- * @retun null if no type-witness available for the argument, the witness otherwise.
+ * @return null if no type-witness available for the argument, the witness otherwise.
*/
public Witness typeInfo(ValueNode object) {
assert FlowUtil.hasLegalObjectStamp(object);
@@ -354,7 +354,7 @@
}
/**
- * @retun true iff the argument is known to stand for null.
+ * @return true iff the argument is known to stand for null.
*/
public boolean isNull(ValueNode object) {
assert FlowUtil.hasLegalObjectStamp(object);
@@ -377,7 +377,7 @@
* is-non-null set.
*
*
- * @retun true iff the argument is known to stand for non-null.
+ * @return true iff the argument is known to stand for non-null.
*/
public boolean isNonNull(ValueNode object) {
assert FlowUtil.hasLegalObjectStamp(object);
@@ -389,7 +389,7 @@
}
/**
- * @retun true iff the argument is known to stand for an object conforming to the given type.
+ * @return true iff the argument is known to stand for an object conforming to the given type.
*/
public boolean knownToConform(ValueNode object, ResolvedJavaType to) {
assert FlowUtil.hasLegalObjectStamp(object);
@@ -411,8 +411,8 @@
}
/**
- * @retun true iff the argument is known to stand for an object that definitely does not conform
- * to the given type.
+ * @return true iff the argument is known to stand for an object that definitely does not
+ * conform to the given type.
*/
public boolean knownNotToConform(ValueNode object, ResolvedJavaType to) {
assert FlowUtil.hasLegalObjectStamp(object);
@@ -454,7 +454,7 @@
* final: exact non-interface reference-type
* non-f: non-exact non-interface reference-type
*
- * @retun true iff the first argument is known not to conform to the second argument.
+ * @return true iff the first argument is known not to conform to the second argument.
*/
// @formatter:on
public static boolean knownNotToConform(ResolvedJavaType a, ResolvedJavaType b) {
@@ -592,7 +592,7 @@
* case the state should be marked unreachable), the caller must take care of that.
*
*
- * */
+ */
private void addFactPrimordial(LogicNode condition, IdentityHashMap to, GuardingNode anchor) {
assert condition != null;
if (!to.containsKey(condition)) {
@@ -608,7 +608,7 @@
*
track set-representative for equality classes determined by (chained) IntegerTestNode
*
*
- * */
+ */
public void addFact(boolean isTrue, LogicNode condition, GuardingNode anchor) {
assert anchor != null;
assert !isUnreachable;
@@ -781,7 +781,7 @@
/**
*
* @return true iff `value` may lose dependency not covered by `anchor`.
- * */
+ */
public static boolean isDependencyTainted(ValueNode value, GuardingNode anchor) {
if (value instanceof ValueProxy) {
if (value instanceof GuardedNode) {
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/Witness.java
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/Witness.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/Witness.java Mon Apr 28 16:35:06 2014 +0200
@@ -118,7 +118,7 @@
/**
* Counterpart to {@link #asStamp()}
- * */
+ */
public Witness(ObjectStamp stamp, GuardingNode anchor) {
assert stamp.isLegal();
assert anchor != null;
@@ -381,7 +381,7 @@
/**
* Shallow cloning is enough because what's reachable from {@link Witness} is primitive or used
* read-only when merging states.
- * */
+ */
@Override
public Witness clone() {
return new Witness(this);
@@ -389,14 +389,14 @@
/**
* @return null for a clueless method, non-null otherwise.
- * */
+ */
GuardingNode guard() {
return gn;
}
/**
* Merges another state into this one, by mutating this object, the other is left as is.
- * */
+ */
public void merge(Witness that, MergeNode merge) {
assert this.repOK();
assert that.repOK();
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java Mon Apr 28 16:35:06 2014 +0200
@@ -72,7 +72,7 @@
try (TimerCloseable a = phaseTimer.start(); Scope s = Debug.scope(getClass(), this)) {
BasePhase.this.run(graph, context);
phaseMetric.increment();
- if (dumpGraph) {
+ if (dumpGraph && Debug.isDumpEnabled()) {
Debug.dump(graph, "After phase %s", getName());
}
assert graph.verify();
@@ -81,13 +81,17 @@
}
}
+ protected CharSequence createName() {
+ String s = BasePhase.this.getClass().getSimpleName();
+ if (s.endsWith("Phase")) {
+ s = s.substring(0, s.length() - "Phase".length());
+ }
+ return s;
+ }
+
public final CharSequence getName() {
if (name == null) {
- String s = BasePhase.this.getClass().getSimpleName();
- if (s.endsWith("Phase")) {
- s = s.substring(0, s.length() - "Phase".length());
- }
- name = s;
+ name = createName();
}
return name;
}
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotFrameInstance.java
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotFrameInstance.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotFrameInstance.java Mon Apr 28 16:35:06 2014 +0200
@@ -145,10 +145,9 @@
}
/**
- * This class represents a frame that is taken from the
- * {@link RootCallTarget#callProxy(VirtualFrame)} method.
+ * This class represents a frame that is taken from the {@link OptimizedCallTarget#callProxy}
+ * method.
*/
- @SuppressWarnings("javadoc")
public static final class CallTargetFrame extends HotSpotFrameInstance {
public static final Method METHOD;
static {
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLAbstractDispatchNode.java
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLAbstractDispatchNode.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLAbstractDispatchNode.java Mon Apr 28 16:35:06 2014 +0200
@@ -44,7 +44,7 @@
*
After execution of function {@code f2}: {@code I->D(f1)->D(f2)->U}
*
After execution of function {@code f3}: {@code I->G}
*
- * */
+ */
public abstract class SLAbstractDispatchNode extends Node {
protected static final int INLINE_CACHE_SIZE = 2;
diff -r 5dcf0ae606f3 -r 7a5c34543493 graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLNull.java
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLNull.java Mon Apr 28 12:07:49 2014 +0200
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLNull.java Mon Apr 28 16:35:06 2014 +0200
@@ -29,7 +29,7 @@
* there is always the danger of a spurious {@link NullPointerException}. Representing the guest
* language {@code null} as a singleton, as in {@link #SINGLETON this class}, is the recommended
* practice.
- * */
+ */
public final class SLNull {
/**
diff -r 5dcf0ae606f3 -r 7a5c34543493 mxtool/mx.py
--- a/mxtool/mx.py Mon Apr 28 12:07:49 2014 +0200
+++ b/mxtool/mx.py Mon Apr 28 16:35:06 2014 +0200
@@ -3996,7 +3996,7 @@
try:
log('Generating {2} for {0} in {1}'.format(p.name, out, docDir))
projectJava = java(p.javaCompliance)
- run([java().javadoc, memory,
+ run([projectJava.javadoc, memory,
'-XDignore.symbol.file',
'-classpath', cp,
'-quiet',
@@ -4006,6 +4006,7 @@
'-source', str(projectJava.javaCompliance),
'-bootclasspath', projectJava.bootclasspath(),
'-extdirs', projectJava.extdirs()] +
+ ([] if projectJava.javaCompliance < JavaCompliance('1.8') else ['-Xdoclint:none']) +
links +
extraArgs +
nowarnAPI +
@@ -4043,115 +4044,19 @@
'-quiet',
'-d', out,
'-sourcepath', sp] +
+ ([] if java().javaCompliance < JavaCompliance('1.8') else ['-Xdoclint:none']) +
links +
extraArgs +
nowarnAPI +
list(pkgs))
log('Generated {2} for {0} in {1}'.format(', '.join(names), out, docDir))
-class Chunk:
- def __init__(self, content, ldelim, rdelim=None):
- lindex = content.find(ldelim)
- if rdelim is not None:
- rindex = content.find(rdelim)
- else:
- rindex = lindex + len(ldelim)
- self.ldelim = ldelim
- self.rdelim = rdelim
- if lindex != -1 and rindex != -1 and rindex > lindex:
- self.text = content[lindex + len(ldelim):rindex]
- else:
- self.text = None
-
- def replace(self, content, repl):
- lindex = content.find(self.ldelim)
- if self.rdelim is not None:
- rindex = content.find(self.rdelim)
- rdelimLen = len(self.rdelim)
- else:
- rindex = lindex + len(self.ldelim)
- rdelimLen = 0
- old = content[lindex:rindex + rdelimLen]
- return content.replace(old, repl)
-
-# Post-process an overview-summary.html file to move the
-# complete overview to the top of the page
-def _fix_overview_summary(path, topLink):
- """
- Processes an "overview-summary.html" generated by javadoc to put the complete
- summary text above the Packages table.
- """
-
- # This uses scraping and so will break if the relevant content produced by javadoc changes in any way!
- with open(path) as fp:
- content = fp.read()
-
- chunk1 = Chunk(content, """
-""")
-
- assert chunk1.text, 'Could not find header section in ' + path
- assert chunk2.text, 'Could not find footer section in ' + path
-
- content = chunk1.replace(content, '
' + topLink + chunk2.text + '
')
- content = chunk2.replace(content, '')
-
- with open(path, 'w') as fp:
- fp.write(content)
-
-
-# Post-process a package-summary.html file to move the
-# complete package description to the top of the page
-def _fix_package_summary(path):
- """
- Processes an "overview-summary.html" generated by javadoc to put the complete
- summary text above the Packages table.
- """
-
- # This uses scraping and so will break if the relevant content produced by javadoc changes in any way!
- with open(path) as fp:
- content = fp.read()
-
- chunk1 = Chunk(content, """