1 /* |
1 /* |
2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
|
24 |
|
25 #ifndef SHARE_VM_RUNTIME_JAVACALLS_HPP |
|
26 #define SHARE_VM_RUNTIME_JAVACALLS_HPP |
|
27 |
|
28 #include "memory/allocation.hpp" |
|
29 #include "oops/methodOop.hpp" |
|
30 #include "runtime/handles.hpp" |
|
31 #include "runtime/javaFrameAnchor.hpp" |
|
32 #include "runtime/vmThread.hpp" |
|
33 #ifdef TARGET_ARCH_x86 |
|
34 # include "jniTypes_x86.hpp" |
|
35 #endif |
|
36 #ifdef TARGET_ARCH_sparc |
|
37 # include "jniTypes_sparc.hpp" |
|
38 #endif |
|
39 #ifdef TARGET_ARCH_zero |
|
40 # include "jniTypes_zero.hpp" |
|
41 #endif |
|
42 #ifdef TARGET_OS_FAMILY_linux |
|
43 # include "thread_linux.inline.hpp" |
|
44 #endif |
|
45 #ifdef TARGET_OS_FAMILY_solaris |
|
46 # include "thread_solaris.inline.hpp" |
|
47 #endif |
|
48 #ifdef TARGET_OS_FAMILY_windows |
|
49 # include "thread_windows.inline.hpp" |
|
50 #endif |
24 |
51 |
25 // A JavaCallWrapper is constructed before each JavaCall and destructed after the call. |
52 // A JavaCallWrapper is constructed before each JavaCall and destructed after the call. |
26 // Its purpose is to allocate/deallocate a new handle block and to save/restore the last |
53 // Its purpose is to allocate/deallocate a new handle block and to save/restore the last |
27 // Java fp/sp. A pointer to the JavaCallWrapper is stored on the stack. |
54 // Java fp/sp. A pointer to the JavaCallWrapper is stored on the stack. |
28 |
55 |
187 static void call_static(JavaValue* result, KlassHandle klass, symbolHandle name, symbolHandle signature, Handle arg1, Handle arg2, TRAPS); |
214 static void call_static(JavaValue* result, KlassHandle klass, symbolHandle name, symbolHandle signature, Handle arg1, Handle arg2, TRAPS); |
188 |
215 |
189 // Low-level interface |
216 // Low-level interface |
190 static void call(JavaValue* result, methodHandle method, JavaCallArguments* args, TRAPS); |
217 static void call(JavaValue* result, methodHandle method, JavaCallArguments* args, TRAPS); |
191 }; |
218 }; |
|
219 |
|
220 #endif // SHARE_VM_RUNTIME_JAVACALLS_HPP |