equal
deleted
inserted
replaced
36 #include "prims/jvm_misc.hpp" |
36 #include "prims/jvm_misc.hpp" |
37 #include "prims/nativeLookup.hpp" |
37 #include "prims/nativeLookup.hpp" |
38 #include "prims/unsafe.hpp" |
38 #include "prims/unsafe.hpp" |
39 #include "runtime/arguments.hpp" |
39 #include "runtime/arguments.hpp" |
40 #include "runtime/handles.inline.hpp" |
40 #include "runtime/handles.inline.hpp" |
|
41 #include "runtime/interfaceSupport.inline.hpp" |
41 #include "runtime/javaCalls.hpp" |
42 #include "runtime/javaCalls.hpp" |
42 #include "runtime/os.inline.hpp" |
43 #include "runtime/os.inline.hpp" |
43 #include "runtime/sharedRuntime.hpp" |
44 #include "runtime/sharedRuntime.hpp" |
44 #include "runtime/signature.hpp" |
45 #include "runtime/signature.hpp" |
45 #include "utilities/macros.hpp" |
46 #include "utilities/macros.hpp" |
256 } |
257 } |
257 |
258 |
258 // Check all the formats of native implementation name to see if there is one |
259 // Check all the formats of native implementation name to see if there is one |
259 // for the specified method. |
260 // for the specified method. |
260 address NativeLookup::lookup_critical_entry(const methodHandle& method) { |
261 address NativeLookup::lookup_critical_entry(const methodHandle& method) { |
261 if (!CriticalJNINatives) return NULL; |
262 assert(CriticalJNINatives, "or should not be here"); |
262 |
263 |
263 if (method->is_synchronized() || |
264 if (method->is_synchronized() || |
264 !method->is_static()) { |
265 !method->is_static()) { |
265 // Only static non-synchronized methods are allowed |
266 // Only static non-synchronized methods are allowed |
266 return NULL; |
267 return NULL; |
281 for (SignatureStream ss(signature); !ss.at_return_type(); ss.next()) { |
282 for (SignatureStream ss(signature); !ss.at_return_type(); ss.next()) { |
282 if (ss.is_array()) { |
283 if (ss.is_array()) { |
283 args_size += T_INT_size; // array length parameter |
284 args_size += T_INT_size; // array length parameter |
284 } |
285 } |
285 } |
286 } |
|
287 |
|
288 // dll handling requires I/O. Don't do that while in _thread_in_vm (safepoint may get requested). |
|
289 ThreadToNativeFromVM thread_in_native(JavaThread::current()); |
286 |
290 |
287 void* dll = dll_load(method); |
291 void* dll = dll_load(method); |
288 address entry = NULL; |
292 address entry = NULL; |
289 |
293 |
290 if (dll != NULL) { |
294 if (dll != NULL) { |