author | jjg |
Fri, 07 Nov 2014 14:51:35 -0800 | |
changeset 27547 | d07b3dcbc707 |
parent 10500 | 0f9de4fc106e |
permissions | -rw-r--r-- |
10500
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
1 |
/* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
2 |
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
4 |
* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
8 |
* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
13 |
* accompanied this code). |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
14 |
* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
18 |
* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
21 |
* questions. |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
22 |
* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
23 |
*/ |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
24 |
|
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
25 |
/** |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
26 |
* @test |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
27 |
* @bug 7082949 |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
28 |
* @summary JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
29 |
* |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
30 |
* @run main Test7082949 |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
31 |
*/ |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
32 |
|
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
33 |
import java.lang.invoke.*; |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
34 |
import static java.lang.invoke.MethodHandles.*; |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
35 |
import static java.lang.invoke.MethodType.*; |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
36 |
|
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
37 |
public class Test7082949 implements Runnable { |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
38 |
public static void main(String... args) throws Throwable { |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
39 |
new Thread(new Test7082949()).start(); |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
40 |
} |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
41 |
|
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
42 |
public static Test7082949 test() { |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
43 |
return null; |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
44 |
} |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
45 |
|
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
46 |
public void run() { |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
47 |
try { |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
48 |
MethodHandle m1 = MethodHandles.lookup().findStatic(Test7082949.class, "test", methodType(Test7082949.class)); |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
49 |
Test7082949 v = (Test7082949)m1.invokeExact(); |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
50 |
} catch (Throwable t) { |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
51 |
t.printStackTrace(); |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
52 |
} |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
53 |
} |
0f9de4fc106e
7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
never
parents:
diff
changeset
|
54 |
} |