Mercurial > hg > graal-compiler
changeset 11796:9c4c197aa6e8
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 25 Sep 2013 21:25:06 +0200 |
parents | 56c3ec12a79c (diff) 45e8bf81205d (current diff) |
children | 65dbed1fdf46 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/AbstractCallNode.java |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Wed Sep 25 13:11:10 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Wed Sep 25 21:25:06 2013 +0200 @@ -618,7 +618,7 @@ value = checkcastNode; } } else { - LoadHubNode arrayClass = graph.unique(new LoadHubNode(array, wordKind, boundsCheck.asNode())); + FloatingReadNode arrayClass = createReadHub(graph, wordKind, array, boundsCheck); LocationNode location = ConstantLocationNode.create(FINAL_LOCATION, wordKind, config.arrayClassElementOffset, graph); /* * Anchor the read of the element klass to the cfg, because it is only valid @@ -990,13 +990,14 @@ } } - private static GuardingNode createBoundsCheck(AccessIndexedNode n, LoweringTool tool) { - StructuredGraph graph = n.graph(); - ArrayLengthNode arrayLength = graph.add(new ArrayLengthNode(n.array())); - GuardingNode guard = tool.createGuard(graph.unique(new IntegerBelowThanNode(n.index(), arrayLength)), BoundsCheckException, InvalidateReprofile); - - graph.addBeforeFixed(n, arrayLength); - return guard; + private GuardingNode createBoundsCheck(AccessIndexedNode n, LoweringTool tool) { + StructuredGraph g = n.graph(); + ValueNode array = n.array(); + Stamp stamp = StampFactory.positiveInt(); + ReadNode arrayLength = g.add(new ReadNode(array, ConstantLocationNode.create(FINAL_LOCATION, Kind.Int, config.arrayLengthOffset, g), stamp, BarrierType.NONE, false)); + g.addBeforeFixed(n, arrayLength); + tool.createNullCheckGuard(arrayLength, array); + return tool.createGuard(g.unique(new IntegerBelowThanNode(n.index(), arrayLength)), BoundsCheckException, InvalidateReprofile); } public ResolvedJavaType lookupJavaType(Class<?> clazz) {