author | michaelm |
Thu, 25 Feb 2016 23:14:22 +0000 | |
changeset 36131 | 379db4b2f95d |
parent 35097 | cd29ef2a189d |
child 40059 | c2304140ed64 |
permissions | -rw-r--r-- |
35097
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
1 |
/* |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
4 |
* |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
8 |
* |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
13 |
* accompanied this code). |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
14 |
* |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
18 |
* |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
21 |
* questions. |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
22 |
* |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
23 |
*/ |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
24 |
|
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
25 |
super public class TestRangeCheckExceptionHandlerLoop |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
26 |
version 51:0 |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
27 |
{ |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
28 |
|
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
29 |
|
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
30 |
public Method "<init>":"()V" |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
31 |
stack 1 locals 1 |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
32 |
{ |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
33 |
aload_0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
34 |
invokespecial Method java/lang/Object."<init>":"()V"; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
35 |
return; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
36 |
} |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
37 |
|
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
38 |
/* This method has an irreducible loop, with 2 entries, one is the exception handler |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
39 |
|
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
40 |
static void test(boolean flag, int[] array, Exception exception) throws Exception { |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
41 |
int i = 0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
42 |
if (flag) { |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
43 |
try { |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
44 |
throw exception; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
45 |
} catch(Exception e) { |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
46 |
array[i] = 0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
47 |
i++; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
48 |
} |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
49 |
} |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
50 |
if (i < 10) { |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
51 |
throw exception; // caught by exception handler above as well |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
52 |
} |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
53 |
} |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
54 |
*/ |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
55 |
public static Method test:"(Z[ILjava/lang/Exception;)V" |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
56 |
throws java/lang/Exception |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
57 |
stack 3 locals 5 |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
58 |
{ |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
59 |
iconst_0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
60 |
istore_3; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
61 |
iload_0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
62 |
ifeq L17; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
63 |
try t0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
64 |
aload_2; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
65 |
athrow; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
66 |
endtry t0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
67 |
catch t0 java/lang/Exception; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
68 |
catch t1 java/lang/Exception; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
69 |
stack_frame_type full; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
70 |
locals_map int, class "[I", class java/lang/Exception, int; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
71 |
stack_map class java/lang/Exception; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
72 |
astore 4; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
73 |
aload_1; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
74 |
iload_3; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
75 |
iconst_0; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
76 |
iastore; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
77 |
iinc 3, 1; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
78 |
L17: stack_frame_type same; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
79 |
iload_3; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
80 |
bipush 10; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
81 |
if_icmpge L25; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
82 |
try t1; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
83 |
aload_2; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
84 |
athrow; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
85 |
endtry t1; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
86 |
L25: stack_frame_type same; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
87 |
return; |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
88 |
} |
cd29ef2a189d
8134883: C1 hard crash in range check elimination in Nashorn test262parallel
roland
parents:
diff
changeset
|
89 |
} // end Class TestRangeCheckExceptionHandlerLoop |