comparison graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/CheckCastTest.java @ 16895:06c15e88d383

added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
author Doug Simon <doug.simon@oracle.com>
date Mon, 18 Aug 2014 14:04:21 +0200
parents c6fcb4a36c6a
children f57d86eb036f
comparison
equal deleted inserted replaced
16894:cc7aaa92c27d 16895:06c15e88d383
35 35
36 @Override 36 @Override
37 protected void replaceProfile(StructuredGraph graph, JavaTypeProfile profile) { 37 protected void replaceProfile(StructuredGraph graph, JavaTypeProfile profile) {
38 CheckCastNode ccn = graph.getNodes().filter(CheckCastNode.class).first(); 38 CheckCastNode ccn = graph.getNodes().filter(CheckCastNode.class).first();
39 if (ccn != null) { 39 if (ccn != null) {
40 CheckCastNode ccnNew = graph.add(new CheckCastNode(ccn.type(), ccn.object(), profile, false)); 40 CheckCastNode ccnNew = graph.add(CheckCastNode.create(ccn.type(), ccn.object(), profile, false));
41 graph.replaceFixedWithFixed(ccn, ccnNew); 41 graph.replaceFixedWithFixed(ccn, ccnNew);
42 } 42 }
43 } 43 }
44 44
45 @Test 45 @Test