# HG changeset patch # User Tom Rodriguez # Date 1433385319 25200 # Node ID 99fe8116f3e812a128b1982a0f95f93d27448dc0 # Parent 645f170013a451083414ff695412c465e9d2ebf0 Make shared NO_VALUES array diff -r 645f170013a4 -r 99fe8116f3e8 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Mon Jun 01 22:14:34 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Wed Jun 03 19:35:19 2015 -0700 @@ -64,8 +64,6 @@ public static final class LabelOp extends LIRInstruction { public static final LIRInstructionClass TYPE = LIRInstructionClass.create(LabelOp.class); - private static final Value[] NO_VALUES = new Value[0]; - /** * In the LIR, every register and variable must be defined before it is used. For method * parameters that are passed in fixed registers, exception objects passed to the exception @@ -83,7 +81,7 @@ super(TYPE); this.label = label; this.align = align; - this.incomingValues = NO_VALUES; + this.incomingValues = Value.NO_VALUES; } public void setIncomingValues(Value[] values) { @@ -101,7 +99,7 @@ } public void clearIncomingValues() { - incomingValues = NO_VALUES; + incomingValues = Value.NO_VALUES; } @Override @@ -130,8 +128,6 @@ public static class JumpOp extends LIRInstruction implements BlockEndOp { public static final LIRInstructionClass TYPE = LIRInstructionClass.create(JumpOp.class); - private static final Value[] NO_VALUES = new Value[0]; - @Alive({REG, STACK, CONST}) private Value[] outgoingValues; private final LabelRef destination; @@ -143,7 +139,7 @@ protected JumpOp(LIRInstructionClass c, LabelRef destination) { super(c); this.destination = destination; - this.outgoingValues = NO_VALUES; + this.outgoingValues = Value.NO_VALUES; } public void setOutgoingValues(Value[] values) { @@ -161,7 +157,7 @@ } public void clearOutgoingValues() { - outgoingValues = NO_VALUES; + outgoingValues = Value.NO_VALUES; } @Override diff -r 645f170013a4 -r 99fe8116f3e8 graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/Value.java --- a/graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/Value.java Mon Jun 01 22:14:34 2015 +0200 +++ b/graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/Value.java Wed Jun 03 19:35:19 2015 -0700 @@ -28,6 +28,8 @@ */ public interface Value extends KindProvider, TrustedInterface { + Value[] NO_VALUES = new Value[0]; + AllocatableValue ILLEGAL = new AllocatableValue(LIRKind.Illegal) { @Override