# HG changeset patch # User Thomas Wuerthinger # Date 1424386438 -3600 # Node ID 55d0b9ec75873e62047c1313766f596212b59c81 # Parent cb59c8b7da465edbc352e39ea323d3b74487c4ed Replace Array.copyOf usages with System.arraycopy usages. diff -r cb59c8b7da46 -r 55d0b9ec7587 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Thu Feb 19 23:40:21 2015 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Thu Feb 19 23:53:58 2015 +0100 @@ -98,7 +98,9 @@ } } if (pos != vobj.entryCount()) { - values = Arrays.copyOf(values, pos); + JavaValue[] newValues = new JavaValue[pos]; + System.arraycopy(values, 0, newValues, 0, pos); + values = newValues; } } entry.getValue().setValues(values); diff -r cb59c8b7da46 -r 55d0b9ec7587 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Thu Feb 19 23:40:21 2015 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Thu Feb 19 23:53:58 2015 +0100 @@ -741,7 +741,9 @@ assert !isFrozen(); assert node.id() == Node.INITIAL_ID; if (nodes.length == nodesSize) { - nodes = Arrays.copyOf(nodes, (nodesSize * 2) + 1); + Node[] newNodes = new Node[(nodesSize * 2) + 1]; + System.arraycopy(nodes, 0, newNodes, 0, nodesSize); + nodes = newNodes; } int id = nodesSize; nodes[id] = node; diff -r cb59c8b7da46 -r 55d0b9ec7587 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Thu Feb 19 23:40:21 2015 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Thu Feb 19 23:53:58 2015 +0100 @@ -342,7 +342,9 @@ if (length == 0) { extraUsages = new Node[4]; } else if (extraUsagesCount == length) { - extraUsages = Arrays.copyOf(extraUsages, length * 2 + 1); + Node[] newExtraUsages = new Node[length * 2 + 1]; + System.arraycopy(extraUsages, 0, newExtraUsages, 0, length); + extraUsages = newExtraUsages; } extraUsages[extraUsagesCount++] = node; } diff -r cb59c8b7da46 -r 55d0b9ec7587 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeList.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeList.java Thu Feb 19 23:40:21 2015 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeList.java Thu Feb 19 23:53:58 2015 +0100 @@ -143,7 +143,9 @@ if (length == 0) { nodes = new Node[2]; } else if (size == length) { - nodes = Arrays.copyOf(nodes, nodes.length * 2 + 1); + Node[] newNodes = new Node[nodes.length * 2 + 1]; + System.arraycopy(nodes, 0, newNodes, 0, length); + nodes = newNodes; } nodes[size++] = node; update(null, (T) node); @@ -186,7 +188,9 @@ void copy(NodeList other) { self.incModCount(); incModCount(); - nodes = Arrays.copyOf(other.nodes, other.size); + Node[] newNodes = new Node[other.size]; + System.arraycopy(other.nodes, 0, newNodes, 0, newNodes.length); + nodes = newNodes; size = other.size; }