# HG changeset patch # User Doug Simon # Date 1346444413 -7200 # Node ID 7acbc95b4b2b75d811db77cae7801be8d197bf97 # Parent 5d7d9a6953bdff6ee915bac7611cf878e3d846f8 enabled InstanceOfSnippets for general lowering of InstanceOfNodes diff -r 5d7d9a6953bd -r 7acbc95b4b2b graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java Fri Aug 31 17:57:30 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java Fri Aug 31 22:20:13 2012 +0200 @@ -271,7 +271,7 @@ * Only instructions in methods whose fully qualified name contains this option will be HIR lowered. */ public static String HIRLowerCheckcast = ""; - public static String HIRLowerInstanceOf = "InstanceOfTest"; + public static String HIRLowerInstanceOf = ""; public static String HIRLowerNewInstance = ""; public static String HIRLowerNewArray = ""; diff -r 5d7d9a6953bd -r 7acbc95b4b2b graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/InstanceOfSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/InstanceOfSnippets.java Fri Aug 31 17:57:30 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/InstanceOfSnippets.java Fri Aug 31 22:20:13 2012 +0200 @@ -34,6 +34,7 @@ import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.nodes.*; +import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; @@ -59,7 +60,7 @@ public class InstanceOfSnippets implements SnippetsInterface { /** - * A test against a final type with the result being {@linkplain MaterializeNode materialized}. + * A test against a final type with the result being {@linkplain ConditionalNode materialized}. */ @Snippet public static Object materializeExact( @@ -105,7 +106,7 @@ } /** - * A test against a primary type with the result being {@linkplain MaterializeNode materialized}. + * A test against a primary type with the result being {@linkplain ConditionalNode materialized}. */ @Snippet public static Object materializePrimary( @@ -154,7 +155,7 @@ } /** - * A test against a restricted secondary type type with the result being {@linkplain MaterializeNode materialized}. + * A test against a restricted secondary type type with the result being {@linkplain ConditionalNode materialized}. */ @Snippet public static Object materializeSecondary( @@ -218,7 +219,7 @@ } /** - * A test against an unknown (at compile time) type with the result being {@linkplain MaterializeNode materialized}. + * A test against an unknown (at compile time) type with the result being {@linkplain ConditionalNode materialized}. */ @Snippet public static Object materializeUnknown( @@ -435,9 +436,9 @@ template.instantiate(runtime, duplicate, ifNode, arguments); assert ifNode.isDeleted(); - } else if (usage instanceof MaterializeNode) { + } else if (usage instanceof ConditionalNode) { - MaterializeNode materialize = (MaterializeNode) usage; + ConditionalNode materialize = (ConditionalNode) usage; materialize.replaceAtUsages(duplicate); ValueNode falseValue = materialize.falseValue(); ValueNode trueValue = materialize.trueValue();