< prev index next >

test/compiler/arraycopy/TestMissingControl.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8055153
  27  * @summary missing control on LoadRange and LoadKlass when array copy macro node is expanded
  28  * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:-TieredCompilation TestMissingControl
  29  *



  30  */



  31 public class TestMissingControl {
  32 
  33     static int[] m1(int[] a2) {
  34         int[] a1 = new int[10];
  35         System.arraycopy(a1, 0, a2, 0, 10);
  36         return a1;
  37     }
  38 
  39     static class A {
  40     }
  41 
  42     static Object m2(Object[] a2) {
  43         A[] a1 = new A[10];
  44         System.arraycopy(a1, 0, a2, 0, 10);
  45         return a1;
  46     }
  47 
  48     static void test1() {
  49         int[] a2 = new int[10];
  50         int[] a3 = new int[5];




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8055153
  27  * @summary missing control on LoadRange and LoadKlass when array copy macro node is expanded

  28  *
  29  * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:-TieredCompilation
  30  *                   compiler.arraycopy.TestMissingControl
  31  *
  32  */
  33 
  34 package compiler.arraycopy;
  35 
  36 public class TestMissingControl {
  37 
  38     static int[] m1(int[] a2) {
  39         int[] a1 = new int[10];
  40         System.arraycopy(a1, 0, a2, 0, 10);
  41         return a1;
  42     }
  43 
  44     static class A {
  45     }
  46 
  47     static Object m2(Object[] a2) {
  48         A[] a1 = new A[10];
  49         System.arraycopy(a1, 0, a2, 0, 10);
  50         return a1;
  51     }
  52 
  53     static void test1() {
  54         int[] a2 = new int[10];
  55         int[] a3 = new int[5];


< prev index next >