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 8130847 8156760
27 * @summary Eliminated instance/array written to by an array copy variant must be correctly initialized when reallocated at a deopt
28 * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestEliminatedArrayCopyDeopt
29 * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks TestEliminatedArrayCopyDeopt
30 */
31
32 // Test that if an ArrayCopy node is eliminated because it doesn't
33 // escape, then the correct field/array element values are captured so
34 // on a deoptimization, when the object/array is reallocated, it is
35 // correctly initialized
36
37 public class TestEliminatedArrayCopyDeopt {
38
39 static class A implements Cloneable {
40 int f0;
41 int f1;
42 int f2;
43 int f3;
44 int f4;
45 int f5;
46 int f6;
47 int f7;
48 int f8;
49 int f9;
50 int f10;
51 int f11;
52 int f12;
53 int f13;
54 int f14;
55 int f15;
56
|
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 8130847 8156760
27 * @summary Eliminated instance/array written to by an array copy variant must be correctly initialized when reallocated at a deopt
28 *
29 * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
30 * compiler.arraycopy.TestEliminatedArrayCopyDeopt
31 * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
32 * -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks
33 * compiler.arraycopy.TestEliminatedArrayCopyDeopt
34 */
35
36 // Test that if an ArrayCopy node is eliminated because it doesn't
37 // escape, then the correct field/array element values are captured so
38 // on a deoptimization, when the object/array is reallocated, it is
39 // correctly initialized
40
41 package compiler.arraycopy;
42
43 public class TestEliminatedArrayCopyDeopt {
44
45 static class A implements Cloneable {
46 int f0;
47 int f1;
48 int f2;
49 int f3;
50 int f4;
51 int f5;
52 int f6;
53 int f7;
54 int f8;
55 int f9;
56 int f10;
57 int f11;
58 int f12;
59 int f13;
60 int f14;
61 int f15;
62
|