author | alanb |
Thu, 01 Dec 2016 15:54:39 +0000 | |
changeset 42309 | 21f9f3fbc302 |
parent 40059 | c2304140ed64 |
permissions | -rw-r--r-- |
30226
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
1 |
/* |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
4 |
* |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
8 |
* |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
13 |
* accompanied this code). |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
14 |
* |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
18 |
* |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
21 |
* questions. |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
22 |
*/ |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
23 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
24 |
/* |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
25 |
* @test |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
26 |
* @bug 8074676 |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
27 |
* @summary after guards in Arrays.copyOf() intrinsic, control may become top |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
28 |
* |
40059 | 29 |
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement |
30 |
* compiler.arraycopy.TestArrayCopyOfStopped |
|
30226
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
31 |
*/ |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
32 |
|
40059 | 33 |
package compiler.arraycopy; |
34 |
||
30226
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
35 |
import java.util.Arrays; |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
36 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
37 |
public class TestArrayCopyOfStopped { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
38 |
static class A { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
39 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
40 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
41 |
static class B { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
42 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
43 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
44 |
static final B[] array_of_bs = new B[10]; |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
45 |
static final A[] array_of_as = new A[10]; |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
46 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
47 |
static Object[] m1_helper(Object[] array, boolean flag) { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
48 |
if (flag) { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
49 |
return Arrays.copyOf(array, 10, A[].class); |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
50 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
51 |
return null; |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
52 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
53 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
54 |
static Object[] m1(boolean flag) { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
55 |
return m1_helper(array_of_bs, flag); |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
56 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
57 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
58 |
public static void main(String[] args) { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
59 |
for (int i = 0; i < 20000; i++) { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
60 |
m1_helper(array_of_as, (i%2) == 0); |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
61 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
62 |
|
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
63 |
for (int i = 0; i < 20000; i++) { |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
64 |
m1(false); |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
65 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
66 |
} |
5f1a3a275862
8074676: java.lang.invoke.PermuteArgsTest.java fails with "assert(is_Initialize()) failed: invalid node class"
roland
parents:
diff
changeset
|
67 |
} |