Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.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 | cbd42807a31f |
children | 37d6d174bc40 |
comparison
equal
deleted
inserted
replaced
16894:cc7aaa92c27d | 16895:06c15e88d383 |
---|---|
82 Debug.dump(graph, "OnStackReplacement loop peeling result"); | 82 Debug.dump(graph, "OnStackReplacement loop peeling result"); |
83 } while (true); | 83 } while (true); |
84 | 84 |
85 FrameState osrState = osr.stateAfter(); | 85 FrameState osrState = osr.stateAfter(); |
86 osr.setStateAfter(null); | 86 osr.setStateAfter(null); |
87 OSRStartNode osrStart = graph.add(new OSRStartNode()); | 87 OSRStartNode osrStart = graph.add(OSRStartNode.create()); |
88 StartNode start = graph.start(); | 88 StartNode start = graph.start(); |
89 FixedNode next = osr.next(); | 89 FixedNode next = osr.next(); |
90 osr.setNext(null); | 90 osr.setNext(null); |
91 osrStart.setNext(next); | 91 osrStart.setNext(next); |
92 graph.setStart(osrStart); | 92 graph.setStart(osrStart); |
98 ProxyNode proxy = (ProxyNode) value; | 98 ProxyNode proxy = (ProxyNode) value; |
99 /* | 99 /* |
100 * we need to drop the stamp since the types we see during OSR may be too precise | 100 * we need to drop the stamp since the types we see during OSR may be too precise |
101 * (if a branch was not parsed for example). | 101 * (if a branch was not parsed for example). |
102 */ | 102 */ |
103 proxy.replaceAndDelete(graph.unique(new OSRLocalNode(i, proxy.stamp().unrestricted()))); | 103 proxy.replaceAndDelete(graph.unique(OSRLocalNode.create(i, proxy.stamp().unrestricted()))); |
104 } else { | 104 } else { |
105 assert value == null || value instanceof OSRLocalNode; | 105 assert value == null || value instanceof OSRLocalNode; |
106 } | 106 } |
107 } | 107 } |
108 | 108 |