# HG changeset patch # User Doug Simon # Date 1363627613 -3600 # Node ID d2fef63dfec84b7398c8070ba25877dd2f4673f8 # Parent 8d6ea1915d420a2ce0fa6313246b8e3e80b8c386# Parent 4e7a668054ea01e1a71a3a30111e9a337366570b Merge. diff -r 8d6ea1915d42 -r d2fef63dfec8 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/MonitorGraphTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/MonitorGraphTest.java Mon Mar 18 18:26:12 2013 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/MonitorGraphTest.java Mon Mar 18 18:26:53 2013 +0100 @@ -54,7 +54,7 @@ return 1; } - @Test(expected = AssertionError.class) + @Test public void test1() { test("test1Snippet"); } diff -r 8d6ea1915d42 -r d2fef63dfec8 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Mon Mar 18 18:26:12 2013 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Mon Mar 18 18:26:53 2013 +0100 @@ -1568,9 +1568,8 @@ ValueNode x = returnKind == Kind.Void ? null : frameState.pop(returnKind); assert frameState.stackSize() == 0; - // TODO (gdub) remove this when FloatingRead can handle this case if (Modifier.isSynchronized(method.getModifiers())) { - append(currentGraph.add(new ValueAnchorNode(x))); + append(currentGraph.add(new ValueAnchorNode(true, x))); assert !frameState.rethrowException(); } diff -r 8d6ea1915d42 -r d2fef63dfec8 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java Mon Mar 18 18:26:12 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java Mon Mar 18 18:26:53 2013 +0100 @@ -28,7 +28,6 @@ import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -38,9 +37,16 @@ public final class ValueAnchorNode extends FixedWithNextNode implements Canonicalizable, LIRLowerable, Node.IterableNodeType, Virtualizable { public ValueAnchorNode(ValueNode... values) { + this(false, values); + } + + public ValueAnchorNode(boolean permanent, ValueNode... values) { super(StampFactory.dependency(), values); + this.permanent = permanent; } + private final boolean permanent; + @Override public void generate(LIRGeneratorTool gen) { // Nothing to emit, since this node is used for structural purposes only. @@ -54,6 +60,9 @@ @Override public ValueNode canonical(CanonicalizerTool tool) { + if (permanent) { + return this; + } if (this.predecessor() instanceof ValueAnchorNode) { ValueAnchorNode previousAnchor = (ValueAnchorNode) this.predecessor(); if (previousAnchor.usages().isEmpty()) { // avoid creating cycles @@ -88,12 +97,8 @@ @Override public void virtualize(VirtualizerTool tool) { - // don't process this node if it is anchoring the return value - if (next() instanceof MonitorExitNode) { - MonitorExitNode monitorExit = (MonitorExitNode) next(); - if (monitorExit.stateAfter() != null && monitorExit.stateAfter().bci == FrameState.AFTER_BCI && monitorExit.next() instanceof ReturnNode) { - return; - } + if (permanent) { + return; } for (ValueNode node : dependencies().nonNull().and(isNotA(BeginNode.class))) { State state = tool.getObjectState(node); diff -r 8d6ea1915d42 -r d2fef63dfec8 src/cpu/x86/vm/templateInterpreter_x86.hpp --- a/src/cpu/x86/vm/templateInterpreter_x86.hpp Mon Mar 18 18:26:12 2013 +0100 +++ b/src/cpu/x86/vm/templateInterpreter_x86.hpp Mon Mar 18 18:26:53 2013 +0100 @@ -34,7 +34,7 @@ // Run with +PrintInterpreter to get the VM to print out the size. // Max size with JVMTI #ifdef AMD64 - const static int InterpreterCodeSize = 200 * 1024; + const static int InterpreterCodeSize = 220 * 1024; #else const static int InterpreterCodeSize = 168 * 1024; #endif // AMD64