changeset 5744:51cee50d1d11

ensure System.arrycopy is resolved in JTT tests that use it
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Jul 2012 13:02:24 +0200
parents e17ab95e06aa
children 11ef22975bba
files graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy02.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy03.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy04.java
diffstat 4 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy01.java	Tue Jul 03 10:31:58 2012 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy01.java	Tue Jul 03 13:02:24 2012 +0200
@@ -31,6 +31,10 @@
 
     public static Object[] src = new Object[]{null, null};
     public static Object[] dest = new Object[]{null, null};
+    static {
+        // Ensure arraycopy is resolved
+        System.arraycopy(src, 0, src, 0, src.length);
+    }
 
     public static int test(int srcPos, int destPos, int length) {
         System.arraycopy(src, srcPos, dest, destPos, length);
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy02.java	Tue Jul 03 10:31:58 2012 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy02.java	Tue Jul 03 13:02:24 2012 +0200
@@ -32,6 +32,10 @@
     public static int[] src = new int[]{0, 1, 2, 3, 4, 5};
     public static int[] dest0 = new int[]{5, 4, 3, 2, 1, 0};
     public static int[] dest = new int[]{5, 4, 3, 2, 1, 0};
+    static {
+        // Ensure arraycopy is resolved
+        System.arraycopy(src, 0, src, 0, src.length);
+    }
 
     @Before
     public void setUp() {
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy03.java	Tue Jul 03 10:31:58 2012 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy03.java	Tue Jul 03 13:02:24 2012 +0200
@@ -32,6 +32,10 @@
     public static byte[] src = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
     public static byte[] dest0 = new byte[]{10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
     public static byte[] dest = new byte[]{10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+    static {
+        // Ensure arraycopy is resolved
+        System.arraycopy(src, 0, src, 0, src.length);
+    }
 
     @Before
     public void setUp() {
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy04.java	Tue Jul 03 10:31:58 2012 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/ArrayCopy04.java	Tue Jul 03 13:02:24 2012 +0200
@@ -31,6 +31,10 @@
 
     public static byte[] array = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
     public static byte[] array0 = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+    static {
+        // Ensure arraycopy is resolved
+        System.arraycopy(array, 0, array, 0, array.length);
+    }
 
     @Before
     public void setUp() {