< prev index next >
test/compiler/codegen/6823354/Test6823354.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 23,37 ****
/**
* @test
* @bug 6823354
* @summary These methods can be instrinsified by using bit scan, bit test, and population count instructions.
! *
* @run main/othervm -Xcomp -XX:CompileOnly=Test6823354.lzcomp,Test6823354.tzcomp,.dolzcomp,.dotzcomp Test6823354
*/
! import java.net.URLClassLoader;
public class Test6823354 {
// Arrays of corner case values.
static final int[] ia = new int[] { 0, 1, -1, Integer.MIN_VALUE, Integer.MAX_VALUE };
static final long[] la = new long[] { 0L, 1L, -1L, Long.MIN_VALUE, Long.MAX_VALUE };
--- 23,37 ----
/**
* @test
* @bug 6823354
* @summary These methods can be instrinsified by using bit scan, bit test, and population count instructions.
! * @library /testlibrary
* @run main/othervm -Xcomp -XX:CompileOnly=Test6823354.lzcomp,Test6823354.tzcomp,.dolzcomp,.dotzcomp Test6823354
*/
! import jdk.test.lib.Utils;
public class Test6823354 {
// Arrays of corner case values.
static final int[] ia = new int[] { 0, 1, -1, Integer.MIN_VALUE, Integer.MAX_VALUE };
static final long[] la = new long[] { 0L, 1L, -1L, Long.MIN_VALUE, Long.MAX_VALUE };
*** 195,206 ****
loadandrunclass(classname);
}
static void loadandrunclass(String classname) throws Exception {
Class cl = Class.forName(classname);
! URLClassLoader apploader = (URLClassLoader) cl.getClassLoader();
! ClassLoader loader = new URLClassLoader(apploader.getURLs(), apploader.getParent());
Class c = loader.loadClass(classname);
Runnable r = (Runnable) c.newInstance();
r.run();
}
--- 195,207 ----
loadandrunclass(classname);
}
static void loadandrunclass(String classname) throws Exception {
Class cl = Class.forName(classname);
! ClassLoader apploader = cl.getClassLoader();
! ClassLoader loader
! = Utils.getTestClassPathURLClassLoader(apploader.getParent());
Class c = loader.loadClass(classname);
Runnable r = (Runnable) c.newInstance();
r.run();
}
< prev index next >