File: | jdk/src/hotspot/share/utilities/globalDefinitions.hpp |
Warning: | line 848, column 30 Undefined or garbage value returned to caller |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* | |||
2 | * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. | |||
3 | * Copyright (c) 2012 Red Hat, Inc. | |||
4 | * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. | |||
5 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |||
6 | * | |||
7 | * This code is free software; you can redistribute it and/or modify it | |||
8 | * under the terms of the GNU General Public License version 2 only, as | |||
9 | * published by the Free Software Foundation. | |||
10 | * | |||
11 | * This code is distributed in the hope that it will be useful, but WITHOUT | |||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |||
14 | * version 2 for more details (a copy is included in the LICENSE file that | |||
15 | * accompanied this code). | |||
16 | * | |||
17 | * You should have received a copy of the GNU General Public License version | |||
18 | * 2 along with this work; if not, write to the Free Software Foundation, | |||
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |||
20 | * | |||
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |||
22 | * or visit www.oracle.com if you need additional information or have any | |||
23 | * questions. | |||
24 | * | |||
25 | */ | |||
26 | ||||
27 | #include "precompiled.hpp" | |||
28 | #include "jni.h" | |||
29 | #include "jvm.h" | |||
30 | #include "ci/ciReplay.hpp" | |||
31 | #include "classfile/altHashing.hpp" | |||
32 | #include "classfile/classFileStream.hpp" | |||
33 | #include "classfile/classLoader.hpp" | |||
34 | #include "classfile/classLoadInfo.hpp" | |||
35 | #include "classfile/javaClasses.hpp" | |||
36 | #include "classfile/javaClasses.inline.hpp" | |||
37 | #include "classfile/javaThreadStatus.hpp" | |||
38 | #include "classfile/moduleEntry.hpp" | |||
39 | #include "classfile/modules.hpp" | |||
40 | #include "classfile/symbolTable.hpp" | |||
41 | #include "classfile/systemDictionary.hpp" | |||
42 | #include "classfile/vmClasses.hpp" | |||
43 | #include "classfile/vmSymbols.hpp" | |||
44 | #include "compiler/compiler_globals.hpp" | |||
45 | #include "gc/shared/collectedHeap.hpp" | |||
46 | #include "gc/shared/gcLocker.inline.hpp" | |||
47 | #include "gc/shared/stringdedup/stringDedup.hpp" | |||
48 | #include "interpreter/linkResolver.hpp" | |||
49 | #include "jfr/jfrEvents.hpp" | |||
50 | #include "jfr/support/jfrThreadId.hpp" | |||
51 | #include "logging/log.hpp" | |||
52 | #include "memory/allocation.hpp" | |||
53 | #include "memory/allocation.inline.hpp" | |||
54 | #include "memory/oopFactory.hpp" | |||
55 | #include "memory/resourceArea.hpp" | |||
56 | #include "memory/universe.hpp" | |||
57 | #include "oops/access.inline.hpp" | |||
58 | #include "oops/arrayOop.hpp" | |||
59 | #include "oops/instanceKlass.inline.hpp" | |||
60 | #include "oops/instanceOop.hpp" | |||
61 | #include "oops/klass.inline.hpp" | |||
62 | #include "oops/markWord.hpp" | |||
63 | #include "oops/method.hpp" | |||
64 | #include "oops/objArrayKlass.hpp" | |||
65 | #include "oops/objArrayOop.inline.hpp" | |||
66 | #include "oops/oop.inline.hpp" | |||
67 | #include "oops/symbol.hpp" | |||
68 | #include "oops/typeArrayKlass.hpp" | |||
69 | #include "oops/typeArrayOop.inline.hpp" | |||
70 | #include "prims/jniCheck.hpp" | |||
71 | #include "prims/jniExport.hpp" | |||
72 | #include "prims/jniFastGetField.hpp" | |||
73 | #include "prims/jvm_misc.hpp" | |||
74 | #include "prims/jvmtiExport.hpp" | |||
75 | #include "prims/jvmtiThreadState.hpp" | |||
76 | #include "runtime/atomic.hpp" | |||
77 | #include "runtime/fieldDescriptor.inline.hpp" | |||
78 | #include "runtime/handles.inline.hpp" | |||
79 | #include "runtime/interfaceSupport.inline.hpp" | |||
80 | #include "runtime/java.hpp" | |||
81 | #include "runtime/javaCalls.hpp" | |||
82 | #include "runtime/jfieldIDWorkaround.hpp" | |||
83 | #include "runtime/jniHandles.inline.hpp" | |||
84 | #include "runtime/reflection.hpp" | |||
85 | #include "runtime/safepointVerifiers.hpp" | |||
86 | #include "runtime/sharedRuntime.hpp" | |||
87 | #include "runtime/signature.hpp" | |||
88 | #include "runtime/thread.inline.hpp" | |||
89 | #include "runtime/vmOperations.hpp" | |||
90 | #include "services/memTracker.hpp" | |||
91 | #include "services/runtimeService.hpp" | |||
92 | #include "utilities/defaultStream.hpp" | |||
93 | #include "utilities/dtrace.hpp" | |||
94 | #include "utilities/events.hpp" | |||
95 | #include "utilities/macros.hpp" | |||
96 | #include "utilities/vmError.hpp" | |||
97 | #if INCLUDE_JVMCI1 | |||
98 | #include "jvmci/jvmciCompiler.hpp" | |||
99 | #endif | |||
100 | ||||
101 | static jint CurrentVersion = JNI_VERSION_100x000a0000; | |||
102 | ||||
103 | #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) | |||
104 | extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* ); | |||
105 | #endif | |||
106 | ||||
107 | // The DT_RETURN_MARK macros create a scoped object to fire the dtrace | |||
108 | // '-return' probe regardless of the return path is taken out of the function. | |||
109 | // Methods that have multiple return paths use this to avoid having to | |||
110 | // instrument each return path. Methods that use CHECK or THROW must use this | |||
111 | // since those macros can cause an immedate uninstrumented return. | |||
112 | // | |||
113 | // In order to get the return value, a reference to the variable containing | |||
114 | // the return value must be passed to the contructor of the object, and | |||
115 | // the return value must be set before return (since the mark object has | |||
116 | // a reference to it). | |||
117 | // | |||
118 | // Example: | |||
119 | // DT_RETURN_MARK_DECL(SomeFunc, int); | |||
120 | // JNI_ENTRY(int, SomeFunc, ...) | |||
121 | // int return_value = 0; | |||
122 | // DT_RETURN_MARK(SomeFunc, int, (const int&)return_value); | |||
123 | // foo(CHECK_0) | |||
124 | // return_value = 5; | |||
125 | // return return_value; | |||
126 | // JNI_END | |||
127 | #define DT_RETURN_MARK_DECL(name, type, probe) \ | |||
128 | DTRACE_ONLY( \ | |||
129 | class DTraceReturnProbeMark_##name { \ | |||
130 | public: \ | |||
131 | const type& _ret_ref; \ | |||
132 | DTraceReturnProbeMark_##name(const type& v) : _ret_ref(v) {} \ | |||
133 | ~DTraceReturnProbeMark_##name() { \ | |||
134 | probe; \ | |||
135 | } \ | |||
136 | } \ | |||
137 | ) | |||
138 | // Void functions are simpler since there's no return value | |||
139 | #define DT_VOID_RETURN_MARK_DECL(name, probe) \ | |||
140 | DTRACE_ONLY( \ | |||
141 | class DTraceReturnProbeMark_##name { \ | |||
142 | public: \ | |||
143 | ~DTraceReturnProbeMark_##name() { \ | |||
144 | probe; \ | |||
145 | } \ | |||
146 | } \ | |||
147 | ) | |||
148 | ||||
149 | // Place these macros in the function to mark the return. Non-void | |||
150 | // functions need the type and address of the return value. | |||
151 | #define DT_RETURN_MARK(name, type, ref) \ | |||
152 | DTRACE_ONLY( DTraceReturnProbeMark_##name dtrace_return_mark(ref) ) | |||
153 | #define DT_VOID_RETURN_MARK(name) \ | |||
154 | DTRACE_ONLY( DTraceReturnProbeMark_##name dtrace_return_mark ) | |||
155 | ||||
156 | ||||
157 | // Use these to select distinct code for floating-point vs. non-floating point | |||
158 | // situations. Used from within common macros where we need slightly | |||
159 | // different behavior for Float/Double | |||
160 | #define FP_SELECT_Boolean(intcode, fpcode)intcode intcode | |||
161 | #define FP_SELECT_Byte(intcode, fpcode)intcode intcode | |||
162 | #define FP_SELECT_Char(intcode, fpcode)intcode intcode | |||
163 | #define FP_SELECT_Short(intcode, fpcode)intcode intcode | |||
164 | #define FP_SELECT_Object(intcode, fpcode)intcode intcode | |||
165 | #define FP_SELECT_Int(intcode, fpcode)intcode intcode | |||
166 | #define FP_SELECT_Long(intcode, fpcode)intcode intcode | |||
167 | #define FP_SELECT_Float(intcode, fpcode)fpcode fpcode | |||
168 | #define FP_SELECT_Double(intcode, fpcode)fpcode fpcode | |||
169 | #define FP_SELECT(TypeName, intcode, fpcode)FP_SELECT_TypeName(intcode, fpcode) \ | |||
170 | FP_SELECT_##TypeName(intcode, fpcode) | |||
171 | ||||
172 | // Choose DT_RETURN_MARK macros based on the type: float/double -> void | |||
173 | // (dtrace doesn't do FP yet) | |||
174 | #define DT_RETURN_MARK_DECL_FOR(TypeName, name, type, probe)FP_SELECT_TypeName(, ) \ | |||
175 | FP_SELECT(TypeName, \FP_SELECT_TypeName(, ) | |||
176 | DT_RETURN_MARK_DECL(name, type, probe), DT_VOID_RETURN_MARK_DECL(name, probe) )FP_SELECT_TypeName(, ) | |||
177 | #define DT_RETURN_MARK_FOR(TypeName, name, type, ref)FP_SELECT_TypeName(, ) \ | |||
178 | FP_SELECT(TypeName, \FP_SELECT_TypeName(, ) | |||
179 | DT_RETURN_MARK(name, type, ref), DT_VOID_RETURN_MARK(name) )FP_SELECT_TypeName(, ) | |||
180 | ||||
181 | ||||
182 | // out-of-line helpers for class jfieldIDWorkaround: | |||
183 | ||||
184 | bool jfieldIDWorkaround::is_valid_jfieldID(Klass* k, jfieldID id) { | |||
185 | if (jfieldIDWorkaround::is_instance_jfieldID(k, id)) { | |||
186 | uintptr_t as_uint = (uintptr_t) id; | |||
187 | intptr_t offset = raw_instance_offset(id); | |||
188 | if (is_checked_jfieldID(id)) { | |||
189 | if (!klass_hash_ok(k, id)) { | |||
190 | return false; | |||
191 | } | |||
192 | } | |||
193 | return InstanceKlass::cast(k)->contains_field_offset(offset); | |||
194 | } else { | |||
195 | JNIid* result = (JNIid*) id; | |||
196 | #ifdef ASSERT1 | |||
197 | return result != NULL__null && result->is_static_field_id(); | |||
198 | #else | |||
199 | return result != NULL__null; | |||
200 | #endif | |||
201 | } | |||
202 | } | |||
203 | ||||
204 | ||||
205 | intptr_t jfieldIDWorkaround::encode_klass_hash(Klass* k, intptr_t offset) { | |||
206 | if (offset <= small_offset_mask) { | |||
207 | Klass* field_klass = k; | |||
208 | Klass* super_klass = field_klass->super(); | |||
209 | // With compressed oops the most super class with nonstatic fields would | |||
210 | // be the owner of fields embedded in the header. | |||
211 | while (InstanceKlass::cast(super_klass)->has_nonstatic_fields() && | |||
212 | InstanceKlass::cast(super_klass)->contains_field_offset(offset)) { | |||
213 | field_klass = super_klass; // super contains the field also | |||
214 | super_klass = field_klass->super(); | |||
215 | } | |||
216 | debug_only(NoSafepointVerifier nosafepoint;)NoSafepointVerifier nosafepoint; | |||
217 | uintptr_t klass_hash = field_klass->identity_hash(); | |||
218 | return ((klass_hash & klass_mask) << klass_shift) | checked_mask_in_place; | |||
219 | } else { | |||
220 | #if 0 | |||
221 | #ifndef PRODUCT | |||
222 | { | |||
223 | ResourceMark rm; | |||
224 | warning("VerifyJNIFields: long offset %d in %s", offset, k->external_name()); | |||
225 | } | |||
226 | #endif | |||
227 | #endif | |||
228 | return 0; | |||
229 | } | |||
230 | } | |||
231 | ||||
232 | bool jfieldIDWorkaround::klass_hash_ok(Klass* k, jfieldID id) { | |||
233 | uintptr_t as_uint = (uintptr_t) id; | |||
234 | intptr_t klass_hash = (as_uint >> klass_shift) & klass_mask; | |||
235 | do { | |||
236 | debug_only(NoSafepointVerifier nosafepoint;)NoSafepointVerifier nosafepoint; | |||
237 | // Could use a non-blocking query for identity_hash here... | |||
238 | if ((k->identity_hash() & klass_mask) == klass_hash) | |||
239 | return true; | |||
240 | k = k->super(); | |||
241 | } while (k != NULL__null); | |||
242 | return false; | |||
243 | } | |||
244 | ||||
245 | void jfieldIDWorkaround::verify_instance_jfieldID(Klass* k, jfieldID id) { | |||
246 | guarantee(jfieldIDWorkaround::is_instance_jfieldID(k, id), "must be an instance field" )do { if (!(jfieldIDWorkaround::is_instance_jfieldID(k, id))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 246, "guarantee(" "jfieldIDWorkaround::is_instance_jfieldID(k, id)" ") failed", "must be an instance field"); ::breakpoint(); } } while (0); | |||
247 | uintptr_t as_uint = (uintptr_t) id; | |||
248 | intptr_t offset = raw_instance_offset(id); | |||
249 | if (VerifyJNIFields) { | |||
250 | if (is_checked_jfieldID(id)) { | |||
251 | guarantee(klass_hash_ok(k, id),do { if (!(klass_hash_ok(k, id))) { (*g_assert_poison) = 'X'; ; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 252, "guarantee(" "klass_hash_ok(k, id)" ") failed", "Bug in native code: jfieldID class must match object" ); ::breakpoint(); } } while (0) | |||
252 | "Bug in native code: jfieldID class must match object")do { if (!(klass_hash_ok(k, id))) { (*g_assert_poison) = 'X'; ; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 252, "guarantee(" "klass_hash_ok(k, id)" ") failed", "Bug in native code: jfieldID class must match object" ); ::breakpoint(); } } while (0); | |||
253 | } else { | |||
254 | #if 0 | |||
255 | #ifndef PRODUCT | |||
256 | if (Verbose) { | |||
257 | ResourceMark rm; | |||
258 | warning("VerifyJNIFields: unverified offset %d for %s", offset, k->external_name()); | |||
259 | } | |||
260 | #endif | |||
261 | #endif | |||
262 | } | |||
263 | } | |||
264 | guarantee(InstanceKlass::cast(k)->contains_field_offset(offset),do { if (!(InstanceKlass::cast(k)->contains_field_offset(offset ))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 265, "guarantee(" "InstanceKlass::cast(k)->contains_field_offset(offset)" ") failed", "Bug in native code: jfieldID offset must address interior of object" ); ::breakpoint(); } } while (0) | |||
265 | "Bug in native code: jfieldID offset must address interior of object")do { if (!(InstanceKlass::cast(k)->contains_field_offset(offset ))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 265, "guarantee(" "InstanceKlass::cast(k)->contains_field_offset(offset)" ") failed", "Bug in native code: jfieldID offset must address interior of object" ); ::breakpoint(); } } while (0); | |||
266 | } | |||
267 | ||||
268 | // Implementation of JNI entries | |||
269 | ||||
270 | DT_RETURN_MARK_DECL(DefineClass, jclass | |||
271 | , HOTSPOT_JNI_DEFINECLASS_RETURN(_ret_ref)); | |||
272 | ||||
273 | JNI_ENTRY(jclass, jni_DefineClass(JNIEnv *env, const char *name, jobject loaderRef,extern "C" { jclass jni_DefineClass(JNIEnv *env, const char * name, jobject loaderRef, const jbyte *buf, jsize bufLen) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 274, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
274 | const jbyte *buf, jsize bufLen))extern "C" { jclass jni_DefineClass(JNIEnv *env, const char * name, jobject loaderRef, const jbyte *buf, jsize bufLen) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 274, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
275 | HOTSPOT_JNI_DEFINECLASS_ENTRY( | |||
276 | env, (char*) name, loaderRef, (char*) buf, bufLen); | |||
277 | ||||
278 | jclass cls = NULL__null; | |||
279 | DT_RETURN_MARK(DefineClass, jclass, (const jclass&)cls); | |||
280 | ||||
281 | // Class resolution will get the class name from the .class stream if the name is null. | |||
282 | TempNewSymbol class_name = name == NULL__null ? NULL__null : | |||
283 | SystemDictionary::class_name_symbol(name, vmSymbols::java_lang_NoClassDefFoundError(), | |||
284 | CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
285 | ||||
286 | ResourceMark rm(THREAD__the_thread__); | |||
287 | ClassFileStream st((u1*)buf, bufLen, NULL__null, ClassFileStream::verify); | |||
288 | Handle class_loader (THREAD__the_thread__, JNIHandles::resolve(loaderRef)); | |||
289 | Handle protection_domain; | |||
290 | ClassLoadInfo cl_info(protection_domain); | |||
291 | Klass* k = SystemDictionary::resolve_from_stream(&st, class_name, | |||
292 | class_loader, | |||
293 | cl_info, | |||
294 | CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
295 | ||||
296 | if (log_is_enabled(Debug, class, resolve)(LogImpl<(LogTag::_class), (LogTag::_resolve), (LogTag::__NO_TAG ), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG) >::is_level(LogLevel::Debug))) { | |||
297 | trace_class_resolution(k); | |||
298 | } | |||
299 | ||||
300 | cls = (jclass)JNIHandles::make_local(THREAD__the_thread__, k->java_mirror()); | |||
301 | return cls; | |||
302 | JNI_END} } | |||
303 | ||||
304 | ||||
305 | ||||
306 | DT_RETURN_MARK_DECL(FindClass, jclass | |||
307 | , HOTSPOT_JNI_FINDCLASS_RETURN(_ret_ref)); | |||
308 | ||||
309 | JNI_ENTRY(jclass, jni_FindClass(JNIEnv *env, const char *name))extern "C" { jclass jni_FindClass(JNIEnv *env, const char *name ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 309, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
310 | HOTSPOT_JNI_FINDCLASS_ENTRY(env, (char *)name); | |||
311 | ||||
312 | jclass result = NULL__null; | |||
313 | DT_RETURN_MARK(FindClass, jclass, (const jclass&)result); | |||
314 | ||||
315 | // This should be ClassNotFoundException imo. | |||
316 | TempNewSymbol class_name = | |||
317 | SystemDictionary::class_name_symbol(name, vmSymbols::java_lang_NoClassDefFoundError(), | |||
318 | CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
319 | ||||
320 | //%note jni_3 | |||
321 | Handle protection_domain; | |||
322 | // Find calling class | |||
323 | Klass* k = thread->security_get_caller_class(0); | |||
324 | // default to the system loader when no context | |||
325 | Handle loader(THREAD__the_thread__, SystemDictionary::java_system_loader()); | |||
326 | if (k != NULL__null) { | |||
327 | // Special handling to make sure JNI_OnLoad and JNI_OnUnload are executed | |||
328 | // in the correct class context. | |||
329 | if (k->class_loader() == NULL__null && | |||
330 | k->name() == vmSymbols::jdk_internal_loader_NativeLibraries()) { | |||
331 | JavaValue result(T_OBJECT); | |||
332 | JavaCalls::call_static(&result, k, | |||
333 | vmSymbols::getFromClass_name(), | |||
334 | vmSymbols::void_class_signature(), | |||
335 | CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
336 | // When invoked from JNI_OnLoad, NativeLibraries::getFromClass returns | |||
337 | // a non-NULL Class object. When invoked from JNI_OnUnload, | |||
338 | // it will return NULL to indicate no context. | |||
339 | oop mirror = result.get_oop(); | |||
340 | if (mirror != NULL__null) { | |||
341 | Klass* fromClass = java_lang_Class::as_Klass(mirror); | |||
342 | loader = Handle(THREAD__the_thread__, fromClass->class_loader()); | |||
343 | protection_domain = Handle(THREAD__the_thread__, fromClass->protection_domain()); | |||
344 | } | |||
345 | } else { | |||
346 | loader = Handle(THREAD__the_thread__, k->class_loader()); | |||
347 | } | |||
348 | } | |||
349 | ||||
350 | result = find_class_from_class_loader(env, class_name, true, loader, | |||
351 | protection_domain, true, thread); | |||
352 | ||||
353 | if (log_is_enabled(Debug, class, resolve)(LogImpl<(LogTag::_class), (LogTag::_resolve), (LogTag::__NO_TAG ), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG) >::is_level(LogLevel::Debug)) && result != NULL__null) { | |||
354 | trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result))); | |||
355 | } | |||
356 | ||||
357 | return result; | |||
358 | JNI_END} } | |||
359 | ||||
360 | DT_RETURN_MARK_DECL(FromReflectedMethod, jmethodID | |||
361 | , HOTSPOT_JNI_FROMREFLECTEDMETHOD_RETURN((uintptr_t)_ret_ref)); | |||
362 | ||||
363 | JNI_ENTRY(jmethodID, jni_FromReflectedMethod(JNIEnv *env, jobject method))extern "C" { jmethodID jni_FromReflectedMethod(JNIEnv *env, jobject method) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 363, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
364 | HOTSPOT_JNI_FROMREFLECTEDMETHOD_ENTRY(env, method); | |||
365 | ||||
366 | jmethodID ret = NULL__null; | |||
367 | DT_RETURN_MARK(FromReflectedMethod, jmethodID, (const jmethodID&)ret); | |||
368 | ||||
369 | // method is a handle to a java.lang.reflect.Method object | |||
370 | oop reflected = JNIHandles::resolve_non_null(method); | |||
371 | oop mirror = NULL__null; | |||
372 | int slot = 0; | |||
373 | ||||
374 | if (reflected->klass() == vmClasses::reflect_Constructor_klass()) { | |||
375 | mirror = java_lang_reflect_Constructor::clazz(reflected); | |||
376 | slot = java_lang_reflect_Constructor::slot(reflected); | |||
377 | } else { | |||
378 | assert(reflected->klass() == vmClasses::reflect_Method_klass(), "wrong type")do { if (!(reflected->klass() == vmClasses::reflect_Method_klass ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 378, "assert(" "reflected->klass() == vmClasses::reflect_Method_klass()" ") failed", "wrong type"); ::breakpoint(); } } while (0); | |||
379 | mirror = java_lang_reflect_Method::clazz(reflected); | |||
380 | slot = java_lang_reflect_Method::slot(reflected); | |||
381 | } | |||
382 | Klass* k1 = java_lang_Class::as_Klass(mirror); | |||
383 | ||||
384 | // Make sure class is initialized before handing id's out to methods | |||
385 | k1->initialize(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
386 | Method* m = InstanceKlass::cast(k1)->method_with_idnum(slot); | |||
387 | ret = m==NULL__null? NULL__null : m->jmethod_id(); // return NULL if reflected method deleted | |||
388 | return ret; | |||
389 | JNI_END} } | |||
390 | ||||
391 | DT_RETURN_MARK_DECL(FromReflectedField, jfieldID | |||
392 | , HOTSPOT_JNI_FROMREFLECTEDFIELD_RETURN((uintptr_t)_ret_ref)); | |||
393 | ||||
394 | JNI_ENTRY(jfieldID, jni_FromReflectedField(JNIEnv *env, jobject field))extern "C" { jfieldID jni_FromReflectedField(JNIEnv *env, jobject field) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 394, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
395 | HOTSPOT_JNI_FROMREFLECTEDFIELD_ENTRY(env, field); | |||
396 | ||||
397 | jfieldID ret = NULL__null; | |||
398 | DT_RETURN_MARK(FromReflectedField, jfieldID, (const jfieldID&)ret); | |||
399 | ||||
400 | // field is a handle to a java.lang.reflect.Field object | |||
401 | oop reflected = JNIHandles::resolve_non_null(field); | |||
402 | oop mirror = java_lang_reflect_Field::clazz(reflected); | |||
403 | Klass* k1 = java_lang_Class::as_Klass(mirror); | |||
404 | int slot = java_lang_reflect_Field::slot(reflected); | |||
405 | int modifiers = java_lang_reflect_Field::modifiers(reflected); | |||
406 | ||||
407 | // Make sure class is initialized before handing id's out to fields | |||
408 | k1->initialize(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
409 | ||||
410 | // First check if this is a static field | |||
411 | if (modifiers & JVM_ACC_STATIC) { | |||
412 | intptr_t offset = InstanceKlass::cast(k1)->field_offset( slot ); | |||
413 | JNIid* id = InstanceKlass::cast(k1)->jni_id_for(offset); | |||
414 | assert(id != NULL, "corrupt Field object")do { if (!(id != __null)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 414, "assert(" "id != __null" ") failed", "corrupt Field object" ); ::breakpoint(); } } while (0); | |||
415 | debug_only(id->set_is_static_field_id();)id->set_is_static_field_id(); | |||
416 | // A jfieldID for a static field is a JNIid specifying the field holder and the offset within the Klass* | |||
417 | ret = jfieldIDWorkaround::to_static_jfieldID(id); | |||
418 | return ret; | |||
419 | } | |||
420 | ||||
421 | // The slot is the index of the field description in the field-array | |||
422 | // The jfieldID is the offset of the field within the object | |||
423 | // It may also have hash bits for k, if VerifyJNIFields is turned on. | |||
424 | intptr_t offset = InstanceKlass::cast(k1)->field_offset( slot ); | |||
425 | assert(InstanceKlass::cast(k1)->contains_field_offset(offset), "stay within object")do { if (!(InstanceKlass::cast(k1)->contains_field_offset( offset))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 425, "assert(" "InstanceKlass::cast(k1)->contains_field_offset(offset)" ") failed", "stay within object"); ::breakpoint(); } } while (0); | |||
426 | ret = jfieldIDWorkaround::to_instance_jfieldID(k1, offset); | |||
427 | return ret; | |||
428 | JNI_END} } | |||
429 | ||||
430 | ||||
431 | DT_RETURN_MARK_DECL(ToReflectedMethod, jobject | |||
432 | , HOTSPOT_JNI_TOREFLECTEDMETHOD_RETURN(_ret_ref)); | |||
433 | ||||
434 | JNI_ENTRY(jobject, jni_ToReflectedMethod(JNIEnv *env, jclass cls, jmethodID method_id, jboolean isStatic))extern "C" { jobject jni_ToReflectedMethod(JNIEnv *env, jclass cls, jmethodID method_id, jboolean isStatic) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 434, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
435 | HOTSPOT_JNI_TOREFLECTEDMETHOD_ENTRY(env, cls, (uintptr_t) method_id, isStatic); | |||
436 | ||||
437 | jobject ret = NULL__null; | |||
438 | DT_RETURN_MARK(ToReflectedMethod, jobject, (const jobject&)ret); | |||
439 | ||||
440 | methodHandle m (THREAD__the_thread__, Method::resolve_jmethod_id(method_id)); | |||
441 | assert(m->is_static() == (isStatic != 0), "jni_ToReflectedMethod access flags doesn't match")do { if (!(m->is_static() == (isStatic != 0))) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 441, "assert(" "m->is_static() == (isStatic != 0)" ") failed" , "jni_ToReflectedMethod access flags doesn't match"); ::breakpoint (); } } while (0); | |||
442 | oop reflection_method; | |||
443 | if (m->is_initializer()) { | |||
444 | reflection_method = Reflection::new_constructor(m, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
445 | } else { | |||
446 | reflection_method = Reflection::new_method(m, false, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
447 | } | |||
448 | ret = JNIHandles::make_local(THREAD__the_thread__, reflection_method); | |||
449 | return ret; | |||
450 | JNI_END} } | |||
451 | ||||
452 | DT_RETURN_MARK_DECL(GetSuperclass, jclass | |||
453 | , HOTSPOT_JNI_GETSUPERCLASS_RETURN(_ret_ref)); | |||
454 | ||||
455 | JNI_ENTRY(jclass, jni_GetSuperclass(JNIEnv *env, jclass sub))extern "C" { jclass jni_GetSuperclass(JNIEnv *env, jclass sub ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 455, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
456 | HOTSPOT_JNI_GETSUPERCLASS_ENTRY(env, sub); | |||
457 | ||||
458 | jclass obj = NULL__null; | |||
459 | DT_RETURN_MARK(GetSuperclass, jclass, (const jclass&)obj); | |||
460 | ||||
461 | oop mirror = JNIHandles::resolve_non_null(sub); | |||
462 | // primitive classes return NULL | |||
463 | if (java_lang_Class::is_primitive(mirror)) return NULL__null; | |||
464 | ||||
465 | // Rules of Class.getSuperClass as implemented by KLass::java_super: | |||
466 | // arrays return Object | |||
467 | // interfaces return NULL | |||
468 | // proper classes return Klass::super() | |||
469 | Klass* k = java_lang_Class::as_Klass(mirror); | |||
470 | if (k->is_interface()) return NULL__null; | |||
471 | ||||
472 | // return mirror for superclass | |||
473 | Klass* super = k->java_super(); | |||
474 | // super2 is the value computed by the compiler's getSuperClass intrinsic: | |||
475 | debug_only(Klass* super2 = ( k->is_array_klass()Klass* super2 = ( k->is_array_klass() ? vmClasses::Object_klass () : k->super() ) | |||
476 | ? vmClasses::Object_klass()Klass* super2 = ( k->is_array_klass() ? vmClasses::Object_klass () : k->super() ) | |||
477 | : k->super() ) )Klass* super2 = ( k->is_array_klass() ? vmClasses::Object_klass () : k->super() ); | |||
478 | assert(super == super2,do { if (!(super == super2)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 479, "assert(" "super == super2" ") failed", "java_super computation depends on interface, array, other super" ); ::breakpoint(); } } while (0) | |||
479 | "java_super computation depends on interface, array, other super")do { if (!(super == super2)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 479, "assert(" "super == super2" ") failed", "java_super computation depends on interface, array, other super" ); ::breakpoint(); } } while (0); | |||
480 | obj = (super == NULL__null) ? NULL__null : (jclass) JNIHandles::make_local(THREAD__the_thread__, super->java_mirror()); | |||
481 | return obj; | |||
482 | JNI_END} } | |||
483 | ||||
484 | JNI_ENTRY_NO_PRESERVE(jboolean, jni_IsAssignableFrom(JNIEnv *env, jclass sub, jclass super))extern "C" { jboolean jni_IsAssignableFrom(JNIEnv *env, jclass sub, jclass super) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 484, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
485 | HOTSPOT_JNI_ISASSIGNABLEFROM_ENTRY(env, sub, super); | |||
486 | ||||
487 | oop sub_mirror = JNIHandles::resolve_non_null(sub); | |||
488 | oop super_mirror = JNIHandles::resolve_non_null(super); | |||
489 | if (java_lang_Class::is_primitive(sub_mirror) || | |||
490 | java_lang_Class::is_primitive(super_mirror)) { | |||
491 | jboolean ret = (sub_mirror == super_mirror); | |||
492 | ||||
493 | HOTSPOT_JNI_ISASSIGNABLEFROM_RETURN(ret); | |||
494 | return ret; | |||
495 | } | |||
496 | Klass* sub_klass = java_lang_Class::as_Klass(sub_mirror); | |||
497 | Klass* super_klass = java_lang_Class::as_Klass(super_mirror); | |||
498 | assert(sub_klass != NULL && super_klass != NULL, "invalid arguments to jni_IsAssignableFrom")do { if (!(sub_klass != __null && super_klass != __null )) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 498, "assert(" "sub_klass != __null && super_klass != __null" ") failed", "invalid arguments to jni_IsAssignableFrom"); :: breakpoint(); } } while (0); | |||
499 | jboolean ret = sub_klass->is_subtype_of(super_klass) ? | |||
500 | JNI_TRUE1 : JNI_FALSE0; | |||
501 | ||||
502 | HOTSPOT_JNI_ISASSIGNABLEFROM_RETURN(ret); | |||
503 | return ret; | |||
504 | JNI_END} } | |||
505 | ||||
506 | ||||
507 | DT_RETURN_MARK_DECL(Throw, jint | |||
508 | , HOTSPOT_JNI_THROW_RETURN(_ret_ref)); | |||
509 | ||||
510 | JNI_ENTRY(jint, jni_Throw(JNIEnv *env, jthrowable obj))extern "C" { jint jni_Throw(JNIEnv *env, jthrowable obj) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 510, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
511 | HOTSPOT_JNI_THROW_ENTRY(env, obj); | |||
512 | ||||
513 | jint ret = JNI_OK0; | |||
514 | DT_RETURN_MARK(Throw, jint, (const jint&)ret); | |||
515 | ||||
516 | THROW_OOP_(JNIHandles::resolve(obj), JNI_OK){ Exceptions::_throw_oop(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 516, JNIHandles::resolve(obj)); return 0; }; | |||
517 | ShouldNotReachHere()do { (*g_assert_poison) = 'X';; report_should_not_reach_here( "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 517); ::breakpoint(); } while (0); | |||
518 | return 0; // Mute compiler. | |||
519 | JNI_END} } | |||
520 | ||||
521 | ||||
522 | DT_RETURN_MARK_DECL(ThrowNew, jint | |||
523 | , HOTSPOT_JNI_THROWNEW_RETURN(_ret_ref)); | |||
524 | ||||
525 | JNI_ENTRY(jint, jni_ThrowNew(JNIEnv *env, jclass clazz, const char *message))extern "C" { jint jni_ThrowNew(JNIEnv *env, jclass clazz, const char *message) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 525, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
526 | HOTSPOT_JNI_THROWNEW_ENTRY(env, clazz, (char *) message); | |||
527 | ||||
528 | jint ret = JNI_OK0; | |||
529 | DT_RETURN_MARK(ThrowNew, jint, (const jint&)ret); | |||
530 | ||||
531 | InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(clazz))); | |||
532 | Symbol* name = k->name(); | |||
533 | Handle class_loader (THREAD__the_thread__, k->class_loader()); | |||
534 | Handle protection_domain (THREAD__the_thread__, k->protection_domain()); | |||
535 | THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 535, name, (char *)message, class_loader, protection_domain ); return 0; }; | |||
536 | ShouldNotReachHere()do { (*g_assert_poison) = 'X';; report_should_not_reach_here( "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 536); ::breakpoint(); } while (0); | |||
537 | return 0; // Mute compiler. | |||
538 | JNI_END} } | |||
539 | ||||
540 | ||||
541 | // JNI functions only transform a pending async exception to a synchronous | |||
542 | // exception in ExceptionOccurred and ExceptionCheck calls, since | |||
543 | // delivering an async exception in other places won't change the native | |||
544 | // code's control flow and would be harmful when native code further calls | |||
545 | // JNI functions with a pending exception. Async exception is also checked | |||
546 | // during the call, so ExceptionOccurred/ExceptionCheck won't return | |||
547 | // false but deliver the async exception at the very end during | |||
548 | // state transition. | |||
549 | ||||
550 | static void jni_check_async_exceptions(JavaThread *thread) { | |||
551 | assert(thread == Thread::current(), "must be itself")do { if (!(thread == Thread::current())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 551, "assert(" "thread == Thread::current()" ") failed", "must be itself" ); ::breakpoint(); } } while (0); | |||
552 | thread->check_and_handle_async_exceptions(); | |||
553 | } | |||
554 | ||||
555 | JNI_ENTRY_NO_PRESERVE(jthrowable, jni_ExceptionOccurred(JNIEnv *env))extern "C" { jthrowable jni_ExceptionOccurred(JNIEnv *env) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 555, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
556 | HOTSPOT_JNI_EXCEPTIONOCCURRED_ENTRY(env); | |||
557 | ||||
558 | jni_check_async_exceptions(thread); | |||
559 | oop exception = thread->pending_exception(); | |||
560 | jthrowable ret = (jthrowable) JNIHandles::make_local(THREAD__the_thread__, exception); | |||
561 | ||||
562 | HOTSPOT_JNI_EXCEPTIONOCCURRED_RETURN(ret); | |||
563 | return ret; | |||
564 | JNI_END} } | |||
565 | ||||
566 | ||||
567 | JNI_ENTRY_NO_PRESERVE(void, jni_ExceptionDescribe(JNIEnv *env))extern "C" { void jni_ExceptionDescribe(JNIEnv *env) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 567, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
568 | HOTSPOT_JNI_EXCEPTIONDESCRIBE_ENTRY(env); | |||
569 | ||||
570 | if (thread->has_pending_exception()) { | |||
571 | Handle ex(thread, thread->pending_exception()); | |||
572 | thread->clear_pending_exception(); | |||
573 | if (ex->is_a(vmClasses::ThreadDeath_klass())) { | |||
574 | // Don't print anything if we are being killed. | |||
575 | } else { | |||
576 | jio_fprintf(defaultStream::error_stream(), "Exception "); | |||
577 | if (thread != NULL__null && thread->threadObj() != NULL__null) { | |||
578 | ResourceMark rm(THREAD__the_thread__); | |||
579 | jio_fprintf(defaultStream::error_stream(), | |||
580 | "in thread \"%s\" ", thread->name()); | |||
581 | } | |||
582 | if (ex->is_a(vmClasses::Throwable_klass())) { | |||
583 | JavaValue result(T_VOID); | |||
584 | JavaCalls::call_virtual(&result, | |||
585 | ex, | |||
586 | vmClasses::Throwable_klass(), | |||
587 | vmSymbols::printStackTrace_name(), | |||
588 | vmSymbols::void_method_signature(), | |||
589 | THREAD__the_thread__); | |||
590 | // If an exception is thrown in the call it gets thrown away. Not much | |||
591 | // we can do with it. The native code that calls this, does not check | |||
592 | // for the exception - hence, it might still be in the thread when DestroyVM gets | |||
593 | // called, potentially causing a few asserts to trigger - since no pending exception | |||
594 | // is expected. | |||
595 | CLEAR_PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->clear_pending_exception( )); | |||
596 | } else { | |||
597 | ResourceMark rm(THREAD__the_thread__); | |||
598 | jio_fprintf(defaultStream::error_stream(), | |||
599 | ". Uncaught exception of type %s.", | |||
600 | ex->klass()->external_name()); | |||
601 | } | |||
602 | } | |||
603 | } | |||
604 | ||||
605 | HOTSPOT_JNI_EXCEPTIONDESCRIBE_RETURN(); | |||
606 | JNI_END} } | |||
607 | ||||
608 | ||||
609 | JNI_ENTRY_NO_PRESERVE(void, jni_ExceptionClear(JNIEnv *env))extern "C" { void jni_ExceptionClear(JNIEnv *env) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 609, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
610 | HOTSPOT_JNI_EXCEPTIONCLEAR_ENTRY(env); | |||
611 | ||||
612 | // The jni code might be using this API to clear java thrown exception. | |||
613 | // So just mark jvmti thread exception state as exception caught. | |||
614 | JvmtiThreadState *state = JavaThread::current()->jvmti_thread_state(); | |||
615 | if (state != NULL__null && state->is_exception_detected()) { | |||
616 | state->set_exception_caught(); | |||
617 | } | |||
618 | thread->clear_pending_exception(); | |||
619 | ||||
620 | HOTSPOT_JNI_EXCEPTIONCLEAR_RETURN(); | |||
621 | JNI_END} } | |||
622 | ||||
623 | ||||
624 | JNI_ENTRY(void, jni_FatalError(JNIEnv *env, const char *msg))extern "C" { void jni_FatalError(JNIEnv *env, const char *msg ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 624, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
625 | HOTSPOT_JNI_FATALERROR_ENTRY(env, (char *) msg); | |||
626 | ||||
627 | tty->print_cr("FATAL ERROR in native method: %s", msg); | |||
628 | thread->print_stack(); | |||
629 | os::abort(); // Dump core and abort | |||
630 | JNI_END} } | |||
631 | ||||
632 | ||||
633 | JNI_ENTRY(jint, jni_PushLocalFrame(JNIEnv *env, jint capacity))extern "C" { jint jni_PushLocalFrame(JNIEnv *env, jint capacity ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 633, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
634 | HOTSPOT_JNI_PUSHLOCALFRAME_ENTRY(env, capacity); | |||
635 | ||||
636 | //%note jni_11 | |||
637 | if (capacity < 0 || | |||
638 | ((MaxJNILocalCapacity > 0) && (capacity > MaxJNILocalCapacity))) { | |||
639 | HOTSPOT_JNI_PUSHLOCALFRAME_RETURN((uint32_t)JNI_ERR); | |||
640 | return JNI_ERR(-1); | |||
641 | } | |||
642 | ||||
643 | thread->push_jni_handle_block(); | |||
644 | jint ret = JNI_OK0; | |||
645 | HOTSPOT_JNI_PUSHLOCALFRAME_RETURN(ret); | |||
646 | return ret; | |||
647 | JNI_END} } | |||
648 | ||||
649 | ||||
650 | JNI_ENTRY(jobject, jni_PopLocalFrame(JNIEnv *env, jobject result))extern "C" { jobject jni_PopLocalFrame(JNIEnv *env, jobject result ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 650, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
651 | HOTSPOT_JNI_POPLOCALFRAME_ENTRY(env, result); | |||
652 | ||||
653 | //%note jni_11 | |||
654 | Handle result_handle(thread, JNIHandles::resolve(result)); | |||
655 | JNIHandleBlock* old_handles = thread->active_handles(); | |||
656 | JNIHandleBlock* new_handles = old_handles->pop_frame_link(); | |||
657 | if (new_handles != NULL__null) { | |||
658 | // As a sanity check we only release the handle blocks if the pop_frame_link is not NULL. | |||
659 | // This way code will still work if PopLocalFrame is called without a corresponding | |||
660 | // PushLocalFrame call. Note that we set the pop_frame_link to NULL explicitly, otherwise | |||
661 | // the release_block call will release the blocks. | |||
662 | thread->set_active_handles(new_handles); | |||
663 | old_handles->set_pop_frame_link(NULL__null); // clear link we won't release new_handles below | |||
664 | JNIHandleBlock::release_block(old_handles, thread); // may block | |||
665 | result = JNIHandles::make_local(thread, result_handle()); | |||
666 | } | |||
667 | HOTSPOT_JNI_POPLOCALFRAME_RETURN(result); | |||
668 | return result; | |||
669 | JNI_END} } | |||
670 | ||||
671 | ||||
672 | JNI_ENTRY(jobject, jni_NewGlobalRef(JNIEnv *env, jobject ref))extern "C" { jobject jni_NewGlobalRef(JNIEnv *env, jobject ref ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 672, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
673 | HOTSPOT_JNI_NEWGLOBALREF_ENTRY(env, ref); | |||
674 | ||||
675 | Handle ref_handle(thread, JNIHandles::resolve(ref)); | |||
676 | jobject ret = JNIHandles::make_global(ref_handle, AllocFailStrategy::RETURN_NULL); | |||
677 | ||||
678 | HOTSPOT_JNI_NEWGLOBALREF_RETURN(ret); | |||
679 | return ret; | |||
680 | JNI_END} } | |||
681 | ||||
682 | // Must be JNI_ENTRY (with HandleMark) | |||
683 | JNI_ENTRY_NO_PRESERVE(void, jni_DeleteGlobalRef(JNIEnv *env, jobject ref))extern "C" { void jni_DeleteGlobalRef(JNIEnv *env, jobject ref ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 683, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
684 | HOTSPOT_JNI_DELETEGLOBALREF_ENTRY(env, ref); | |||
685 | ||||
686 | JNIHandles::destroy_global(ref); | |||
687 | ||||
688 | HOTSPOT_JNI_DELETEGLOBALREF_RETURN(); | |||
689 | JNI_END} } | |||
690 | ||||
691 | JNI_ENTRY_NO_PRESERVE(void, jni_DeleteLocalRef(JNIEnv *env, jobject obj))extern "C" { void jni_DeleteLocalRef(JNIEnv *env, jobject obj ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 691, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
692 | HOTSPOT_JNI_DELETELOCALREF_ENTRY(env, obj); | |||
693 | ||||
694 | JNIHandles::destroy_local(obj); | |||
695 | ||||
696 | HOTSPOT_JNI_DELETELOCALREF_RETURN(); | |||
697 | JNI_END} } | |||
698 | ||||
699 | JNI_ENTRY_NO_PRESERVE(jboolean, jni_IsSameObject(JNIEnv *env, jobject r1, jobject r2))extern "C" { jboolean jni_IsSameObject(JNIEnv *env, jobject r1 , jobject r2) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 699, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
700 | HOTSPOT_JNI_ISSAMEOBJECT_ENTRY(env, r1, r2); | |||
701 | ||||
702 | jboolean ret = JNIHandles::is_same_object(r1, r2) ? JNI_TRUE1 : JNI_FALSE0; | |||
703 | ||||
704 | HOTSPOT_JNI_ISSAMEOBJECT_RETURN(ret); | |||
705 | return ret; | |||
706 | JNI_END} } | |||
707 | ||||
708 | ||||
709 | JNI_ENTRY(jobject, jni_NewLocalRef(JNIEnv *env, jobject ref))extern "C" { jobject jni_NewLocalRef(JNIEnv *env, jobject ref ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 709, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
710 | HOTSPOT_JNI_NEWLOCALREF_ENTRY(env, ref); | |||
711 | ||||
712 | jobject ret = JNIHandles::make_local(THREAD__the_thread__, JNIHandles::resolve(ref), | |||
713 | AllocFailStrategy::RETURN_NULL); | |||
714 | ||||
715 | HOTSPOT_JNI_NEWLOCALREF_RETURN(ret); | |||
716 | return ret; | |||
717 | JNI_END} } | |||
718 | ||||
719 | JNI_LEAF(jint, jni_EnsureLocalCapacity(JNIEnv *env, jint capacity))extern "C" { jint jni_EnsureLocalCapacity(JNIEnv *env, jint capacity ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 719, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); NoHandleMark __hm; ; os::verify_stack_alignment (); | |||
720 | HOTSPOT_JNI_ENSURELOCALCAPACITY_ENTRY(env, capacity); | |||
721 | ||||
722 | jint ret; | |||
723 | if (capacity >= 0 && | |||
724 | ((MaxJNILocalCapacity <= 0) || (capacity <= MaxJNILocalCapacity))) { | |||
725 | ret = JNI_OK0; | |||
726 | } else { | |||
727 | ret = JNI_ERR(-1); | |||
728 | } | |||
729 | ||||
730 | HOTSPOT_JNI_ENSURELOCALCAPACITY_RETURN(ret); | |||
731 | return ret; | |||
732 | JNI_END} } | |||
733 | ||||
734 | // Return the Handle Type | |||
735 | JNI_LEAF(jobjectRefType, jni_GetObjectRefType(JNIEnv *env, jobject obj))extern "C" { jobjectRefType jni_GetObjectRefType(JNIEnv *env, jobject obj) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 735, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); NoHandleMark __hm; ; os::verify_stack_alignment (); | |||
736 | HOTSPOT_JNI_GETOBJECTREFTYPE_ENTRY(env, obj); | |||
737 | ||||
738 | jobjectRefType ret = JNIInvalidRefType; | |||
739 | if (obj != NULL__null) { | |||
740 | ret = JNIHandles::handle_type(thread, obj); | |||
741 | } | |||
742 | ||||
743 | HOTSPOT_JNI_GETOBJECTREFTYPE_RETURN((void *) ret); | |||
744 | return ret; | |||
745 | JNI_END} } | |||
746 | ||||
747 | ||||
748 | class JNI_ArgumentPusher : public SignatureIterator { | |||
749 | protected: | |||
750 | JavaCallArguments* _arguments; | |||
751 | ||||
752 | void push_int(jint x) { _arguments->push_int(x); } | |||
753 | void push_long(jlong x) { _arguments->push_long(x); } | |||
754 | void push_float(jfloat x) { _arguments->push_float(x); } | |||
755 | void push_double(jdouble x) { _arguments->push_double(x); } | |||
756 | void push_object(jobject x) { _arguments->push_jobject(x); } | |||
757 | ||||
758 | void push_boolean(jboolean b) { | |||
759 | // Normalize boolean arguments from native code by converting 1-255 to JNI_TRUE and | |||
760 | // 0 to JNI_FALSE. Boolean return values from native are normalized the same in | |||
761 | // TemplateInterpreterGenerator::generate_result_handler_for and | |||
762 | // SharedRuntime::generate_native_wrapper. | |||
763 | push_int(b == 0 ? JNI_FALSE0 : JNI_TRUE1); | |||
764 | } | |||
765 | ||||
766 | JNI_ArgumentPusher(Method* method) | |||
767 | : SignatureIterator(method->signature(), | |||
768 | Fingerprinter(methodHandle(Thread::current(), method)).fingerprint()) | |||
769 | { | |||
770 | _arguments = NULL__null; | |||
771 | } | |||
772 | ||||
773 | public: | |||
774 | virtual void push_arguments_on(JavaCallArguments* arguments) = 0; | |||
775 | }; | |||
776 | ||||
777 | ||||
778 | class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher { | |||
779 | va_list _ap; | |||
780 | ||||
781 | void set_ap(va_list rap) { | |||
782 | va_copy(_ap, rap)__builtin_va_copy(_ap, rap); | |||
783 | } | |||
784 | ||||
785 | friend class SignatureIterator; // so do_parameters_on can call do_type | |||
786 | void do_type(BasicType type) { | |||
787 | switch (type) { | |||
788 | // these are coerced to int when using va_arg | |||
789 | case T_BYTE: | |||
790 | case T_CHAR: | |||
791 | case T_SHORT: | |||
792 | case T_INT: push_int(va_arg(_ap, jint)__builtin_va_arg(_ap, jint)); break; | |||
793 | case T_BOOLEAN: push_boolean((jboolean) va_arg(_ap, jint)__builtin_va_arg(_ap, jint)); break; | |||
794 | ||||
795 | // each of these paths is exercised by the various jck Call[Static,Nonvirtual,][Void,Int,..]Method[A,V,] tests | |||
796 | ||||
797 | case T_LONG: push_long(va_arg(_ap, jlong)__builtin_va_arg(_ap, jlong)); break; | |||
798 | // float is coerced to double w/ va_arg | |||
799 | case T_FLOAT: push_float((jfloat) va_arg(_ap, jdouble)__builtin_va_arg(_ap, jdouble)); break; | |||
800 | case T_DOUBLE: push_double(va_arg(_ap, jdouble)__builtin_va_arg(_ap, jdouble)); break; | |||
801 | ||||
802 | case T_ARRAY: | |||
803 | case T_OBJECT: push_object(va_arg(_ap, jobject)__builtin_va_arg(_ap, jobject)); break; | |||
804 | default: ShouldNotReachHere()do { (*g_assert_poison) = 'X';; report_should_not_reach_here( "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 804); ::breakpoint(); } while (0); | |||
805 | } | |||
806 | } | |||
807 | ||||
808 | public: | |||
809 | JNI_ArgumentPusherVaArg(jmethodID method_id, va_list rap) | |||
810 | : JNI_ArgumentPusher(Method::resolve_jmethod_id(method_id)) { | |||
811 | set_ap(rap); | |||
812 | } | |||
813 | ||||
814 | ~JNI_ArgumentPusherVaArg() { | |||
815 | va_end(_ap)__builtin_va_end(_ap); | |||
816 | } | |||
817 | ||||
818 | virtual void push_arguments_on(JavaCallArguments* arguments) { | |||
819 | _arguments = arguments; | |||
820 | do_parameters_on(this); | |||
821 | } | |||
822 | }; | |||
823 | ||||
824 | ||||
825 | class JNI_ArgumentPusherArray : public JNI_ArgumentPusher { | |||
826 | protected: | |||
827 | const jvalue *_ap; | |||
828 | ||||
829 | inline void set_ap(const jvalue *rap) { _ap = rap; } | |||
830 | ||||
831 | friend class SignatureIterator; // so do_parameters_on can call do_type | |||
832 | void do_type(BasicType type) { | |||
833 | switch (type) { | |||
834 | case T_CHAR: push_int((_ap++)->c); break; | |||
835 | case T_SHORT: push_int((_ap++)->s); break; | |||
836 | case T_BYTE: push_int((_ap++)->b); break; | |||
837 | case T_INT: push_int((_ap++)->i); break; | |||
838 | case T_BOOLEAN: push_boolean((_ap++)->z); break; | |||
839 | case T_LONG: push_long((_ap++)->j); break; | |||
840 | case T_FLOAT: push_float((_ap++)->f); break; | |||
841 | case T_DOUBLE: push_double((_ap++)->d); break; | |||
842 | case T_ARRAY: | |||
843 | case T_OBJECT: push_object((_ap++)->l); break; | |||
844 | default: ShouldNotReachHere()do { (*g_assert_poison) = 'X';; report_should_not_reach_here( "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 844); ::breakpoint(); } while (0); | |||
845 | } | |||
846 | } | |||
847 | ||||
848 | public: | |||
849 | JNI_ArgumentPusherArray(jmethodID method_id, const jvalue *rap) | |||
850 | : JNI_ArgumentPusher(Method::resolve_jmethod_id(method_id)) { | |||
851 | set_ap(rap); | |||
852 | } | |||
853 | ||||
854 | virtual void push_arguments_on(JavaCallArguments* arguments) { | |||
855 | _arguments = arguments; | |||
856 | do_parameters_on(this); | |||
857 | } | |||
858 | }; | |||
859 | ||||
860 | ||||
861 | enum JNICallType { | |||
862 | JNI_STATIC, | |||
863 | JNI_VIRTUAL, | |||
864 | JNI_NONVIRTUAL | |||
865 | }; | |||
866 | ||||
867 | ||||
868 | ||||
869 | static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPSJavaThread* __the_thread__) { | |||
870 | methodHandle method(THREAD__the_thread__, Method::resolve_jmethod_id(method_id)); | |||
871 | ||||
872 | // Create object to hold arguments for the JavaCall, and associate it with | |||
873 | // the jni parser | |||
874 | ResourceMark rm(THREAD__the_thread__); | |||
875 | int number_of_parameters = method->size_of_parameters(); | |||
876 | JavaCallArguments java_args(number_of_parameters); | |||
877 | ||||
878 | assert(method->is_static(), "method should be static")do { if (!(method->is_static())) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 878, "assert(" "method->is_static()" ") failed", "method should be static" ); ::breakpoint(); } } while (0); | |||
879 | ||||
880 | // Fill out JavaCallArguments object | |||
881 | args->push_arguments_on(&java_args); | |||
882 | // Initialize result type | |||
883 | result->set_type(args->return_type()); | |||
884 | ||||
885 | // Invoke the method. Result is returned as oop. | |||
886 | JavaCalls::call(result, method, &java_args, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
887 | ||||
888 | // Convert result | |||
889 | if (is_reference_type(result->get_type())) { | |||
890 | result->set_jobject(JNIHandles::make_local(THREAD__the_thread__, result->get_oop())); | |||
891 | } | |||
892 | } | |||
893 | ||||
894 | ||||
895 | static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPSJavaThread* __the_thread__) { | |||
896 | oop recv = JNIHandles::resolve(receiver); | |||
897 | if (recv == NULL__null) { | |||
898 | THROW(vmSymbols::java_lang_NullPointerException()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 898, vmSymbols::java_lang_NullPointerException(), __null); return ; }; | |||
899 | } | |||
900 | Handle h_recv(THREAD__the_thread__, recv); | |||
901 | ||||
902 | int number_of_parameters; | |||
903 | Method* selected_method; | |||
904 | { | |||
905 | Method* m = Method::resolve_jmethod_id(method_id); | |||
906 | number_of_parameters = m->size_of_parameters(); | |||
907 | InstanceKlass* holder = m->method_holder(); | |||
908 | if (call_type != JNI_VIRTUAL) { | |||
909 | selected_method = m; | |||
910 | } else if (!m->has_itable_index()) { | |||
911 | // non-interface call -- for that little speed boost, don't handlize | |||
912 | debug_only(NoSafepointVerifier nosafepoint;)NoSafepointVerifier nosafepoint; | |||
913 | // jni_GetMethodID makes sure class is linked and initialized | |||
914 | // so m should have a valid vtable index. | |||
915 | assert(m->valid_vtable_index(), "no valid vtable index")do { if (!(m->valid_vtable_index())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 915, "assert(" "m->valid_vtable_index()" ") failed", "no valid vtable index" ); ::breakpoint(); } } while (0); | |||
916 | int vtbl_index = m->vtable_index(); | |||
917 | if (vtbl_index != Method::nonvirtual_vtable_index) { | |||
918 | selected_method = h_recv->klass()->method_at_vtable(vtbl_index); | |||
919 | } else { | |||
920 | // final method | |||
921 | selected_method = m; | |||
922 | } | |||
923 | } else { | |||
924 | // interface call | |||
925 | int itbl_index = m->itable_index(); | |||
926 | Klass* k = h_recv->klass(); | |||
927 | selected_method = InstanceKlass::cast(k)->method_at_itable(holder, itbl_index, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
928 | } | |||
929 | } | |||
930 | ||||
931 | methodHandle method(THREAD__the_thread__, selected_method); | |||
932 | ||||
933 | // Create object to hold arguments for the JavaCall, and associate it with | |||
934 | // the jni parser | |||
935 | ResourceMark rm(THREAD__the_thread__); | |||
936 | JavaCallArguments java_args(number_of_parameters); | |||
937 | ||||
938 | // handle arguments | |||
939 | assert(!method->is_static(), "method %s should not be static", method->name_and_sig_as_C_string())do { if (!(!method->is_static())) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 939, "assert(" "!method->is_static()" ") failed", "method %s should not be static" , method->name_and_sig_as_C_string()); ::breakpoint(); } } while (0); | |||
940 | java_args.push_oop(h_recv); // Push jobject handle | |||
941 | ||||
942 | // Fill out JavaCallArguments object | |||
943 | args->push_arguments_on(&java_args); | |||
944 | // Initialize result type | |||
945 | result->set_type(args->return_type()); | |||
946 | ||||
947 | // Invoke the method. Result is returned as oop. | |||
948 | JavaCalls::call(result, method, &java_args, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
949 | ||||
950 | // Convert result | |||
951 | if (is_reference_type(result->get_type())) { | |||
952 | result->set_jobject(JNIHandles::make_local(THREAD__the_thread__, result->get_oop())); | |||
953 | } | |||
954 | } | |||
955 | ||||
956 | DT_RETURN_MARK_DECL(AllocObject, jobject | |||
957 | , HOTSPOT_JNI_ALLOCOBJECT_RETURN(_ret_ref)); | |||
958 | ||||
959 | JNI_ENTRY(jobject, jni_AllocObject(JNIEnv *env, jclass clazz))extern "C" { jobject jni_AllocObject(JNIEnv *env, jclass clazz ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 959, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
960 | HOTSPOT_JNI_ALLOCOBJECT_ENTRY(env, clazz); | |||
961 | ||||
962 | jobject ret = NULL__null; | |||
963 | DT_RETURN_MARK(AllocObject, jobject, (const jobject&)ret); | |||
964 | ||||
965 | instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(clazz), CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
966 | ret = JNIHandles::make_local(THREAD__the_thread__, i); | |||
967 | return ret; | |||
968 | JNI_END} } | |||
969 | ||||
970 | DT_RETURN_MARK_DECL(NewObjectA, jobject | |||
971 | , HOTSPOT_JNI_NEWOBJECTA_RETURN(_ret_ref)); | |||
972 | ||||
973 | JNI_ENTRY(jobject, jni_NewObjectA(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args))extern "C" { jobject jni_NewObjectA(JNIEnv *env, jclass clazz , jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 973, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
974 | HOTSPOT_JNI_NEWOBJECTA_ENTRY(env, clazz, (uintptr_t) methodID); | |||
975 | ||||
976 | jobject obj = NULL__null; | |||
977 | DT_RETURN_MARK(NewObjectA, jobject, (const jobject&)obj); | |||
978 | ||||
979 | instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(clazz), CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
980 | obj = JNIHandles::make_local(THREAD__the_thread__, i); | |||
981 | JavaValue jvalue(T_VOID); | |||
982 | JNI_ArgumentPusherArray ap(methodID, args); | |||
983 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
984 | return obj; | |||
985 | JNI_END} } | |||
986 | ||||
987 | ||||
988 | DT_RETURN_MARK_DECL(NewObjectV, jobject | |||
989 | , HOTSPOT_JNI_NEWOBJECTV_RETURN(_ret_ref)); | |||
990 | ||||
991 | JNI_ENTRY(jobject, jni_NewObjectV(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args))extern "C" { jobject jni_NewObjectV(JNIEnv *env, jclass clazz , jmethodID methodID, va_list args) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 991, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
992 | HOTSPOT_JNI_NEWOBJECTV_ENTRY(env, clazz, (uintptr_t) methodID); | |||
993 | ||||
994 | jobject obj = NULL__null; | |||
995 | DT_RETURN_MARK(NewObjectV, jobject, (const jobject&)obj); | |||
996 | ||||
997 | instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(clazz), CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
998 | obj = JNIHandles::make_local(THREAD__the_thread__, i); | |||
999 | JavaValue jvalue(T_VOID); | |||
1000 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1001 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1002 | return obj; | |||
1003 | JNI_END} } | |||
1004 | ||||
1005 | ||||
1006 | DT_RETURN_MARK_DECL(NewObject, jobject | |||
1007 | , HOTSPOT_JNI_NEWOBJECT_RETURN(_ret_ref)); | |||
1008 | ||||
1009 | JNI_ENTRY(jobject, jni_NewObject(JNIEnv *env, jclass clazz, jmethodID methodID, ...))extern "C" { jobject jni_NewObject(JNIEnv *env, jclass clazz, jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1009, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1010 | HOTSPOT_JNI_NEWOBJECT_ENTRY(env, clazz, (uintptr_t) methodID); | |||
1011 | ||||
1012 | jobject obj = NULL__null; | |||
1013 | DT_RETURN_MARK(NewObject, jobject, (const jobject&)obj); | |||
1014 | ||||
1015 | instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(clazz), CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1016 | obj = JNIHandles::make_local(THREAD__the_thread__, i); | |||
1017 | va_list args; | |||
1018 | va_start(args, methodID)__builtin_va_start(args, methodID); | |||
1019 | JavaValue jvalue(T_VOID); | |||
1020 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1021 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1022 | va_end(args)__builtin_va_end(args); | |||
1023 | return obj; | |||
1024 | JNI_END} } | |||
1025 | ||||
1026 | ||||
1027 | JNI_ENTRY(jclass, jni_GetObjectClass(JNIEnv *env, jobject obj))extern "C" { jclass jni_GetObjectClass(JNIEnv *env, jobject obj ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1027, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1028 | HOTSPOT_JNI_GETOBJECTCLASS_ENTRY(env, obj); | |||
1029 | ||||
1030 | Klass* k = JNIHandles::resolve_non_null(obj)->klass(); | |||
1031 | jclass ret = | |||
1032 | (jclass) JNIHandles::make_local(THREAD__the_thread__, k->java_mirror()); | |||
1033 | ||||
1034 | HOTSPOT_JNI_GETOBJECTCLASS_RETURN(ret); | |||
1035 | return ret; | |||
1036 | JNI_END} } | |||
1037 | ||||
1038 | JNI_ENTRY_NO_PRESERVE(jboolean, jni_IsInstanceOf(JNIEnv *env, jobject obj, jclass clazz))extern "C" { jboolean jni_IsInstanceOf(JNIEnv *env, jobject obj , jclass clazz) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1038, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
1039 | HOTSPOT_JNI_ISINSTANCEOF_ENTRY(env, obj, clazz); | |||
1040 | ||||
1041 | jboolean ret = JNI_TRUE1; | |||
1042 | if (obj != NULL__null) { | |||
1043 | ret = JNI_FALSE0; | |||
1044 | Klass* k = java_lang_Class::as_Klass( | |||
1045 | JNIHandles::resolve_non_null(clazz)); | |||
1046 | if (k != NULL__null) { | |||
1047 | ret = JNIHandles::resolve_non_null(obj)->is_a(k) ? JNI_TRUE1 : JNI_FALSE0; | |||
1048 | } | |||
1049 | } | |||
1050 | ||||
1051 | HOTSPOT_JNI_ISINSTANCEOF_RETURN(ret); | |||
1052 | return ret; | |||
1053 | JNI_END} } | |||
1054 | ||||
1055 | ||||
1056 | static jmethodID get_method_id(JNIEnv *env, jclass clazz, const char *name_str, | |||
1057 | const char *sig, bool is_static, TRAPSJavaThread* __the_thread__) { | |||
1058 | // %%%% This code should probably just call into a method in the LinkResolver | |||
1059 | // | |||
1060 | // The class should have been loaded (we have an instance of the class | |||
1061 | // passed in) so the method and signature should already be in the symbol | |||
1062 | // table. If they're not there, the method doesn't exist. | |||
1063 | const char *name_to_probe = (name_str == NULL__null) | |||
1064 | ? vmSymbols::object_initializer_name()->as_C_string() | |||
1065 | : name_str; | |||
1066 | TempNewSymbol name = SymbolTable::probe(name_to_probe, (int)strlen(name_to_probe)); | |||
1067 | TempNewSymbol signature = SymbolTable::probe(sig, (int)strlen(sig)); | |||
1068 | ||||
1069 | if (name == NULL__null || signature == NULL__null) { | |||
1070 | THROW_MSG_0(vmSymbols::java_lang_NoSuchMethodError(), name_str){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1070, vmSymbols::java_lang_NoSuchMethodError(), name_str); return 0; }; | |||
1071 | } | |||
1072 | ||||
1073 | oop mirror = JNIHandles::resolve_non_null(clazz); | |||
1074 | Klass* klass = java_lang_Class::as_Klass(mirror); | |||
1075 | ||||
1076 | // Throw a NoSuchMethodError exception if we have an instance of a | |||
1077 | // primitive java.lang.Class | |||
1078 | if (java_lang_Class::is_primitive(mirror)) { | |||
1079 | ResourceMark rm(THREAD__the_thread__); | |||
1080 | THROW_MSG_0(vmSymbols::java_lang_NoSuchMethodError(), err_msg("%s%s.%s%s", is_static ? "static " : "", klass->signature_name(), name_str, sig)){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1080, vmSymbols::java_lang_NoSuchMethodError(), err_msg("%s%s.%s%s" , is_static ? "static " : "", klass->signature_name(), name_str , sig)); return 0; }; | |||
1081 | } | |||
1082 | ||||
1083 | // Make sure class is linked and initialized before handing id's out to | |||
1084 | // Method*s. | |||
1085 | klass->initialize(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1086 | ||||
1087 | Method* m; | |||
1088 | if (name == vmSymbols::object_initializer_name() || | |||
1089 | name == vmSymbols::class_initializer_name()) { | |||
1090 | // Never search superclasses for constructors | |||
1091 | if (klass->is_instance_klass()) { | |||
1092 | m = InstanceKlass::cast(klass)->find_method(name, signature); | |||
1093 | } else { | |||
1094 | m = NULL__null; | |||
1095 | } | |||
1096 | } else { | |||
1097 | m = klass->lookup_method(name, signature); | |||
1098 | if (m == NULL__null && klass->is_instance_klass()) { | |||
1099 | m = InstanceKlass::cast(klass)->lookup_method_in_ordered_interfaces(name, signature); | |||
1100 | } | |||
1101 | } | |||
1102 | if (m == NULL__null || (m->is_static() != is_static)) { | |||
1103 | ResourceMark rm(THREAD__the_thread__); | |||
1104 | THROW_MSG_0(vmSymbols::java_lang_NoSuchMethodError(), err_msg("%s%s.%s%s", is_static ? "static " : "", klass->signature_name(), name_str, sig)){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1104, vmSymbols::java_lang_NoSuchMethodError(), err_msg("%s%s.%s%s" , is_static ? "static " : "", klass->signature_name(), name_str , sig)); return 0; }; | |||
1105 | } | |||
1106 | return m->jmethod_id(); | |||
1107 | } | |||
1108 | ||||
1109 | ||||
1110 | JNI_ENTRY(jmethodID, jni_GetMethodID(JNIEnv *env, jclass clazz,extern "C" { jmethodID jni_GetMethodID(JNIEnv *env, jclass clazz , const char *name, const char *sig) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1111, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1111 | const char *name, const char *sig))extern "C" { jmethodID jni_GetMethodID(JNIEnv *env, jclass clazz , const char *name, const char *sig) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1111, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1112 | HOTSPOT_JNI_GETMETHODID_ENTRY(env, clazz, (char *) name, (char *) sig); | |||
1113 | jmethodID ret = get_method_id(env, clazz, name, sig, false, thread); | |||
1114 | HOTSPOT_JNI_GETMETHODID_RETURN((uintptr_t) ret); | |||
1115 | return ret; | |||
1116 | JNI_END} } | |||
1117 | ||||
1118 | ||||
1119 | JNI_ENTRY(jmethodID, jni_GetStaticMethodID(JNIEnv *env, jclass clazz,extern "C" { jmethodID jni_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1120, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1120 | const char *name, const char *sig))extern "C" { jmethodID jni_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1120, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1121 | HOTSPOT_JNI_GETSTATICMETHODID_ENTRY(env, (char *) clazz, (char *) name, (char *)sig); | |||
1122 | jmethodID ret = get_method_id(env, clazz, name, sig, true, thread); | |||
1123 | HOTSPOT_JNI_GETSTATICMETHODID_RETURN((uintptr_t) ret); | |||
1124 | return ret; | |||
1125 | JNI_END} } | |||
1126 | ||||
1127 | ||||
1128 | ||||
1129 | // | |||
1130 | // Calling Methods | |||
1131 | // | |||
1132 | ||||
1133 | ||||
1134 | #define DEFINE_CALLMETHOD(ResultType, Result, Tag \FP_SELECT_Result(, ); extern "C" { ResultType jni_CallResultMethod (JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1135, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); va_list args; __builtin_va_start(args, methodID); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue .get_ResultType(); return ret;} } | |||
1135 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, ); extern "C" { ResultType jni_CallResultMethod (JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1135, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); va_list args; __builtin_va_start(args, methodID); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1136 | \ | |||
1137 | DT_RETURN_MARK_DECL_FOR(Result, Call##Result##Method, ResultType \FP_SELECT_Result(, ) | |||
1138 | , ReturnProbe)FP_SELECT_Result(, ); \extern "C" { ResultType jni_Call##Result##Method(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1141, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1139 | \extern "C" { ResultType jni_Call##Result##Method(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1141, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1140 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_Call##Result##Method(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1141, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1141 | jni_Call##Result##Method(JNIEnv *env, jobject obj, jmethodID methodID, ...))extern "C" { ResultType jni_Call##Result##Method(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1141, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1142 | \ | |||
1143 | EntryProbe; \ | |||
1144 | ResultType ret = 0;\ | |||
1145 | DT_RETURN_MARK_FOR(Result, Call##Result##Method, ResultType, \FP_SELECT_Result(, ) | |||
1146 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1147 | \ | |||
1148 | va_list args; \ | |||
1149 | va_start(args, methodID)__builtin_va_start(args, methodID); \ | |||
1150 | JavaValue jvalue(Tag); \ | |||
1151 | JNI_ArgumentPusherVaArg ap(methodID, args); \ | |||
1152 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1153 | va_end(args)__builtin_va_end(args); \ | |||
1154 | ret = jvalue.get_##ResultType(); \ | |||
1155 | return ret;\} } | |||
1156 | JNI_END} } | |||
1157 | ||||
1158 | // the runtime type of subword integral basic types is integer | |||
1159 | DEFINE_CALLMETHOD(jboolean, Boolean, T_BOOLEAN; extern "C" { jboolean jni_CallBooleanMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1161, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jboolean(); return ret;} } | |||
1160 | , HOTSPOT_JNI_CALLBOOLEANMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jboolean jni_CallBooleanMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1161, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jboolean(); return ret;} } | |||
1161 | HOTSPOT_JNI_CALLBOOLEANMETHOD_RETURN(_ret_ref)); extern "C" { jboolean jni_CallBooleanMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1161, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jboolean(); return ret;} } | |||
1162 | DEFINE_CALLMETHOD(jbyte, Byte, T_BYTE; extern "C" { jbyte jni_CallByteMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1164, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1163 | , HOTSPOT_JNI_CALLBYTEMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jbyte jni_CallByteMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1164, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1164 | HOTSPOT_JNI_CALLBYTEMETHOD_RETURN(_ret_ref)); extern "C" { jbyte jni_CallByteMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1164, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1165 | DEFINE_CALLMETHOD(jchar, Char, T_CHAR; extern "C" { jchar jni_CallCharMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1167, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1166 | , HOTSPOT_JNI_CALLCHARMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jchar jni_CallCharMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1167, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1167 | HOTSPOT_JNI_CALLCHARMETHOD_RETURN(_ret_ref)); extern "C" { jchar jni_CallCharMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1167, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1168 | DEFINE_CALLMETHOD(jshort, Short, T_SHORT; extern "C" { jshort jni_CallShortMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1170, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jshort(); return ret;} } | |||
1169 | , HOTSPOT_JNI_CALLSHORTMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jshort jni_CallShortMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1170, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jshort(); return ret;} } | |||
1170 | HOTSPOT_JNI_CALLSHORTMETHOD_RETURN(_ret_ref)); extern "C" { jshort jni_CallShortMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1170, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jshort(); return ret;} } | |||
1171 | ||||
1172 | DEFINE_CALLMETHOD(jobject, Object, T_OBJECT; extern "C" { jobject jni_CallObjectMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1174, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jobject(); return ret;} } | |||
1173 | , HOTSPOT_JNI_CALLOBJECTMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jobject jni_CallObjectMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1174, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jobject(); return ret;} } | |||
1174 | HOTSPOT_JNI_CALLOBJECTMETHOD_RETURN(_ret_ref)); extern "C" { jobject jni_CallObjectMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1174, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jobject(); return ret;} } | |||
1175 | DEFINE_CALLMETHOD(jint, Int, T_INT,; extern "C" { jint jni_CallIntMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1177, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1176 | HOTSPOT_JNI_CALLINTMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jint jni_CallIntMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1177, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1177 | HOTSPOT_JNI_CALLINTMETHOD_RETURN(_ret_ref)); extern "C" { jint jni_CallIntMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1177, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1178 | DEFINE_CALLMETHOD(jlong, Long, T_LONG; extern "C" { jlong jni_CallLongMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1180, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1179 | , HOTSPOT_JNI_CALLLONGMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jlong jni_CallLongMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1180, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1180 | HOTSPOT_JNI_CALLLONGMETHOD_RETURN(_ret_ref)); extern "C" { jlong jni_CallLongMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1180, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1181 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1182 | DEFINE_CALLMETHOD(jfloat, Float, T_FLOAT; extern "C" { jfloat jni_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1184, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jfloat(); return ret;} } | |||
1183 | , HOTSPOT_JNI_CALLFLOATMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jfloat jni_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1184, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jfloat(); return ret;} } | |||
1184 | HOTSPOT_JNI_CALLFLOATMETHOD_RETURN()); extern "C" { jfloat jni_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1184, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jfloat(); return ret;} } | |||
1185 | DEFINE_CALLMETHOD(jdouble, Double, T_DOUBLE; extern "C" { jdouble jni_CallDoubleMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1187, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jdouble(); return ret;} } | |||
1186 | , HOTSPOT_JNI_CALLDOUBLEMETHOD_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jdouble jni_CallDoubleMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1187, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jdouble(); return ret;} } | |||
1187 | HOTSPOT_JNI_CALLDOUBLEMETHOD_RETURN()); extern "C" { jdouble jni_CallDoubleMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1187, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jdouble(); return ret;} } | |||
1188 | ||||
1189 | #define DEFINE_CALLMETHODV(ResultType, Result, Tag \FP_SELECT_Result(, ); extern "C" { ResultType jni_CallResultMethodV (JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1190, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } | |||
1190 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, ); extern "C" { ResultType jni_CallResultMethodV (JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1190, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1191 | \ | |||
1192 | DT_RETURN_MARK_DECL_FOR(Result, Call##Result##MethodV, ResultType \FP_SELECT_Result(, ) | |||
1193 | , ReturnProbe)FP_SELECT_Result(, ); \extern "C" { ResultType jni_Call##Result##MethodV(JNIEnv *env , jobject obj, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1196, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1194 | \extern "C" { ResultType jni_Call##Result##MethodV(JNIEnv *env , jobject obj, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1196, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1195 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_Call##Result##MethodV(JNIEnv *env , jobject obj, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1196, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1196 | jni_Call##Result##MethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args))extern "C" { ResultType jni_Call##Result##MethodV(JNIEnv *env , jobject obj, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1196, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1197 | \ | |||
1198 | EntryProbe;\ | |||
1199 | ResultType ret = 0;\ | |||
1200 | DT_RETURN_MARK_FOR(Result, Call##Result##MethodV, ResultType, \FP_SELECT_Result(, ) | |||
1201 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1202 | \ | |||
1203 | JavaValue jvalue(Tag); \ | |||
1204 | JNI_ArgumentPusherVaArg ap(methodID, args); \ | |||
1205 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1206 | ret = jvalue.get_##ResultType(); \ | |||
1207 | return ret;\} } | |||
1208 | JNI_END} } | |||
1209 | ||||
1210 | // the runtime type of subword integral basic types is integer | |||
1211 | DEFINE_CALLMETHODV(jboolean, Boolean, T_BOOLEAN; extern "C" { jboolean jni_CallBooleanMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1213, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1212 | , HOTSPOT_JNI_CALLBOOLEANMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jboolean jni_CallBooleanMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1213, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1213 | HOTSPOT_JNI_CALLBOOLEANMETHODV_RETURN(_ret_ref)); extern "C" { jboolean jni_CallBooleanMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1213, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1214 | DEFINE_CALLMETHODV(jbyte, Byte, T_BYTE; extern "C" { jbyte jni_CallByteMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1216, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1215 | , HOTSPOT_JNI_CALLBYTEMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jbyte jni_CallByteMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1216, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1216 | HOTSPOT_JNI_CALLBYTEMETHODV_RETURN(_ret_ref)); extern "C" { jbyte jni_CallByteMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1216, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1217 | DEFINE_CALLMETHODV(jchar, Char, T_CHAR; extern "C" { jchar jni_CallCharMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1219, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1218 | , HOTSPOT_JNI_CALLCHARMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jchar jni_CallCharMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1219, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1219 | HOTSPOT_JNI_CALLCHARMETHODV_RETURN(_ret_ref)); extern "C" { jchar jni_CallCharMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1219, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1220 | DEFINE_CALLMETHODV(jshort, Short, T_SHORT; extern "C" { jshort jni_CallShortMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1222, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1221 | , HOTSPOT_JNI_CALLSHORTMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jshort jni_CallShortMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1222, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1222 | HOTSPOT_JNI_CALLSHORTMETHODV_RETURN(_ret_ref)); extern "C" { jshort jni_CallShortMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1222, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1223 | ||||
1224 | DEFINE_CALLMETHODV(jobject, Object, T_OBJECT; extern "C" { jobject jni_CallObjectMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1226, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1225 | , HOTSPOT_JNI_CALLOBJECTMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jobject jni_CallObjectMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1226, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1226 | HOTSPOT_JNI_CALLOBJECTMETHODV_RETURN(_ret_ref)); extern "C" { jobject jni_CallObjectMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1226, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1227 | DEFINE_CALLMETHODV(jint, Int, T_INT,; extern "C" { jint jni_CallIntMethodV(JNIEnv *env, jobject obj , jmethodID methodID, va_list args) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1229, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1228 | HOTSPOT_JNI_CALLINTMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jint jni_CallIntMethodV(JNIEnv *env, jobject obj , jmethodID methodID, va_list args) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1229, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1229 | HOTSPOT_JNI_CALLINTMETHODV_RETURN(_ret_ref)); extern "C" { jint jni_CallIntMethodV(JNIEnv *env, jobject obj , jmethodID methodID, va_list args) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1229, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1230 | DEFINE_CALLMETHODV(jlong, Long, T_LONG; extern "C" { jlong jni_CallLongMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1232, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1231 | , HOTSPOT_JNI_CALLLONGMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jlong jni_CallLongMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1232, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1232 | HOTSPOT_JNI_CALLLONGMETHODV_RETURN(_ret_ref)); extern "C" { jlong jni_CallLongMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1232, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1233 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1234 | DEFINE_CALLMETHODV(jfloat, Float, T_FLOAT; extern "C" { jfloat jni_CallFloatMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1236, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1235 | , HOTSPOT_JNI_CALLFLOATMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jfloat jni_CallFloatMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1236, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1236 | HOTSPOT_JNI_CALLFLOATMETHODV_RETURN()); extern "C" { jfloat jni_CallFloatMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1236, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1237 | DEFINE_CALLMETHODV(jdouble, Double, T_DOUBLE; extern "C" { jdouble jni_CallDoubleMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1239, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1238 | , HOTSPOT_JNI_CALLDOUBLEMETHODV_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jdouble jni_CallDoubleMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1239, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1239 | HOTSPOT_JNI_CALLDOUBLEMETHODV_RETURN()); extern "C" { jdouble jni_CallDoubleMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1239, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1240 | ||||
1241 | #define DEFINE_CALLMETHODA(ResultType, Result, Tag \FP_SELECT_Result(, ); extern "C" { ResultType jni_CallResultMethodA (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1242, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherArray ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } | |||
1242 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, ); extern "C" { ResultType jni_CallResultMethodA (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1242, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherArray ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1243 | \ | |||
1244 | DT_RETURN_MARK_DECL_FOR(Result, Call##Result##MethodA, ResultType \FP_SELECT_Result(, ) | |||
1245 | , ReturnProbe)FP_SELECT_Result(, ); \extern "C" { ResultType jni_Call##Result##MethodA(JNIEnv *env , jobject obj, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1248, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1246 | \extern "C" { ResultType jni_Call##Result##MethodA(JNIEnv *env , jobject obj, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1248, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1247 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_Call##Result##MethodA(JNIEnv *env , jobject obj, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1248, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1248 | jni_Call##Result##MethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args))extern "C" { ResultType jni_Call##Result##MethodA(JNIEnv *env , jobject obj, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1248, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1249 | EntryProbe; \ | |||
1250 | ResultType ret = 0;\ | |||
1251 | DT_RETURN_MARK_FOR(Result, Call##Result##MethodA, ResultType, \FP_SELECT_Result(, ) | |||
1252 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1253 | \ | |||
1254 | JavaValue jvalue(Tag); \ | |||
1255 | JNI_ArgumentPusherArray ap(methodID, args); \ | |||
1256 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1257 | ret = jvalue.get_##ResultType(); \ | |||
1258 | return ret;\} } | |||
1259 | JNI_END} } | |||
1260 | ||||
1261 | // the runtime type of subword integral basic types is integer | |||
1262 | DEFINE_CALLMETHODA(jboolean, Boolean, T_BOOLEAN; extern "C" { jboolean jni_CallBooleanMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1264, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1263 | , HOTSPOT_JNI_CALLBOOLEANMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jboolean jni_CallBooleanMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1264, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1264 | HOTSPOT_JNI_CALLBOOLEANMETHODA_RETURN(_ret_ref)); extern "C" { jboolean jni_CallBooleanMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1264, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1265 | DEFINE_CALLMETHODA(jbyte, Byte, T_BYTE; extern "C" { jbyte jni_CallByteMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1267, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1266 | , HOTSPOT_JNI_CALLBYTEMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jbyte jni_CallByteMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1267, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1267 | HOTSPOT_JNI_CALLBYTEMETHODA_RETURN(_ret_ref)); extern "C" { jbyte jni_CallByteMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1267, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1268 | DEFINE_CALLMETHODA(jchar, Char, T_CHAR; extern "C" { jchar jni_CallCharMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1270, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1269 | , HOTSPOT_JNI_CALLCHARMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jchar jni_CallCharMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1270, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1270 | HOTSPOT_JNI_CALLCHARMETHODA_RETURN(_ret_ref)); extern "C" { jchar jni_CallCharMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1270, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1271 | DEFINE_CALLMETHODA(jshort, Short, T_SHORT; extern "C" { jshort jni_CallShortMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1273, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1272 | , HOTSPOT_JNI_CALLSHORTMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jshort jni_CallShortMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1273, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1273 | HOTSPOT_JNI_CALLSHORTMETHODA_RETURN(_ret_ref)); extern "C" { jshort jni_CallShortMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1273, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1274 | ||||
1275 | DEFINE_CALLMETHODA(jobject, Object, T_OBJECT; extern "C" { jobject jni_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1277, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1276 | , HOTSPOT_JNI_CALLOBJECTMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jobject jni_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1277, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1277 | HOTSPOT_JNI_CALLOBJECTMETHODA_RETURN(_ret_ref)); extern "C" { jobject jni_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1277, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1278 | DEFINE_CALLMETHODA(jint, Int, T_INT,; extern "C" { jint jni_CallIntMethodA(JNIEnv *env, jobject obj , jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1280, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1279 | HOTSPOT_JNI_CALLINTMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jint jni_CallIntMethodA(JNIEnv *env, jobject obj , jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1280, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1280 | HOTSPOT_JNI_CALLINTMETHODA_RETURN(_ret_ref)); extern "C" { jint jni_CallIntMethodA(JNIEnv *env, jobject obj , jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1280, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1281 | DEFINE_CALLMETHODA(jlong, Long, T_LONG; extern "C" { jlong jni_CallLongMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1283, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1282 | , HOTSPOT_JNI_CALLLONGMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jlong jni_CallLongMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1283, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1283 | HOTSPOT_JNI_CALLLONGMETHODA_RETURN(_ret_ref)); extern "C" { jlong jni_CallLongMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1283, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_VIRTUAL, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1284 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1285 | DEFINE_CALLMETHODA(jfloat, Float, T_FLOAT; extern "C" { jfloat jni_CallFloatMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1287, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1286 | , HOTSPOT_JNI_CALLFLOATMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jfloat jni_CallFloatMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1287, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1287 | HOTSPOT_JNI_CALLFLOATMETHODA_RETURN()); extern "C" { jfloat jni_CallFloatMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1287, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1288 | DEFINE_CALLMETHODA(jdouble, Double, T_DOUBLE; extern "C" { jdouble jni_CallDoubleMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1290, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1289 | , HOTSPOT_JNI_CALLDOUBLEMETHODA_ENTRY(env, obj, (uintptr_t)methodID),; extern "C" { jdouble jni_CallDoubleMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1290, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1290 | HOTSPOT_JNI_CALLDOUBLEMETHODA_RETURN()); extern "C" { jdouble jni_CallDoubleMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1290, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1291 | ||||
1292 | DT_VOID_RETURN_MARK_DECL(CallVoidMethod, HOTSPOT_JNI_CALLVOIDMETHOD_RETURN()); | |||
1293 | DT_VOID_RETURN_MARK_DECL(CallVoidMethodV, HOTSPOT_JNI_CALLVOIDMETHODV_RETURN()); | |||
1294 | DT_VOID_RETURN_MARK_DECL(CallVoidMethodA, HOTSPOT_JNI_CALLVOIDMETHODA_RETURN()); | |||
1295 | ||||
1296 | ||||
1297 | JNI_ENTRY(void, jni_CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...))extern "C" { void jni_CallVoidMethod(JNIEnv *env, jobject obj , jmethodID methodID, ...) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1297, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1298 | HOTSPOT_JNI_CALLVOIDMETHOD_ENTRY(env, obj, (uintptr_t) methodID); | |||
1299 | DT_VOID_RETURN_MARK(CallVoidMethod); | |||
1300 | ||||
1301 | va_list args; | |||
1302 | va_start(args, methodID)__builtin_va_start(args, methodID); | |||
1303 | JavaValue jvalue(T_VOID); | |||
1304 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1305 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1306 | va_end(args)__builtin_va_end(args); | |||
1307 | JNI_END} } | |||
1308 | ||||
1309 | ||||
1310 | JNI_ENTRY(void, jni_CallVoidMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args))extern "C" { void jni_CallVoidMethodV(JNIEnv *env, jobject obj , jmethodID methodID, va_list args) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1310, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1311 | HOTSPOT_JNI_CALLVOIDMETHODV_ENTRY(env, obj, (uintptr_t) methodID); | |||
1312 | DT_VOID_RETURN_MARK(CallVoidMethodV); | |||
1313 | ||||
1314 | JavaValue jvalue(T_VOID); | |||
1315 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1316 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1317 | JNI_END} } | |||
1318 | ||||
1319 | ||||
1320 | JNI_ENTRY(void, jni_CallVoidMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args))extern "C" { void jni_CallVoidMethodA(JNIEnv *env, jobject obj , jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1320, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1321 | HOTSPOT_JNI_CALLVOIDMETHODA_ENTRY(env, obj, (uintptr_t) methodID); | |||
1322 | DT_VOID_RETURN_MARK(CallVoidMethodA); | |||
1323 | ||||
1324 | JavaValue jvalue(T_VOID); | |||
1325 | JNI_ArgumentPusherArray ap(methodID, args); | |||
1326 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1327 | JNI_END} } | |||
1328 | ||||
1329 | ||||
1330 | ||||
1331 | #define DEFINE_CALLNONVIRTUALMETHOD(ResultType, Result, Tag \FP_SELECT_Result(, );extern "C" { ResultType jni_CallNonvirtualResultMethod (JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ... ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1332, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret; FP_SELECT_Result( , ); va_list args; __builtin_va_start(args, methodID); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue .get_ResultType(); return ret;} } | |||
1332 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, );extern "C" { ResultType jni_CallNonvirtualResultMethod (JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ... ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1332, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret; FP_SELECT_Result( , ); va_list args; __builtin_va_start(args, methodID); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1333 | \ | |||
1334 | DT_RETURN_MARK_DECL_FOR(Result, CallNonvirtual##Result##Method, ResultType \FP_SELECT_Result(, ) | |||
1335 | , ReturnProbe)FP_SELECT_Result(, );\extern "C" { ResultType jni_CallNonvirtual##Result##Method(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1338, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1336 | \extern "C" { ResultType jni_CallNonvirtual##Result##Method(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1338, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1337 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_CallNonvirtual##Result##Method(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1338, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1338 | jni_CallNonvirtual##Result##Method(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...))extern "C" { ResultType jni_CallNonvirtual##Result##Method(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1338, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1339 | \ | |||
1340 | EntryProbe;\ | |||
1341 | ResultType ret;\ | |||
1342 | DT_RETURN_MARK_FOR(Result, CallNonvirtual##Result##Method, ResultType, \FP_SELECT_Result(, ) | |||
1343 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1344 | \ | |||
1345 | va_list args; \ | |||
1346 | va_start(args, methodID)__builtin_va_start(args, methodID); \ | |||
1347 | JavaValue jvalue(Tag); \ | |||
1348 | JNI_ArgumentPusherVaArg ap(methodID, args); \ | |||
1349 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1350 | va_end(args)__builtin_va_end(args); \ | |||
1351 | ret = jvalue.get_##ResultType(); \ | |||
1352 | return ret;\} } | |||
1353 | JNI_END} } | |||
1354 | ||||
1355 | // the runtime type of subword integral basic types is integer | |||
1356 | DEFINE_CALLNONVIRTUALMETHOD(jboolean, Boolean, T_BOOLEAN;extern "C" { jboolean jni_CallNonvirtualBooleanMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1358, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jboolean (); return ret;} } | |||
1357 | , HOTSPOT_JNI_CALLNONVIRTUALBOOLEANMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jboolean jni_CallNonvirtualBooleanMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1358, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jboolean (); return ret;} } | |||
1358 | HOTSPOT_JNI_CALLNONVIRTUALBOOLEANMETHOD_RETURN(_ret_ref));extern "C" { jboolean jni_CallNonvirtualBooleanMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1358, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jboolean (); return ret;} } | |||
1359 | DEFINE_CALLNONVIRTUALMETHOD(jbyte, Byte, T_BYTE;extern "C" { jbyte jni_CallNonvirtualByteMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1361, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jbyte (); return ret;} } | |||
1360 | , HOTSPOT_JNI_CALLNONVIRTUALBYTEMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jbyte jni_CallNonvirtualByteMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1361, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jbyte (); return ret;} } | |||
1361 | HOTSPOT_JNI_CALLNONVIRTUALBYTEMETHOD_RETURN(_ret_ref));extern "C" { jbyte jni_CallNonvirtualByteMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1361, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jbyte (); return ret;} } | |||
1362 | DEFINE_CALLNONVIRTUALMETHOD(jchar, Char, T_CHAR;extern "C" { jchar jni_CallNonvirtualCharMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1364, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jchar (); return ret;} } | |||
1363 | , HOTSPOT_JNI_CALLNONVIRTUALCHARMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jchar jni_CallNonvirtualCharMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1364, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jchar (); return ret;} } | |||
1364 | HOTSPOT_JNI_CALLNONVIRTUALCHARMETHOD_RETURN(_ret_ref));extern "C" { jchar jni_CallNonvirtualCharMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1364, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jchar (); return ret;} } | |||
1365 | DEFINE_CALLNONVIRTUALMETHOD(jshort, Short, T_SHORT;extern "C" { jshort jni_CallNonvirtualShortMethod(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1367, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jshort (); return ret;} } | |||
1366 | , HOTSPOT_JNI_CALLNONVIRTUALSHORTMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jshort jni_CallNonvirtualShortMethod(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1367, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jshort (); return ret;} } | |||
1367 | HOTSPOT_JNI_CALLNONVIRTUALSHORTMETHOD_RETURN(_ret_ref));extern "C" { jshort jni_CallNonvirtualShortMethod(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1367, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jshort (); return ret;} } | |||
1368 | ||||
1369 | DEFINE_CALLNONVIRTUALMETHOD(jobject, Object, T_OBJECT;extern "C" { jobject jni_CallNonvirtualObjectMethod(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1371, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jobject (); return ret;} } | |||
1370 | , HOTSPOT_JNI_CALLNONVIRTUALOBJECTMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jobject jni_CallNonvirtualObjectMethod(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1371, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jobject (); return ret;} } | |||
1371 | HOTSPOT_JNI_CALLNONVIRTUALOBJECTMETHOD_RETURN(_ret_ref));extern "C" { jobject jni_CallNonvirtualObjectMethod(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1371, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jobject (); return ret;} } | |||
1372 | DEFINE_CALLNONVIRTUALMETHOD(jint, Int, T_INT;extern "C" { jint jni_CallNonvirtualIntMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1374, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jint( ); return ret;} } | |||
1373 | , HOTSPOT_JNI_CALLNONVIRTUALINTMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jint jni_CallNonvirtualIntMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1374, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jint( ); return ret;} } | |||
1374 | HOTSPOT_JNI_CALLNONVIRTUALINTMETHOD_RETURN(_ret_ref));extern "C" { jint jni_CallNonvirtualIntMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1374, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jint( ); return ret;} } | |||
1375 | DEFINE_CALLNONVIRTUALMETHOD(jlong, Long, T_LONG;extern "C" { jlong jni_CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1378, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jlong (); return ret;} } | |||
1376 | , HOTSPOT_JNI_CALLNONVIRTUALLONGMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jlong jni_CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1378, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jlong (); return ret;} } | |||
1377 | // Float and double probes don't return value because dtrace doesn't currently support it;extern "C" { jlong jni_CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1378, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jlong (); return ret;} } | |||
1378 | HOTSPOT_JNI_CALLNONVIRTUALLONGMETHOD_RETURN(_ret_ref));extern "C" { jlong jni_CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1378, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jlong (); return ret;} } | |||
1379 | DEFINE_CALLNONVIRTUALMETHOD(jfloat, Float, T_FLOAT;extern "C" { jfloat jni_CallNonvirtualFloatMethod(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1381, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jfloat (); return ret;} } | |||
1380 | , HOTSPOT_JNI_CALLNONVIRTUALFLOATMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jfloat jni_CallNonvirtualFloatMethod(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1381, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jfloat (); return ret;} } | |||
1381 | HOTSPOT_JNI_CALLNONVIRTUALFLOATMETHOD_RETURN());extern "C" { jfloat jni_CallNonvirtualFloatMethod(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1381, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jfloat (); return ret;} } | |||
1382 | DEFINE_CALLNONVIRTUALMETHOD(jdouble, Double, T_DOUBLE;extern "C" { jdouble jni_CallNonvirtualDoubleMethod(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1384, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jdouble (); return ret;} } | |||
1383 | , HOTSPOT_JNI_CALLNONVIRTUALDOUBLEMETHOD_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jdouble jni_CallNonvirtualDoubleMethod(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1384, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jdouble (); return ret;} } | |||
1384 | HOTSPOT_JNI_CALLNONVIRTUALDOUBLEMETHOD_RETURN());extern "C" { jdouble jni_CallNonvirtualDoubleMethod(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1384, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jdouble (); return ret;} } | |||
1385 | ||||
1386 | #define DEFINE_CALLNONVIRTUALMETHODV(ResultType, Result, Tag \FP_SELECT_Result(, );extern "C" { ResultType jni_CallNonvirtualResultMethodV (JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1387, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret; FP_SELECT_Result( , ); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } | |||
1387 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, );extern "C" { ResultType jni_CallNonvirtualResultMethodV (JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1387, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret; FP_SELECT_Result( , ); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1388 | \ | |||
1389 | DT_RETURN_MARK_DECL_FOR(Result, CallNonvirtual##Result##MethodV, ResultType \FP_SELECT_Result(, ) | |||
1390 | , ReturnProbe)FP_SELECT_Result(, );\extern "C" { ResultType jni_CallNonvirtual##Result##MethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1393, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1391 | \extern "C" { ResultType jni_CallNonvirtual##Result##MethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1393, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1392 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_CallNonvirtual##Result##MethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1393, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1393 | jni_CallNonvirtual##Result##MethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args))extern "C" { ResultType jni_CallNonvirtual##Result##MethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1393, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1394 | \ | |||
1395 | EntryProbe;\ | |||
1396 | ResultType ret;\ | |||
1397 | DT_RETURN_MARK_FOR(Result, CallNonvirtual##Result##MethodV, ResultType, \FP_SELECT_Result(, ) | |||
1398 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1399 | \ | |||
1400 | JavaValue jvalue(Tag); \ | |||
1401 | JNI_ArgumentPusherVaArg ap(methodID, args); \ | |||
1402 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1403 | ret = jvalue.get_##ResultType(); \ | |||
1404 | return ret;\} } | |||
1405 | JNI_END} } | |||
1406 | ||||
1407 | // the runtime type of subword integral basic types is integer | |||
1408 | DEFINE_CALLNONVIRTUALMETHODV(jboolean, Boolean, T_BOOLEAN;extern "C" { jboolean jni_CallNonvirtualBooleanMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1410, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; JavaValue jvalue(T_BOOLEAN) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1409 | , HOTSPOT_JNI_CALLNONVIRTUALBOOLEANMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jboolean jni_CallNonvirtualBooleanMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1410, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; JavaValue jvalue(T_BOOLEAN) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1410 | HOTSPOT_JNI_CALLNONVIRTUALBOOLEANMETHODV_RETURN(_ret_ref));extern "C" { jboolean jni_CallNonvirtualBooleanMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1410, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; JavaValue jvalue(T_BOOLEAN) ; JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1411 | DEFINE_CALLNONVIRTUALMETHODV(jbyte, Byte, T_BYTE;extern "C" { jbyte jni_CallNonvirtualByteMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1413, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1412 | , HOTSPOT_JNI_CALLNONVIRTUALBYTEMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jbyte jni_CallNonvirtualByteMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1413, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1413 | HOTSPOT_JNI_CALLNONVIRTUALBYTEMETHODV_RETURN(_ret_ref));extern "C" { jbyte jni_CallNonvirtualByteMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1413, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1414 | DEFINE_CALLNONVIRTUALMETHODV(jchar, Char, T_CHAR;extern "C" { jchar jni_CallNonvirtualCharMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1416, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jchar(); return ret;} } | |||
1415 | , HOTSPOT_JNI_CALLNONVIRTUALCHARMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jchar jni_CallNonvirtualCharMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1416, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jchar(); return ret;} } | |||
1416 | HOTSPOT_JNI_CALLNONVIRTUALCHARMETHODV_RETURN(_ret_ref));extern "C" { jchar jni_CallNonvirtualCharMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1416, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jchar(); return ret;} } | |||
1417 | DEFINE_CALLNONVIRTUALMETHODV(jshort, Short, T_SHORT;extern "C" { jshort jni_CallNonvirtualShortMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1419, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret;} } | |||
1418 | , HOTSPOT_JNI_CALLNONVIRTUALSHORTMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jshort jni_CallNonvirtualShortMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1419, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret;} } | |||
1419 | HOTSPOT_JNI_CALLNONVIRTUALSHORTMETHODV_RETURN(_ret_ref));extern "C" { jshort jni_CallNonvirtualShortMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1419, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret;} } | |||
1420 | ||||
1421 | DEFINE_CALLNONVIRTUALMETHODV(jobject, Object, T_OBJECT;extern "C" { jobject jni_CallNonvirtualObjectMethodV(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1423, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret;} } | |||
1422 | , HOTSPOT_JNI_CALLNONVIRTUALOBJECTMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jobject jni_CallNonvirtualObjectMethodV(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1423, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret;} } | |||
1423 | HOTSPOT_JNI_CALLNONVIRTUALOBJECTMETHODV_RETURN(_ret_ref));extern "C" { jobject jni_CallNonvirtualObjectMethodV(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1423, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret;} } | |||
1424 | DEFINE_CALLNONVIRTUALMETHODV(jint, Int, T_INT;extern "C" { jint jni_CallNonvirtualIntMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1426, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jint(); return ret;} } | |||
1425 | , HOTSPOT_JNI_CALLNONVIRTUALINTMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jint jni_CallNonvirtualIntMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1426, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jint(); return ret;} } | |||
1426 | HOTSPOT_JNI_CALLNONVIRTUALINTMETHODV_RETURN(_ret_ref));extern "C" { jint jni_CallNonvirtualIntMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1426, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jint(); return ret;} } | |||
1427 | DEFINE_CALLNONVIRTUALMETHODV(jlong, Long, T_LONG;extern "C" { jlong jni_CallNonvirtualLongMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1430, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1428 | , HOTSPOT_JNI_CALLNONVIRTUALLONGMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jlong jni_CallNonvirtualLongMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1430, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1429 | // Float and double probes don't return value because dtrace doesn't currently support it;extern "C" { jlong jni_CallNonvirtualLongMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1430, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1430 | HOTSPOT_JNI_CALLNONVIRTUALLONGMETHODV_RETURN(_ret_ref));extern "C" { jlong jni_CallNonvirtualLongMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1430, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1431 | DEFINE_CALLNONVIRTUALMETHODV(jfloat, Float, T_FLOAT;extern "C" { jfloat jni_CallNonvirtualFloatMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1433, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret;} } | |||
1432 | , HOTSPOT_JNI_CALLNONVIRTUALFLOATMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jfloat jni_CallNonvirtualFloatMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1433, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret;} } | |||
1433 | HOTSPOT_JNI_CALLNONVIRTUALFLOATMETHODV_RETURN());extern "C" { jfloat jni_CallNonvirtualFloatMethodV(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1433, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret;} } | |||
1434 | DEFINE_CALLNONVIRTUALMETHODV(jdouble, Double, T_DOUBLE;extern "C" { jdouble jni_CallNonvirtualDoubleMethodV(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1436, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret;} } | |||
1435 | , HOTSPOT_JNI_CALLNONVIRTUALDOUBLEMETHODV_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jdouble jni_CallNonvirtualDoubleMethodV(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1436, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret;} } | |||
1436 | HOTSPOT_JNI_CALLNONVIRTUALDOUBLEMETHODV_RETURN());extern "C" { jdouble jni_CallNonvirtualDoubleMethodV(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, va_list args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1436, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret;} } | |||
1437 | ||||
1438 | #define DEFINE_CALLNONVIRTUALMETHODA(ResultType, Result, Tag \FP_SELECT_Result(, );extern "C" { ResultType jni_CallNonvirtualResultMethodA (JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1439, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret; FP_SELECT_Result( , ); JavaValue jvalue(Tag); JNI_ArgumentPusherArray ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } | |||
1439 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, );extern "C" { ResultType jni_CallNonvirtualResultMethodA (JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1439, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret; FP_SELECT_Result( , ); JavaValue jvalue(Tag); JNI_ArgumentPusherArray ap(methodID , args); jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1440 | \ | |||
1441 | DT_RETURN_MARK_DECL_FOR(Result, CallNonvirtual##Result##MethodA, ResultType \FP_SELECT_Result(, ) | |||
1442 | , ReturnProbe)FP_SELECT_Result(, );\extern "C" { ResultType jni_CallNonvirtual##Result##MethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1445, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1443 | \extern "C" { ResultType jni_CallNonvirtual##Result##MethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1445, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1444 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_CallNonvirtual##Result##MethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1445, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1445 | jni_CallNonvirtual##Result##MethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args))extern "C" { ResultType jni_CallNonvirtual##Result##MethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1445, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1446 | \ | |||
1447 | EntryProbe;\ | |||
1448 | ResultType ret;\ | |||
1449 | DT_RETURN_MARK_FOR(Result, CallNonvirtual##Result##MethodA, ResultType, \FP_SELECT_Result(, ) | |||
1450 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1451 | \ | |||
1452 | JavaValue jvalue(Tag); \ | |||
1453 | JNI_ArgumentPusherArray ap(methodID, args); \ | |||
1454 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1455 | ret = jvalue.get_##ResultType(); \ | |||
1456 | return ret;\} } | |||
1457 | JNI_END} } | |||
1458 | ||||
1459 | // the runtime type of subword integral basic types is integer | |||
1460 | DEFINE_CALLNONVIRTUALMETHODA(jboolean, Boolean, T_BOOLEAN;extern "C" { jboolean jni_CallNonvirtualBooleanMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1462, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; JavaValue jvalue(T_BOOLEAN) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1461 | , HOTSPOT_JNI_CALLNONVIRTUALBOOLEANMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jboolean jni_CallNonvirtualBooleanMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1462, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; JavaValue jvalue(T_BOOLEAN) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1462 | HOTSPOT_JNI_CALLNONVIRTUALBOOLEANMETHODA_RETURN(_ret_ref));extern "C" { jboolean jni_CallNonvirtualBooleanMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1462, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret; ; JavaValue jvalue(T_BOOLEAN) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic (env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1463 | DEFINE_CALLNONVIRTUALMETHODA(jbyte, Byte, T_BYTE;extern "C" { jbyte jni_CallNonvirtualByteMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1465, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1464 | , HOTSPOT_JNI_CALLNONVIRTUALBYTEMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jbyte jni_CallNonvirtualByteMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1465, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1465 | HOTSPOT_JNI_CALLNONVIRTUALBYTEMETHODA_RETURN(_ret_ref));extern "C" { jbyte jni_CallNonvirtualByteMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1465, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1466 | DEFINE_CALLNONVIRTUALMETHODA(jchar, Char, T_CHAR;extern "C" { jchar jni_CallNonvirtualCharMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1468, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jchar(); return ret;} } | |||
1467 | , HOTSPOT_JNI_CALLNONVIRTUALCHARMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jchar jni_CallNonvirtualCharMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1468, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jchar(); return ret;} } | |||
1468 | HOTSPOT_JNI_CALLNONVIRTUALCHARMETHODA_RETURN(_ret_ref));extern "C" { jchar jni_CallNonvirtualCharMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1468, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jchar(); return ret;} } | |||
1469 | DEFINE_CALLNONVIRTUALMETHODA(jshort, Short, T_SHORT;extern "C" { jshort jni_CallNonvirtualShortMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; JavaValue jvalue(T_SHORT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret;} } | |||
1470 | , HOTSPOT_JNI_CALLNONVIRTUALSHORTMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jshort jni_CallNonvirtualShortMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; JavaValue jvalue(T_SHORT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret;} } | |||
1471 | HOTSPOT_JNI_CALLNONVIRTUALSHORTMETHODA_RETURN(_ret_ref));extern "C" { jshort jni_CallNonvirtualShortMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret; ; JavaValue jvalue(T_SHORT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret;} } | |||
1472 | ||||
1473 | DEFINE_CALLNONVIRTUALMETHODA(jobject, Object, T_OBJECT;extern "C" { jobject jni_CallNonvirtualObjectMethodA(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1475, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret;} } | |||
1474 | , HOTSPOT_JNI_CALLNONVIRTUALOBJECTMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jobject jni_CallNonvirtualObjectMethodA(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1475, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret;} } | |||
1475 | HOTSPOT_JNI_CALLNONVIRTUALOBJECTMETHODA_RETURN(_ret_ref));extern "C" { jobject jni_CallNonvirtualObjectMethodA(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1475, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret; ; JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret;} } | |||
1476 | DEFINE_CALLNONVIRTUALMETHODA(jint, Int, T_INT;extern "C" { jint jni_CallNonvirtualIntMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1478, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jint(); return ret;} } | |||
1477 | , HOTSPOT_JNI_CALLNONVIRTUALINTMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jint jni_CallNonvirtualIntMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1478, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jint(); return ret;} } | |||
1478 | HOTSPOT_JNI_CALLNONVIRTUALINTMETHODA_RETURN(_ret_ref));extern "C" { jint jni_CallNonvirtualIntMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1478, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jint(); return ret;} } | |||
1479 | DEFINE_CALLNONVIRTUALMETHODA(jlong, Long, T_LONG;extern "C" { jlong jni_CallNonvirtualLongMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1482, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1480 | , HOTSPOT_JNI_CALLNONVIRTUALLONGMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jlong jni_CallNonvirtualLongMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1482, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1481 | // Float and double probes don't return value because dtrace doesn't currently support it;extern "C" { jlong jni_CallNonvirtualLongMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1482, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1482 | HOTSPOT_JNI_CALLNONVIRTUALLONGMETHODA_RETURN(_ret_ref));extern "C" { jlong jni_CallNonvirtualLongMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1482, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jlong(); return ret;} } | |||
1483 | DEFINE_CALLNONVIRTUALMETHODA(jfloat, Float, T_FLOAT;extern "C" { jfloat jni_CallNonvirtualFloatMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1485, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret;} } | |||
| ||||
1484 | , HOTSPOT_JNI_CALLNONVIRTUALFLOATMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jfloat jni_CallNonvirtualFloatMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1485, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret;} } | |||
1485 | HOTSPOT_JNI_CALLNONVIRTUALFLOATMETHODA_RETURN());extern "C" { jfloat jni_CallNonvirtualFloatMethodA(JNIEnv *env , jobject obj, jclass cls, jmethodID methodID, const jvalue * args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1485, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret; ; JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret;} } | |||
1486 | DEFINE_CALLNONVIRTUALMETHODA(jdouble, Double, T_DOUBLE;extern "C" { jdouble jni_CallNonvirtualDoubleMethodA(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1488, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret;} } | |||
1487 | , HOTSPOT_JNI_CALLNONVIRTUALDOUBLEMETHODA_ENTRY(env, obj, cls, (uintptr_t)methodID),;extern "C" { jdouble jni_CallNonvirtualDoubleMethodA(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1488, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret;} } | |||
1488 | HOTSPOT_JNI_CALLNONVIRTUALDOUBLEMETHODA_RETURN());extern "C" { jdouble jni_CallNonvirtualDoubleMethodA(JNIEnv * env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1488, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret; ; JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_nonstatic(env, &jvalue, obj , JNI_NONVIRTUAL, methodID, &ap, __the_thread__); if (((( ThreadShadow*)__the_thread__)->has_pending_exception())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret;} } | |||
1489 | ||||
1490 | DT_VOID_RETURN_MARK_DECL(CallNonvirtualVoidMethod | |||
1491 | , HOTSPOT_JNI_CALLNONVIRTUALVOIDMETHOD_RETURN()); | |||
1492 | DT_VOID_RETURN_MARK_DECL(CallNonvirtualVoidMethodV | |||
1493 | , HOTSPOT_JNI_CALLNONVIRTUALVOIDMETHODV_RETURN()); | |||
1494 | DT_VOID_RETURN_MARK_DECL(CallNonvirtualVoidMethodA | |||
1495 | , HOTSPOT_JNI_CALLNONVIRTUALVOIDMETHODA_RETURN()); | |||
1496 | ||||
1497 | JNI_ENTRY(void, jni_CallNonvirtualVoidMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...))extern "C" { void jni_CallNonvirtualVoidMethod(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1497, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1498 | HOTSPOT_JNI_CALLNONVIRTUALVOIDMETHOD_ENTRY(env, obj, cls, (uintptr_t) methodID); | |||
1499 | DT_VOID_RETURN_MARK(CallNonvirtualVoidMethod); | |||
1500 | ||||
1501 | va_list args; | |||
1502 | va_start(args, methodID)__builtin_va_start(args, methodID); | |||
1503 | JavaValue jvalue(T_VOID); | |||
1504 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1505 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1506 | va_end(args)__builtin_va_end(args); | |||
1507 | JNI_END} } | |||
1508 | ||||
1509 | ||||
1510 | JNI_ENTRY(void, jni_CallNonvirtualVoidMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args))extern "C" { void jni_CallNonvirtualVoidMethodV(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1510, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1511 | HOTSPOT_JNI_CALLNONVIRTUALVOIDMETHODV_ENTRY( | |||
1512 | env, obj, cls, (uintptr_t) methodID); | |||
1513 | DT_VOID_RETURN_MARK(CallNonvirtualVoidMethodV); | |||
1514 | ||||
1515 | JavaValue jvalue(T_VOID); | |||
1516 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1517 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1518 | JNI_END} } | |||
1519 | ||||
1520 | ||||
1521 | JNI_ENTRY(void, jni_CallNonvirtualVoidMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args))extern "C" { void jni_CallNonvirtualVoidMethodA(JNIEnv *env, jobject obj, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1521, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1522 | HOTSPOT_JNI_CALLNONVIRTUALVOIDMETHODA_ENTRY( | |||
1523 | env, obj, cls, (uintptr_t) methodID); | |||
1524 | DT_VOID_RETURN_MARK(CallNonvirtualVoidMethodA); | |||
1525 | JavaValue jvalue(T_VOID); | |||
1526 | JNI_ArgumentPusherArray ap(methodID, args); | |||
1527 | jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1528 | JNI_END} } | |||
1529 | ||||
1530 | ||||
1531 | ||||
1532 | #define DEFINE_CALLSTATICMETHOD(ResultType, Result, Tag \FP_SELECT_Result(, ); extern "C" { ResultType jni_CallStaticResultMethod (JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1533, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); va_list args; __builtin_va_start(args, methodID); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue .get_ResultType(); return ret;} } | |||
1533 | , EntryProbe, ResultProbe)FP_SELECT_Result(, ); extern "C" { ResultType jni_CallStaticResultMethod (JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1533, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); va_list args; __builtin_va_start(args, methodID); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); __builtin_va_end(args); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1534 | \ | |||
1535 | DT_RETURN_MARK_DECL_FOR(Result, CallStatic##Result##Method, ResultType \FP_SELECT_Result(, ) | |||
1536 | , ResultProbe)FP_SELECT_Result(, ); \extern "C" { ResultType jni_CallStatic##Result##Method(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1539, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1537 | \extern "C" { ResultType jni_CallStatic##Result##Method(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1539, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1538 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_CallStatic##Result##Method(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1539, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1539 | jni_CallStatic##Result##Method(JNIEnv *env, jclass cls, jmethodID methodID, ...))extern "C" { ResultType jni_CallStatic##Result##Method(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1539, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1540 | \ | |||
1541 | EntryProbe; \ | |||
1542 | ResultType ret = 0;\ | |||
1543 | DT_RETURN_MARK_FOR(Result, CallStatic##Result##Method, ResultType, \FP_SELECT_Result(, ) | |||
1544 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1545 | \ | |||
1546 | va_list args; \ | |||
1547 | va_start(args, methodID)__builtin_va_start(args, methodID); \ | |||
1548 | JavaValue jvalue(Tag); \ | |||
1549 | JNI_ArgumentPusherVaArg ap(methodID, args); \ | |||
1550 | jni_invoke_static(env, &jvalue, NULL__null, JNI_STATIC, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1551 | va_end(args)__builtin_va_end(args); \ | |||
1552 | ret = jvalue.get_##ResultType(); \ | |||
1553 | return ret;\} } | |||
1554 | JNI_END} } | |||
1555 | ||||
1556 | // the runtime type of subword integral basic types is integer | |||
1557 | DEFINE_CALLSTATICMETHOD(jboolean, Boolean, T_BOOLEAN; extern "C" { jboolean jni_CallStaticBooleanMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1559, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jboolean(); return ret;} } | |||
1558 | , HOTSPOT_JNI_CALLSTATICBOOLEANMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jboolean jni_CallStaticBooleanMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1559, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jboolean(); return ret;} } | |||
1559 | HOTSPOT_JNI_CALLSTATICBOOLEANMETHOD_RETURN(_ret_ref)); extern "C" { jboolean jni_CallStaticBooleanMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1559, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BOOLEAN); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jboolean(); return ret;} }; | |||
1560 | DEFINE_CALLSTATICMETHOD(jbyte, Byte, T_BYTE; extern "C" { jbyte jni_CallStaticByteMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1562, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1561 | , HOTSPOT_JNI_CALLSTATICBYTEMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jbyte jni_CallStaticByteMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1562, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1562 | HOTSPOT_JNI_CALLSTATICBYTEMETHOD_RETURN(_ret_ref)); extern "C" { jbyte jni_CallStaticByteMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1562, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} }; | |||
1563 | DEFINE_CALLSTATICMETHOD(jchar, Char, T_CHAR; extern "C" { jchar jni_CallStaticCharMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1565, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1564 | , HOTSPOT_JNI_CALLSTATICCHARMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jchar jni_CallStaticCharMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1565, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1565 | HOTSPOT_JNI_CALLSTATICCHARMETHOD_RETURN(_ret_ref)); extern "C" { jchar jni_CallStaticCharMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1565, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} }; | |||
1566 | DEFINE_CALLSTATICMETHOD(jshort, Short, T_SHORT; extern "C" { jshort jni_CallStaticShortMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1568, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jshort(); return ret;} } | |||
1567 | , HOTSPOT_JNI_CALLSTATICSHORTMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jshort jni_CallStaticShortMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1568, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jshort(); return ret;} } | |||
1568 | HOTSPOT_JNI_CALLSTATICSHORTMETHOD_RETURN(_ret_ref)); extern "C" { jshort jni_CallStaticShortMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1568, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_SHORT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jshort(); return ret;} }; | |||
1569 | ||||
1570 | DEFINE_CALLSTATICMETHOD(jobject, Object, T_OBJECT; extern "C" { jobject jni_CallStaticObjectMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1572, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jobject(); return ret;} } | |||
1571 | , HOTSPOT_JNI_CALLSTATICOBJECTMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jobject jni_CallStaticObjectMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1572, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jobject(); return ret;} } | |||
1572 | HOTSPOT_JNI_CALLSTATICOBJECTMETHOD_RETURN(_ret_ref)); extern "C" { jobject jni_CallStaticObjectMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1572, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_OBJECT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jobject(); return ret;} }; | |||
1573 | DEFINE_CALLSTATICMETHOD(jint, Int, T_INT; extern "C" { jint jni_CallStaticIntMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1574 | , HOTSPOT_JNI_CALLSTATICINTMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jint jni_CallStaticIntMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1575 | HOTSPOT_JNI_CALLSTATICINTMETHOD_RETURN(_ret_ref)); extern "C" { jint jni_CallStaticIntMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} }; | |||
1576 | DEFINE_CALLSTATICMETHOD(jlong, Long, T_LONG; extern "C" { jlong jni_CallStaticLongMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1578, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1577 | , HOTSPOT_JNI_CALLSTATICLONGMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jlong jni_CallStaticLongMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1578, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1578 | HOTSPOT_JNI_CALLSTATICLONGMETHOD_RETURN(_ret_ref)); extern "C" { jlong jni_CallStaticLongMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1578, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} }; | |||
1579 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1580 | DEFINE_CALLSTATICMETHOD(jfloat, Float, T_FLOAT; extern "C" { jfloat jni_CallStaticFloatMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1582, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jfloat(); return ret;} } | |||
1581 | , HOTSPOT_JNI_CALLSTATICFLOATMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jfloat jni_CallStaticFloatMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1582, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jfloat(); return ret;} } | |||
1582 | HOTSPOT_JNI_CALLSTATICFLOATMETHOD_RETURN()); extern "C" { jfloat jni_CallStaticFloatMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1582, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_FLOAT); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jfloat(); return ret;} }; | |||
1583 | DEFINE_CALLSTATICMETHOD(jdouble, Double, T_DOUBLE; extern "C" { jdouble jni_CallStaticDoubleMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1585, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jdouble(); return ret;} } | |||
1584 | , HOTSPOT_JNI_CALLSTATICDOUBLEMETHOD_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jdouble jni_CallStaticDoubleMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1585, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jdouble(); return ret;} } | |||
1585 | HOTSPOT_JNI_CALLSTATICDOUBLEMETHOD_RETURN()); extern "C" { jdouble jni_CallStaticDoubleMethod(JNIEnv *env , jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1585, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; va_list args; __builtin_va_start (args, methodID); JavaValue jvalue(T_DOUBLE); JNI_ArgumentPusherVaArg ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jdouble(); return ret;} }; | |||
1586 | ||||
1587 | #define DEFINE_CALLSTATICMETHODV(ResultType, Result, Tag \FP_SELECT_Result(, ); extern "C" { ResultType jni_CallStaticResultMethodV (JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1588, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID , args); Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null (cls)); k->initialize(__the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); __builtin_va_end (args); ret = jvalue.get_ResultType(); return ret;} } | |||
1588 | , EntryProbe, ResultProbe)FP_SELECT_Result(, ); extern "C" { ResultType jni_CallStaticResultMethodV (JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1588, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherVaArg ap(methodID , args); Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null (cls)); k->initialize(__the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); __builtin_va_end (args); ret = jvalue.get_ResultType(); return ret;} } \ | |||
1589 | \ | |||
1590 | DT_RETURN_MARK_DECL_FOR(Result, CallStatic##Result##MethodV, ResultType \FP_SELECT_Result(, ) | |||
1591 | , ResultProbe)FP_SELECT_Result(, ); \extern "C" { ResultType jni_CallStatic##Result##MethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1594, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1592 | \extern "C" { ResultType jni_CallStatic##Result##MethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1594, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1593 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_CallStatic##Result##MethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1594, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1594 | jni_CallStatic##Result##MethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args))extern "C" { ResultType jni_CallStatic##Result##MethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1594, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1595 | \ | |||
1596 | EntryProbe; \ | |||
1597 | ResultType ret = 0;\ | |||
1598 | DT_RETURN_MARK_FOR(Result, CallStatic##Result##MethodV, ResultType, \FP_SELECT_Result(, ) | |||
1599 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1600 | \ | |||
1601 | JavaValue jvalue(Tag); \ | |||
1602 | JNI_ArgumentPusherVaArg ap(methodID, args); \ | |||
1603 | /* Make sure class is initialized before trying to invoke its method */ \ | |||
1604 | Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls)); \ | |||
1605 | k->initialize(CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1606 | jni_invoke_static(env, &jvalue, NULL__null, JNI_STATIC, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1607 | va_end(args)__builtin_va_end(args); \ | |||
1608 | ret = jvalue.get_##ResultType(); \ | |||
1609 | return ret;\} } | |||
1610 | JNI_END} } | |||
1611 | ||||
1612 | // the runtime type of subword integral basic types is integer | |||
1613 | DEFINE_CALLSTATICMETHODV(jboolean, Boolean, T_BOOLEAN; extern "C" { jboolean jni_CallStaticBooleanMethodV(JNIEnv * env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1615, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jboolean (); return ret;} } | |||
1614 | , HOTSPOT_JNI_CALLSTATICBOOLEANMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jboolean jni_CallStaticBooleanMethodV(JNIEnv * env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1615, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jboolean (); return ret;} } | |||
1615 | HOTSPOT_JNI_CALLSTATICBOOLEANMETHODV_RETURN(_ret_ref)); extern "C" { jboolean jni_CallStaticBooleanMethodV(JNIEnv * env, jclass cls, jmethodID methodID, va_list args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1615, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jboolean (); return ret;} }; | |||
1616 | DEFINE_CALLSTATICMETHODV(jbyte, Byte, T_BYTE; extern "C" { jbyte jni_CallStaticByteMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1618, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1617 | , HOTSPOT_JNI_CALLSTATICBYTEMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jbyte jni_CallStaticByteMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1618, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} } | |||
1618 | HOTSPOT_JNI_CALLSTATICBYTEMETHODV_RETURN(_ret_ref)); extern "C" { jbyte jni_CallStaticByteMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1618, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jbyte(); return ret;} }; | |||
1619 | DEFINE_CALLSTATICMETHODV(jchar, Char, T_CHAR; extern "C" { jchar jni_CallStaticCharMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1621, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1620 | , HOTSPOT_JNI_CALLSTATICCHARMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jchar jni_CallStaticCharMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1621, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} } | |||
1621 | HOTSPOT_JNI_CALLSTATICCHARMETHODV_RETURN(_ret_ref)); extern "C" { jchar jni_CallStaticCharMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1621, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jchar(); return ret;} }; | |||
1622 | DEFINE_CALLSTATICMETHODV(jshort, Short, T_SHORT; extern "C" { jshort jni_CallStaticShortMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1624, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jshort (); return ret;} } | |||
1623 | , HOTSPOT_JNI_CALLSTATICSHORTMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jshort jni_CallStaticShortMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1624, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jshort (); return ret;} } | |||
1624 | HOTSPOT_JNI_CALLSTATICSHORTMETHODV_RETURN(_ret_ref)); extern "C" { jshort jni_CallStaticShortMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1624, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jshort (); return ret;} }; | |||
1625 | ||||
1626 | DEFINE_CALLSTATICMETHODV(jobject, Object, T_OBJECT; extern "C" { jobject jni_CallStaticObjectMethodV(JNIEnv *env , jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1628, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jobject (); return ret;} } | |||
1627 | , HOTSPOT_JNI_CALLSTATICOBJECTMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jobject jni_CallStaticObjectMethodV(JNIEnv *env , jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1628, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jobject (); return ret;} } | |||
1628 | HOTSPOT_JNI_CALLSTATICOBJECTMETHODV_RETURN(_ret_ref)); extern "C" { jobject jni_CallStaticObjectMethodV(JNIEnv *env , jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1628, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jobject (); return ret;} }; | |||
1629 | DEFINE_CALLSTATICMETHODV(jint, Int, T_INT; extern "C" { jint jni_CallStaticIntMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1631, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1630 | , HOTSPOT_JNI_CALLSTATICINTMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jint jni_CallStaticIntMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1631, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} } | |||
1631 | HOTSPOT_JNI_CALLSTATICINTMETHODV_RETURN(_ret_ref)); extern "C" { jint jni_CallStaticIntMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1631, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jint(); return ret;} }; | |||
1632 | DEFINE_CALLSTATICMETHODV(jlong, Long, T_LONG; extern "C" { jlong jni_CallStaticLongMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1634, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1633 | , HOTSPOT_JNI_CALLSTATICLONGMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jlong jni_CallStaticLongMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1634, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} } | |||
1634 | HOTSPOT_JNI_CALLSTATICLONGMETHODV_RETURN(_ret_ref)); extern "C" { jlong jni_CallStaticLongMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1634, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class::as_Klass(JNIHandles ::resolve_non_null(cls)); k->initialize(__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception( ))) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); __builtin_va_end(args); ret = jvalue.get_jlong(); return ret;} }; | |||
1635 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1636 | DEFINE_CALLSTATICMETHODV(jfloat, Float, T_FLOAT; extern "C" { jfloat jni_CallStaticFloatMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1638, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jfloat (); return ret;} } | |||
1637 | , HOTSPOT_JNI_CALLSTATICFLOATMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jfloat jni_CallStaticFloatMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1638, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jfloat (); return ret;} } | |||
1638 | HOTSPOT_JNI_CALLSTATICFLOATMETHODV_RETURN()); extern "C" { jfloat jni_CallStaticFloatMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1638, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jfloat (); return ret;} }; | |||
1639 | DEFINE_CALLSTATICMETHODV(jdouble, Double, T_DOUBLE; extern "C" { jdouble jni_CallStaticDoubleMethodV(JNIEnv *env , jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1641, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jdouble (); return ret;} } | |||
1640 | , HOTSPOT_JNI_CALLSTATICDOUBLEMETHODV_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jdouble jni_CallStaticDoubleMethodV(JNIEnv *env , jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1641, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jdouble (); return ret;} } | |||
1641 | HOTSPOT_JNI_CALLSTATICDOUBLEMETHODV_RETURN()); extern "C" { jdouble jni_CallStaticDoubleMethodV(JNIEnv *env , jclass cls, jmethodID methodID, va_list args) { JavaThread* thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1641, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherVaArg ap(methodID, args); Klass* k = java_lang_Class ::as_Klass(JNIHandles::resolve_non_null(cls)); k->initialize (__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); jni_invoke_static(env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__); if ( (((ThreadShadow*)__the_thread__)->has_pending_exception()) ) return 0; (void)(0); __builtin_va_end(args); ret = jvalue.get_jdouble (); return ret;} }; | |||
1642 | ||||
1643 | #define DEFINE_CALLSTATICMETHODA(ResultType, Result, Tag \FP_SELECT_Result(, ); extern "C" { ResultType jni_CallStaticResultMethodA (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1644, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherArray ap(methodID , args); jni_invoke_static(env, &jvalue, __null, JNI_STATIC , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } | |||
1644 | , EntryProbe, ResultProbe)FP_SELECT_Result(, ); extern "C" { ResultType jni_CallStaticResultMethodA (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1644, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ResultType ret = 0; FP_SELECT_Result (, ); JavaValue jvalue(Tag); JNI_ArgumentPusherArray ap(methodID , args); jni_invoke_static(env, &jvalue, __null, JNI_STATIC , methodID, &ap, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return 0; (void)(0); ret = jvalue .get_ResultType(); return ret;} } \ | |||
1645 | \ | |||
1646 | DT_RETURN_MARK_DECL_FOR(Result, CallStatic##Result##MethodA, ResultType \FP_SELECT_Result(, ) | |||
1647 | , ResultProbe)FP_SELECT_Result(, ); \extern "C" { ResultType jni_CallStatic##Result##MethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1650, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1648 | \extern "C" { ResultType jni_CallStatic##Result##MethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1650, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1649 | JNI_ENTRY(ResultType, \extern "C" { ResultType jni_CallStatic##Result##MethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1650, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1650 | jni_CallStatic##Result##MethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args))extern "C" { ResultType jni_CallStatic##Result##MethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1650, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
1651 | \ | |||
1652 | EntryProbe; \ | |||
1653 | ResultType ret = 0;\ | |||
1654 | DT_RETURN_MARK_FOR(Result, CallStatic##Result##MethodA, ResultType, \FP_SELECT_Result(, ) | |||
1655 | (const ResultType&)ret)FP_SELECT_Result(, );\ | |||
1656 | \ | |||
1657 | JavaValue jvalue(Tag); \ | |||
1658 | JNI_ArgumentPusherArray ap(methodID, args); \ | |||
1659 | jni_invoke_static(env, &jvalue, NULL__null, JNI_STATIC, methodID, &ap, CHECK_0__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); \ | |||
1660 | ret = jvalue.get_##ResultType(); \ | |||
1661 | return ret;\} } | |||
1662 | JNI_END} } | |||
1663 | ||||
1664 | // the runtime type of subword integral basic types is integer | |||
1665 | DEFINE_CALLSTATICMETHODA(jboolean, Boolean, T_BOOLEAN; extern "C" { jboolean jni_CallStaticBooleanMethodA(JNIEnv * env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1667, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1666 | , HOTSPOT_JNI_CALLSTATICBOOLEANMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jboolean jni_CallStaticBooleanMethodA(JNIEnv * env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1667, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} } | |||
1667 | HOTSPOT_JNI_CALLSTATICBOOLEANMETHODA_RETURN(_ret_ref)); extern "C" { jboolean jni_CallStaticBooleanMethodA(JNIEnv * env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1667, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JavaValue jvalue(T_BOOLEAN ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jboolean(); return ret;} }; | |||
1668 | DEFINE_CALLSTATICMETHODA(jbyte, Byte, T_BYTE; extern "C" { jbyte jni_CallStaticByteMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1670, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1669 | , HOTSPOT_JNI_CALLSTATICBYTEMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jbyte jni_CallStaticByteMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1670, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} } | |||
1670 | HOTSPOT_JNI_CALLSTATICBYTEMETHODA_RETURN(_ret_ref)); extern "C" { jbyte jni_CallStaticByteMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1670, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JavaValue jvalue(T_BYTE); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jbyte(); return ret;} }; | |||
1671 | DEFINE_CALLSTATICMETHODA(jchar, Char, T_CHAR; extern "C" { jchar jni_CallStaticCharMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1673, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1672 | , HOTSPOT_JNI_CALLSTATICCHARMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jchar jni_CallStaticCharMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1673, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} } | |||
1673 | HOTSPOT_JNI_CALLSTATICCHARMETHODA_RETURN(_ret_ref)); extern "C" { jchar jni_CallStaticCharMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1673, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JavaValue jvalue(T_CHAR); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jchar(); return ret;} }; | |||
1674 | DEFINE_CALLSTATICMETHODA(jshort, Short, T_SHORT; extern "C" { jshort jni_CallStaticShortMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1676, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1675 | , HOTSPOT_JNI_CALLSTATICSHORTMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jshort jni_CallStaticShortMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1676, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} } | |||
1676 | HOTSPOT_JNI_CALLSTATICSHORTMETHODA_RETURN(_ret_ref)); extern "C" { jshort jni_CallStaticShortMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1676, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JavaValue jvalue(T_SHORT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jshort(); return ret ;} }; | |||
1677 | ||||
1678 | DEFINE_CALLSTATICMETHODA(jobject, Object, T_OBJECT; extern "C" { jobject jni_CallStaticObjectMethodA(JNIEnv *env , jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1680, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1679 | , HOTSPOT_JNI_CALLSTATICOBJECTMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jobject jni_CallStaticObjectMethodA(JNIEnv *env , jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1680, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} } | |||
1680 | HOTSPOT_JNI_CALLSTATICOBJECTMETHODA_RETURN(_ret_ref)); extern "C" { jobject jni_CallStaticObjectMethodA(JNIEnv *env , jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1680, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jobject ret = 0; ; JavaValue jvalue(T_OBJECT ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jobject(); return ret ;} }; | |||
1681 | DEFINE_CALLSTATICMETHODA(jint, Int, T_INT; extern "C" { jint jni_CallStaticIntMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1683, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1682 | , HOTSPOT_JNI_CALLSTATICINTMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jint jni_CallStaticIntMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1683, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} } | |||
1683 | HOTSPOT_JNI_CALLSTATICINTMETHODA_RETURN(_ret_ref)); extern "C" { jint jni_CallStaticIntMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1683, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JavaValue jvalue(T_INT); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jint(); return ret;} }; | |||
1684 | DEFINE_CALLSTATICMETHODA(jlong, Long, T_LONG; extern "C" { jlong jni_CallStaticLongMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1686, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1685 | , HOTSPOT_JNI_CALLSTATICLONGMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jlong jni_CallStaticLongMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1686, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} } | |||
1686 | HOTSPOT_JNI_CALLSTATICLONGMETHODA_RETURN(_ret_ref)); extern "C" { jlong jni_CallStaticLongMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1686, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JavaValue jvalue(T_LONG); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static(env, &jvalue, __null , JNI_STATIC, methodID, &ap, __the_thread__); if ((((ThreadShadow *)__the_thread__)->has_pending_exception())) return 0; (void )(0); ret = jvalue.get_jlong(); return ret;} }; | |||
1687 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1688 | DEFINE_CALLSTATICMETHODA(jfloat, Float, T_FLOAT; extern "C" { jfloat jni_CallStaticFloatMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1690, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1689 | , HOTSPOT_JNI_CALLSTATICFLOATMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jfloat jni_CallStaticFloatMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1690, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} } | |||
1690 | HOTSPOT_JNI_CALLSTATICFLOATMETHODA_RETURN()); extern "C" { jfloat jni_CallStaticFloatMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1690, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JavaValue jvalue(T_FLOAT) ; JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jfloat(); return ret ;} }; | |||
1691 | DEFINE_CALLSTATICMETHODA(jdouble, Double, T_DOUBLE; extern "C" { jdouble jni_CallStaticDoubleMethodA(JNIEnv *env , jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1693, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1692 | , HOTSPOT_JNI_CALLSTATICDOUBLEMETHODA_ENTRY(env, cls, (uintptr_t)methodID),; extern "C" { jdouble jni_CallStaticDoubleMethodA(JNIEnv *env , jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1693, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} } | |||
1693 | HOTSPOT_JNI_CALLSTATICDOUBLEMETHODA_RETURN()); extern "C" { jdouble jni_CallStaticDoubleMethodA(JNIEnv *env , jclass cls, jmethodID methodID, const jvalue *args) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1693, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JavaValue jvalue(T_DOUBLE ); JNI_ArgumentPusherArray ap(methodID, args); jni_invoke_static (env, &jvalue, __null, JNI_STATIC, methodID, &ap, __the_thread__ ); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return 0; (void)(0); ret = jvalue.get_jdouble(); return ret ;} }; | |||
1694 | ||||
1695 | DT_VOID_RETURN_MARK_DECL(CallStaticVoidMethod | |||
1696 | , HOTSPOT_JNI_CALLSTATICVOIDMETHOD_RETURN()); | |||
1697 | DT_VOID_RETURN_MARK_DECL(CallStaticVoidMethodV | |||
1698 | , HOTSPOT_JNI_CALLSTATICVOIDMETHODV_RETURN()); | |||
1699 | DT_VOID_RETURN_MARK_DECL(CallStaticVoidMethodA | |||
1700 | , HOTSPOT_JNI_CALLSTATICVOIDMETHODA_RETURN()); | |||
1701 | ||||
1702 | JNI_ENTRY(void, jni_CallStaticVoidMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...))extern "C" { void jni_CallStaticVoidMethod(JNIEnv *env, jclass cls, jmethodID methodID, ...) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1702, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1703 | HOTSPOT_JNI_CALLSTATICVOIDMETHOD_ENTRY(env, cls, (uintptr_t) methodID); | |||
1704 | DT_VOID_RETURN_MARK(CallStaticVoidMethod); | |||
1705 | ||||
1706 | va_list args; | |||
1707 | va_start(args, methodID)__builtin_va_start(args, methodID); | |||
1708 | JavaValue jvalue(T_VOID); | |||
1709 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1710 | jni_invoke_static(env, &jvalue, NULL__null, JNI_STATIC, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1711 | va_end(args)__builtin_va_end(args); | |||
1712 | JNI_END} } | |||
1713 | ||||
1714 | ||||
1715 | JNI_ENTRY(void, jni_CallStaticVoidMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args))extern "C" { void jni_CallStaticVoidMethodV(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1715, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1716 | HOTSPOT_JNI_CALLSTATICVOIDMETHODV_ENTRY(env, cls, (uintptr_t) methodID); | |||
1717 | DT_VOID_RETURN_MARK(CallStaticVoidMethodV); | |||
1718 | ||||
1719 | JavaValue jvalue(T_VOID); | |||
1720 | JNI_ArgumentPusherVaArg ap(methodID, args); | |||
1721 | jni_invoke_static(env, &jvalue, NULL__null, JNI_STATIC, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1722 | JNI_END} } | |||
1723 | ||||
1724 | ||||
1725 | JNI_ENTRY(void, jni_CallStaticVoidMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args))extern "C" { void jni_CallStaticVoidMethodA(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue *args) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1725, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1726 | HOTSPOT_JNI_CALLSTATICVOIDMETHODA_ENTRY(env, cls, (uintptr_t) methodID); | |||
1727 | DT_VOID_RETURN_MARK(CallStaticVoidMethodA); | |||
1728 | ||||
1729 | JavaValue jvalue(T_VOID); | |||
1730 | JNI_ArgumentPusherArray ap(methodID, args); | |||
1731 | jni_invoke_static(env, &jvalue, NULL__null, JNI_STATIC, methodID, &ap, CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); | |||
1732 | JNI_END} } | |||
1733 | ||||
1734 | ||||
1735 | // | |||
1736 | // Accessing Fields | |||
1737 | // | |||
1738 | ||||
1739 | ||||
1740 | DT_RETURN_MARK_DECL(GetFieldID, jfieldID | |||
1741 | , HOTSPOT_JNI_GETFIELDID_RETURN((uintptr_t)_ret_ref)); | |||
1742 | ||||
1743 | JNI_ENTRY(jfieldID, jni_GetFieldID(JNIEnv *env, jclass clazz,extern "C" { jfieldID jni_GetFieldID(JNIEnv *env, jclass clazz , const char *name, const char *sig) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1744, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1744 | const char *name, const char *sig))extern "C" { jfieldID jni_GetFieldID(JNIEnv *env, jclass clazz , const char *name, const char *sig) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1744, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1745 | HOTSPOT_JNI_GETFIELDID_ENTRY(env, clazz, (char *) name, (char *) sig); | |||
1746 | jfieldID ret = 0; | |||
1747 | DT_RETURN_MARK(GetFieldID, jfieldID, (const jfieldID&)ret); | |||
1748 | ||||
1749 | Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(clazz)); | |||
1750 | ||||
1751 | // The class should have been loaded (we have an instance of the class | |||
1752 | // passed in) so the field and signature should already be in the symbol | |||
1753 | // table. If they're not there, the field doesn't exist. | |||
1754 | TempNewSymbol fieldname = SymbolTable::probe(name, (int)strlen(name)); | |||
1755 | TempNewSymbol signame = SymbolTable::probe(sig, (int)strlen(sig)); | |||
1756 | if (fieldname == NULL__null || signame == NULL__null) { | |||
1757 | ResourceMark rm; | |||
1758 | THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), err_msg("%s.%s %s", k->external_name(), name, sig)){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1758, vmSymbols::java_lang_NoSuchFieldError(), err_msg("%s.%s %s" , k->external_name(), name, sig)); return 0; }; | |||
1759 | } | |||
1760 | ||||
1761 | // Make sure class is initialized before handing id's out to fields | |||
1762 | k->initialize(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1763 | ||||
1764 | fieldDescriptor fd; | |||
1765 | if (!k->is_instance_klass() || | |||
1766 | !InstanceKlass::cast(k)->find_field(fieldname, signame, false, &fd)) { | |||
1767 | ResourceMark rm; | |||
1768 | THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), err_msg("%s.%s %s", k->external_name(), name, sig)){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1768, vmSymbols::java_lang_NoSuchFieldError(), err_msg("%s.%s %s" , k->external_name(), name, sig)); return 0; }; | |||
1769 | } | |||
1770 | ||||
1771 | // A jfieldID for a non-static field is simply the offset of the field within the instanceOop | |||
1772 | // It may also have hash bits for k, if VerifyJNIFields is turned on. | |||
1773 | ret = jfieldIDWorkaround::to_instance_jfieldID(k, fd.offset()); | |||
1774 | return ret; | |||
1775 | JNI_END} } | |||
1776 | ||||
1777 | ||||
1778 | JNI_ENTRY(jobject, jni_GetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID))extern "C" { jobject jni_GetObjectField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1778, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1779 | HOTSPOT_JNI_GETOBJECTFIELD_ENTRY(env, obj, (uintptr_t) fieldID); | |||
1780 | oop o = JNIHandles::resolve_non_null(obj); | |||
1781 | Klass* k = o->klass(); | |||
1782 | int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); | |||
1783 | // Keep JVMTI addition small and only check enabled flag here. | |||
1784 | // jni_GetField_probe() assumes that is okay to create handles. | |||
1785 | if (JvmtiExport::should_post_field_access()) { | |||
1786 | o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false); | |||
1787 | } | |||
1788 | oop loaded_obj = HeapAccess<ON_UNKNOWN_OOP_REF>::oop_load_at(o, offset); | |||
1789 | jobject ret = JNIHandles::make_local(THREAD__the_thread__, loaded_obj); | |||
1790 | HOTSPOT_JNI_GETOBJECTFIELD_RETURN(ret); | |||
1791 | return ret; | |||
1792 | JNI_END} } | |||
1793 | ||||
1794 | ||||
1795 | ||||
1796 | #define DEFINE_GETFIELD(Return,Fieldname,Result \FP_SELECT_Result(, ); extern "C" { Return jni_GetResultField( JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1797, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; Return ret = 0; FP_SELECT_Result(, ); oop o = JNIHandles::resolve_non_null (obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround ::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_access ()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->Fieldname_field(offset); return ret; } } | |||
1797 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, ); extern "C" { Return jni_GetResultField( JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1797, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; Return ret = 0; FP_SELECT_Result(, ); oop o = JNIHandles::resolve_non_null (obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround ::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_access ()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->Fieldname_field(offset); return ret; } } \ | |||
1798 | \ | |||
1799 | DT_RETURN_MARK_DECL_FOR(Result, Get##Result##Field, Return \FP_SELECT_Result(, ) | |||
1800 | , ReturnProbe)FP_SELECT_Result(, ); \extern "C" { Return jni_Get##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1802, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
1801 | \extern "C" { Return jni_Get##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1802, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
1802 | JNI_ENTRY_NO_PRESERVE(Return, jni_Get##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID))extern "C" { Return jni_Get##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1802, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); \ | |||
1803 | \ | |||
1804 | EntryProbe; \ | |||
1805 | Return ret = 0;\ | |||
1806 | DT_RETURN_MARK_FOR(Result, Get##Result##Field, Return, (const Return&)ret)FP_SELECT_Result(, );\ | |||
1807 | \ | |||
1808 | oop o = JNIHandles::resolve_non_null(obj); \ | |||
1809 | Klass* k = o->klass(); \ | |||
1810 | int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); \ | |||
1811 | /* Keep JVMTI addition small and only check enabled flag here. */ \ | |||
1812 | if (JvmtiExport::should_post_field_access()) { \ | |||
1813 | o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false); \ | |||
1814 | } \ | |||
1815 | ret = o->Fieldname##_field(offset); \ | |||
1816 | return ret; \} } | |||
1817 | JNI_END} } | |||
1818 | ||||
1819 | DEFINE_GETFIELD(jboolean, bool, Boolean; extern "C" { jboolean jni_GetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1821, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jboolean ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o-> klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID (k, fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->bool_field(offset); return ret; } } | |||
1820 | , HOTSPOT_JNI_GETBOOLEANFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jboolean jni_GetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1821, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jboolean ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o-> klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID (k, fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->bool_field(offset); return ret; } } | |||
1821 | HOTSPOT_JNI_GETBOOLEANFIELD_RETURN(_ret_ref)); extern "C" { jboolean jni_GetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1821, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jboolean ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o-> klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID (k, fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->bool_field(offset); return ret; } } | |||
1822 | DEFINE_GETFIELD(jbyte, byte, Byte; extern "C" { jbyte jni_GetByteField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1824, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jbyte ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->byte_field(offset); return ret; } } | |||
1823 | , HOTSPOT_JNI_GETBYTEFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jbyte jni_GetByteField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1824, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jbyte ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->byte_field(offset); return ret; } } | |||
1824 | HOTSPOT_JNI_GETBYTEFIELD_RETURN(_ret_ref)); extern "C" { jbyte jni_GetByteField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1824, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jbyte ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->byte_field(offset); return ret; } } | |||
1825 | DEFINE_GETFIELD(jchar, char, Char; extern "C" { jchar jni_GetCharField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1827, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jchar ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->char_field(offset); return ret; } } | |||
1826 | , HOTSPOT_JNI_GETCHARFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jchar jni_GetCharField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1827, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jchar ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->char_field(offset); return ret; } } | |||
1827 | HOTSPOT_JNI_GETCHARFIELD_RETURN(_ret_ref)); extern "C" { jchar jni_GetCharField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1827, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jchar ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->char_field(offset); return ret; } } | |||
1828 | DEFINE_GETFIELD(jshort, short, Short; extern "C" { jshort jni_GetShortField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1830, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jshort ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->short_field(offset); return ret; } } | |||
1829 | , HOTSPOT_JNI_GETSHORTFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jshort jni_GetShortField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1830, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jshort ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->short_field(offset); return ret; } } | |||
1830 | HOTSPOT_JNI_GETSHORTFIELD_RETURN(_ret_ref)); extern "C" { jshort jni_GetShortField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1830, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jshort ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->short_field(offset); return ret; } } | |||
1831 | DEFINE_GETFIELD(jint, int, Int; extern "C" { jint jni_GetIntField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1833, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jint ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->int_field(offset); return ret; } } | |||
1832 | , HOTSPOT_JNI_GETINTFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jint jni_GetIntField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1833, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jint ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->int_field(offset); return ret; } } | |||
1833 | HOTSPOT_JNI_GETINTFIELD_RETURN(_ret_ref)); extern "C" { jint jni_GetIntField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1833, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jint ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->int_field(offset); return ret; } } | |||
1834 | DEFINE_GETFIELD(jlong, long, Long; extern "C" { jlong jni_GetLongField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1836, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jlong ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->long_field(offset); return ret; } } | |||
1835 | , HOTSPOT_JNI_GETLONGFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jlong jni_GetLongField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1836, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jlong ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->long_field(offset); return ret; } } | |||
1836 | HOTSPOT_JNI_GETLONGFIELD_RETURN(_ret_ref)); extern "C" { jlong jni_GetLongField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1836, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jlong ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->long_field(offset); return ret; } } | |||
1837 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1838 | DEFINE_GETFIELD(jfloat, float, Float; extern "C" { jfloat jni_GetFloatField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1840, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jfloat ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->float_field(offset); return ret; } } | |||
1839 | , HOTSPOT_JNI_GETFLOATFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jfloat jni_GetFloatField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1840, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jfloat ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->float_field(offset); return ret; } } | |||
1840 | HOTSPOT_JNI_GETFLOATFIELD_RETURN()); extern "C" { jfloat jni_GetFloatField(JNIEnv *env, jobject obj , jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1840, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jfloat ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o->klass (); int offset = jfieldIDWorkaround::from_instance_jfieldID(k , fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false ); } ret = o->float_field(offset); return ret; } } | |||
1841 | DEFINE_GETFIELD(jdouble, double, Double; extern "C" { jdouble jni_GetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1843, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jdouble ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o-> klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID (k, fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->double_field(offset); return ret; } } | |||
1842 | , HOTSPOT_JNI_GETDOUBLEFIELD_ENTRY(env, obj, (uintptr_t)fieldID),; extern "C" { jdouble jni_GetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1843, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jdouble ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o-> klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID (k, fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->double_field(offset); return ret; } } | |||
1843 | HOTSPOT_JNI_GETDOUBLEFIELD_RETURN()); extern "C" { jdouble jni_GetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1843, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; jdouble ret = 0; ; oop o = JNIHandles::resolve_non_null(obj); Klass* k = o-> klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID (k, fieldID); if (JvmtiExport::should_post_field_access()) { o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID , false); } ret = o->double_field(offset); return ret; } } | |||
1844 | ||||
1845 | address jni_GetBooleanField_addr() { | |||
1846 | return (address)jni_GetBooleanField; | |||
1847 | } | |||
1848 | address jni_GetByteField_addr() { | |||
1849 | return (address)jni_GetByteField; | |||
1850 | } | |||
1851 | address jni_GetCharField_addr() { | |||
1852 | return (address)jni_GetCharField; | |||
1853 | } | |||
1854 | address jni_GetShortField_addr() { | |||
1855 | return (address)jni_GetShortField; | |||
1856 | } | |||
1857 | address jni_GetIntField_addr() { | |||
1858 | return (address)jni_GetIntField; | |||
1859 | } | |||
1860 | address jni_GetLongField_addr() { | |||
1861 | return (address)jni_GetLongField; | |||
1862 | } | |||
1863 | address jni_GetFloatField_addr() { | |||
1864 | return (address)jni_GetFloatField; | |||
1865 | } | |||
1866 | address jni_GetDoubleField_addr() { | |||
1867 | return (address)jni_GetDoubleField; | |||
1868 | } | |||
1869 | ||||
1870 | JNI_ENTRY_NO_PRESERVE(void, jni_SetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID, jobject value))extern "C" { void jni_SetObjectField(JNIEnv *env, jobject obj , jfieldID fieldID, jobject value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1870, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
1871 | HOTSPOT_JNI_SETOBJECTFIELD_ENTRY(env, obj, (uintptr_t) fieldID, value); | |||
1872 | oop o = JNIHandles::resolve_non_null(obj); | |||
1873 | Klass* k = o->klass(); | |||
1874 | int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); | |||
1875 | // Keep JVMTI addition small and only check enabled flag here. | |||
1876 | if (JvmtiExport::should_post_field_modification()) { | |||
1877 | jvalue field_value; | |||
1878 | field_value.l = value; | |||
1879 | o = JvmtiExport::jni_SetField_probe(thread, obj, o, k, fieldID, false, JVM_SIGNATURE_CLASS, (jvalue *)&field_value); | |||
1880 | } | |||
1881 | HeapAccess<ON_UNKNOWN_OOP_REF>::oop_store_at(o, offset, JNIHandles::resolve(value)); | |||
1882 | HOTSPOT_JNI_SETOBJECTFIELD_RETURN(); | |||
1883 | JNI_END} } | |||
1884 | ||||
1885 | ||||
1886 | #define DEFINE_SETFIELD(Argument,Fieldname,Result,SigType,unionType \extern "C" { void jni_SetResultField(JNIEnv *env, jobject obj , jfieldID fieldID, Argument value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1887, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.unionType = value; o = JvmtiExport::jni_SetField_probe (thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value ); } if (SigType == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } o->Fieldname_field_put(offset, value); ReturnProbe ; } } | |||
1887 | , EntryProbe, ReturnProbe)extern "C" { void jni_SetResultField(JNIEnv *env, jobject obj , jfieldID fieldID, Argument value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1887, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.unionType = value; o = JvmtiExport::jni_SetField_probe (thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value ); } if (SigType == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } o->Fieldname_field_put(offset, value); ReturnProbe ; } } \extern "C" { void jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1889, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
1888 | \extern "C" { void jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1889, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
1889 | JNI_ENTRY_NO_PRESERVE(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value))extern "C" { void jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1889, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); \ | |||
1890 | \ | |||
1891 | EntryProbe; \ | |||
1892 | \ | |||
1893 | oop o = JNIHandles::resolve_non_null(obj); \ | |||
1894 | Klass* k = o->klass(); \ | |||
1895 | int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); \ | |||
1896 | /* Keep JVMTI addition small and only check enabled flag here. */ \ | |||
1897 | if (JvmtiExport::should_post_field_modification()) { \ | |||
1898 | jvalue field_value; \ | |||
1899 | field_value.unionType = value; \ | |||
1900 | o = JvmtiExport::jni_SetField_probe(thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value); \ | |||
1901 | } \ | |||
1902 | if (SigType == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1; } \ | |||
1903 | o->Fieldname##_field_put(offset, value); \ | |||
1904 | ReturnProbe; \} } | |||
1905 | JNI_END} } | |||
1906 | ||||
1907 | DEFINE_SETFIELD(jboolean, bool, Boolean, JVM_SIGNATURE_BOOLEAN, zextern "C" { void jni_SetBooleanField(JNIEnv *env, jobject obj , jfieldID fieldID, jboolean value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1909, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.z = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_BOOLEAN, (jvalue *)&field_value); } if (JVM_SIGNATURE_BOOLEAN == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->bool_field_put (offset, value); ; } } | |||
1908 | , HOTSPOT_JNI_SETBOOLEANFIELD_ENTRY(env, obj, (uintptr_t)fieldID, value),extern "C" { void jni_SetBooleanField(JNIEnv *env, jobject obj , jfieldID fieldID, jboolean value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1909, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.z = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_BOOLEAN, (jvalue *)&field_value); } if (JVM_SIGNATURE_BOOLEAN == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->bool_field_put (offset, value); ; } } | |||
1909 | HOTSPOT_JNI_SETBOOLEANFIELD_RETURN())extern "C" { void jni_SetBooleanField(JNIEnv *env, jobject obj , jfieldID fieldID, jboolean value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1909, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.z = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_BOOLEAN, (jvalue *)&field_value); } if (JVM_SIGNATURE_BOOLEAN == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->bool_field_put (offset, value); ; } } | |||
1910 | DEFINE_SETFIELD(jbyte, byte, Byte, JVM_SIGNATURE_BYTE, bextern "C" { void jni_SetByteField(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1912, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.b = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_BYTE, (jvalue *)&field_value); } if (JVM_SIGNATURE_BYTE == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->byte_field_put (offset, value); ; } } | |||
1911 | , HOTSPOT_JNI_SETBYTEFIELD_ENTRY(env, obj, (uintptr_t)fieldID, value),extern "C" { void jni_SetByteField(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1912, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.b = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_BYTE, (jvalue *)&field_value); } if (JVM_SIGNATURE_BYTE == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->byte_field_put (offset, value); ; } } | |||
1912 | HOTSPOT_JNI_SETBYTEFIELD_RETURN())extern "C" { void jni_SetByteField(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1912, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.b = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_BYTE, (jvalue *)&field_value); } if (JVM_SIGNATURE_BYTE == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->byte_field_put (offset, value); ; } } | |||
1913 | DEFINE_SETFIELD(jchar, char, Char, JVM_SIGNATURE_CHAR, cextern "C" { void jni_SetCharField(JNIEnv *env, jobject obj, jfieldID fieldID, jchar value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1915, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.c = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_CHAR, (jvalue *)&field_value); } if (JVM_SIGNATURE_CHAR == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->char_field_put (offset, value); ; } } | |||
1914 | , HOTSPOT_JNI_SETCHARFIELD_ENTRY(env, obj, (uintptr_t)fieldID, value),extern "C" { void jni_SetCharField(JNIEnv *env, jobject obj, jfieldID fieldID, jchar value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1915, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.c = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_CHAR, (jvalue *)&field_value); } if (JVM_SIGNATURE_CHAR == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->char_field_put (offset, value); ; } } | |||
1915 | HOTSPOT_JNI_SETCHARFIELD_RETURN())extern "C" { void jni_SetCharField(JNIEnv *env, jobject obj, jfieldID fieldID, jchar value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1915, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.c = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_CHAR, (jvalue *)&field_value); } if (JVM_SIGNATURE_CHAR == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->char_field_put (offset, value); ; } } | |||
1916 | DEFINE_SETFIELD(jshort, short, Short, JVM_SIGNATURE_SHORT, sextern "C" { void jni_SetShortField(JNIEnv *env, jobject obj, jfieldID fieldID, jshort value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1918, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.s = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_SHORT, (jvalue *)&field_value); } if (JVM_SIGNATURE_SHORT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->short_field_put (offset, value); ; } } | |||
1917 | , HOTSPOT_JNI_SETSHORTFIELD_ENTRY(env, obj, (uintptr_t)fieldID, value),extern "C" { void jni_SetShortField(JNIEnv *env, jobject obj, jfieldID fieldID, jshort value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1918, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.s = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_SHORT, (jvalue *)&field_value); } if (JVM_SIGNATURE_SHORT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->short_field_put (offset, value); ; } } | |||
1918 | HOTSPOT_JNI_SETSHORTFIELD_RETURN())extern "C" { void jni_SetShortField(JNIEnv *env, jobject obj, jfieldID fieldID, jshort value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1918, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.s = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_SHORT, (jvalue *)&field_value); } if (JVM_SIGNATURE_SHORT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->short_field_put (offset, value); ; } } | |||
1919 | DEFINE_SETFIELD(jint, int, Int, JVM_SIGNATURE_INT, iextern "C" { void jni_SetIntField(JNIEnv *env, jobject obj, jfieldID fieldID, jint value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1921, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.i = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_INT, (jvalue *)&field_value); } if (JVM_SIGNATURE_INT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->int_field_put( offset, value); ; } } | |||
1920 | , HOTSPOT_JNI_SETINTFIELD_ENTRY(env, obj, (uintptr_t)fieldID, value),extern "C" { void jni_SetIntField(JNIEnv *env, jobject obj, jfieldID fieldID, jint value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1921, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.i = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_INT, (jvalue *)&field_value); } if (JVM_SIGNATURE_INT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->int_field_put( offset, value); ; } } | |||
1921 | HOTSPOT_JNI_SETINTFIELD_RETURN())extern "C" { void jni_SetIntField(JNIEnv *env, jobject obj, jfieldID fieldID, jint value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1921, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.i = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_INT, (jvalue *)&field_value); } if (JVM_SIGNATURE_INT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->int_field_put( offset, value); ; } } | |||
1922 | DEFINE_SETFIELD(jlong, long, Long, JVM_SIGNATURE_LONG, jextern "C" { void jni_SetLongField(JNIEnv *env, jobject obj, jfieldID fieldID, jlong value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1924, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.j = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_LONG, (jvalue *)&field_value); } if (JVM_SIGNATURE_LONG == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->long_field_put (offset, value); ; } } | |||
1923 | , HOTSPOT_JNI_SETLONGFIELD_ENTRY(env, obj, (uintptr_t)fieldID, value),extern "C" { void jni_SetLongField(JNIEnv *env, jobject obj, jfieldID fieldID, jlong value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1924, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.j = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_LONG, (jvalue *)&field_value); } if (JVM_SIGNATURE_LONG == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->long_field_put (offset, value); ; } } | |||
1924 | HOTSPOT_JNI_SETLONGFIELD_RETURN())extern "C" { void jni_SetLongField(JNIEnv *env, jobject obj, jfieldID fieldID, jlong value) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1924, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.j = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_LONG, (jvalue *)&field_value); } if (JVM_SIGNATURE_LONG == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->long_field_put (offset, value); ; } } | |||
1925 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
1926 | DEFINE_SETFIELD(jfloat, float, Float, JVM_SIGNATURE_FLOAT, fextern "C" { void jni_SetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1928, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.f = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_FLOAT, (jvalue *)&field_value); } if (JVM_SIGNATURE_FLOAT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->float_field_put (offset, value); ; } } | |||
1927 | , HOTSPOT_JNI_SETFLOATFIELD_ENTRY(env, obj, (uintptr_t)fieldID),extern "C" { void jni_SetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1928, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.f = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_FLOAT, (jvalue *)&field_value); } if (JVM_SIGNATURE_FLOAT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->float_field_put (offset, value); ; } } | |||
1928 | HOTSPOT_JNI_SETFLOATFIELD_RETURN())extern "C" { void jni_SetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1928, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.f = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_FLOAT, (jvalue *)&field_value); } if (JVM_SIGNATURE_FLOAT == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->float_field_put (offset, value); ; } } | |||
1929 | DEFINE_SETFIELD(jdouble, double, Double, JVM_SIGNATURE_DOUBLE, dextern "C" { void jni_SetDoubleField(JNIEnv *env, jobject obj , jfieldID fieldID, jdouble value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1931, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.d = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_DOUBLE, (jvalue *)&field_value); } if (JVM_SIGNATURE_DOUBLE == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->double_field_put (offset, value); ; } } | |||
1930 | , HOTSPOT_JNI_SETDOUBLEFIELD_ENTRY(env, obj, (uintptr_t)fieldID),extern "C" { void jni_SetDoubleField(JNIEnv *env, jobject obj , jfieldID fieldID, jdouble value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1931, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.d = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_DOUBLE, (jvalue *)&field_value); } if (JVM_SIGNATURE_DOUBLE == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->double_field_put (offset, value); ; } } | |||
1931 | HOTSPOT_JNI_SETDOUBLEFIELD_RETURN())extern "C" { void jni_SetDoubleField(JNIEnv *env, jobject obj , jfieldID fieldID, jdouble value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1931, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; oop o = JNIHandles ::resolve_non_null(obj); Klass* k = o->klass(); int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); if (JvmtiExport::should_post_field_modification()) { jvalue field_value ; field_value.d = value; o = JvmtiExport::jni_SetField_probe( thread, obj, o, k, fieldID, false, JVM_SIGNATURE_DOUBLE, (jvalue *)&field_value); } if (JVM_SIGNATURE_DOUBLE == JVM_SIGNATURE_BOOLEAN ) { value = ((jboolean)value) & 1; } o->double_field_put (offset, value); ; } } | |||
1932 | ||||
1933 | DT_RETURN_MARK_DECL(ToReflectedField, jobject | |||
1934 | , HOTSPOT_JNI_TOREFLECTEDFIELD_RETURN(_ret_ref)); | |||
1935 | ||||
1936 | JNI_ENTRY(jobject, jni_ToReflectedField(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic))extern "C" { jobject jni_ToReflectedField(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1936, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1937 | HOTSPOT_JNI_TOREFLECTEDFIELD_ENTRY(env, cls, (uintptr_t) fieldID, isStatic); | |||
1938 | jobject ret = NULL__null; | |||
1939 | DT_RETURN_MARK(ToReflectedField, jobject, (const jobject&)ret); | |||
1940 | ||||
1941 | fieldDescriptor fd; | |||
1942 | bool found = false; | |||
1943 | Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls)); | |||
1944 | ||||
1945 | assert(jfieldIDWorkaround::is_static_jfieldID(fieldID) == (isStatic != 0), "invalid fieldID")do { if (!(jfieldIDWorkaround::is_static_jfieldID(fieldID) == (isStatic != 0))) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1945, "assert(" "jfieldIDWorkaround::is_static_jfieldID(fieldID) == (isStatic != 0)" ") failed", "invalid fieldID"); ::breakpoint(); } } while (0 ); | |||
1946 | ||||
1947 | if (isStatic) { | |||
1948 | // Static field. The fieldID a JNIid specifying the field holder and the offset within the Klass*. | |||
1949 | JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); | |||
1950 | assert(id->is_static_field_id(), "invalid static field id")do { if (!(id->is_static_field_id())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1950, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); | |||
1951 | found = id->find_local_field(&fd); | |||
1952 | } else { | |||
1953 | // Non-static field. The fieldID is really the offset of the field within the instanceOop. | |||
1954 | int offset = jfieldIDWorkaround::from_instance_jfieldID(k, fieldID); | |||
1955 | found = InstanceKlass::cast(k)->find_field_from_offset(offset, false, &fd); | |||
1956 | } | |||
1957 | assert(found, "bad fieldID passed into jni_ToReflectedField")do { if (!(found)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1957, "assert(" "found" ") failed", "bad fieldID passed into jni_ToReflectedField" ); ::breakpoint(); } } while (0); | |||
1958 | oop reflected = Reflection::new_field(&fd, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1959 | ret = JNIHandles::make_local(THREAD__the_thread__, reflected); | |||
1960 | return ret; | |||
1961 | JNI_END} } | |||
1962 | ||||
1963 | ||||
1964 | // | |||
1965 | // Accessing Static Fields | |||
1966 | // | |||
1967 | DT_RETURN_MARK_DECL(GetStaticFieldID, jfieldID | |||
1968 | , HOTSPOT_JNI_GETSTATICFIELDID_RETURN((uintptr_t)_ret_ref)); | |||
1969 | ||||
1970 | JNI_ENTRY(jfieldID, jni_GetStaticFieldID(JNIEnv *env, jclass clazz,extern "C" { jfieldID jni_GetStaticFieldID(JNIEnv *env, jclass clazz, const char *name, const char *sig) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1971, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1971 | const char *name, const char *sig))extern "C" { jfieldID jni_GetStaticFieldID(JNIEnv *env, jclass clazz, const char *name, const char *sig) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1971, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
1972 | HOTSPOT_JNI_GETSTATICFIELDID_ENTRY(env, clazz, (char *) name, (char *) sig); | |||
1973 | jfieldID ret = NULL__null; | |||
1974 | DT_RETURN_MARK(GetStaticFieldID, jfieldID, (const jfieldID&)ret); | |||
1975 | ||||
1976 | // The class should have been loaded (we have an instance of the class | |||
1977 | // passed in) so the field and signature should already be in the symbol | |||
1978 | // table. If they're not there, the field doesn't exist. | |||
1979 | TempNewSymbol fieldname = SymbolTable::probe(name, (int)strlen(name)); | |||
1980 | TempNewSymbol signame = SymbolTable::probe(sig, (int)strlen(sig)); | |||
1981 | if (fieldname == NULL__null || signame == NULL__null) { | |||
1982 | THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), (char*) name){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1982, vmSymbols::java_lang_NoSuchFieldError(), (char*) name ); return 0; }; | |||
1983 | } | |||
1984 | Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(clazz)); | |||
1985 | // Make sure class is initialized before handing id's out to static fields | |||
1986 | k->initialize(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
1987 | ||||
1988 | fieldDescriptor fd; | |||
1989 | if (!k->is_instance_klass() || | |||
1990 | !InstanceKlass::cast(k)->find_field(fieldname, signame, true, &fd)) { | |||
1991 | THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), (char*) name){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 1991, vmSymbols::java_lang_NoSuchFieldError(), (char*) name ); return 0; }; | |||
1992 | } | |||
1993 | ||||
1994 | // A jfieldID for a static field is a JNIid specifying the field holder and the offset within the Klass* | |||
1995 | JNIid* id = fd.field_holder()->jni_id_for(fd.offset()); | |||
1996 | debug_only(id->set_is_static_field_id();)id->set_is_static_field_id(); | |||
1997 | ||||
1998 | debug_only(id->verify(fd.field_holder()))id->verify(fd.field_holder()); | |||
1999 | ||||
2000 | ret = jfieldIDWorkaround::to_static_jfieldID(id); | |||
2001 | return ret; | |||
2002 | JNI_END} } | |||
2003 | ||||
2004 | ||||
2005 | JNI_ENTRY(jobject, jni_GetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID))extern "C" { jobject jni_GetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2005, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2006 | HOTSPOT_JNI_GETSTATICOBJECTFIELD_ENTRY(env, clazz, (uintptr_t) fieldID); | |||
2007 | #if INCLUDE_JNI_CHECK1 | |||
2008 | DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);)Klass* param_k = jniCheck::validate_class(thread, clazz); | |||
2009 | #endif // INCLUDE_JNI_CHECK | |||
2010 | JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); | |||
2011 | assert(id->is_static_field_id(), "invalid static field id")do { if (!(id->is_static_field_id())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2011, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); | |||
2012 | // Keep JVMTI addition small and only check enabled flag here. | |||
2013 | // jni_GetField_probe() assumes that is okay to create handles. | |||
2014 | if (JvmtiExport::should_post_field_access()) { | |||
2015 | JvmtiExport::jni_GetField_probe(thread, NULL__null, NULL__null, id->holder(), fieldID, true); | |||
2016 | } | |||
2017 | jobject ret = JNIHandles::make_local(THREAD__the_thread__, id->holder()->java_mirror()->obj_field(id->offset())); | |||
2018 | HOTSPOT_JNI_GETSTATICOBJECTFIELD_RETURN(ret); | |||
2019 | return ret; | |||
2020 | JNI_END} } | |||
2021 | ||||
2022 | ||||
2023 | #define DEFINE_GETSTATICFIELD(Return,Fieldname,Result \FP_SELECT_Result(, ); extern "C" { Return jni_GetStaticResultField (JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2024, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; Return ret = 0; FP_SELECT_Result( , ); JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID ); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2024, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> Fieldname_field (id->offset()); return ret ;} } | |||
2024 | , EntryProbe, ReturnProbe)FP_SELECT_Result(, ); extern "C" { Return jni_GetStaticResultField (JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2024, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; Return ret = 0; FP_SELECT_Result( , ); JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID ); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2024, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> Fieldname_field (id->offset()); return ret ;} } \ | |||
2025 | \ | |||
2026 | DT_RETURN_MARK_DECL_FOR(Result, GetStatic##Result##Field, Return \FP_SELECT_Result(, ) | |||
2027 | , ReturnProbe)FP_SELECT_Result(, ); \extern "C" { Return jni_GetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2029, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2028 | \extern "C" { Return jni_GetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2029, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2029 | JNI_ENTRY(Return, jni_GetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID))extern "C" { Return jni_GetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2029, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
2030 | EntryProbe; \ | |||
2031 | Return ret = 0;\ | |||
2032 | DT_RETURN_MARK_FOR(Result, GetStatic##Result##Field, Return, \FP_SELECT_Result(, ) | |||
2033 | (const Return&)ret)FP_SELECT_Result(, );\ | |||
2034 | JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \ | |||
2035 | assert(id->is_static_field_id(), "invalid static field id")do { if (!(id->is_static_field_id())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2035, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); \ | |||
2036 | /* Keep JVMTI addition small and only check enabled flag here. */ \ | |||
2037 | /* jni_GetField_probe() assumes that is okay to create handles. */ \ | |||
2038 | if (JvmtiExport::should_post_field_access()) { \ | |||
2039 | JvmtiExport::jni_GetField_probe(thread, NULL__null, NULL__null, id->holder(), fieldID, true); \ | |||
2040 | } \ | |||
2041 | ret = id->holder()->java_mirror()-> Fieldname##_field (id->offset()); \ | |||
2042 | return ret;\} } | |||
2043 | JNI_END} } | |||
2044 | ||||
2045 | DEFINE_GETSTATICFIELD(jboolean, bool, Boolean; extern "C" { jboolean jni_GetStaticBooleanField(JNIEnv *env , jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2046, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2046, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> bool_field (id->offset()); return ret;} } | |||
2046 | , HOTSPOT_JNI_GETSTATICBOOLEANFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICBOOLEANFIELD_RETURN(_ret_ref)); extern "C" { jboolean jni_GetStaticBooleanField(JNIEnv *env , jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2046, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jboolean ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2046, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> bool_field (id->offset()); return ret;} } | |||
2047 | DEFINE_GETSTATICFIELD(jbyte, byte, Byte; extern "C" { jbyte jni_GetStaticByteField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2048, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2048, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> byte_field (id->offset()); return ret;} } | |||
2048 | , HOTSPOT_JNI_GETSTATICBYTEFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICBYTEFIELD_RETURN(_ret_ref) ); extern "C" { jbyte jni_GetStaticByteField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2048, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyte ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2048, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> byte_field (id->offset()); return ret;} } | |||
2049 | DEFINE_GETSTATICFIELD(jchar, char, Char; extern "C" { jchar jni_GetStaticCharField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2050, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2050, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> char_field (id->offset()); return ret;} } | |||
2050 | , HOTSPOT_JNI_GETSTATICCHARFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICCHARFIELD_RETURN(_ret_ref) ); extern "C" { jchar jni_GetStaticCharField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2050, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jchar ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2050, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> char_field (id->offset()); return ret;} } | |||
2051 | DEFINE_GETSTATICFIELD(jshort, short, Short; extern "C" { jshort jni_GetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2052, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2052, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> short_field (id->offset()); return ret; } } | |||
2052 | , HOTSPOT_JNI_GETSTATICSHORTFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICSHORTFIELD_RETURN(_ret_ref) ); extern "C" { jshort jni_GetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2052, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshort ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2052, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> short_field (id->offset()); return ret; } } | |||
2053 | DEFINE_GETSTATICFIELD(jint, int, Int; extern "C" { jint jni_GetStaticIntField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2054, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2054, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> int_field (id->offset()); return ret;} } | |||
2054 | , HOTSPOT_JNI_GETSTATICINTFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICINTFIELD_RETURN(_ret_ref) ); extern "C" { jint jni_GetStaticIntField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2054, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jint ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2054, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> int_field (id->offset()); return ret;} } | |||
2055 | DEFINE_GETSTATICFIELD(jlong, long, Long; extern "C" { jlong jni_GetStaticLongField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2056, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2056, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> long_field (id->offset()); return ret;} } | |||
2056 | , HOTSPOT_JNI_GETSTATICLONGFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICLONGFIELD_RETURN(_ret_ref) ); extern "C" { jlong jni_GetStaticLongField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2056, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlong ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2056, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> long_field (id->offset()); return ret;} } | |||
2057 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
2058 | DEFINE_GETSTATICFIELD(jfloat, float, Float; extern "C" { jfloat jni_GetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2059, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2059, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> float_field (id->offset()); return ret; } } | |||
2059 | , HOTSPOT_JNI_GETSTATICFLOATFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICFLOATFIELD_RETURN() ); extern "C" { jfloat jni_GetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2059, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloat ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2059, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> float_field (id->offset()); return ret; } } | |||
2060 | DEFINE_GETSTATICFIELD(jdouble, double, Double; extern "C" { jdouble jni_GetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2061, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2061, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> double_field (id->offset()); return ret ;} } | |||
2061 | , HOTSPOT_JNI_GETSTATICDOUBLEFIELD_ENTRY(env, clazz, (uintptr_t) fieldID), HOTSPOT_JNI_GETSTATICDOUBLEFIELD_RETURN() ); extern "C" { jdouble jni_GetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2061, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdouble ret = 0; ; JNIid* id = jfieldIDWorkaround ::from_static_jfieldID(fieldID); do { if (!(id->is_static_field_id ())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2061, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_access ()) { JvmtiExport::jni_GetField_probe(thread, __null, __null, id->holder(), fieldID, true); } ret = id->holder()-> java_mirror()-> double_field (id->offset()); return ret ;} } | |||
2062 | ||||
2063 | JNI_ENTRY(void, jni_SetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value))extern "C" { void jni_SetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2063, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2064 | HOTSPOT_JNI_SETSTATICOBJECTFIELD_ENTRY(env, clazz, (uintptr_t) fieldID, value); | |||
2065 | JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); | |||
2066 | assert(id->is_static_field_id(), "invalid static field id")do { if (!(id->is_static_field_id())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2066, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); | |||
2067 | // Keep JVMTI addition small and only check enabled flag here. | |||
2068 | // jni_SetField_probe() assumes that is okay to create handles. | |||
2069 | if (JvmtiExport::should_post_field_modification()) { | |||
2070 | jvalue field_value; | |||
2071 | field_value.l = value; | |||
2072 | JvmtiExport::jni_SetField_probe(thread, NULL__null, NULL__null, id->holder(), fieldID, true, JVM_SIGNATURE_CLASS, (jvalue *)&field_value); | |||
2073 | } | |||
2074 | id->holder()->java_mirror()->obj_field_put(id->offset(), JNIHandles::resolve(value)); | |||
2075 | HOTSPOT_JNI_SETSTATICOBJECTFIELD_RETURN(); | |||
2076 | JNI_END} } | |||
2077 | ||||
2078 | ||||
2079 | ||||
2080 | #define DEFINE_SETSTATICFIELD(Argument,Fieldname,Result,SigType,unionType \extern "C" { void jni_SetStaticResultField(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2081, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2081, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.unionType = value; JvmtiExport ::jni_SetField_probe(thread, __null, __null, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); } if (SigType == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1 ; } id->holder()->java_mirror()-> Fieldname_field_put (id->offset(), value); ReturnProbe;} } | |||
2081 | , EntryProbe, ReturnProbe)extern "C" { void jni_SetStaticResultField(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2081, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2081, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.unionType = value; JvmtiExport ::jni_SetField_probe(thread, __null, __null, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); } if (SigType == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1 ; } id->holder()->java_mirror()-> Fieldname_field_put (id->offset(), value); ReturnProbe;} } \extern "C" { void jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2083, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2082 | \extern "C" { void jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2083, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2083 | JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value))extern "C" { void jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2083, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
2084 | EntryProbe; \ | |||
2085 | \ | |||
2086 | JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \ | |||
2087 | assert(id->is_static_field_id(), "invalid static field id")do { if (!(id->is_static_field_id())) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2087, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); \ | |||
2088 | /* Keep JVMTI addition small and only check enabled flag here. */ \ | |||
2089 | /* jni_SetField_probe() assumes that is okay to create handles. */ \ | |||
2090 | if (JvmtiExport::should_post_field_modification()) { \ | |||
2091 | jvalue field_value; \ | |||
2092 | field_value.unionType = value; \ | |||
2093 | JvmtiExport::jni_SetField_probe(thread, NULL__null, NULL__null, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); \ | |||
2094 | } \ | |||
2095 | if (SigType == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1; } \ | |||
2096 | id->holder()->java_mirror()-> Fieldname##_field_put (id->offset(), value); \ | |||
2097 | ReturnProbe;\} } | |||
2098 | JNI_END} } | |||
2099 | ||||
2100 | DEFINE_SETSTATICFIELD(jboolean, bool, Boolean, JVM_SIGNATURE_BOOLEAN, zextern "C" { void jni_SetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2102, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2102, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.z = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_BOOLEAN, (jvalue *)&field_value); } if (JVM_SIGNATURE_BOOLEAN == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1; } id->holder()->java_mirror ()-> bool_field_put (id->offset(), value); ;} } | |||
2101 | , HOTSPOT_JNI_SETSTATICBOOLEANFIELD_ENTRY(env, clazz, (uintptr_t)fieldID, value),extern "C" { void jni_SetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2102, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2102, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.z = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_BOOLEAN, (jvalue *)&field_value); } if (JVM_SIGNATURE_BOOLEAN == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1; } id->holder()->java_mirror ()-> bool_field_put (id->offset(), value); ;} } | |||
2102 | HOTSPOT_JNI_SETSTATICBOOLEANFIELD_RETURN())extern "C" { void jni_SetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2102, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2102, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.z = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_BOOLEAN, (jvalue *)&field_value); } if (JVM_SIGNATURE_BOOLEAN == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean)value) & 1; } id->holder()->java_mirror ()-> bool_field_put (id->offset(), value); ;} } | |||
2103 | DEFINE_SETSTATICFIELD(jbyte, byte, Byte, JVM_SIGNATURE_BYTE, bextern "C" { void jni_SetStaticByteField(JNIEnv *env, jclass clazz , jfieldID fieldID, jbyte value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2105, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2105, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.b = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_BYTE, (jvalue *)&field_value); } if (JVM_SIGNATURE_BYTE == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> byte_field_put (id->offset(), value); ;} } | |||
2104 | , HOTSPOT_JNI_SETSTATICBYTEFIELD_ENTRY(env, clazz, (uintptr_t) fieldID, value),extern "C" { void jni_SetStaticByteField(JNIEnv *env, jclass clazz , jfieldID fieldID, jbyte value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2105, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2105, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.b = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_BYTE, (jvalue *)&field_value); } if (JVM_SIGNATURE_BYTE == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> byte_field_put (id->offset(), value); ;} } | |||
2105 | HOTSPOT_JNI_SETSTATICBYTEFIELD_RETURN())extern "C" { void jni_SetStaticByteField(JNIEnv *env, jclass clazz , jfieldID fieldID, jbyte value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2105, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2105, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.b = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_BYTE, (jvalue *)&field_value); } if (JVM_SIGNATURE_BYTE == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> byte_field_put (id->offset(), value); ;} } | |||
2106 | DEFINE_SETSTATICFIELD(jchar, char, Char, JVM_SIGNATURE_CHAR, cextern "C" { void jni_SetStaticCharField(JNIEnv *env, jclass clazz , jfieldID fieldID, jchar value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2108, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2108, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.c = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_CHAR, (jvalue *)&field_value); } if (JVM_SIGNATURE_CHAR == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> char_field_put (id->offset(), value); ;} } | |||
2107 | , HOTSPOT_JNI_SETSTATICCHARFIELD_ENTRY(env, clazz, (uintptr_t) fieldID, value),extern "C" { void jni_SetStaticCharField(JNIEnv *env, jclass clazz , jfieldID fieldID, jchar value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2108, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2108, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.c = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_CHAR, (jvalue *)&field_value); } if (JVM_SIGNATURE_CHAR == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> char_field_put (id->offset(), value); ;} } | |||
2108 | HOTSPOT_JNI_SETSTATICCHARFIELD_RETURN())extern "C" { void jni_SetStaticCharField(JNIEnv *env, jclass clazz , jfieldID fieldID, jchar value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2108, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2108, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.c = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_CHAR, (jvalue *)&field_value); } if (JVM_SIGNATURE_CHAR == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> char_field_put (id->offset(), value); ;} } | |||
2109 | DEFINE_SETSTATICFIELD(jshort, short, Short, JVM_SIGNATURE_SHORT, sextern "C" { void jni_SetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2111, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2111, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.s = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_SHORT, (jvalue *)&field_value); } if (JVM_SIGNATURE_SHORT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> short_field_put (id->offset(), value); ;} } | |||
2110 | , HOTSPOT_JNI_SETSTATICSHORTFIELD_ENTRY(env, clazz, (uintptr_t) fieldID, value),extern "C" { void jni_SetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2111, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2111, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.s = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_SHORT, (jvalue *)&field_value); } if (JVM_SIGNATURE_SHORT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> short_field_put (id->offset(), value); ;} } | |||
2111 | HOTSPOT_JNI_SETSTATICSHORTFIELD_RETURN())extern "C" { void jni_SetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2111, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2111, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.s = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_SHORT, (jvalue *)&field_value); } if (JVM_SIGNATURE_SHORT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> short_field_put (id->offset(), value); ;} } | |||
2112 | DEFINE_SETSTATICFIELD(jint, int, Int, JVM_SIGNATURE_INT, iextern "C" { void jni_SetStaticIntField(JNIEnv *env, jclass clazz , jfieldID fieldID, jint value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2114, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2114, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.i = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_INT, (jvalue *)&field_value); } if ( JVM_SIGNATURE_INT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> int_field_put (id->offset(), value); ;} } | |||
2113 | , HOTSPOT_JNI_SETSTATICINTFIELD_ENTRY(env, clazz, (uintptr_t) fieldID, value),extern "C" { void jni_SetStaticIntField(JNIEnv *env, jclass clazz , jfieldID fieldID, jint value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2114, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2114, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.i = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_INT, (jvalue *)&field_value); } if ( JVM_SIGNATURE_INT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> int_field_put (id->offset(), value); ;} } | |||
2114 | HOTSPOT_JNI_SETSTATICINTFIELD_RETURN())extern "C" { void jni_SetStaticIntField(JNIEnv *env, jclass clazz , jfieldID fieldID, jint value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2114, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2114, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.i = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_INT, (jvalue *)&field_value); } if ( JVM_SIGNATURE_INT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> int_field_put (id->offset(), value); ;} } | |||
2115 | DEFINE_SETSTATICFIELD(jlong, long, Long, JVM_SIGNATURE_LONG, jextern "C" { void jni_SetStaticLongField(JNIEnv *env, jclass clazz , jfieldID fieldID, jlong value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2117, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2117, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.j = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_LONG, (jvalue *)&field_value); } if (JVM_SIGNATURE_LONG == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> long_field_put (id->offset(), value); ;} } | |||
2116 | , HOTSPOT_JNI_SETSTATICLONGFIELD_ENTRY(env, clazz, (uintptr_t) fieldID, value),extern "C" { void jni_SetStaticLongField(JNIEnv *env, jclass clazz , jfieldID fieldID, jlong value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2117, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2117, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.j = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_LONG, (jvalue *)&field_value); } if (JVM_SIGNATURE_LONG == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> long_field_put (id->offset(), value); ;} } | |||
2117 | HOTSPOT_JNI_SETSTATICLONGFIELD_RETURN())extern "C" { void jni_SetStaticLongField(JNIEnv *env, jclass clazz , jfieldID fieldID, jlong value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2117, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2117, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.j = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_LONG, (jvalue *)&field_value); } if (JVM_SIGNATURE_LONG == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> long_field_put (id->offset(), value); ;} } | |||
2118 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
2119 | DEFINE_SETSTATICFIELD(jfloat, float, Float, JVM_SIGNATURE_FLOAT, fextern "C" { void jni_SetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2121, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2121, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.f = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_FLOAT, (jvalue *)&field_value); } if (JVM_SIGNATURE_FLOAT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> float_field_put (id->offset(), value); ;} } | |||
2120 | , HOTSPOT_JNI_SETSTATICFLOATFIELD_ENTRY(env, clazz, (uintptr_t) fieldID),extern "C" { void jni_SetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2121, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2121, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.f = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_FLOAT, (jvalue *)&field_value); } if (JVM_SIGNATURE_FLOAT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> float_field_put (id->offset(), value); ;} } | |||
2121 | HOTSPOT_JNI_SETSTATICFLOATFIELD_RETURN())extern "C" { void jni_SetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value) { JavaThread* thread= JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2121, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2121, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.f = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_FLOAT, (jvalue *)&field_value); } if (JVM_SIGNATURE_FLOAT == JVM_SIGNATURE_BOOLEAN) { value = ((jboolean )value) & 1; } id->holder()->java_mirror()-> float_field_put (id->offset(), value); ;} } | |||
2122 | DEFINE_SETSTATICFIELD(jdouble, double, Double, JVM_SIGNATURE_DOUBLE, dextern "C" { void jni_SetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2124, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2124, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.d = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_DOUBLE, (jvalue *)&field_value); } if (JVM_SIGNATURE_DOUBLE == JVM_SIGNATURE_BOOLEAN) { value = (( jboolean)value) & 1; } id->holder()->java_mirror()-> double_field_put (id->offset(), value); ;} } | |||
2123 | , HOTSPOT_JNI_SETSTATICDOUBLEFIELD_ENTRY(env, clazz, (uintptr_t) fieldID),extern "C" { void jni_SetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2124, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2124, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.d = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_DOUBLE, (jvalue *)&field_value); } if (JVM_SIGNATURE_DOUBLE == JVM_SIGNATURE_BOOLEAN) { value = (( jboolean)value) & 1; } id->holder()->java_mirror()-> double_field_put (id->offset(), value); ;} } | |||
2124 | HOTSPOT_JNI_SETSTATICDOUBLEFIELD_RETURN())extern "C" { void jni_SetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2124, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; JNIid* id = jfieldIDWorkaround::from_static_jfieldID (fieldID); do { if (!(id->is_static_field_id())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2124, "assert(" "id->is_static_field_id()" ") failed", "invalid static field id" ); ::breakpoint(); } } while (0); if (JvmtiExport::should_post_field_modification ()) { jvalue field_value; field_value.d = value; JvmtiExport:: jni_SetField_probe(thread, __null, __null, id->holder(), fieldID , true, JVM_SIGNATURE_DOUBLE, (jvalue *)&field_value); } if (JVM_SIGNATURE_DOUBLE == JVM_SIGNATURE_BOOLEAN) { value = (( jboolean)value) & 1; } id->holder()->java_mirror()-> double_field_put (id->offset(), value); ;} } | |||
2125 | ||||
2126 | // | |||
2127 | // String Operations | |||
2128 | // | |||
2129 | ||||
2130 | // Unicode Interface | |||
2131 | ||||
2132 | DT_RETURN_MARK_DECL(NewString, jstring | |||
2133 | , HOTSPOT_JNI_NEWSTRING_RETURN(_ret_ref)); | |||
2134 | ||||
2135 | JNI_ENTRY(jstring, jni_NewString(JNIEnv *env, const jchar *unicodeChars, jsize len))extern "C" { jstring jni_NewString(JNIEnv *env, const jchar * unicodeChars, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2135, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2136 | HOTSPOT_JNI_NEWSTRING_ENTRY(env, (uint16_t *) unicodeChars, len); | |||
2137 | jstring ret = NULL__null; | |||
2138 | DT_RETURN_MARK(NewString, jstring, (const jstring&)ret); | |||
2139 | oop string=java_lang_String::create_oop_from_unicode((jchar*) unicodeChars, len, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
2140 | ret = (jstring) JNIHandles::make_local(THREAD__the_thread__, string); | |||
2141 | return ret; | |||
2142 | JNI_END} } | |||
2143 | ||||
2144 | ||||
2145 | JNI_ENTRY_NO_PRESERVE(jsize, jni_GetStringLength(JNIEnv *env, jstring string))extern "C" { jsize jni_GetStringLength(JNIEnv *env, jstring string ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2145, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2146 | HOTSPOT_JNI_GETSTRINGLENGTH_ENTRY(env, string); | |||
2147 | jsize ret = 0; | |||
2148 | oop s = JNIHandles::resolve_non_null(string); | |||
2149 | ret = java_lang_String::length(s); | |||
2150 | HOTSPOT_JNI_GETSTRINGLENGTH_RETURN(ret); | |||
2151 | return ret; | |||
2152 | JNI_END} } | |||
2153 | ||||
2154 | ||||
2155 | JNI_ENTRY_NO_PRESERVE(const jchar*, jni_GetStringChars(extern "C" { const jchar* jni_GetStringChars( JNIEnv *env, jstring string, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2156, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2156 | JNIEnv *env, jstring string, jboolean *isCopy))extern "C" { const jchar* jni_GetStringChars( JNIEnv *env, jstring string, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2156, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2157 | HOTSPOT_JNI_GETSTRINGCHARS_ENTRY(env, string, (uintptr_t *) isCopy); | |||
2158 | jchar* buf = NULL__null; | |||
2159 | oop s = JNIHandles::resolve_non_null(string); | |||
2160 | typeArrayOop s_value = java_lang_String::value(s); | |||
2161 | if (s_value != NULL__null) { | |||
2162 | int s_len = java_lang_String::length(s, s_value); | |||
2163 | bool is_latin1 = java_lang_String::is_latin1(s); | |||
2164 | buf = NEW_C_HEAP_ARRAY_RETURN_NULL(jchar, s_len + 1, mtInternal)(jchar*) (AllocateHeap(((s_len + 1)) * sizeof(jchar), mtInternal , AllocFailStrategy::RETURN_NULL)); // add one for zero termination | |||
2165 | /* JNI Specification states return NULL on OOM */ | |||
2166 | if (buf != NULL__null) { | |||
2167 | if (s_len > 0) { | |||
2168 | if (!is_latin1) { | |||
2169 | ArrayAccess<>::arraycopy_to_native(s_value, (size_t) typeArrayOopDesc::element_offset<jchar>(0), | |||
2170 | buf, s_len); | |||
2171 | } else { | |||
2172 | for (int i = 0; i < s_len; i++) { | |||
2173 | buf[i] = ((jchar) s_value->byte_at(i)) & 0xff; | |||
2174 | } | |||
2175 | } | |||
2176 | } | |||
2177 | buf[s_len] = 0; | |||
2178 | //%note jni_5 | |||
2179 | if (isCopy != NULL__null) { | |||
2180 | *isCopy = JNI_TRUE1; | |||
2181 | } | |||
2182 | } | |||
2183 | } | |||
2184 | HOTSPOT_JNI_GETSTRINGCHARS_RETURN(buf); | |||
2185 | return buf; | |||
2186 | JNI_END} } | |||
2187 | ||||
2188 | ||||
2189 | JNI_ENTRY_NO_PRESERVE(void, jni_ReleaseStringChars(JNIEnv *env, jstring str, const jchar *chars))extern "C" { void jni_ReleaseStringChars(JNIEnv *env, jstring str, const jchar *chars) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2189, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2190 | HOTSPOT_JNI_RELEASESTRINGCHARS_ENTRY(env, str, (uint16_t *) chars); | |||
2191 | //%note jni_6 | |||
2192 | if (chars != NULL__null) { | |||
2193 | // Since String objects are supposed to be immutable, don't copy any | |||
2194 | // new data back. A bad user will have to go after the char array. | |||
2195 | FreeHeap((void*) chars); | |||
2196 | } | |||
2197 | HOTSPOT_JNI_RELEASESTRINGCHARS_RETURN(); | |||
2198 | JNI_END} } | |||
2199 | ||||
2200 | ||||
2201 | // UTF Interface | |||
2202 | ||||
2203 | DT_RETURN_MARK_DECL(NewStringUTF, jstring | |||
2204 | , HOTSPOT_JNI_NEWSTRINGUTF_RETURN(_ret_ref)); | |||
2205 | ||||
2206 | JNI_ENTRY(jstring, jni_NewStringUTF(JNIEnv *env, const char *bytes))extern "C" { jstring jni_NewStringUTF(JNIEnv *env, const char *bytes) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2206, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2207 | HOTSPOT_JNI_NEWSTRINGUTF_ENTRY(env, (char *) bytes); | |||
2208 | jstring ret; | |||
2209 | DT_RETURN_MARK(NewStringUTF, jstring, (const jstring&)ret); | |||
2210 | ||||
2211 | oop result = java_lang_String::create_oop_from_str((char*) bytes, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
2212 | ret = (jstring) JNIHandles::make_local(THREAD__the_thread__, result); | |||
2213 | return ret; | |||
2214 | JNI_END} } | |||
2215 | ||||
2216 | ||||
2217 | JNI_ENTRY(jsize, jni_GetStringUTFLength(JNIEnv *env, jstring string))extern "C" { jsize jni_GetStringUTFLength(JNIEnv *env, jstring string) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2217, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2218 | HOTSPOT_JNI_GETSTRINGUTFLENGTH_ENTRY(env, string); | |||
2219 | oop java_string = JNIHandles::resolve_non_null(string); | |||
2220 | jsize ret = java_lang_String::utf8_length(java_string); | |||
2221 | HOTSPOT_JNI_GETSTRINGUTFLENGTH_RETURN(ret); | |||
2222 | return ret; | |||
2223 | JNI_END} } | |||
2224 | ||||
2225 | ||||
2226 | JNI_ENTRY(const char*, jni_GetStringUTFChars(JNIEnv *env, jstring string, jboolean *isCopy))extern "C" { const char* jni_GetStringUTFChars(JNIEnv *env, jstring string, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2226, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2227 | HOTSPOT_JNI_GETSTRINGUTFCHARS_ENTRY(env, string, (uintptr_t *) isCopy); | |||
2228 | char* result = NULL__null; | |||
2229 | oop java_string = JNIHandles::resolve_non_null(string); | |||
2230 | typeArrayOop s_value = java_lang_String::value(java_string); | |||
2231 | if (s_value != NULL__null) { | |||
2232 | size_t length = java_lang_String::utf8_length(java_string, s_value); | |||
2233 | /* JNI Specification states return NULL on OOM */ | |||
2234 | result = AllocateHeap(length + 1, mtInternal, 0, AllocFailStrategy::RETURN_NULL); | |||
2235 | if (result != NULL__null) { | |||
2236 | java_lang_String::as_utf8_string(java_string, s_value, result, (int) length + 1); | |||
2237 | if (isCopy != NULL__null) { | |||
2238 | *isCopy = JNI_TRUE1; | |||
2239 | } | |||
2240 | } | |||
2241 | } | |||
2242 | HOTSPOT_JNI_GETSTRINGUTFCHARS_RETURN(result); | |||
2243 | return result; | |||
2244 | JNI_END} } | |||
2245 | ||||
2246 | ||||
2247 | JNI_LEAF(void, jni_ReleaseStringUTFChars(JNIEnv *env, jstring str, const char *chars))extern "C" { void jni_ReleaseStringUTFChars(JNIEnv *env, jstring str, const char *chars) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2247, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); NoHandleMark __hm; ; os::verify_stack_alignment (); | |||
2248 | HOTSPOT_JNI_RELEASESTRINGUTFCHARS_ENTRY(env, str, (char *) chars); | |||
2249 | if (chars != NULL__null) { | |||
2250 | FreeHeap((char*) chars); | |||
2251 | } | |||
2252 | HOTSPOT_JNI_RELEASESTRINGUTFCHARS_RETURN(); | |||
2253 | JNI_END} } | |||
2254 | ||||
2255 | ||||
2256 | JNI_ENTRY_NO_PRESERVE(jsize, jni_GetArrayLength(JNIEnv *env, jarray array))extern "C" { jsize jni_GetArrayLength(JNIEnv *env, jarray array ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2256, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2257 | HOTSPOT_JNI_GETARRAYLENGTH_ENTRY(env, array); | |||
2258 | arrayOop a = arrayOop(JNIHandles::resolve_non_null(array)); | |||
2259 | assert(a->is_array(), "must be array")do { if (!(a->is_array())) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2259, "assert(" "a->is_array()" ") failed", "must be array" ); ::breakpoint(); } } while (0); | |||
2260 | jsize ret = a->length(); | |||
2261 | HOTSPOT_JNI_GETARRAYLENGTH_RETURN(ret); | |||
2262 | return ret; | |||
2263 | JNI_END} } | |||
2264 | ||||
2265 | ||||
2266 | // | |||
2267 | // Object Array Operations | |||
2268 | // | |||
2269 | ||||
2270 | DT_RETURN_MARK_DECL(NewObjectArray, jobjectArray | |||
2271 | , HOTSPOT_JNI_NEWOBJECTARRAY_RETURN(_ret_ref)); | |||
2272 | ||||
2273 | JNI_ENTRY(jobjectArray, jni_NewObjectArray(JNIEnv *env, jsize length, jclass elementClass, jobject initialElement))extern "C" { jobjectArray jni_NewObjectArray(JNIEnv *env, jsize length, jclass elementClass, jobject initialElement) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2273, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2274 | HOTSPOT_JNI_NEWOBJECTARRAY_ENTRY(env, length, elementClass, initialElement); | |||
2275 | jobjectArray ret = NULL__null; | |||
2276 | DT_RETURN_MARK(NewObjectArray, jobjectArray, (const jobjectArray&)ret); | |||
2277 | Klass* ek = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(elementClass)); | |||
2278 | Klass* ak = ek->array_klass(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
2279 | ObjArrayKlass::cast(ak)->initialize(CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
2280 | objArrayOop result = ObjArrayKlass::cast(ak)->allocate(length, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
2281 | oop initial_value = JNIHandles::resolve(initialElement); | |||
2282 | if (initial_value != NULL__null) { // array already initialized with NULL | |||
2283 | for (int index = 0; index < length; index++) { | |||
2284 | result->obj_at_put(index, initial_value); | |||
2285 | } | |||
2286 | } | |||
2287 | ret = (jobjectArray) JNIHandles::make_local(THREAD__the_thread__, result); | |||
2288 | return ret; | |||
2289 | JNI_END} } | |||
2290 | ||||
2291 | DT_RETURN_MARK_DECL(GetObjectArrayElement, jobject | |||
2292 | , HOTSPOT_JNI_GETOBJECTARRAYELEMENT_RETURN(_ret_ref)); | |||
2293 | ||||
2294 | JNI_ENTRY(jobject, jni_GetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index))extern "C" { jobject jni_GetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2294, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2295 | HOTSPOT_JNI_GETOBJECTARRAYELEMENT_ENTRY(env, array, index); | |||
2296 | jobject ret = NULL__null; | |||
2297 | DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret); | |||
2298 | objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array)); | |||
2299 | if (a->is_within_bounds(index)) { | |||
2300 | ret = JNIHandles::make_local(THREAD__the_thread__, a->obj_at(index)); | |||
2301 | return ret; | |||
2302 | } else { | |||
2303 | ResourceMark rm(THREAD__the_thread__); | |||
2304 | stringStream ss; | |||
2305 | ss.print("Index %d out of bounds for length %d", index, a->length()); | |||
2306 | THROW_MSG_0(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2306, vmSymbols::java_lang_ArrayIndexOutOfBoundsException() , ss.as_string()); return 0; }; | |||
2307 | } | |||
2308 | JNI_END} } | |||
2309 | ||||
2310 | DT_VOID_RETURN_MARK_DECL(SetObjectArrayElement | |||
2311 | , HOTSPOT_JNI_SETOBJECTARRAYELEMENT_RETURN()); | |||
2312 | ||||
2313 | JNI_ENTRY(void, jni_SetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index, jobject value))extern "C" { void jni_SetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index, jobject value) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2313, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2314 | HOTSPOT_JNI_SETOBJECTARRAYELEMENT_ENTRY(env, array, index, value); | |||
2315 | DT_VOID_RETURN_MARK(SetObjectArrayElement); | |||
2316 | ||||
2317 | objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array)); | |||
2318 | oop v = JNIHandles::resolve(value); | |||
2319 | if (a->is_within_bounds(index)) { | |||
2320 | if (v == NULL__null || v->is_a(ObjArrayKlass::cast(a->klass())->element_klass())) { | |||
2321 | a->obj_at_put(index, v); | |||
2322 | } else { | |||
2323 | ResourceMark rm(THREAD__the_thread__); | |||
2324 | stringStream ss; | |||
2325 | Klass *bottom_kl = ObjArrayKlass::cast(a->klass())->bottom_klass(); | |||
2326 | ss.print("type mismatch: can not store %s to %s[%d]", | |||
2327 | v->klass()->external_name(), | |||
2328 | bottom_kl->is_typeArray_klass() ? type2name_tab[ArrayKlass::cast(bottom_kl)->element_type()] : bottom_kl->external_name(), | |||
2329 | index); | |||
2330 | for (int dims = ArrayKlass::cast(a->klass())->dimension(); dims > 1; --dims) { | |||
2331 | ss.print("[]"); | |||
2332 | } | |||
2333 | THROW_MSG(vmSymbols::java_lang_ArrayStoreException(), ss.as_string()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2333, vmSymbols::java_lang_ArrayStoreException(), ss.as_string ()); return; }; | |||
2334 | } | |||
2335 | } else { | |||
2336 | ResourceMark rm(THREAD__the_thread__); | |||
2337 | stringStream ss; | |||
2338 | ss.print("Index %d out of bounds for length %d", index, a->length()); | |||
2339 | THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2339, vmSymbols::java_lang_ArrayIndexOutOfBoundsException() , ss.as_string()); return; }; | |||
2340 | } | |||
2341 | JNI_END} } | |||
2342 | ||||
2343 | ||||
2344 | ||||
2345 | #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result \; extern "C" { Return jni_NewResultArray(JNIEnv *env, jsize len ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2346, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; Return ret = __null; ; oop obj= oopFactory ::Allocator(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (Return) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2346 | ,EntryProbe,ReturnProbe); extern "C" { Return jni_NewResultArray(JNIEnv *env, jsize len ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2346, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; Return ret = __null; ; oop obj= oopFactory ::Allocator(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (Return) JNIHandles::make_local(__the_thread__, obj); return ret;} } \ | |||
2347 | \ | |||
2348 | DT_RETURN_MARK_DECL(New##Result##Array, Return \ | |||
2349 | , ReturnProbe); \extern "C" { Return jni_New##Result##Array(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2352, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2350 | \extern "C" { Return jni_New##Result##Array(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2352, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2351 | JNI_ENTRY(Return, \extern "C" { Return jni_New##Result##Array(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2352, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2352 | jni_New##Result##Array(JNIEnv *env, jsize len))extern "C" { Return jni_New##Result##Array(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2352, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
2353 | EntryProbe; \ | |||
2354 | Return ret = NULL__null;\ | |||
2355 | DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\ | |||
2356 | \ | |||
2357 | oop obj= oopFactory::Allocator(len, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); \ | |||
2358 | ret = (Return) JNIHandles::make_local(THREAD__the_thread__, obj); \ | |||
2359 | return ret;\} } | |||
2360 | JNI_END} } | |||
2361 | ||||
2362 | DEFINE_NEWSCALARARRAY(jbooleanArray, new_boolArray, Boolean,; extern "C" { jbooleanArray jni_NewBooleanArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2364, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbooleanArray ret = __null; ; oop obj= oopFactory ::new_boolArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jbooleanArray) JNIHandles::make_local(__the_thread__, obj ); return ret;} } | |||
2363 | HOTSPOT_JNI_NEWBOOLEANARRAY_ENTRY(env, len),; extern "C" { jbooleanArray jni_NewBooleanArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2364, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbooleanArray ret = __null; ; oop obj= oopFactory ::new_boolArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jbooleanArray) JNIHandles::make_local(__the_thread__, obj ); return ret;} } | |||
2364 | HOTSPOT_JNI_NEWBOOLEANARRAY_RETURN(_ret_ref)); extern "C" { jbooleanArray jni_NewBooleanArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2364, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbooleanArray ret = __null; ; oop obj= oopFactory ::new_boolArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jbooleanArray) JNIHandles::make_local(__the_thread__, obj ); return ret;} } | |||
2365 | DEFINE_NEWSCALARARRAY(jbyteArray, new_byteArray, Byte,; extern "C" { jbyteArray jni_NewByteArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2367, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyteArray ret = __null; ; oop obj= oopFactory ::new_byteArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jbyteArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2366 | HOTSPOT_JNI_NEWBYTEARRAY_ENTRY(env, len),; extern "C" { jbyteArray jni_NewByteArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2367, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyteArray ret = __null; ; oop obj= oopFactory ::new_byteArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jbyteArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2367 | HOTSPOT_JNI_NEWBYTEARRAY_RETURN(_ret_ref)); extern "C" { jbyteArray jni_NewByteArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2367, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jbyteArray ret = __null; ; oop obj= oopFactory ::new_byteArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jbyteArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2368 | DEFINE_NEWSCALARARRAY(jshortArray, new_shortArray, Short,; extern "C" { jshortArray jni_NewShortArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2370, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshortArray ret = __null; ; oop obj= oopFactory ::new_shortArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jshortArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2369 | HOTSPOT_JNI_NEWSHORTARRAY_ENTRY(env, len),; extern "C" { jshortArray jni_NewShortArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2370, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshortArray ret = __null; ; oop obj= oopFactory ::new_shortArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jshortArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2370 | HOTSPOT_JNI_NEWSHORTARRAY_RETURN(_ret_ref)); extern "C" { jshortArray jni_NewShortArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2370, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jshortArray ret = __null; ; oop obj= oopFactory ::new_shortArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jshortArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2371 | DEFINE_NEWSCALARARRAY(jcharArray, new_charArray, Char,; extern "C" { jcharArray jni_NewCharArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2373, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jcharArray ret = __null; ; oop obj= oopFactory ::new_charArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jcharArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2372 | HOTSPOT_JNI_NEWCHARARRAY_ENTRY(env, len),; extern "C" { jcharArray jni_NewCharArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2373, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jcharArray ret = __null; ; oop obj= oopFactory ::new_charArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jcharArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2373 | HOTSPOT_JNI_NEWCHARARRAY_RETURN(_ret_ref)); extern "C" { jcharArray jni_NewCharArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2373, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jcharArray ret = __null; ; oop obj= oopFactory ::new_charArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jcharArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2374 | DEFINE_NEWSCALARARRAY(jintArray, new_intArray, Int,; extern "C" { jintArray jni_NewIntArray(JNIEnv *env, jsize len ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2376, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jintArray ret = __null; ; oop obj= oopFactory ::new_intArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jintArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2375 | HOTSPOT_JNI_NEWINTARRAY_ENTRY(env, len),; extern "C" { jintArray jni_NewIntArray(JNIEnv *env, jsize len ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2376, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jintArray ret = __null; ; oop obj= oopFactory ::new_intArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jintArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2376 | HOTSPOT_JNI_NEWINTARRAY_RETURN(_ret_ref)); extern "C" { jintArray jni_NewIntArray(JNIEnv *env, jsize len ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2376, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jintArray ret = __null; ; oop obj= oopFactory ::new_intArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jintArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2377 | DEFINE_NEWSCALARARRAY(jlongArray, new_longArray, Long,; extern "C" { jlongArray jni_NewLongArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2379, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlongArray ret = __null; ; oop obj= oopFactory ::new_longArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jlongArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2378 | HOTSPOT_JNI_NEWLONGARRAY_ENTRY(env, len),; extern "C" { jlongArray jni_NewLongArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2379, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlongArray ret = __null; ; oop obj= oopFactory ::new_longArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jlongArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2379 | HOTSPOT_JNI_NEWLONGARRAY_RETURN(_ret_ref)); extern "C" { jlongArray jni_NewLongArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2379, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jlongArray ret = __null; ; oop obj= oopFactory ::new_longArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jlongArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2380 | DEFINE_NEWSCALARARRAY(jfloatArray, new_floatArray, Float,; extern "C" { jfloatArray jni_NewFloatArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2382, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloatArray ret = __null; ; oop obj= oopFactory ::new_floatArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jfloatArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2381 | HOTSPOT_JNI_NEWFLOATARRAY_ENTRY(env, len),; extern "C" { jfloatArray jni_NewFloatArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2382, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloatArray ret = __null; ; oop obj= oopFactory ::new_floatArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jfloatArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2382 | HOTSPOT_JNI_NEWFLOATARRAY_RETURN(_ret_ref)); extern "C" { jfloatArray jni_NewFloatArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2382, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jfloatArray ret = __null; ; oop obj= oopFactory ::new_floatArray(len, __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return __null; (void)(0); ret = (jfloatArray) JNIHandles::make_local(__the_thread__, obj); return ret;} } | |||
2383 | DEFINE_NEWSCALARARRAY(jdoubleArray, new_doubleArray, Double,; extern "C" { jdoubleArray jni_NewDoubleArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2385, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdoubleArray ret = __null; ; oop obj= oopFactory ::new_doubleArray(len, __the_thread__); if ((((ThreadShadow*) __the_thread__)->has_pending_exception())) return __null; ( void)(0); ret = (jdoubleArray) JNIHandles::make_local(__the_thread__ , obj); return ret;} } | |||
2384 | HOTSPOT_JNI_NEWDOUBLEARRAY_ENTRY(env, len),; extern "C" { jdoubleArray jni_NewDoubleArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2385, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdoubleArray ret = __null; ; oop obj= oopFactory ::new_doubleArray(len, __the_thread__); if ((((ThreadShadow*) __the_thread__)->has_pending_exception())) return __null; ( void)(0); ret = (jdoubleArray) JNIHandles::make_local(__the_thread__ , obj); return ret;} } | |||
2385 | HOTSPOT_JNI_NEWDOUBLEARRAY_RETURN(_ret_ref)); extern "C" { jdoubleArray jni_NewDoubleArray(JNIEnv *env, jsize len) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2385, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; jdoubleArray ret = __null; ; oop obj= oopFactory ::new_doubleArray(len, __the_thread__); if ((((ThreadShadow*) __the_thread__)->has_pending_exception())) return __null; ( void)(0); ret = (jdoubleArray) JNIHandles::make_local(__the_thread__ , obj); return ret;} } | |||
2386 | ||||
2387 | // Return an address which will fault if the caller writes to it. | |||
2388 | ||||
2389 | static char* get_bad_address() { | |||
2390 | static char* bad_address = NULL__null; | |||
2391 | if (bad_address == NULL__null) { | |||
2392 | size_t size = os::vm_allocation_granularity(); | |||
2393 | bad_address = os::reserve_memory(size); | |||
2394 | if (bad_address != NULL__null) { | |||
2395 | os::protect_memory(bad_address, size, os::MEM_PROT_READ, | |||
2396 | /*is_committed*/false); | |||
2397 | MemTracker::record_virtual_memory_type((void*)bad_address, mtInternal); | |||
2398 | } | |||
2399 | } | |||
2400 | return bad_address; | |||
2401 | } | |||
2402 | ||||
2403 | ||||
2404 | ||||
2405 | #define DEFINE_GETSCALARARRAYELEMENTS(ElementTag,ElementType,Result, Tag \extern "C" { ElementType* jni_GetResultArrayElements(JNIEnv * env, ElementTypeArray array, jboolean *isCopy) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2406, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); ElementType * result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (ElementType*)get_bad_address (); } else { result = (ElementType*) (AllocateHeap(((len)) * sizeof (ElementType), mtInternal, AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess<>::arraycopy_to_native (a, typeArrayOopDesc::element_offset<ElementType>(0), result , len); if (isCopy) { *isCopy = 1; } } } ReturnProbe; return result ; } } | |||
2406 | , EntryProbe, ReturnProbe)extern "C" { ElementType* jni_GetResultArrayElements(JNIEnv * env, ElementTypeArray array, jboolean *isCopy) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2406, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); ElementType * result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (ElementType*)get_bad_address (); } else { result = (ElementType*) (AllocateHeap(((len)) * sizeof (ElementType), mtInternal, AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess<>::arraycopy_to_native (a, typeArrayOopDesc::element_offset<ElementType>(0), result , len); if (isCopy) { *isCopy = 1; } } } ReturnProbe; return result ; } } \extern "C" { ElementType* jni_Get##Result##ArrayElements(JNIEnv *env, ElementType##Array array, jboolean *isCopy) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2409, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2407 | \extern "C" { ElementType* jni_Get##Result##ArrayElements(JNIEnv *env, ElementType##Array array, jboolean *isCopy) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2409, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2408 | JNI_ENTRY_NO_PRESERVE(ElementType*, \extern "C" { ElementType* jni_Get##Result##ArrayElements(JNIEnv *env, ElementType##Array array, jboolean *isCopy) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2409, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2409 | jni_Get##Result##ArrayElements(JNIEnv *env, ElementType##Array array, jboolean *isCopy))extern "C" { ElementType* jni_Get##Result##ArrayElements(JNIEnv *env, ElementType##Array array, jboolean *isCopy) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2409, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); \ | |||
2410 | EntryProbe; \ | |||
2411 | /* allocate an chunk of memory in c land */ \ | |||
2412 | typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); \ | |||
2413 | ElementType* result; \ | |||
2414 | int len = a->length(); \ | |||
2415 | if (len == 0) { \ | |||
2416 | if (isCopy != NULL__null) { \ | |||
2417 | *isCopy = JNI_FALSE0; \ | |||
2418 | } \ | |||
2419 | /* Empty array: legal but useless, can't return NULL. \ | |||
2420 | * Return a pointer to something useless. \ | |||
2421 | * Avoid asserts in typeArrayOop. */ \ | |||
2422 | result = (ElementType*)get_bad_address(); \ | |||
2423 | } else { \ | |||
2424 | /* JNI Specification states return NULL on OOM */ \ | |||
2425 | result = NEW_C_HEAP_ARRAY_RETURN_NULL(ElementType, len, mtInternal)(ElementType*) (AllocateHeap(((len)) * sizeof(ElementType), mtInternal , AllocFailStrategy::RETURN_NULL)); \ | |||
2426 | if (result != NULL__null) { \ | |||
2427 | /* copy the array to the c chunk */ \ | |||
2428 | ArrayAccess<>::arraycopy_to_native(a, typeArrayOopDesc::element_offset<ElementType>(0), \ | |||
2429 | result, len); \ | |||
2430 | if (isCopy) { \ | |||
2431 | *isCopy = JNI_TRUE1; \ | |||
2432 | } \ | |||
2433 | } \ | |||
2434 | } \ | |||
2435 | ReturnProbe; \ | |||
2436 | return result; \} } | |||
2437 | JNI_END} } | |||
2438 | ||||
2439 | DEFINE_GETSCALARARRAYELEMENTS(T_BOOLEAN, jboolean, Boolean, boolextern "C" { jboolean* jni_GetBooleanArrayElements(JNIEnv *env , jbooleanArray array, jboolean *isCopy) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2441, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jboolean* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jboolean*)get_bad_address(); } else { result = (jboolean*) (AllocateHeap(((len)) * sizeof(jboolean), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jboolean>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2440 | , HOTSPOT_JNI_GETBOOLEANARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) isCopy),extern "C" { jboolean* jni_GetBooleanArrayElements(JNIEnv *env , jbooleanArray array, jboolean *isCopy) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2441, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jboolean* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jboolean*)get_bad_address(); } else { result = (jboolean*) (AllocateHeap(((len)) * sizeof(jboolean), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jboolean>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2441 | HOTSPOT_JNI_GETBOOLEANARRAYELEMENTS_RETURN((uintptr_t*)result))extern "C" { jboolean* jni_GetBooleanArrayElements(JNIEnv *env , jbooleanArray array, jboolean *isCopy) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2441, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jboolean* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jboolean*)get_bad_address(); } else { result = (jboolean*) (AllocateHeap(((len)) * sizeof(jboolean), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jboolean>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2442 | DEFINE_GETSCALARARRAYELEMENTS(T_BYTE, jbyte, Byte, byteextern "C" { jbyte* jni_GetByteArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2444, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jbyte* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jbyte*)get_bad_address(); } else { result = (jbyte*) (AllocateHeap(((len)) * sizeof(jbyte), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jbyte >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2443 | , HOTSPOT_JNI_GETBYTEARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) isCopy),extern "C" { jbyte* jni_GetByteArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2444, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jbyte* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jbyte*)get_bad_address(); } else { result = (jbyte*) (AllocateHeap(((len)) * sizeof(jbyte), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jbyte >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2444 | HOTSPOT_JNI_GETBYTEARRAYELEMENTS_RETURN((char*)result))extern "C" { jbyte* jni_GetByteArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2444, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jbyte* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jbyte*)get_bad_address(); } else { result = (jbyte*) (AllocateHeap(((len)) * sizeof(jbyte), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jbyte >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2445 | DEFINE_GETSCALARARRAYELEMENTS(T_SHORT, jshort, Short, shortextern "C" { jshort* jni_GetShortArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2447, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jshort* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jshort*)get_bad_address(); } else { result = (jshort*) (AllocateHeap(((len)) * sizeof(jshort), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jshort>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2446 | , HOTSPOT_JNI_GETSHORTARRAYELEMENTS_ENTRY(env, (uint16_t*) array, (uintptr_t *) isCopy),extern "C" { jshort* jni_GetShortArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2447, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jshort* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jshort*)get_bad_address(); } else { result = (jshort*) (AllocateHeap(((len)) * sizeof(jshort), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jshort>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2447 | HOTSPOT_JNI_GETSHORTARRAYELEMENTS_RETURN((uint16_t*)result))extern "C" { jshort* jni_GetShortArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2447, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jshort* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jshort*)get_bad_address(); } else { result = (jshort*) (AllocateHeap(((len)) * sizeof(jshort), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jshort>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2448 | DEFINE_GETSCALARARRAYELEMENTS(T_CHAR, jchar, Char, charextern "C" { jchar* jni_GetCharArrayElements(JNIEnv *env, jcharArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2450, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jchar* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jchar*)get_bad_address(); } else { result = (jchar*) (AllocateHeap(((len)) * sizeof(jchar), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jchar >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2449 | , HOTSPOT_JNI_GETCHARARRAYELEMENTS_ENTRY(env, (uint16_t*) array, (uintptr_t *) isCopy),extern "C" { jchar* jni_GetCharArrayElements(JNIEnv *env, jcharArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2450, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jchar* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jchar*)get_bad_address(); } else { result = (jchar*) (AllocateHeap(((len)) * sizeof(jchar), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jchar >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2450 | HOTSPOT_JNI_GETCHARARRAYELEMENTS_RETURN(result))extern "C" { jchar* jni_GetCharArrayElements(JNIEnv *env, jcharArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2450, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jchar* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jchar*)get_bad_address(); } else { result = (jchar*) (AllocateHeap(((len)) * sizeof(jchar), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jchar >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2451 | DEFINE_GETSCALARARRAYELEMENTS(T_INT, jint, Int, intextern "C" { jint* jni_GetIntArrayElements(JNIEnv *env, jintArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2453, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jint* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jint*)get_bad_address(); } else { result = ( jint*) (AllocateHeap(((len)) * sizeof(jint), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jint >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2452 | , HOTSPOT_JNI_GETINTARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) isCopy),extern "C" { jint* jni_GetIntArrayElements(JNIEnv *env, jintArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2453, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jint* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jint*)get_bad_address(); } else { result = ( jint*) (AllocateHeap(((len)) * sizeof(jint), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jint >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2453 | HOTSPOT_JNI_GETINTARRAYELEMENTS_RETURN((uint32_t*)result))extern "C" { jint* jni_GetIntArrayElements(JNIEnv *env, jintArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2453, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jint* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jint*)get_bad_address(); } else { result = ( jint*) (AllocateHeap(((len)) * sizeof(jint), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jint >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2454 | DEFINE_GETSCALARARRAYELEMENTS(T_LONG, jlong, Long, longextern "C" { jlong* jni_GetLongArrayElements(JNIEnv *env, jlongArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2456, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jlong* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jlong*)get_bad_address(); } else { result = (jlong*) (AllocateHeap(((len)) * sizeof(jlong), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jlong >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2455 | , HOTSPOT_JNI_GETLONGARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) isCopy),extern "C" { jlong* jni_GetLongArrayElements(JNIEnv *env, jlongArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2456, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jlong* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jlong*)get_bad_address(); } else { result = (jlong*) (AllocateHeap(((len)) * sizeof(jlong), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jlong >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2456 | HOTSPOT_JNI_GETLONGARRAYELEMENTS_RETURN(((uintptr_t*)result)))extern "C" { jlong* jni_GetLongArrayElements(JNIEnv *env, jlongArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2456, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jlong* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jlong*)get_bad_address(); } else { result = (jlong*) (AllocateHeap(((len)) * sizeof(jlong), mtInternal, AllocFailStrategy ::RETURN_NULL)); if (result != __null) { ArrayAccess<>:: arraycopy_to_native(a, typeArrayOopDesc::element_offset<jlong >(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2457 | // Float and double probes don't return value because dtrace doesn't currently support it | |||
2458 | DEFINE_GETSCALARARRAYELEMENTS(T_FLOAT, jfloat, Float, floatextern "C" { jfloat* jni_GetFloatArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2460, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jfloat* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jfloat*)get_bad_address(); } else { result = (jfloat*) (AllocateHeap(((len)) * sizeof(jfloat), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jfloat>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2459 | , HOTSPOT_JNI_GETFLOATARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) isCopy),extern "C" { jfloat* jni_GetFloatArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2460, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jfloat* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jfloat*)get_bad_address(); } else { result = (jfloat*) (AllocateHeap(((len)) * sizeof(jfloat), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jfloat>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2460 | HOTSPOT_JNI_GETFLOATARRAYELEMENTS_RETURN(result))extern "C" { jfloat* jni_GetFloatArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2460, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jfloat* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jfloat*)get_bad_address(); } else { result = (jfloat*) (AllocateHeap(((len)) * sizeof(jfloat), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jfloat>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2461 | DEFINE_GETSCALARARRAYELEMENTS(T_DOUBLE, jdouble, Double, doubleextern "C" { jdouble* jni_GetDoubleArrayElements(JNIEnv *env, jdoubleArray array, jboolean *isCopy) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2463, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jdouble* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jdouble*)get_bad_address(); } else { result = (jdouble*) (AllocateHeap(((len)) * sizeof(jdouble), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jdouble>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2462 | , HOTSPOT_JNI_GETDOUBLEARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) isCopy),extern "C" { jdouble* jni_GetDoubleArrayElements(JNIEnv *env, jdoubleArray array, jboolean *isCopy) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2463, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jdouble* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jdouble*)get_bad_address(); } else { result = (jdouble*) (AllocateHeap(((len)) * sizeof(jdouble), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jdouble>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2463 | HOTSPOT_JNI_GETDOUBLEARRAYELEMENTS_RETURN(result))extern "C" { jdouble* jni_GetDoubleArrayElements(JNIEnv *env, jdoubleArray array, jboolean *isCopy) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2463, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); jdouble* result; int len = a->length(); if (len == 0) { if (isCopy != __null) { *isCopy = 0; } result = (jdouble*)get_bad_address(); } else { result = (jdouble*) (AllocateHeap(((len)) * sizeof(jdouble), mtInternal , AllocFailStrategy::RETURN_NULL)); if (result != __null) { ArrayAccess <>::arraycopy_to_native(a, typeArrayOopDesc::element_offset <jdouble>(0), result, len); if (isCopy) { *isCopy = 1; } } } ; return result; } } | |||
2464 | ||||
2465 | ||||
2466 | #define DEFINE_RELEASESCALARARRAYELEMENTS(ElementTag,ElementType,Result,Tag \;extern "C" { void jni_ReleaseResultArrayElements(JNIEnv *env , ElementTypeArray array, ElementType *buf, jint mode) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2467, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); int len = a->length(); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess<>::arraycopy_from_native(buf, a, typeArrayOopDesc ::element_offset<ElementType>(0), len); } if ((mode == 0 ) || (mode == 2)) { FreeHeap(buf); } } ReturnProbe; } } | |||
2467 | , EntryProbe, ReturnProbe);extern "C" { void jni_ReleaseResultArrayElements(JNIEnv *env , ElementTypeArray array, ElementType *buf, jint mode) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2467, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); EntryProbe; typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); int len = a->length(); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess<>::arraycopy_from_native(buf, a, typeArrayOopDesc ::element_offset<ElementType>(0), len); } if ((mode == 0 ) || (mode == 2)) { FreeHeap(buf); } } ReturnProbe; } };\extern "C" { void jni_Release##Result##ArrayElements(JNIEnv * env, ElementType##Array array, ElementType *buf, jint mode) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2468 | \extern "C" { void jni_Release##Result##ArrayElements(JNIEnv * env, ElementType##Array array, ElementType *buf, jint mode) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2469 | JNI_ENTRY_NO_PRESERVE(void, \extern "C" { void jni_Release##Result##ArrayElements(JNIEnv * env, ElementType##Array array, ElementType *buf, jint mode) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2470 | jni_Release##Result##ArrayElements(JNIEnv *env, ElementType##Array array, \extern "C" { void jni_Release##Result##ArrayElements(JNIEnv * env, ElementType##Array array, ElementType *buf, jint mode) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2471 | ElementType *buf, jint mode))extern "C" { void jni_Release##Result##ArrayElements(JNIEnv * env, ElementType##Array array, ElementType *buf, jint mode) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2471, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); \ | |||
2472 | EntryProbe; \ | |||
2473 | typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); \ | |||
2474 | int len = a->length(); \ | |||
2475 | if (len != 0) { /* Empty array: nothing to free or copy. */ \ | |||
2476 | if ((mode == 0) || (mode == JNI_COMMIT1)) { \ | |||
2477 | ArrayAccess<>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset<ElementType>(0), len); \ | |||
2478 | } \ | |||
2479 | if ((mode == 0) || (mode == JNI_ABORT2)) { \ | |||
2480 | FreeHeap(buf); \ | |||
2481 | } \ | |||
2482 | } \ | |||
2483 | ReturnProbe; \} } | |||
2484 | JNI_END} } | |||
2485 | ||||
2486 | DEFINE_RELEASESCALARARRAYELEMENTS(T_BOOLEAN, jboolean, Boolean, bool;extern "C" { void jni_ReleaseBooleanArrayElements(JNIEnv *env , jbooleanArray array, jboolean *buf, jint mode) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2488, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jboolean>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap(buf); } } ; } } | |||
2487 | , HOTSPOT_JNI_RELEASEBOOLEANARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) buf, mode),;extern "C" { void jni_ReleaseBooleanArrayElements(JNIEnv *env , jbooleanArray array, jboolean *buf, jint mode) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2488, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jboolean>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap(buf); } } ; } } | |||
2488 | HOTSPOT_JNI_RELEASEBOOLEANARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseBooleanArrayElements(JNIEnv *env , jbooleanArray array, jboolean *buf, jint mode) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2488, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jboolean>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap(buf); } } ; } } | |||
2489 | DEFINE_RELEASESCALARARRAYELEMENTS(T_BYTE, jbyte, Byte, byte;extern "C" { void jni_ReleaseByteArrayElements(JNIEnv *env, jbyteArray array, jbyte *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2491, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jbyte>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2490 | , HOTSPOT_JNI_RELEASEBYTEARRAYELEMENTS_ENTRY(env, array, (char *) buf, mode),;extern "C" { void jni_ReleaseByteArrayElements(JNIEnv *env, jbyteArray array, jbyte *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2491, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jbyte>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2491 | HOTSPOT_JNI_RELEASEBYTEARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseByteArrayElements(JNIEnv *env, jbyteArray array, jbyte *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2491, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jbyte>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2492 | DEFINE_RELEASESCALARARRAYELEMENTS(T_SHORT, jshort, Short, short;extern "C" { void jni_ReleaseShortArrayElements(JNIEnv *env, jshortArray array, jshort *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2494, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jshort>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2493 | , HOTSPOT_JNI_RELEASESHORTARRAYELEMENTS_ENTRY(env, array, (uint16_t *) buf, mode),;extern "C" { void jni_ReleaseShortArrayElements(JNIEnv *env, jshortArray array, jshort *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2494, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jshort>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2494 | HOTSPOT_JNI_RELEASESHORTARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseShortArrayElements(JNIEnv *env, jshortArray array, jshort *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2494, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jshort>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2495 | DEFINE_RELEASESCALARARRAYELEMENTS(T_CHAR, jchar, Char, char;extern "C" { void jni_ReleaseCharArrayElements(JNIEnv *env, jcharArray array, jchar *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2497, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jchar>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2496 | , HOTSPOT_JNI_RELEASECHARARRAYELEMENTS_ENTRY(env, array, (uint16_t *) buf, mode),;extern "C" { void jni_ReleaseCharArrayElements(JNIEnv *env, jcharArray array, jchar *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2497, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jchar>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2497 | HOTSPOT_JNI_RELEASECHARARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseCharArrayElements(JNIEnv *env, jcharArray array, jchar *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2497, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jchar>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2498 | DEFINE_RELEASESCALARARRAYELEMENTS(T_INT, jint, Int, int;extern "C" { void jni_ReleaseIntArrayElements(JNIEnv *env, jintArray array, jint *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2500, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jint>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2499 | , HOTSPOT_JNI_RELEASEINTARRAYELEMENTS_ENTRY(env, array, (uint32_t *) buf, mode),;extern "C" { void jni_ReleaseIntArrayElements(JNIEnv *env, jintArray array, jint *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2500, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jint>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2500 | HOTSPOT_JNI_RELEASEINTARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseIntArrayElements(JNIEnv *env, jintArray array, jint *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2500, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jint>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2501 | DEFINE_RELEASESCALARARRAYELEMENTS(T_LONG, jlong, Long, long;extern "C" { void jni_ReleaseLongArrayElements(JNIEnv *env, jlongArray array, jlong *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2503, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jlong>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2502 | , HOTSPOT_JNI_RELEASELONGARRAYELEMENTS_ENTRY(env, array, (uintptr_t *) buf, mode),;extern "C" { void jni_ReleaseLongArrayElements(JNIEnv *env, jlongArray array, jlong *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2503, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jlong>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2503 | HOTSPOT_JNI_RELEASELONGARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseLongArrayElements(JNIEnv *env, jlongArray array, jlong *buf, jint mode) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2503, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jlong>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2504 | DEFINE_RELEASESCALARARRAYELEMENTS(T_FLOAT, jfloat, Float, float;extern "C" { void jni_ReleaseFloatArrayElements(JNIEnv *env, jfloatArray array, jfloat *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2506, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jfloat>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2505 | , HOTSPOT_JNI_RELEASEFLOATARRAYELEMENTS_ENTRY(env, array, (float *) buf, mode),;extern "C" { void jni_ReleaseFloatArrayElements(JNIEnv *env, jfloatArray array, jfloat *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2506, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jfloat>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2506 | HOTSPOT_JNI_RELEASEFLOATARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseFloatArrayElements(JNIEnv *env, jfloatArray array, jfloat *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2506, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jfloat>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap (buf); } } ; } } | |||
2507 | DEFINE_RELEASESCALARARRAYELEMENTS(T_DOUBLE, jdouble, Double, double;extern "C" { void jni_ReleaseDoubleArrayElements(JNIEnv *env , jdoubleArray array, jdouble *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2509, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jdouble>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap(buf); } } ; } } | |||
2508 | , HOTSPOT_JNI_RELEASEDOUBLEARRAYELEMENTS_ENTRY(env, array, (double *) buf, mode),;extern "C" { void jni_ReleaseDoubleArrayElements(JNIEnv *env , jdoubleArray array, jdouble *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2509, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jdouble>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap(buf); } } ; } } | |||
2509 | HOTSPOT_JNI_RELEASEDOUBLEARRAYELEMENTS_RETURN());extern "C" { void jni_ReleaseDoubleArrayElements(JNIEnv *env , jdoubleArray array, jdouble *buf, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2509, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); ; typeArrayOop a = typeArrayOop (JNIHandles::resolve_non_null(array)); int len = a->length (); if (len != 0) { if ((mode == 0) || (mode == 1)) { ArrayAccess <>::arraycopy_from_native(buf, a, typeArrayOopDesc::element_offset <jdouble>(0), len); } if ((mode == 0) || (mode == 2)) { FreeHeap(buf); } } ; } } | |||
2510 | ||||
2511 | static void check_bounds(jsize start, jsize copy_len, jsize array_len, TRAPSJavaThread* __the_thread__) { | |||
2512 | ResourceMark rm(THREAD__the_thread__); | |||
2513 | if (copy_len < 0) { | |||
2514 | stringStream ss; | |||
2515 | ss.print("Length %d is negative", copy_len); | |||
2516 | THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2516, vmSymbols::java_lang_ArrayIndexOutOfBoundsException() , ss.as_string()); return; }; | |||
2517 | } else if (start < 0 || (start > array_len - copy_len)) { | |||
2518 | stringStream ss; | |||
2519 | ss.print("Array region %d.." INT64_FORMAT"%" "l" "d" " out of bounds for length %d", | |||
2520 | start, (int64_t)start+(int64_t)copy_len, array_len); | |||
2521 | THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2521, vmSymbols::java_lang_ArrayIndexOutOfBoundsException() , ss.as_string()); return; }; | |||
2522 | } | |||
2523 | } | |||
2524 | ||||
2525 | #define DEFINE_GETSCALARARRAYREGION(ElementTag,ElementType,Result, Tag \; ; extern "C" { void jni_GetResultArrayRegion(JNIEnv *env, ElementTypeArray array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2526, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ; typeArrayOop src = typeArrayOop (JNIHandles::resolve_non_null(array)); check_bounds(start, len , src->length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<ElementType>(start), buf, len); } } } | |||
2526 | , EntryProbe, ReturnProbe); ; extern "C" { void jni_GetResultArrayRegion(JNIEnv *env, ElementTypeArray array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2526, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ; typeArrayOop src = typeArrayOop (JNIHandles::resolve_non_null(array)); check_bounds(start, len , src->length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<ElementType>(start), buf, len); } } }; \ | |||
2527 | DT_VOID_RETURN_MARK_DECL(Get##Result##ArrayRegion \ | |||
2528 | , ReturnProbe); \extern "C" { void jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2532, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2529 | \extern "C" { void jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2532, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2530 | JNI_ENTRY(void, \extern "C" { void jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2532, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2531 | jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start, \extern "C" { void jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2532, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2532 | jsize len, ElementType *buf))extern "C" { void jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2532, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
2533 | EntryProbe; \ | |||
2534 | DT_VOID_RETURN_MARK(Get##Result##ArrayRegion); \ | |||
2535 | typeArrayOop src = typeArrayOop(JNIHandles::resolve_non_null(array)); \ | |||
2536 | check_bounds(start, len, src->length(), CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); \ | |||
2537 | if (len > 0) { \ | |||
2538 | ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc::element_offset<ElementType>(start), buf, len); \ | |||
2539 | } \} } | |||
2540 | JNI_END} } | |||
2541 | ||||
2542 | DEFINE_GETSCALARARRAYREGION(T_BOOLEAN, jboolean,Boolean, bool; ; extern "C" { void jni_GetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize len, jboolean *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2544, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jboolean>(start), buf, len); } } } | |||
2543 | , HOTSPOT_JNI_GETBOOLEANARRAYREGION_ENTRY(env, array, start, len, (uintptr_t *) buf),; ; extern "C" { void jni_GetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize len, jboolean *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2544, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jboolean>(start), buf, len); } } } | |||
2544 | HOTSPOT_JNI_GETBOOLEANARRAYREGION_RETURN()); ; extern "C" { void jni_GetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize len, jboolean *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2544, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jboolean>(start), buf, len); } } }; | |||
2545 | DEFINE_GETSCALARARRAYREGION(T_BYTE, jbyte, Byte, byte; ; extern "C" { void jni_GetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2547, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jbyte>(start), buf, len); } } } | |||
2546 | , HOTSPOT_JNI_GETBYTEARRAYREGION_ENTRY(env, array, start, len, (char *) buf),; ; extern "C" { void jni_GetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2547, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jbyte>(start), buf, len); } } } | |||
2547 | HOTSPOT_JNI_GETBYTEARRAYREGION_RETURN()); ; extern "C" { void jni_GetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2547, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jbyte>(start), buf, len); } } }; | |||
2548 | DEFINE_GETSCALARARRAYREGION(T_SHORT, jshort, Short, short; ; extern "C" { void jni_GetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2550, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jshort>(start), buf, len); } } } | |||
2549 | , HOTSPOT_JNI_GETSHORTARRAYREGION_ENTRY(env, array, start, len, (uint16_t *) buf),; ; extern "C" { void jni_GetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2550, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jshort>(start), buf, len); } } } | |||
2550 | HOTSPOT_JNI_GETSHORTARRAYREGION_RETURN()); ; extern "C" { void jni_GetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2550, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jshort>(start), buf, len); } } }; | |||
2551 | DEFINE_GETSCALARARRAYREGION(T_CHAR, jchar, Char, char; ; extern "C" { void jni_GetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2553, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jchar>(start), buf, len); } } } | |||
2552 | , HOTSPOT_JNI_GETCHARARRAYREGION_ENTRY(env, array, start, len, (uint16_t*) buf),; ; extern "C" { void jni_GetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2553, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jchar>(start), buf, len); } } } | |||
2553 | HOTSPOT_JNI_GETCHARARRAYREGION_RETURN()); ; extern "C" { void jni_GetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2553, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jchar>(start), buf, len); } } }; | |||
2554 | DEFINE_GETSCALARARRAYREGION(T_INT, jint, Int, int; ; extern "C" { void jni_GetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2556, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jint>(start), buf, len); } } } | |||
2555 | , HOTSPOT_JNI_GETINTARRAYREGION_ENTRY(env, array, start, len, (uint32_t*) buf),; ; extern "C" { void jni_GetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2556, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jint>(start), buf, len); } } } | |||
2556 | HOTSPOT_JNI_GETINTARRAYREGION_RETURN()); ; extern "C" { void jni_GetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2556, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jint>(start), buf, len); } } }; | |||
2557 | DEFINE_GETSCALARARRAYREGION(T_LONG, jlong, Long, long; ; extern "C" { void jni_GetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2559, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jlong>(start), buf, len); } } } | |||
2558 | , HOTSPOT_JNI_GETLONGARRAYREGION_ENTRY(env, array, start, len, (uintptr_t *) buf),; ; extern "C" { void jni_GetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2559, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jlong>(start), buf, len); } } } | |||
2559 | HOTSPOT_JNI_GETLONGARRAYREGION_RETURN()); ; extern "C" { void jni_GetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2559, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jlong>(start), buf, len); } } }; | |||
2560 | DEFINE_GETSCALARARRAYREGION(T_FLOAT, jfloat, Float, float; ; extern "C" { void jni_GetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2562, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jfloat>(start), buf, len); } } } | |||
2561 | , HOTSPOT_JNI_GETFLOATARRAYREGION_ENTRY(env, array, start, len, (float *) buf),; ; extern "C" { void jni_GetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2562, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jfloat>(start), buf, len); } } } | |||
2562 | HOTSPOT_JNI_GETFLOATARRAYREGION_RETURN()); ; extern "C" { void jni_GetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2562, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jfloat>(start), buf, len); } } }; | |||
2563 | DEFINE_GETSCALARARRAYREGION(T_DOUBLE, jdouble, Double, double; ; extern "C" { void jni_GetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2565, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jdouble>(start), buf, len); } } } | |||
2564 | , HOTSPOT_JNI_GETDOUBLEARRAYREGION_ENTRY(env, array, start, len, (double *) buf),; ; extern "C" { void jni_GetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2565, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jdouble>(start), buf, len); } } } | |||
2565 | HOTSPOT_JNI_GETDOUBLEARRAYREGION_RETURN()); ; extern "C" { void jni_GetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2565, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop src = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, src-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc ::element_offset<jdouble>(start), buf, len); } } }; | |||
2566 | ||||
2567 | ||||
2568 | #define DEFINE_SETSCALARARRAYREGION(ElementTag,ElementType,Result, Tag \; ; extern "C" { void jni_SetResultArrayRegion(JNIEnv *env, ElementTypeArray array, jsize start, jsize len, const ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2569, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ; typeArrayOop dst = typeArrayOop (JNIHandles::resolve_non_null(array)); check_bounds(start, len , dst->length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<ElementType>(start), len); } } } | |||
2569 | , EntryProbe, ReturnProbe); ; extern "C" { void jni_SetResultArrayRegion(JNIEnv *env, ElementTypeArray array, jsize start, jsize len, const ElementType *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2569, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); EntryProbe; ; typeArrayOop dst = typeArrayOop (JNIHandles::resolve_non_null(array)); check_bounds(start, len , dst->length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<ElementType>(start), len); } } }; \ | |||
2570 | DT_VOID_RETURN_MARK_DECL(Set##Result##ArrayRegion \ | |||
2571 | ,ReturnProbe); \extern "C" { void jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, const ElementType *buf ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2572 | \extern "C" { void jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, const ElementType *buf ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2573 | JNI_ENTRY(void, \extern "C" { void jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, const ElementType *buf ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2574 | jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start, \extern "C" { void jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, const ElementType *buf ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2575 | jsize len, const ElementType *buf))extern "C" { void jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType ##Array array, jsize start, jsize len, const ElementType *buf ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2575, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); \ | |||
2576 | EntryProbe; \ | |||
2577 | DT_VOID_RETURN_MARK(Set##Result##ArrayRegion); \ | |||
2578 | typeArrayOop dst = typeArrayOop(JNIHandles::resolve_non_null(array)); \ | |||
2579 | check_bounds(start, len, dst->length(), CHECK__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return ; (void)(0); \ | |||
2580 | if (len > 0) { \ | |||
2581 | ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc::element_offset<ElementType>(start), len); \ | |||
2582 | } \} } | |||
2583 | JNI_END} } | |||
2584 | ||||
2585 | DEFINE_SETSCALARARRAYREGION(T_BOOLEAN, jboolean, Boolean, bool; ; extern "C" { void jni_SetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize len, const jboolean *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2587, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jboolean>(start), len); } } } | |||
2586 | , HOTSPOT_JNI_SETBOOLEANARRAYREGION_ENTRY(env, array, start, len, (uintptr_t *)buf),; ; extern "C" { void jni_SetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize len, const jboolean *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2587, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jboolean>(start), len); } } } | |||
2587 | HOTSPOT_JNI_SETBOOLEANARRAYREGION_RETURN()); ; extern "C" { void jni_SetBooleanArrayRegion(JNIEnv *env, jbooleanArray array, jsize start, jsize len, const jboolean *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2587, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jboolean>(start), len); } } } | |||
2588 | DEFINE_SETSCALARARRAYREGION(T_BYTE, jbyte, Byte, byte; ; extern "C" { void jni_SetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2590, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jbyte>(start), len); } } } | |||
2589 | , HOTSPOT_JNI_SETBYTEARRAYREGION_ENTRY(env, array, start, len, (char *) buf),; ; extern "C" { void jni_SetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2590, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jbyte>(start), len); } } } | |||
2590 | HOTSPOT_JNI_SETBYTEARRAYREGION_RETURN()); ; extern "C" { void jni_SetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2590, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jbyte>(start), len); } } } | |||
2591 | DEFINE_SETSCALARARRAYREGION(T_SHORT, jshort, Short, short; ; extern "C" { void jni_SetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2593, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jshort>(start), len); } } } | |||
2592 | , HOTSPOT_JNI_SETSHORTARRAYREGION_ENTRY(env, array, start, len, (uint16_t *) buf),; ; extern "C" { void jni_SetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2593, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jshort>(start), len); } } } | |||
2593 | HOTSPOT_JNI_SETSHORTARRAYREGION_RETURN()); ; extern "C" { void jni_SetShortArrayRegion(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2593, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jshort>(start), len); } } } | |||
2594 | DEFINE_SETSCALARARRAYREGION(T_CHAR, jchar, Char, char; ; extern "C" { void jni_SetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2596, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jchar>(start), len); } } } | |||
2595 | , HOTSPOT_JNI_SETCHARARRAYREGION_ENTRY(env, array, start, len, (uint16_t *) buf),; ; extern "C" { void jni_SetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2596, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jchar>(start), len); } } } | |||
2596 | HOTSPOT_JNI_SETCHARARRAYREGION_RETURN()); ; extern "C" { void jni_SetCharArrayRegion(JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2596, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jchar>(start), len); } } } | |||
2597 | DEFINE_SETSCALARARRAYREGION(T_INT, jint, Int, int; ; extern "C" { void jni_SetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2599, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jint>(start), len); } } } | |||
2598 | , HOTSPOT_JNI_SETINTARRAYREGION_ENTRY(env, array, start, len, (uint32_t *) buf),; ; extern "C" { void jni_SetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2599, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jint>(start), len); } } } | |||
2599 | HOTSPOT_JNI_SETINTARRAYREGION_RETURN()); ; extern "C" { void jni_SetIntArrayRegion(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2599, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jint>(start), len); } } } | |||
2600 | DEFINE_SETSCALARARRAYREGION(T_LONG, jlong, Long, long; ; extern "C" { void jni_SetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2602, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jlong>(start), len); } } } | |||
2601 | , HOTSPOT_JNI_SETLONGARRAYREGION_ENTRY(env, array, start, len, (uintptr_t *) buf),; ; extern "C" { void jni_SetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2602, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jlong>(start), len); } } } | |||
2602 | HOTSPOT_JNI_SETLONGARRAYREGION_RETURN()); ; extern "C" { void jni_SetLongArrayRegion(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2602, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jlong>(start), len); } } } | |||
2603 | DEFINE_SETSCALARARRAYREGION(T_FLOAT, jfloat, Float, float; ; extern "C" { void jni_SetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2605, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jfloat>(start), len); } } } | |||
2604 | , HOTSPOT_JNI_SETFLOATARRAYREGION_ENTRY(env, array, start, len, (float *) buf),; ; extern "C" { void jni_SetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2605, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jfloat>(start), len); } } } | |||
2605 | HOTSPOT_JNI_SETFLOATARRAYREGION_RETURN()); ; extern "C" { void jni_SetFloatArrayRegion(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2605, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jfloat>(start), len); } } } | |||
2606 | DEFINE_SETSCALARARRAYREGION(T_DOUBLE, jdouble, Double, double; ; extern "C" { void jni_SetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2608, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jdouble>(start), len); } } } | |||
2607 | , HOTSPOT_JNI_SETDOUBLEARRAYREGION_ENTRY(env, array, start, len, (double *) buf),; ; extern "C" { void jni_SetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2608, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jdouble>(start), len); } } } | |||
2608 | HOTSPOT_JNI_SETDOUBLEARRAYREGION_RETURN()); ; extern "C" { void jni_SetDoubleArrayRegion(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2608, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); ; ; typeArrayOop dst = typeArrayOop(JNIHandles ::resolve_non_null(array)); check_bounds(start, len, dst-> length(), __the_thread__); if ((((ThreadShadow*)__the_thread__ )->has_pending_exception())) return ; (void)(0); if (len > 0) { ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc ::element_offset<jdouble>(start), len); } } } | |||
2609 | ||||
2610 | ||||
2611 | DT_RETURN_MARK_DECL(RegisterNatives, jint | |||
2612 | , HOTSPOT_JNI_REGISTERNATIVES_RETURN(_ret_ref)); | |||
2613 | ||||
2614 | JNI_ENTRY(jint, jni_RegisterNatives(JNIEnv *env, jclass clazz,extern "C" { jint jni_RegisterNatives(JNIEnv *env, jclass clazz , const JNINativeMethod *methods, jint nMethods) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2616, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2615 | const JNINativeMethod *methods,extern "C" { jint jni_RegisterNatives(JNIEnv *env, jclass clazz , const JNINativeMethod *methods, jint nMethods) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2616, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2616 | jint nMethods))extern "C" { jint jni_RegisterNatives(JNIEnv *env, jclass clazz , const JNINativeMethod *methods, jint nMethods) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2616, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2617 | HOTSPOT_JNI_REGISTERNATIVES_ENTRY(env, clazz, (void *) methods, nMethods); | |||
2618 | jint ret = 0; | |||
2619 | DT_RETURN_MARK(RegisterNatives, jint, (const jint&)ret); | |||
2620 | ||||
2621 | Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(clazz)); | |||
2622 | ||||
2623 | // There are no restrictions on native code registering native methods, | |||
2624 | // which allows agents to redefine the bindings to native methods, however | |||
2625 | // we issue a warning if any code running outside of the boot/platform | |||
2626 | // loader is rebinding any native methods in classes loaded by the | |||
2627 | // boot/platform loader that are in named modules. That will catch changes | |||
2628 | // to platform classes while excluding classes added to the bootclasspath. | |||
2629 | bool do_warning = false; | |||
2630 | ||||
2631 | // Only instanceKlasses can have native methods | |||
2632 | if (k->is_instance_klass()) { | |||
2633 | oop cl = k->class_loader(); | |||
2634 | InstanceKlass* ik = InstanceKlass::cast(k); | |||
2635 | // Check for a platform class | |||
2636 | if ((cl == NULL__null || SystemDictionary::is_platform_class_loader(cl)) && | |||
2637 | ik->module()->is_named()) { | |||
2638 | Klass* caller = thread->security_get_caller_class(1); | |||
2639 | // If no caller class, or caller class has a different loader, then | |||
2640 | // issue a warning below. | |||
2641 | do_warning = (caller == NULL__null) || caller->class_loader() != cl; | |||
2642 | } | |||
2643 | } | |||
2644 | ||||
2645 | ||||
2646 | for (int index = 0; index < nMethods; index++) { | |||
2647 | const char* meth_name = methods[index].name; | |||
2648 | const char* meth_sig = methods[index].signature; | |||
2649 | int meth_name_len = (int)strlen(meth_name); | |||
2650 | ||||
2651 | // The class should have been loaded (we have an instance of the class | |||
2652 | // passed in) so the method and signature should already be in the symbol | |||
2653 | // table. If they're not there, the method doesn't exist. | |||
2654 | TempNewSymbol name = SymbolTable::probe(meth_name, meth_name_len); | |||
2655 | TempNewSymbol signature = SymbolTable::probe(meth_sig, (int)strlen(meth_sig)); | |||
2656 | ||||
2657 | if (name == NULL__null || signature == NULL__null) { | |||
2658 | ResourceMark rm(THREAD__the_thread__); | |||
2659 | stringStream st; | |||
2660 | st.print("Method %s.%s%s not found", k->external_name(), meth_name, meth_sig); | |||
2661 | // Must return negative value on failure | |||
2662 | THROW_MSG_(vmSymbols::java_lang_NoSuchMethodError(), st.as_string(), -1){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2662, vmSymbols::java_lang_NoSuchMethodError(), st.as_string ()); return -1; }; | |||
2663 | } | |||
2664 | ||||
2665 | if (do_warning) { | |||
2666 | ResourceMark rm(THREAD__the_thread__); | |||
2667 | log_warning(jni, resolve)(!(LogImpl<(LogTag::_jni), (LogTag::_resolve), (LogTag::__NO_TAG ), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG) >::is_level(LogLevel::Warning))) ? (void)0 : LogImpl<(LogTag ::_jni), (LogTag::_resolve), (LogTag::__NO_TAG), (LogTag::__NO_TAG ), (LogTag::__NO_TAG), (LogTag::__NO_TAG)>::write<LogLevel ::Warning>("Re-registering of platform native method: %s.%s%s " | |||
2668 | "from code in a different classloader", k->external_name(), meth_name, meth_sig); | |||
2669 | } | |||
2670 | ||||
2671 | bool res = Method::register_native(k, name, signature, | |||
2672 | (address) methods[index].fnPtr, THREAD__the_thread__); | |||
2673 | if (!res) { | |||
2674 | ret = -1; | |||
2675 | break; | |||
2676 | } | |||
2677 | } | |||
2678 | return ret; | |||
2679 | JNI_END} } | |||
2680 | ||||
2681 | ||||
2682 | JNI_ENTRY(jint, jni_UnregisterNatives(JNIEnv *env, jclass clazz))extern "C" { jint jni_UnregisterNatives(JNIEnv *env, jclass clazz ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2682, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2683 | HOTSPOT_JNI_UNREGISTERNATIVES_ENTRY(env, clazz); | |||
2684 | Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(clazz)); | |||
2685 | //%note jni_2 | |||
2686 | if (k->is_instance_klass()) { | |||
2687 | for (int index = 0; index < InstanceKlass::cast(k)->methods()->length(); index++) { | |||
2688 | Method* m = InstanceKlass::cast(k)->methods()->at(index); | |||
2689 | if (m->is_native()) { | |||
2690 | m->clear_native_function(); | |||
2691 | m->set_signature_handler(NULL__null); | |||
2692 | } | |||
2693 | } | |||
2694 | } | |||
2695 | HOTSPOT_JNI_UNREGISTERNATIVES_RETURN(0); | |||
2696 | return 0; | |||
2697 | JNI_END} } | |||
2698 | ||||
2699 | // | |||
2700 | // Monitor functions | |||
2701 | // | |||
2702 | ||||
2703 | DT_RETURN_MARK_DECL(MonitorEnter, jint | |||
2704 | , HOTSPOT_JNI_MONITORENTER_RETURN(_ret_ref)); | |||
2705 | ||||
2706 | JNI_ENTRY(jint, jni_MonitorEnter(JNIEnv *env, jobject jobj))extern "C" { jint jni_MonitorEnter(JNIEnv *env, jobject jobj) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2706, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2707 | HOTSPOT_JNI_MONITORENTER_ENTRY(env, jobj); | |||
2708 | jint ret = JNI_ERR(-1); | |||
2709 | DT_RETURN_MARK(MonitorEnter, jint, (const jint&)ret); | |||
2710 | ||||
2711 | // If the object is null, we can't do anything with it | |||
2712 | if (jobj == NULL__null) { | |||
2713 | THROW_(vmSymbols::java_lang_NullPointerException(), JNI_ERR){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2713, vmSymbols::java_lang_NullPointerException(), __null); return (-1); }; | |||
2714 | } | |||
2715 | ||||
2716 | Handle obj(thread, JNIHandles::resolve_non_null(jobj)); | |||
2717 | ObjectSynchronizer::jni_enter(obj, thread); | |||
2718 | ret = JNI_OK0; | |||
2719 | return ret; | |||
2720 | JNI_END} } | |||
2721 | ||||
2722 | DT_RETURN_MARK_DECL(MonitorExit, jint | |||
2723 | , HOTSPOT_JNI_MONITOREXIT_RETURN(_ret_ref)); | |||
2724 | ||||
2725 | JNI_ENTRY(jint, jni_MonitorExit(JNIEnv *env, jobject jobj))extern "C" { jint jni_MonitorExit(JNIEnv *env, jobject jobj) { JavaThread* thread=JavaThread::thread_from_jni_environment(env ); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2725, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2726 | HOTSPOT_JNI_MONITOREXIT_ENTRY(env, jobj); | |||
2727 | jint ret = JNI_ERR(-1); | |||
2728 | DT_RETURN_MARK(MonitorExit, jint, (const jint&)ret); | |||
2729 | ||||
2730 | // Don't do anything with a null object | |||
2731 | if (jobj == NULL__null) { | |||
2732 | THROW_(vmSymbols::java_lang_NullPointerException(), JNI_ERR){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2732, vmSymbols::java_lang_NullPointerException(), __null); return (-1); }; | |||
2733 | } | |||
2734 | ||||
2735 | Handle obj(THREAD__the_thread__, JNIHandles::resolve_non_null(jobj)); | |||
2736 | ObjectSynchronizer::jni_exit(obj(), CHECK_(JNI_ERR)__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return (-1); (void)(0); | |||
2737 | ||||
2738 | ret = JNI_OK0; | |||
2739 | return ret; | |||
2740 | JNI_END} } | |||
2741 | ||||
2742 | // | |||
2743 | // Extensions | |||
2744 | // | |||
2745 | ||||
2746 | DT_VOID_RETURN_MARK_DECL(GetStringRegion | |||
2747 | , HOTSPOT_JNI_GETSTRINGREGION_RETURN()); | |||
2748 | ||||
2749 | JNI_ENTRY(void, jni_GetStringRegion(JNIEnv *env, jstring string, jsize start, jsize len, jchar *buf))extern "C" { void jni_GetStringRegion(JNIEnv *env, jstring string , jsize start, jsize len, jchar *buf) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2749, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2750 | HOTSPOT_JNI_GETSTRINGREGION_ENTRY(env, string, start, len, buf); | |||
2751 | DT_VOID_RETURN_MARK(GetStringRegion); | |||
2752 | oop s = JNIHandles::resolve_non_null(string); | |||
2753 | typeArrayOop s_value = java_lang_String::value(s); | |||
2754 | int s_len = java_lang_String::length(s, s_value); | |||
2755 | if (start < 0 || len < 0 || start > s_len - len) { | |||
2756 | THROW(vmSymbols::java_lang_StringIndexOutOfBoundsException()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2756, vmSymbols::java_lang_StringIndexOutOfBoundsException( ), __null); return; }; | |||
2757 | } else { | |||
2758 | if (len > 0) { | |||
2759 | bool is_latin1 = java_lang_String::is_latin1(s); | |||
2760 | if (!is_latin1) { | |||
2761 | ArrayAccess<>::arraycopy_to_native(s_value, typeArrayOopDesc::element_offset<jchar>(start), | |||
2762 | buf, len); | |||
2763 | } else { | |||
2764 | for (int i = 0; i < len; i++) { | |||
2765 | buf[i] = ((jchar) s_value->byte_at(i + start)) & 0xff; | |||
2766 | } | |||
2767 | } | |||
2768 | } | |||
2769 | } | |||
2770 | JNI_END} } | |||
2771 | ||||
2772 | DT_VOID_RETURN_MARK_DECL(GetStringUTFRegion | |||
2773 | , HOTSPOT_JNI_GETSTRINGUTFREGION_RETURN()); | |||
2774 | ||||
2775 | JNI_ENTRY(void, jni_GetStringUTFRegion(JNIEnv *env, jstring string, jsize start, jsize len, char *buf))extern "C" { void jni_GetStringUTFRegion(JNIEnv *env, jstring string, jsize start, jsize len, char *buf) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2775, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2776 | HOTSPOT_JNI_GETSTRINGUTFREGION_ENTRY(env, string, start, len, buf); | |||
2777 | DT_VOID_RETURN_MARK(GetStringUTFRegion); | |||
2778 | oop s = JNIHandles::resolve_non_null(string); | |||
2779 | typeArrayOop s_value = java_lang_String::value(s); | |||
2780 | int s_len = java_lang_String::length(s, s_value); | |||
2781 | if (start < 0 || len < 0 || start > s_len - len) { | |||
2782 | THROW(vmSymbols::java_lang_StringIndexOutOfBoundsException()){ Exceptions::_throw_msg(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2782, vmSymbols::java_lang_StringIndexOutOfBoundsException( ), __null); return; }; | |||
2783 | } else { | |||
2784 | //%note jni_7 | |||
2785 | if (len > 0) { | |||
2786 | // Assume the buffer is large enough as the JNI spec. does not require user error checking | |||
2787 | java_lang_String::as_utf8_string(s, s_value, start, len, buf, INT_MAX2147483647); | |||
2788 | // as_utf8_string null-terminates the result string | |||
2789 | } else { | |||
2790 | // JDK null-terminates the buffer even in len is zero | |||
2791 | if (buf != NULL__null) { | |||
2792 | buf[0] = 0; | |||
2793 | } | |||
2794 | } | |||
2795 | } | |||
2796 | JNI_END} } | |||
2797 | ||||
2798 | static oop lock_gc_or_pin_object(JavaThread* thread, jobject obj) { | |||
2799 | if (Universe::heap()->supports_object_pinning()) { | |||
2800 | const oop o = JNIHandles::resolve_non_null(obj); | |||
2801 | return Universe::heap()->pin_object(thread, o); | |||
2802 | } else { | |||
2803 | GCLocker::lock_critical(thread); | |||
2804 | return JNIHandles::resolve_non_null(obj); | |||
2805 | } | |||
2806 | } | |||
2807 | ||||
2808 | static void unlock_gc_or_unpin_object(JavaThread* thread, jobject obj) { | |||
2809 | if (Universe::heap()->supports_object_pinning()) { | |||
2810 | const oop o = JNIHandles::resolve_non_null(obj); | |||
2811 | return Universe::heap()->unpin_object(thread, o); | |||
2812 | } else { | |||
2813 | GCLocker::unlock_critical(thread); | |||
2814 | } | |||
2815 | } | |||
2816 | ||||
2817 | JNI_ENTRY(void*, jni_GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy))extern "C" { void* jni_GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy) { JavaThread* thread=JavaThread ::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2817, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2818 | HOTSPOT_JNI_GETPRIMITIVEARRAYCRITICAL_ENTRY(env, array, (uintptr_t *) isCopy); | |||
2819 | if (isCopy != NULL__null) { | |||
2820 | *isCopy = JNI_FALSE0; | |||
2821 | } | |||
2822 | oop a = lock_gc_or_pin_object(thread, array); | |||
2823 | assert(a->is_typeArray(), "Primitive array only")do { if (!(a->is_typeArray())) { (*g_assert_poison) = 'X'; ; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2823, "assert(" "a->is_typeArray()" ") failed", "Primitive array only" ); ::breakpoint(); } } while (0); | |||
2824 | BasicType type = TypeArrayKlass::cast(a->klass())->element_type(); | |||
2825 | void* ret = arrayOop(a)->base(type); | |||
2826 | HOTSPOT_JNI_GETPRIMITIVEARRAYCRITICAL_RETURN(ret); | |||
2827 | return ret; | |||
2828 | JNI_END} } | |||
2829 | ||||
2830 | ||||
2831 | JNI_ENTRY(void, jni_ReleasePrimitiveArrayCritical(JNIEnv *env, jarray array, void *carray, jint mode))extern "C" { void jni_ReleasePrimitiveArrayCritical(JNIEnv *env , jarray array, void *carray, jint mode) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2831, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2832 | HOTSPOT_JNI_RELEASEPRIMITIVEARRAYCRITICAL_ENTRY(env, array, carray, mode); | |||
2833 | unlock_gc_or_unpin_object(thread, array); | |||
2834 | HOTSPOT_JNI_RELEASEPRIMITIVEARRAYCRITICAL_RETURN(); | |||
2835 | JNI_END} } | |||
2836 | ||||
2837 | ||||
2838 | static typeArrayOop lock_gc_or_pin_string_value(JavaThread* thread, oop str) { | |||
2839 | if (Universe::heap()->supports_object_pinning()) { | |||
2840 | // Forbid deduplication before obtaining the value array, to prevent | |||
2841 | // deduplication from replacing the value array while setting up or in | |||
2842 | // the critical section. That would lead to the release operation | |||
2843 | // unpinning the wrong object. | |||
2844 | if (StringDedup::is_enabled()) { | |||
2845 | NoSafepointVerifier nsv; | |||
2846 | StringDedup::forbid_deduplication(str); | |||
2847 | } | |||
2848 | typeArrayOop s_value = java_lang_String::value(str); | |||
2849 | return (typeArrayOop) Universe::heap()->pin_object(thread, s_value); | |||
2850 | } else { | |||
2851 | Handle h(thread, str); // Handlize across potential safepoint. | |||
2852 | GCLocker::lock_critical(thread); | |||
2853 | return java_lang_String::value(h()); | |||
2854 | } | |||
2855 | } | |||
2856 | ||||
2857 | static void unlock_gc_or_unpin_string_value(JavaThread* thread, oop str) { | |||
2858 | if (Universe::heap()->supports_object_pinning()) { | |||
2859 | typeArrayOop s_value = java_lang_String::value(str); | |||
2860 | Universe::heap()->unpin_object(thread, s_value); | |||
2861 | } else { | |||
2862 | GCLocker::unlock_critical(thread); | |||
2863 | } | |||
2864 | } | |||
2865 | ||||
2866 | JNI_ENTRY(const jchar*, jni_GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy))extern "C" { const jchar* jni_GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2866, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2867 | HOTSPOT_JNI_GETSTRINGCRITICAL_ENTRY(env, string, (uintptr_t *) isCopy); | |||
2868 | oop s = JNIHandles::resolve_non_null(string); | |||
2869 | jchar* ret; | |||
2870 | if (!java_lang_String::is_latin1(s)) { | |||
2871 | typeArrayOop s_value = lock_gc_or_pin_string_value(thread, s); | |||
2872 | ret = (jchar*) s_value->base(T_CHAR); | |||
2873 | if (isCopy != NULL__null) *isCopy = JNI_FALSE0; | |||
2874 | } else { | |||
2875 | // Inflate latin1 encoded string to UTF16 | |||
2876 | typeArrayOop s_value = java_lang_String::value(s); | |||
2877 | int s_len = java_lang_String::length(s, s_value); | |||
2878 | ret = NEW_C_HEAP_ARRAY_RETURN_NULL(jchar, s_len + 1, mtInternal)(jchar*) (AllocateHeap(((s_len + 1)) * sizeof(jchar), mtInternal , AllocFailStrategy::RETURN_NULL)); // add one for zero termination | |||
2879 | /* JNI Specification states return NULL on OOM */ | |||
2880 | if (ret != NULL__null) { | |||
2881 | for (int i = 0; i < s_len; i++) { | |||
2882 | ret[i] = ((jchar) s_value->byte_at(i)) & 0xff; | |||
2883 | } | |||
2884 | ret[s_len] = 0; | |||
2885 | } | |||
2886 | if (isCopy != NULL__null) *isCopy = JNI_TRUE1; | |||
2887 | } | |||
2888 | HOTSPOT_JNI_GETSTRINGCRITICAL_RETURN((uint16_t *) ret); | |||
2889 | return ret; | |||
2890 | JNI_END} } | |||
2891 | ||||
2892 | ||||
2893 | JNI_ENTRY(void, jni_ReleaseStringCritical(JNIEnv *env, jstring str, const jchar *chars))extern "C" { void jni_ReleaseStringCritical(JNIEnv *env, jstring str, const jchar *chars) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2893, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2894 | HOTSPOT_JNI_RELEASESTRINGCRITICAL_ENTRY(env, str, (uint16_t *) chars); | |||
2895 | oop s = JNIHandles::resolve_non_null(str); | |||
2896 | bool is_latin1 = java_lang_String::is_latin1(s); | |||
2897 | if (is_latin1) { | |||
2898 | // For latin1 string, free jchar array allocated by earlier call to GetStringCritical. | |||
2899 | // This assumes that ReleaseStringCritical bookends GetStringCritical. | |||
2900 | FREE_C_HEAP_ARRAY(jchar, chars)FreeHeap((char*)(chars)); | |||
2901 | } else { | |||
2902 | // For non-latin1 string, drop the associated gc-locker/pin. | |||
2903 | unlock_gc_or_unpin_string_value(thread, s); | |||
2904 | } | |||
2905 | HOTSPOT_JNI_RELEASESTRINGCRITICAL_RETURN(); | |||
2906 | JNI_END} } | |||
2907 | ||||
2908 | ||||
2909 | JNI_ENTRY(jweak, jni_NewWeakGlobalRef(JNIEnv *env, jobject ref))extern "C" { jweak jni_NewWeakGlobalRef(JNIEnv *env, jobject ref ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2909, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2910 | HOTSPOT_JNI_NEWWEAKGLOBALREF_ENTRY(env, ref); | |||
2911 | Handle ref_handle(thread, JNIHandles::resolve(ref)); | |||
2912 | jweak ret = JNIHandles::make_weak_global(ref_handle, AllocFailStrategy::RETURN_NULL); | |||
2913 | if (ret == NULL__null) { | |||
2914 | THROW_OOP_(Universe::out_of_memory_error_c_heap(), NULL){ Exceptions::_throw_oop(__the_thread__, "/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2914, Universe::out_of_memory_error_c_heap()); return __null ; }; | |||
2915 | } | |||
2916 | HOTSPOT_JNI_NEWWEAKGLOBALREF_RETURN(ret); | |||
2917 | return ret; | |||
2918 | JNI_END} } | |||
2919 | ||||
2920 | // Must be JNI_ENTRY (with HandleMark) | |||
2921 | JNI_ENTRY(void, jni_DeleteWeakGlobalRef(JNIEnv *env, jweak ref))extern "C" { void jni_DeleteWeakGlobalRef(JNIEnv *env, jweak ref ) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2921, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2922 | HOTSPOT_JNI_DELETEWEAKGLOBALREF_ENTRY(env, ref); | |||
2923 | JNIHandles::destroy_weak_global(ref); | |||
2924 | HOTSPOT_JNI_DELETEWEAKGLOBALREF_RETURN(); | |||
2925 | JNI_END} } | |||
2926 | ||||
2927 | ||||
2928 | JNI_ENTRY_NO_PRESERVE(jboolean, jni_ExceptionCheck(JNIEnv *env))extern "C" { jboolean jni_ExceptionCheck(JNIEnv *env) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2928, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); | |||
2929 | HOTSPOT_JNI_EXCEPTIONCHECK_ENTRY(env); | |||
2930 | jni_check_async_exceptions(thread); | |||
2931 | jboolean ret = (thread->has_pending_exception()) ? JNI_TRUE1 : JNI_FALSE0; | |||
2932 | HOTSPOT_JNI_EXCEPTIONCHECK_RETURN(ret); | |||
2933 | return ret; | |||
2934 | JNI_END} } | |||
2935 | ||||
2936 | ||||
2937 | // Initialization state for three routines below relating to | |||
2938 | // java.nio.DirectBuffers | |||
2939 | static int directBufferSupportInitializeStarted = 0; | |||
2940 | static volatile int directBufferSupportInitializeEnded = 0; | |||
2941 | static volatile int directBufferSupportInitializeFailed = 0; | |||
2942 | static jclass bufferClass = NULL__null; | |||
2943 | static jclass directBufferClass = NULL__null; | |||
2944 | static jclass directByteBufferClass = NULL__null; | |||
2945 | static jmethodID directByteBufferConstructor = NULL__null; | |||
2946 | static jfieldID directBufferAddressField = NULL__null; | |||
2947 | static jfieldID bufferCapacityField = NULL__null; | |||
2948 | ||||
2949 | static jclass lookupOne(JNIEnv* env, const char* name, TRAPSJavaThread* __the_thread__) { | |||
2950 | Handle loader; // null (bootstrap) loader | |||
2951 | Handle protection_domain; // null protection domain | |||
2952 | ||||
2953 | TempNewSymbol sym = SymbolTable::new_symbol(name); | |||
2954 | jclass result = find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) return __null; (void)(0); | |||
2955 | ||||
2956 | if (log_is_enabled(Debug, class, resolve)(LogImpl<(LogTag::_class), (LogTag::_resolve), (LogTag::__NO_TAG ), (LogTag::__NO_TAG), (LogTag::__NO_TAG), (LogTag::__NO_TAG) >::is_level(LogLevel::Debug)) && result != NULL__null) { | |||
2957 | trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result))); | |||
2958 | } | |||
2959 | return result; | |||
2960 | } | |||
2961 | ||||
2962 | // These lookups are done with the NULL (bootstrap) ClassLoader to | |||
2963 | // circumvent any security checks that would be done by jni_FindClass. | |||
2964 | JNI_ENTRY(bool, lookupDirectBufferClasses(JNIEnv* env))extern "C" { bool lookupDirectBufferClasses(JNIEnv* env) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 2964, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
2965 | { | |||
2966 | if ((bufferClass = lookupOne(env, "java/nio/Buffer", thread)) == NULL__null) { return false; } | |||
2967 | if ((directBufferClass = lookupOne(env, "sun/nio/ch/DirectBuffer", thread)) == NULL__null) { return false; } | |||
2968 | if ((directByteBufferClass = lookupOne(env, "java/nio/DirectByteBuffer", thread)) == NULL__null) { return false; } | |||
2969 | return true; | |||
2970 | } | |||
2971 | JNI_END} } | |||
2972 | ||||
2973 | ||||
2974 | static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) { | |||
2975 | if (directBufferSupportInitializeFailed) { | |||
2976 | return false; | |||
2977 | } | |||
2978 | ||||
2979 | if (Atomic::cmpxchg(&directBufferSupportInitializeStarted, 0, 1) == 0) { | |||
2980 | if (!lookupDirectBufferClasses(env)) { | |||
2981 | directBufferSupportInitializeFailed = 1; | |||
2982 | return false; | |||
2983 | } | |||
2984 | ||||
2985 | // Make global references for these | |||
2986 | bufferClass = (jclass) env->NewGlobalRef(bufferClass); | |||
2987 | directBufferClass = (jclass) env->NewGlobalRef(directBufferClass); | |||
2988 | directByteBufferClass = (jclass) env->NewGlobalRef(directByteBufferClass); | |||
2989 | ||||
2990 | // Global refs will be NULL if out-of-memory (no exception is pending) | |||
2991 | if (bufferClass == NULL__null || directBufferClass == NULL__null || directByteBufferClass == NULL__null) { | |||
2992 | directBufferSupportInitializeFailed = 1; | |||
2993 | return false; | |||
2994 | } | |||
2995 | ||||
2996 | // Get needed field and method IDs | |||
2997 | directByteBufferConstructor = env->GetMethodID(directByteBufferClass, "<init>", "(JI)V"); | |||
2998 | if (env->ExceptionCheck()) { | |||
2999 | env->ExceptionClear(); | |||
3000 | directBufferSupportInitializeFailed = 1; | |||
3001 | return false; | |||
3002 | } | |||
3003 | directBufferAddressField = env->GetFieldID(bufferClass, "address", "J"); | |||
3004 | if (env->ExceptionCheck()) { | |||
3005 | env->ExceptionClear(); | |||
3006 | directBufferSupportInitializeFailed = 1; | |||
3007 | return false; | |||
3008 | } | |||
3009 | bufferCapacityField = env->GetFieldID(bufferClass, "capacity", "I"); | |||
3010 | if (env->ExceptionCheck()) { | |||
3011 | env->ExceptionClear(); | |||
3012 | directBufferSupportInitializeFailed = 1; | |||
3013 | return false; | |||
3014 | } | |||
3015 | ||||
3016 | if ((directByteBufferConstructor == NULL__null) || | |||
3017 | (directBufferAddressField == NULL__null) || | |||
3018 | (bufferCapacityField == NULL__null)) { | |||
3019 | directBufferSupportInitializeFailed = 1; | |||
3020 | return false; | |||
3021 | } | |||
3022 | ||||
3023 | directBufferSupportInitializeEnded = 1; | |||
3024 | } else { | |||
3025 | while (!directBufferSupportInitializeEnded && !directBufferSupportInitializeFailed) { | |||
3026 | os::naked_yield(); | |||
3027 | } | |||
3028 | } | |||
3029 | ||||
3030 | return !directBufferSupportInitializeFailed; | |||
3031 | } | |||
3032 | ||||
3033 | extern "C" jobject JNICALL jni_NewDirectByteBuffer(JNIEnv *env, void* address, jlong capacity) | |||
3034 | { | |||
3035 | // thread_from_jni_environment() will block if VM is gone. | |||
3036 | JavaThread* thread = JavaThread::thread_from_jni_environment(env); | |||
3037 | ||||
3038 | HOTSPOT_JNI_NEWDIRECTBYTEBUFFER_ENTRY(env, address, capacity); | |||
3039 | ||||
3040 | if (!directBufferSupportInitializeEnded) { | |||
3041 | if (!initializeDirectBufferSupport(env, thread)) { | |||
3042 | HOTSPOT_JNI_NEWDIRECTBYTEBUFFER_RETURN(NULL); | |||
3043 | return NULL__null; | |||
3044 | } | |||
3045 | } | |||
3046 | ||||
3047 | // Being paranoid about accidental sign extension on address | |||
3048 | jlong addr = (jlong) ((uintptr_t) address); | |||
3049 | // NOTE that package-private DirectByteBuffer constructor currently | |||
3050 | // takes int capacity | |||
3051 | jint cap = (jint) capacity; | |||
3052 | jobject ret = env->NewObject(directByteBufferClass, directByteBufferConstructor, addr, cap); | |||
3053 | HOTSPOT_JNI_NEWDIRECTBYTEBUFFER_RETURN(ret); | |||
3054 | return ret; | |||
3055 | } | |||
3056 | ||||
3057 | DT_RETURN_MARK_DECL(GetDirectBufferAddress, void* | |||
3058 | , HOTSPOT_JNI_GETDIRECTBUFFERADDRESS_RETURN((void*) _ret_ref)); | |||
3059 | ||||
3060 | extern "C" void* JNICALL jni_GetDirectBufferAddress(JNIEnv *env, jobject buf) | |||
3061 | { | |||
3062 | // thread_from_jni_environment() will block if VM is gone. | |||
3063 | JavaThread* thread = JavaThread::thread_from_jni_environment(env); | |||
3064 | ||||
3065 | HOTSPOT_JNI_GETDIRECTBUFFERADDRESS_ENTRY(env, buf); | |||
3066 | void* ret = NULL__null; | |||
3067 | DT_RETURN_MARK(GetDirectBufferAddress, void*, (const void*&)ret); | |||
3068 | ||||
3069 | if (!directBufferSupportInitializeEnded) { | |||
3070 | if (!initializeDirectBufferSupport(env, thread)) { | |||
3071 | return 0; | |||
3072 | } | |||
3073 | } | |||
3074 | ||||
3075 | if ((buf != NULL__null) && (!env->IsInstanceOf(buf, directBufferClass))) { | |||
3076 | return 0; | |||
3077 | } | |||
3078 | ||||
3079 | ret = (void*)(intptr_t)env->GetLongField(buf, directBufferAddressField); | |||
3080 | return ret; | |||
3081 | } | |||
3082 | ||||
3083 | DT_RETURN_MARK_DECL(GetDirectBufferCapacity, jlong | |||
3084 | , HOTSPOT_JNI_GETDIRECTBUFFERCAPACITY_RETURN(_ret_ref)); | |||
3085 | ||||
3086 | extern "C" jlong JNICALL jni_GetDirectBufferCapacity(JNIEnv *env, jobject buf) | |||
3087 | { | |||
3088 | // thread_from_jni_environment() will block if VM is gone. | |||
3089 | JavaThread* thread = JavaThread::thread_from_jni_environment(env); | |||
3090 | ||||
3091 | HOTSPOT_JNI_GETDIRECTBUFFERCAPACITY_ENTRY(env, buf); | |||
3092 | jlong ret = -1; | |||
3093 | DT_RETURN_MARK(GetDirectBufferCapacity, jlong, (const jlong&)ret); | |||
3094 | ||||
3095 | if (!directBufferSupportInitializeEnded) { | |||
3096 | if (!initializeDirectBufferSupport(env, thread)) { | |||
3097 | ret = 0; | |||
3098 | return ret; | |||
3099 | } | |||
3100 | } | |||
3101 | ||||
3102 | if (buf == NULL__null) { | |||
3103 | return -1; | |||
3104 | } | |||
3105 | ||||
3106 | if (!env->IsInstanceOf(buf, directBufferClass)) { | |||
3107 | return -1; | |||
3108 | } | |||
3109 | ||||
3110 | // NOTE that capacity is currently an int in the implementation | |||
3111 | ret = env->GetIntField(buf, bufferCapacityField); | |||
3112 | return ret; | |||
3113 | } | |||
3114 | ||||
3115 | ||||
3116 | JNI_LEAF(jint, jni_GetVersion(JNIEnv *env))extern "C" { jint jni_GetVersion(JNIEnv *env) { JavaThread* thread =JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { (*g_assert_poison) = 'X' ;; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3116, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); NoHandleMark __hm; ; os::verify_stack_alignment (); | |||
3117 | HOTSPOT_JNI_GETVERSION_ENTRY(env); | |||
3118 | HOTSPOT_JNI_GETVERSION_RETURN(CurrentVersion); | |||
3119 | return CurrentVersion; | |||
3120 | JNI_END} } | |||
3121 | ||||
3122 | extern struct JavaVM_ main_vm; | |||
3123 | ||||
3124 | JNI_LEAF(jint, jni_GetJavaVM(JNIEnv *env, JavaVM **vm))extern "C" { jint jni_GetJavaVM(JNIEnv *env, JavaVM **vm) { JavaThread * thread=JavaThread::thread_from_jni_environment(env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current()))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3124, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); NoHandleMark __hm; ; os::verify_stack_alignment (); | |||
3125 | HOTSPOT_JNI_GETJAVAVM_ENTRY(env, (void **) vm); | |||
3126 | *vm = (JavaVM *)(&main_vm); | |||
3127 | HOTSPOT_JNI_GETJAVAVM_RETURN(JNI_OK); | |||
3128 | return JNI_OK0; | |||
3129 | JNI_END} } | |||
3130 | ||||
3131 | ||||
3132 | JNI_ENTRY(jobject, jni_GetModule(JNIEnv* env, jclass clazz))extern "C" { jobject jni_GetModule(JNIEnv* env, jclass clazz) { JavaThread* thread=JavaThread::thread_from_jni_environment (env); do { if (!(!VerifyJNIEnvThread || (thread == Thread::current ()))) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3132, "assert(" "!VerifyJNIEnvThread || (thread == Thread::current())" ") failed", "JNIEnv is only valid in same thread"); ::breakpoint (); } } while (0); ; ThreadInVMfromNative __tiv(thread); VMNativeEntryWrapper __vew; HandleMarkCleaner __hm(thread); JavaThread* __the_thread__ = thread; os::verify_stack_alignment(); WeakPreserveExceptionMark __wem(thread); | |||
3133 | return Modules::get_module(clazz, THREAD__the_thread__); | |||
3134 | JNI_END} } | |||
3135 | ||||
3136 | ||||
3137 | // Structure containing all jni functions | |||
3138 | struct JNINativeInterface_ jni_NativeInterface = { | |||
3139 | NULL__null, | |||
3140 | NULL__null, | |||
3141 | NULL__null, | |||
3142 | ||||
3143 | NULL__null, | |||
3144 | ||||
3145 | jni_GetVersion, | |||
3146 | ||||
3147 | jni_DefineClass, | |||
3148 | jni_FindClass, | |||
3149 | ||||
3150 | jni_FromReflectedMethod, | |||
3151 | jni_FromReflectedField, | |||
3152 | ||||
3153 | jni_ToReflectedMethod, | |||
3154 | ||||
3155 | jni_GetSuperclass, | |||
3156 | jni_IsAssignableFrom, | |||
3157 | ||||
3158 | jni_ToReflectedField, | |||
3159 | ||||
3160 | jni_Throw, | |||
3161 | jni_ThrowNew, | |||
3162 | jni_ExceptionOccurred, | |||
3163 | jni_ExceptionDescribe, | |||
3164 | jni_ExceptionClear, | |||
3165 | jni_FatalError, | |||
3166 | ||||
3167 | jni_PushLocalFrame, | |||
3168 | jni_PopLocalFrame, | |||
3169 | ||||
3170 | jni_NewGlobalRef, | |||
3171 | jni_DeleteGlobalRef, | |||
3172 | jni_DeleteLocalRef, | |||
3173 | jni_IsSameObject, | |||
3174 | ||||
3175 | jni_NewLocalRef, | |||
3176 | jni_EnsureLocalCapacity, | |||
3177 | ||||
3178 | jni_AllocObject, | |||
3179 | jni_NewObject, | |||
3180 | jni_NewObjectV, | |||
3181 | jni_NewObjectA, | |||
3182 | ||||
3183 | jni_GetObjectClass, | |||
3184 | jni_IsInstanceOf, | |||
3185 | ||||
3186 | jni_GetMethodID, | |||
3187 | ||||
3188 | jni_CallObjectMethod, | |||
3189 | jni_CallObjectMethodV, | |||
3190 | jni_CallObjectMethodA, | |||
3191 | jni_CallBooleanMethod, | |||
3192 | jni_CallBooleanMethodV, | |||
3193 | jni_CallBooleanMethodA, | |||
3194 | jni_CallByteMethod, | |||
3195 | jni_CallByteMethodV, | |||
3196 | jni_CallByteMethodA, | |||
3197 | jni_CallCharMethod, | |||
3198 | jni_CallCharMethodV, | |||
3199 | jni_CallCharMethodA, | |||
3200 | jni_CallShortMethod, | |||
3201 | jni_CallShortMethodV, | |||
3202 | jni_CallShortMethodA, | |||
3203 | jni_CallIntMethod, | |||
3204 | jni_CallIntMethodV, | |||
3205 | jni_CallIntMethodA, | |||
3206 | jni_CallLongMethod, | |||
3207 | jni_CallLongMethodV, | |||
3208 | jni_CallLongMethodA, | |||
3209 | jni_CallFloatMethod, | |||
3210 | jni_CallFloatMethodV, | |||
3211 | jni_CallFloatMethodA, | |||
3212 | jni_CallDoubleMethod, | |||
3213 | jni_CallDoubleMethodV, | |||
3214 | jni_CallDoubleMethodA, | |||
3215 | jni_CallVoidMethod, | |||
3216 | jni_CallVoidMethodV, | |||
3217 | jni_CallVoidMethodA, | |||
3218 | ||||
3219 | jni_CallNonvirtualObjectMethod, | |||
3220 | jni_CallNonvirtualObjectMethodV, | |||
3221 | jni_CallNonvirtualObjectMethodA, | |||
3222 | jni_CallNonvirtualBooleanMethod, | |||
3223 | jni_CallNonvirtualBooleanMethodV, | |||
3224 | jni_CallNonvirtualBooleanMethodA, | |||
3225 | jni_CallNonvirtualByteMethod, | |||
3226 | jni_CallNonvirtualByteMethodV, | |||
3227 | jni_CallNonvirtualByteMethodA, | |||
3228 | jni_CallNonvirtualCharMethod, | |||
3229 | jni_CallNonvirtualCharMethodV, | |||
3230 | jni_CallNonvirtualCharMethodA, | |||
3231 | jni_CallNonvirtualShortMethod, | |||
3232 | jni_CallNonvirtualShortMethodV, | |||
3233 | jni_CallNonvirtualShortMethodA, | |||
3234 | jni_CallNonvirtualIntMethod, | |||
3235 | jni_CallNonvirtualIntMethodV, | |||
3236 | jni_CallNonvirtualIntMethodA, | |||
3237 | jni_CallNonvirtualLongMethod, | |||
3238 | jni_CallNonvirtualLongMethodV, | |||
3239 | jni_CallNonvirtualLongMethodA, | |||
3240 | jni_CallNonvirtualFloatMethod, | |||
3241 | jni_CallNonvirtualFloatMethodV, | |||
3242 | jni_CallNonvirtualFloatMethodA, | |||
3243 | jni_CallNonvirtualDoubleMethod, | |||
3244 | jni_CallNonvirtualDoubleMethodV, | |||
3245 | jni_CallNonvirtualDoubleMethodA, | |||
3246 | jni_CallNonvirtualVoidMethod, | |||
3247 | jni_CallNonvirtualVoidMethodV, | |||
3248 | jni_CallNonvirtualVoidMethodA, | |||
3249 | ||||
3250 | jni_GetFieldID, | |||
3251 | ||||
3252 | jni_GetObjectField, | |||
3253 | jni_GetBooleanField, | |||
3254 | jni_GetByteField, | |||
3255 | jni_GetCharField, | |||
3256 | jni_GetShortField, | |||
3257 | jni_GetIntField, | |||
3258 | jni_GetLongField, | |||
3259 | jni_GetFloatField, | |||
3260 | jni_GetDoubleField, | |||
3261 | ||||
3262 | jni_SetObjectField, | |||
3263 | jni_SetBooleanField, | |||
3264 | jni_SetByteField, | |||
3265 | jni_SetCharField, | |||
3266 | jni_SetShortField, | |||
3267 | jni_SetIntField, | |||
3268 | jni_SetLongField, | |||
3269 | jni_SetFloatField, | |||
3270 | jni_SetDoubleField, | |||
3271 | ||||
3272 | jni_GetStaticMethodID, | |||
3273 | ||||
3274 | jni_CallStaticObjectMethod, | |||
3275 | jni_CallStaticObjectMethodV, | |||
3276 | jni_CallStaticObjectMethodA, | |||
3277 | jni_CallStaticBooleanMethod, | |||
3278 | jni_CallStaticBooleanMethodV, | |||
3279 | jni_CallStaticBooleanMethodA, | |||
3280 | jni_CallStaticByteMethod, | |||
3281 | jni_CallStaticByteMethodV, | |||
3282 | jni_CallStaticByteMethodA, | |||
3283 | jni_CallStaticCharMethod, | |||
3284 | jni_CallStaticCharMethodV, | |||
3285 | jni_CallStaticCharMethodA, | |||
3286 | jni_CallStaticShortMethod, | |||
3287 | jni_CallStaticShortMethodV, | |||
3288 | jni_CallStaticShortMethodA, | |||
3289 | jni_CallStaticIntMethod, | |||
3290 | jni_CallStaticIntMethodV, | |||
3291 | jni_CallStaticIntMethodA, | |||
3292 | jni_CallStaticLongMethod, | |||
3293 | jni_CallStaticLongMethodV, | |||
3294 | jni_CallStaticLongMethodA, | |||
3295 | jni_CallStaticFloatMethod, | |||
3296 | jni_CallStaticFloatMethodV, | |||
3297 | jni_CallStaticFloatMethodA, | |||
3298 | jni_CallStaticDoubleMethod, | |||
3299 | jni_CallStaticDoubleMethodV, | |||
3300 | jni_CallStaticDoubleMethodA, | |||
3301 | jni_CallStaticVoidMethod, | |||
3302 | jni_CallStaticVoidMethodV, | |||
3303 | jni_CallStaticVoidMethodA, | |||
3304 | ||||
3305 | jni_GetStaticFieldID, | |||
3306 | ||||
3307 | jni_GetStaticObjectField, | |||
3308 | jni_GetStaticBooleanField, | |||
3309 | jni_GetStaticByteField, | |||
3310 | jni_GetStaticCharField, | |||
3311 | jni_GetStaticShortField, | |||
3312 | jni_GetStaticIntField, | |||
3313 | jni_GetStaticLongField, | |||
3314 | jni_GetStaticFloatField, | |||
3315 | jni_GetStaticDoubleField, | |||
3316 | ||||
3317 | jni_SetStaticObjectField, | |||
3318 | jni_SetStaticBooleanField, | |||
3319 | jni_SetStaticByteField, | |||
3320 | jni_SetStaticCharField, | |||
3321 | jni_SetStaticShortField, | |||
3322 | jni_SetStaticIntField, | |||
3323 | jni_SetStaticLongField, | |||
3324 | jni_SetStaticFloatField, | |||
3325 | jni_SetStaticDoubleField, | |||
3326 | ||||
3327 | jni_NewString, | |||
3328 | jni_GetStringLength, | |||
3329 | jni_GetStringChars, | |||
3330 | jni_ReleaseStringChars, | |||
3331 | ||||
3332 | jni_NewStringUTF, | |||
3333 | jni_GetStringUTFLength, | |||
3334 | jni_GetStringUTFChars, | |||
3335 | jni_ReleaseStringUTFChars, | |||
3336 | ||||
3337 | jni_GetArrayLength, | |||
3338 | ||||
3339 | jni_NewObjectArray, | |||
3340 | jni_GetObjectArrayElement, | |||
3341 | jni_SetObjectArrayElement, | |||
3342 | ||||
3343 | jni_NewBooleanArray, | |||
3344 | jni_NewByteArray, | |||
3345 | jni_NewCharArray, | |||
3346 | jni_NewShortArray, | |||
3347 | jni_NewIntArray, | |||
3348 | jni_NewLongArray, | |||
3349 | jni_NewFloatArray, | |||
3350 | jni_NewDoubleArray, | |||
3351 | ||||
3352 | jni_GetBooleanArrayElements, | |||
3353 | jni_GetByteArrayElements, | |||
3354 | jni_GetCharArrayElements, | |||
3355 | jni_GetShortArrayElements, | |||
3356 | jni_GetIntArrayElements, | |||
3357 | jni_GetLongArrayElements, | |||
3358 | jni_GetFloatArrayElements, | |||
3359 | jni_GetDoubleArrayElements, | |||
3360 | ||||
3361 | jni_ReleaseBooleanArrayElements, | |||
3362 | jni_ReleaseByteArrayElements, | |||
3363 | jni_ReleaseCharArrayElements, | |||
3364 | jni_ReleaseShortArrayElements, | |||
3365 | jni_ReleaseIntArrayElements, | |||
3366 | jni_ReleaseLongArrayElements, | |||
3367 | jni_ReleaseFloatArrayElements, | |||
3368 | jni_ReleaseDoubleArrayElements, | |||
3369 | ||||
3370 | jni_GetBooleanArrayRegion, | |||
3371 | jni_GetByteArrayRegion, | |||
3372 | jni_GetCharArrayRegion, | |||
3373 | jni_GetShortArrayRegion, | |||
3374 | jni_GetIntArrayRegion, | |||
3375 | jni_GetLongArrayRegion, | |||
3376 | jni_GetFloatArrayRegion, | |||
3377 | jni_GetDoubleArrayRegion, | |||
3378 | ||||
3379 | jni_SetBooleanArrayRegion, | |||
3380 | jni_SetByteArrayRegion, | |||
3381 | jni_SetCharArrayRegion, | |||
3382 | jni_SetShortArrayRegion, | |||
3383 | jni_SetIntArrayRegion, | |||
3384 | jni_SetLongArrayRegion, | |||
3385 | jni_SetFloatArrayRegion, | |||
3386 | jni_SetDoubleArrayRegion, | |||
3387 | ||||
3388 | jni_RegisterNatives, | |||
3389 | jni_UnregisterNatives, | |||
3390 | ||||
3391 | jni_MonitorEnter, | |||
3392 | jni_MonitorExit, | |||
3393 | ||||
3394 | jni_GetJavaVM, | |||
3395 | ||||
3396 | jni_GetStringRegion, | |||
3397 | jni_GetStringUTFRegion, | |||
3398 | ||||
3399 | jni_GetPrimitiveArrayCritical, | |||
3400 | jni_ReleasePrimitiveArrayCritical, | |||
3401 | ||||
3402 | jni_GetStringCritical, | |||
3403 | jni_ReleaseStringCritical, | |||
3404 | ||||
3405 | jni_NewWeakGlobalRef, | |||
3406 | jni_DeleteWeakGlobalRef, | |||
3407 | ||||
3408 | jni_ExceptionCheck, | |||
3409 | ||||
3410 | jni_NewDirectByteBuffer, | |||
3411 | jni_GetDirectBufferAddress, | |||
3412 | jni_GetDirectBufferCapacity, | |||
3413 | ||||
3414 | // New 1_6 features | |||
3415 | ||||
3416 | jni_GetObjectRefType, | |||
3417 | ||||
3418 | // Module features | |||
3419 | ||||
3420 | jni_GetModule | |||
3421 | }; | |||
3422 | ||||
3423 | ||||
3424 | // For jvmti use to modify jni function table. | |||
3425 | // Java threads in native contiues to run until it is transitioned | |||
3426 | // to VM at safepoint. Before the transition or before it is blocked | |||
3427 | // for safepoint it may access jni function table. VM could crash if | |||
3428 | // any java thread access the jni function table in the middle of memcpy. | |||
3429 | // To avoid this each function pointers are copied automically. | |||
3430 | void copy_jni_function_table(const struct JNINativeInterface_ *new_jni_NativeInterface) { | |||
3431 | assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint")do { if (!(SafepointSynchronize::is_at_safepoint())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3431, "assert(" "SafepointSynchronize::is_at_safepoint()" ") failed" , "must be at safepoint"); ::breakpoint(); } } while (0); | |||
3432 | intptr_t *a = (intptr_t *) jni_functions(); | |||
3433 | intptr_t *b = (intptr_t *) new_jni_NativeInterface; | |||
3434 | for (uint i=0; i < sizeof(struct JNINativeInterface_)/sizeof(void *); i++) { | |||
3435 | Atomic::store(a++, *b++); | |||
3436 | } | |||
3437 | } | |||
3438 | ||||
3439 | void quicken_jni_functions() { | |||
3440 | // Replace Get<Primitive>Field with fast versions | |||
3441 | if (UseFastJNIAccessors && !VerifyJNIFields && !CheckJNICalls) { | |||
3442 | address func; | |||
3443 | func = JNI_FastGetField::generate_fast_get_boolean_field(); | |||
3444 | if (func != (address)-1) { | |||
3445 | jni_NativeInterface.GetBooleanField = (GetBooleanField_t)func; | |||
3446 | } | |||
3447 | func = JNI_FastGetField::generate_fast_get_byte_field(); | |||
3448 | if (func != (address)-1) { | |||
3449 | jni_NativeInterface.GetByteField = (GetByteField_t)func; | |||
3450 | } | |||
3451 | func = JNI_FastGetField::generate_fast_get_char_field(); | |||
3452 | if (func != (address)-1) { | |||
3453 | jni_NativeInterface.GetCharField = (GetCharField_t)func; | |||
3454 | } | |||
3455 | func = JNI_FastGetField::generate_fast_get_short_field(); | |||
3456 | if (func != (address)-1) { | |||
3457 | jni_NativeInterface.GetShortField = (GetShortField_t)func; | |||
3458 | } | |||
3459 | func = JNI_FastGetField::generate_fast_get_int_field(); | |||
3460 | if (func != (address)-1) { | |||
3461 | jni_NativeInterface.GetIntField = (GetIntField_t)func; | |||
3462 | } | |||
3463 | func = JNI_FastGetField::generate_fast_get_long_field(); | |||
3464 | if (func != (address)-1) { | |||
3465 | jni_NativeInterface.GetLongField = (GetLongField_t)func; | |||
3466 | } | |||
3467 | func = JNI_FastGetField::generate_fast_get_float_field(); | |||
3468 | if (func != (address)-1) { | |||
3469 | jni_NativeInterface.GetFloatField = (GetFloatField_t)func; | |||
3470 | } | |||
3471 | func = JNI_FastGetField::generate_fast_get_double_field(); | |||
3472 | if (func != (address)-1) { | |||
3473 | jni_NativeInterface.GetDoubleField = (GetDoubleField_t)func; | |||
3474 | } | |||
3475 | } | |||
3476 | } | |||
3477 | ||||
3478 | // Returns the function structure | |||
3479 | struct JNINativeInterface_* jni_functions() { | |||
3480 | #if INCLUDE_JNI_CHECK1 | |||
3481 | if (CheckJNICalls) return jni_functions_check(); | |||
3482 | #endif // INCLUDE_JNI_CHECK | |||
3483 | return &jni_NativeInterface; | |||
3484 | } | |||
3485 | ||||
3486 | // Returns the function structure | |||
3487 | struct JNINativeInterface_* jni_functions_nocheck() { | |||
3488 | return &jni_NativeInterface; | |||
3489 | } | |||
3490 | ||||
3491 | static void post_thread_start_event(const JavaThread* jt) { | |||
3492 | assert(jt != NULL, "invariant")do { if (!(jt != __null)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3492, "assert(" "jt != __null" ") failed", "invariant"); :: breakpoint(); } } while (0); | |||
3493 | EventThreadStart event; | |||
3494 | if (event.should_commit()) { | |||
3495 | event.set_thread(JFR_THREAD_ID(jt)((jt)->jfr_thread_local()->thread_id())); | |||
3496 | event.set_parentThread((traceid)0); | |||
3497 | #if INCLUDE_JFR1 | |||
3498 | if (EventThreadStart::is_stacktrace_enabled()) { | |||
3499 | jt->jfr_thread_local()->set_cached_stack_trace_id((traceid)0); | |||
3500 | event.commit(); | |||
3501 | jt->jfr_thread_local()->clear_cached_stack_trace(); | |||
3502 | } else | |||
3503 | #endif | |||
3504 | { | |||
3505 | event.commit(); | |||
3506 | } | |||
3507 | } | |||
3508 | } | |||
3509 | ||||
3510 | // Invocation API | |||
3511 | ||||
3512 | ||||
3513 | // Forward declaration | |||
3514 | extern const struct JNIInvokeInterface_ jni_InvokeInterface; | |||
3515 | ||||
3516 | // Global invocation API vars | |||
3517 | volatile int vm_created = 0; | |||
3518 | // Indicate whether it is safe to recreate VM. Recreation is only | |||
3519 | // possible after a failed initial creation attempt in some cases. | |||
3520 | volatile int safe_to_recreate_vm = 1; | |||
3521 | struct JavaVM_ main_vm = {&jni_InvokeInterface}; | |||
3522 | ||||
3523 | ||||
3524 | #define JAVASTACKSIZE(400 * 1024) (400 * 1024) /* Default size of a thread java stack */ | |||
3525 | enum { VERIFY_NONE, VERIFY_REMOTE, VERIFY_ALL }; | |||
3526 | ||||
3527 | DT_RETURN_MARK_DECL(GetDefaultJavaVMInitArgs, jint | |||
3528 | , HOTSPOT_JNI_GETDEFAULTJAVAVMINITARGS_RETURN(_ret_ref)); | |||
3529 | ||||
3530 | _JNI_IMPORT_OR_EXPORT___attribute__((visibility("default"))) jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) { | |||
3531 | HOTSPOT_JNI_GETDEFAULTJAVAVMINITARGS_ENTRY(args_); | |||
3532 | JDK1_1InitArgs *args = (JDK1_1InitArgs *)args_; | |||
3533 | jint ret = JNI_ERR(-1); | |||
3534 | DT_RETURN_MARK(GetDefaultJavaVMInitArgs, jint, (const jint&)ret); | |||
3535 | ||||
3536 | if (Threads::is_supported_jni_version(args->version)) { | |||
3537 | ret = JNI_OK0; | |||
3538 | } | |||
3539 | // 1.1 style no longer supported in hotspot. | |||
3540 | // According the JNI spec, we should update args->version on return. | |||
3541 | // We also use the structure to communicate with launcher about default | |||
3542 | // stack size. | |||
3543 | if (args->version == JNI_VERSION_1_10x00010001) { | |||
3544 | args->version = JNI_VERSION_1_20x00010002; | |||
3545 | // javaStackSize is int in arguments structure | |||
3546 | assert(jlong(ThreadStackSize) * K < INT_MAX, "integer overflow")do { if (!(jlong(ThreadStackSize) * K < 2147483647)) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3546, "assert(" "jlong(ThreadStackSize) * K < 2147483647" ") failed", "integer overflow"); ::breakpoint(); } } while ( 0); | |||
3547 | args->javaStackSize = (jint)(ThreadStackSize * K); | |||
3548 | } | |||
3549 | return ret; | |||
3550 | } | |||
3551 | ||||
3552 | DT_RETURN_MARK_DECL(CreateJavaVM, jint | |||
3553 | , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref)); | |||
3554 | ||||
3555 | static jint JNI_CreateJavaVM_inner(JavaVM **vm, void **penv, void *args) { | |||
3556 | HOTSPOT_JNI_CREATEJAVAVM_ENTRY((void **) vm, penv, args); | |||
3557 | ||||
3558 | jint result = JNI_ERR(-1); | |||
3559 | DT_RETURN_MARK(CreateJavaVM, jint, (const jint&)result); | |||
3560 | ||||
3561 | // We're about to use Atomic::xchg for synchronization. Some Zero | |||
3562 | // platforms use the GCC builtin __sync_lock_test_and_set for this, | |||
3563 | // but __sync_lock_test_and_set is not guaranteed to do what we want | |||
3564 | // on all architectures. So we check it works before relying on it. | |||
3565 | #if defined(ZERO) && defined(ASSERT1) | |||
3566 | { | |||
3567 | jint a = 0xcafebabe; | |||
3568 | jint b = Atomic::xchg(&a, (jint) 0xdeadbeef); | |||
3569 | void *c = &a; | |||
3570 | void *d = Atomic::xchg(&c, &b); | |||
3571 | assert(a == (jint) 0xdeadbeef && b == (jint) 0xcafebabe, "Atomic::xchg() works")do { if (!(a == (jint) 0xdeadbeef && b == (jint) 0xcafebabe )) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3571, "assert(" "a == (jint) 0xdeadbeef && b == (jint) 0xcafebabe" ") failed", "Atomic::xchg() works"); ::breakpoint(); } } while (0); | |||
3572 | assert(c == &b && d == &a, "Atomic::xchg() works")do { if (!(c == &b && d == &a)) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3572, "assert(" "c == &b && d == &a" ") failed" , "Atomic::xchg() works"); ::breakpoint(); } } while (0); | |||
3573 | } | |||
3574 | #endif // ZERO && ASSERT | |||
3575 | ||||
3576 | // At the moment it's only possible to have one Java VM, | |||
3577 | // since some of the runtime state is in global variables. | |||
3578 | ||||
3579 | // We cannot use our mutex locks here, since they only work on | |||
3580 | // Threads. We do an atomic compare and exchange to ensure only | |||
3581 | // one thread can call this method at a time | |||
3582 | ||||
3583 | // We use Atomic::xchg rather than Atomic::add/dec since on some platforms | |||
3584 | // the add/dec implementations are dependent on whether we are running | |||
3585 | // on a multiprocessor Atomic::xchg does not have this problem. | |||
3586 | if (Atomic::xchg(&vm_created, 1) == 1) { | |||
3587 | return JNI_EEXIST(-5); // already created, or create attempt in progress | |||
3588 | } | |||
3589 | ||||
3590 | // If a previous creation attempt failed but can be retried safely, | |||
3591 | // then safe_to_recreate_vm will have been reset to 1 after being | |||
3592 | // cleared here. If a previous creation attempt succeeded and we then | |||
3593 | // destroyed that VM, we will be prevented from trying to recreate | |||
3594 | // the VM in the same process, as the value will still be 0. | |||
3595 | if (Atomic::xchg(&safe_to_recreate_vm, 0) == 0) { | |||
3596 | return JNI_ERR(-1); | |||
3597 | } | |||
3598 | ||||
3599 | assert(vm_created == 1, "vm_created is true during the creation")do { if (!(vm_created == 1)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3599, "assert(" "vm_created == 1" ") failed", "vm_created is true during the creation" ); ::breakpoint(); } } while (0); | |||
3600 | ||||
3601 | /** | |||
3602 | * Certain errors during initialization are recoverable and do not | |||
3603 | * prevent this method from being called again at a later time | |||
3604 | * (perhaps with different arguments). However, at a certain | |||
3605 | * point during initialization if an error occurs we cannot allow | |||
3606 | * this function to be called again (or it will crash). In those | |||
3607 | * situations, the 'canTryAgain' flag is set to false, which atomically | |||
3608 | * sets safe_to_recreate_vm to 1, such that any new call to | |||
3609 | * JNI_CreateJavaVM will immediately fail using the above logic. | |||
3610 | */ | |||
3611 | bool can_try_again = true; | |||
3612 | ||||
3613 | result = Threads::create_vm((JavaVMInitArgs*) args, &can_try_again); | |||
3614 | if (result == JNI_OK0) { | |||
3615 | JavaThread *thread = JavaThread::current(); | |||
3616 | assert(!thread->has_pending_exception(), "should have returned not OK")do { if (!(!thread->has_pending_exception())) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3616, "assert(" "!thread->has_pending_exception()" ") failed" , "should have returned not OK"); ::breakpoint(); } } while ( 0); | |||
3617 | /* thread is thread_in_vm here */ | |||
3618 | *vm = (JavaVM *)(&main_vm); | |||
3619 | *(JNIEnv**)penv = thread->jni_environment(); | |||
3620 | ||||
3621 | #if INCLUDE_JVMCI1 | |||
3622 | if (EnableJVMCI) { | |||
3623 | if (UseJVMCICompiler) { | |||
3624 | // JVMCI is initialized on a CompilerThread | |||
3625 | if (BootstrapJVMCI) { | |||
3626 | JavaThread* THREAD__the_thread__ = thread; // For exception macros. | |||
3627 | JVMCICompiler* compiler = JVMCICompiler::instance(true, CATCH__the_thread__); if ((((ThreadShadow*)__the_thread__)->has_pending_exception ())) { oop ex = (((ThreadShadow*)__the_thread__)->pending_exception ()); (((ThreadShadow*)__the_thread__)->clear_pending_exception ()); ex->print(); do { if (!(false)) { (*g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/prims/jni.cpp" , 3627, "assert(" "false" ") failed", "CATCH"); ::breakpoint( ); } } while (0); } (void)(0); | |||
3628 | compiler->bootstrap(THREAD__the_thread__); | |||
3629 | if (HAS_PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->has_pending_exception())) { | |||
3630 | HandleMark hm(THREAD__the_thread__); | |||
3631 | vm_exit_during_initialization(Handle(THREAD__the_thread__, PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->pending_exception()))); | |||
3632 | } | |||
3633 | } | |||
3634 | } | |||
3635 | } | |||
3636 | #endif | |||
3637 | ||||
3638 | // Notify JVMTI | |||
3639 | if (JvmtiExport::should_post_thread_life()) { | |||
3640 | JvmtiExport::post_thread_start(thread); | |||
3641 | } | |||
3642 | ||||
3643 | post_thread_start_event(thread); | |||
3644 | ||||
3645 | #ifndef PRODUCT | |||
3646 | if (ReplayCompiles) ciReplay::replay(thread); | |||
3647 | #endif | |||
3648 | ||||
3649 | #ifdef ASSERT1 | |||
3650 | // Some platforms (like Win*) need a wrapper around these test | |||
3651 | // functions in order to properly handle error conditions. | |||
3652 | if (ErrorHandlerTest != 0) { | |||
3653 | VMError::controlled_crash(ErrorHandlerTest); | |||
3654 | } | |||
3655 | #endif | |||
3656 | ||||
3657 | // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. | |||
3658 | ThreadStateTransition::transition_from_vm(thread, _thread_in_native); | |||
3659 | MACOS_AARCH64_ONLY(thread->enable_wx(WXExec)); | |||
3660 | } else { | |||
3661 | // If create_vm exits because of a pending exception, exit with that | |||
3662 | // exception. In the future when we figure out how to reclaim memory, | |||
3663 | // we may be able to exit with JNI_ERR and allow the calling application | |||
3664 | // to continue. | |||
3665 | if (Universe::is_fully_initialized()) { | |||
3666 | // otherwise no pending exception possible - VM will already have aborted | |||
3667 | JavaThread* THREAD__the_thread__ = JavaThread::current(); // For exception macros. | |||
3668 | if (HAS_PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->has_pending_exception())) { | |||
3669 | HandleMark hm(THREAD__the_thread__); | |||
3670 | vm_exit_during_initialization(Handle(THREAD__the_thread__, PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->pending_exception()))); | |||
3671 | } | |||
3672 | } | |||
3673 | ||||
3674 | if (can_try_again) { | |||
3675 | // reset safe_to_recreate_vm to 1 so that retrial would be possible | |||
3676 | safe_to_recreate_vm = 1; | |||
3677 | } | |||
3678 | ||||
3679 | // Creation failed. We must reset vm_created | |||
3680 | *vm = 0; | |||
3681 | *(JNIEnv**)penv = 0; | |||
3682 | // reset vm_created last to avoid race condition. Use OrderAccess to | |||
3683 | // control both compiler and architectural-based reordering. | |||
3684 | Atomic::release_store(&vm_created, 0); | |||
3685 | } | |||
3686 | ||||
3687 | // Flush stdout and stderr before exit. | |||
3688 | fflush(stdoutstdout); | |||
3689 | fflush(stderrstderr); | |||
3690 | ||||
3691 | return result; | |||
3692 | ||||
3693 | } | |||
3694 | ||||
3695 | _JNI_IMPORT_OR_EXPORT___attribute__((visibility("default"))) jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) { | |||
3696 | jint result = JNI_ERR(-1); | |||
3697 | // On Windows, let CreateJavaVM run with SEH protection | |||
3698 | #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) | |||
3699 | __tryif (true) { | |||
3700 | #endif | |||
3701 | result = JNI_CreateJavaVM_inner(vm, penv, args); | |||
3702 | #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) | |||
3703 | } __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) { | |||
3704 | // Nothing to do. | |||
3705 | } | |||
3706 | #endif | |||
3707 | return result; | |||
3708 | } | |||
3709 | ||||
3710 | _JNI_IMPORT_OR_EXPORT___attribute__((visibility("default"))) jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **vm_buf, jsize bufLen, jsize *numVMs) { | |||
3711 | HOTSPOT_JNI_GETCREATEDJAVAVMS_ENTRY((void **) vm_buf, bufLen, (uintptr_t *) numVMs); | |||
3712 | ||||
3713 | if (vm_created == 1) { | |||
3714 | if (numVMs != NULL__null) *numVMs = 1; | |||
3715 | if (bufLen > 0) *vm_buf = (JavaVM *)(&main_vm); | |||
3716 | } else { | |||
3717 | if (numVMs != NULL__null) *numVMs = 0; | |||
3718 | } | |||
3719 | HOTSPOT_JNI_GETCREATEDJAVAVMS_RETURN(JNI_OK); | |||
3720 | return JNI_OK0; | |||
3721 | } | |||
3722 | ||||
3723 | extern "C" { | |||
3724 | ||||
3725 | DT_RETURN_MARK_DECL(DestroyJavaVM, jint | |||
3726 | , HOTSPOT_JNI_DESTROYJAVAVM_RETURN(_ret_ref)); | |||
3727 | ||||
3728 | static jint JNICALL jni_DestroyJavaVM_inner(JavaVM *vm) { | |||
3729 | HOTSPOT_JNI_DESTROYJAVAVM_ENTRY(vm); | |||
3730 | jint res = JNI_ERR(-1); | |||
3731 | DT_RETURN_MARK(DestroyJavaVM, jint, (const jint&)res); | |||
3732 | ||||
3733 | if (vm_created == 0) { | |||
3734 | res = JNI_ERR(-1); | |||
3735 | return res; | |||
3736 | } | |||
3737 | ||||
3738 | JNIEnv *env; | |||
3739 | JavaVMAttachArgs destroyargs; | |||
3740 | destroyargs.version = CurrentVersion; | |||
3741 | destroyargs.name = (char *)"DestroyJavaVM"; | |||
3742 | destroyargs.group = NULL__null; | |||
3743 | res = vm->AttachCurrentThread((void **)&env, (void *)&destroyargs); | |||
3744 | if (res != JNI_OK0) { | |||
3745 | return res; | |||
3746 | } | |||
3747 | ||||
3748 | // Since this is not a JVM_ENTRY we have to set the thread state manually before entering. | |||
3749 | JavaThread* thread = JavaThread::current(); | |||
3750 | ||||
3751 | // We are going to VM, change W^X state to the expected one. | |||
3752 | MACOS_AARCH64_ONLY(WXMode oldmode = thread->enable_wx(WXWrite)); | |||
3753 | ||||
3754 | ThreadStateTransition::transition_from_native(thread, _thread_in_vm); | |||
3755 | Threads::destroy_vm(); | |||
3756 | // Don't bother restoring thread state, VM is gone. | |||
3757 | vm_created = 0; | |||
3758 | return JNI_OK0; | |||
3759 | } | |||
3760 | ||||
3761 | jint JNICALL jni_DestroyJavaVM(JavaVM *vm) { | |||
3762 | jint result = JNI_ERR(-1); | |||
3763 | // On Windows, we need SEH protection | |||
3764 | #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) | |||
3765 | __tryif (true) { | |||
3766 | #endif | |||
3767 | result = jni_DestroyJavaVM_inner(vm); | |||
3768 | #if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) | |||
3769 | } __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) { | |||
3770 | // Nothing to do. | |||
3771 | } | |||
3772 | #endif | |||
3773 | return result; | |||
3774 | } | |||
3775 | ||||
3776 | static jint attach_current_thread(JavaVM *vm, void **penv, void *_args, bool daemon) { | |||
3777 | JavaVMAttachArgs *args = (JavaVMAttachArgs *) _args; | |||
3778 | ||||
3779 | // Check below commented out from JDK1.2fcs as well | |||
3780 | /* | |||
3781 | if (args && (args->version != JNI_VERSION_1_1 || args->version != JNI_VERSION_1_2)) { | |||
3782 | return JNI_EVERSION; | |||
3783 | } | |||
3784 | */ | |||
3785 | ||||
3786 | Thread* t = Thread::current_or_null(); | |||
3787 | if (t != NULL__null) { | |||
3788 | // If executing from an atexit hook we may be in the VMThread. | |||
3789 | if (t->is_Java_thread()) { | |||
3790 | // If the thread has been attached this operation is a no-op | |||
3791 | *(JNIEnv**)penv = JavaThread::cast(t)->jni_environment(); | |||
3792 | return JNI_OK0; | |||
3793 | } else { | |||
3794 | return JNI_ERR(-1); | |||
3795 | } | |||
3796 | } | |||
3797 | ||||
3798 | // Create a thread and mark it as attaching so it will be skipped by the | |||
3799 | // ThreadsListEnumerator - see CR 6404306 | |||
3800 | JavaThread* thread = new JavaThread(true); | |||
3801 | ||||
3802 | // Set correct safepoint info. The thread is going to call into Java when | |||
3803 | // initializing the Java level thread object. Hence, the correct state must | |||
3804 | // be set in order for the Safepoint code to deal with it correctly. | |||
3805 | thread->set_thread_state(_thread_in_vm); | |||
3806 | thread->record_stack_base_and_size(); | |||
3807 | thread->register_thread_stack_with_NMT(); | |||
3808 | thread->initialize_thread_current(); | |||
3809 | MACOS_AARCH64_ONLY(thread->init_wx()); | |||
3810 | ||||
3811 | if (!os::create_attached_thread(thread)) { | |||
3812 | thread->smr_delete(); | |||
3813 | return JNI_ERR(-1); | |||
3814 | } | |||
3815 | // Enable stack overflow checks | |||
3816 | thread->stack_overflow_state()->create_stack_guard_pages(); | |||
3817 | ||||
3818 | thread->initialize_tlab(); | |||
3819 | ||||
3820 | thread->cache_global_variables(); | |||
3821 | ||||
3822 | // This thread will not do a safepoint check, since it has | |||
3823 | // not been added to the Thread list yet. | |||
3824 | { MutexLocker ml(Threads_lock); | |||
3825 | // This must be inside this lock in order to get FullGCALot to work properly, i.e., to | |||
3826 | // avoid this thread trying to do a GC before it is added to the thread-list | |||
3827 | thread->set_active_handles(JNIHandleBlock::allocate_block()); | |||
3828 | Threads::add(thread, daemon); | |||
3829 | } | |||
3830 | // Create thread group and name info from attach arguments | |||
3831 | oop group = NULL__null; | |||
3832 | char* thread_name = NULL__null; | |||
3833 | if (args != NULL__null && Threads::is_supported_jni_version(args->version)) { | |||
3834 | group = JNIHandles::resolve(args->group); | |||
3835 | thread_name = args->name; // may be NULL | |||
3836 | } | |||
3837 | if (group == NULL__null) group = Universe::main_thread_group(); | |||
3838 | ||||
3839 | // Create Java level thread object and attach it to this thread | |||
3840 | bool attach_failed = false; | |||
3841 | { | |||
3842 | EXCEPTION_MARKExceptionMark __em; JavaThread* __the_thread__ = __em.thread( );; | |||
3843 | HandleMark hm(THREAD__the_thread__); | |||
3844 | Handle thread_group(THREAD__the_thread__, group); | |||
3845 | thread->allocate_threadObj(thread_group, thread_name, daemon, THREAD__the_thread__); | |||
3846 | if (HAS_PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->has_pending_exception())) { | |||
3847 | CLEAR_PENDING_EXCEPTION(((ThreadShadow*)__the_thread__)->clear_pending_exception( )); | |||
3848 | // cleanup outside the handle mark. | |||
3849 | attach_failed = true; | |||
3850 | } | |||
3851 | } | |||
3852 | ||||
3853 | if (attach_failed) { | |||
3854 | // Added missing cleanup | |||
3855 | thread->cleanup_failed_attach_current_thread(daemon); | |||
3856 | return JNI_ERR(-1); | |||
3857 | } | |||
3858 | ||||
3859 | // mark the thread as no longer attaching | |||
3860 | // this uses a fence to push the change through so we don't have | |||
3861 | // to regrab the threads_lock | |||
3862 | thread->set_done_attaching_via_jni(); | |||
3863 | ||||
3864 | // Set java thread status. | |||
3865 | java_lang_Thread::set_thread_status(thread->threadObj(), | |||
3866 | JavaThreadStatus::RUNNABLE); | |||
3867 | ||||
3868 | // Notify the debugger | |||
3869 | if (JvmtiExport::should_post_thread_life()) { | |||
3870 | JvmtiExport::post_thread_start(thread); | |||
3871 | } | |||
3872 | ||||
3873 | post_thread_start_event(thread); | |||
3874 | ||||
3875 | *(JNIEnv**)penv = thread->jni_environment(); | |||
3876 | ||||
3877 | // Now leaving the VM, so change thread_state. This is normally automatically taken care | |||
3878 | // of in the JVM_ENTRY. But in this situation we have to do it manually. | |||
3879 | ThreadStateTransition::transition_from_vm(thread, _thread_in_native); | |||
3880 | MACOS_AARCH64_ONLY(thread->enable_wx(WXExec)); | |||
3881 | ||||
3882 | // Perform any platform dependent FPU setup | |||
3883 | os::setup_fpu(); | |||
3884 | ||||
3885 | return JNI_OK0; | |||
3886 | } | |||
3887 | ||||
3888 | ||||
3889 | jint JNICALL jni_AttachCurrentThread(JavaVM *vm, void **penv, void *_args) { | |||
3890 | HOTSPOT_JNI_ATTACHCURRENTTHREAD_ENTRY(vm, penv, _args); | |||
3891 | if (vm_created == 0) { | |||
3892 | HOTSPOT_JNI_ATTACHCURRENTTHREAD_RETURN((uint32_t) JNI_ERR); | |||
3893 | return JNI_ERR(-1); | |||
3894 | } | |||
3895 | ||||
3896 | jint ret = attach_current_thread(vm, penv, _args, false); | |||
3897 | HOTSPOT_JNI_ATTACHCURRENTTHREAD_RETURN(ret); | |||
3898 | return ret; | |||
3899 | } | |||
3900 | ||||
3901 | ||||
3902 | jint JNICALL jni_DetachCurrentThread(JavaVM *vm) { | |||
3903 | HOTSPOT_JNI_DETACHCURRENTTHREAD_ENTRY(vm); | |||
3904 | if (vm_created == 0) { | |||
3905 | HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN(JNI_ERR); | |||
3906 | return JNI_ERR(-1); | |||
3907 | } | |||
3908 | ||||
3909 | Thread* current = Thread::current_or_null(); | |||
3910 | ||||
3911 | // If the thread has already been detached the operation is a no-op | |||
3912 | if (current == NULL__null) { | |||
3913 | HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN(JNI_OK); | |||
3914 | return JNI_OK0; | |||
3915 | } | |||
3916 | ||||
3917 | // If executing from an atexit hook we may be in the VMThread. | |||
3918 | if (!current->is_Java_thread()) { | |||
3919 | HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN((uint32_t) JNI_ERR); | |||
3920 | return JNI_ERR(-1); | |||
3921 | } | |||
3922 | ||||
3923 | VM_Exit::block_if_vm_exited(); | |||
3924 | ||||
3925 | JavaThread* thread = JavaThread::cast(current); | |||
3926 | if (thread->has_last_Java_frame()) { | |||
3927 | HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN((uint32_t) JNI_ERR); | |||
3928 | // Can't detach a thread that's running java, that can't work. | |||
3929 | return JNI_ERR(-1); | |||
3930 | } | |||
3931 | ||||
3932 | // We are going to VM, change W^X state to the expected one. | |||
3933 | MACOS_AARCH64_ONLY(thread->enable_wx(WXWrite)); | |||
3934 | ||||
3935 | // Safepoint support. Have to do call-back to safepoint code, if in the | |||
3936 | // middle of a safepoint operation | |||
3937 | ThreadStateTransition::transition_from_native(thread, _thread_in_vm); | |||
3938 | ||||
3939 | // XXX: Note that JavaThread::exit() call below removes the guards on the | |||
3940 | // stack pages set up via enable_stack_{red,yellow}_zone() calls | |||
3941 | // above in jni_AttachCurrentThread. Unfortunately, while the setting | |||
3942 | // of the guards is visible in jni_AttachCurrentThread above, | |||
3943 | // the removal of the guards is buried below in JavaThread::exit() | |||
3944 | // here. The abstraction should be more symmetrically either exposed | |||
3945 | // or hidden (e.g. it could probably be hidden in the same | |||
3946 | // (platform-dependent) methods where we do alternate stack | |||
3947 | // maintenance work?) | |||
3948 | thread->exit(false, JavaThread::jni_detach); | |||
3949 | thread->smr_delete(); | |||
3950 | ||||
3951 | // Go to the execute mode, the initial state of the thread on creation. | |||
3952 | // Use os interface as the thread is not a JavaThread anymore. | |||
3953 | MACOS_AARCH64_ONLY(os::current_thread_enable_wx(WXExec)); | |||
3954 | ||||
3955 | HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN(JNI_OK); | |||
3956 | return JNI_OK0; | |||
3957 | } | |||
3958 | ||||
3959 | DT_RETURN_MARK_DECL(GetEnv, jint | |||
3960 | , HOTSPOT_JNI_GETENV_RETURN(_ret_ref)); | |||
3961 | ||||
3962 | jint JNICALL jni_GetEnv(JavaVM *vm, void **penv, jint version) { | |||
3963 | HOTSPOT_JNI_GETENV_ENTRY(vm, penv, version); | |||
3964 | jint ret = JNI_ERR(-1); | |||
3965 | DT_RETURN_MARK(GetEnv, jint, (const jint&)ret); | |||
3966 | ||||
3967 | if (vm_created == 0) { | |||
3968 | *penv = NULL__null; | |||
3969 | ret = JNI_EDETACHED(-2); | |||
3970 | return ret; | |||
3971 | } | |||
3972 | ||||
3973 | if (JniExportedInterface::GetExportedInterface(vm, penv, version, &ret)) { | |||
3974 | return ret; | |||
3975 | } | |||
3976 | ||||
3977 | #ifndef JVMPI_VERSION_1((jint)0x10000001) | |||
3978 | // need these in order to be polite about older agents | |||
3979 | #define JVMPI_VERSION_1((jint)0x10000001) ((jint)0x10000001) | |||
3980 | #define JVMPI_VERSION_1_1((jint)0x10000002) ((jint)0x10000002) | |||
3981 | #define JVMPI_VERSION_1_2((jint)0x10000003) ((jint)0x10000003) | |||
3982 | #endif // !JVMPI_VERSION_1 | |||
3983 | ||||
3984 | Thread* thread = Thread::current_or_null(); | |||
3985 | if (thread != NULL__null && thread->is_Java_thread()) { | |||
3986 | if (Threads::is_supported_jni_version_including_1_1(version)) { | |||
3987 | *(JNIEnv**)penv = JavaThread::cast(thread)->jni_environment(); | |||
3988 | ret = JNI_OK0; | |||
3989 | return ret; | |||
3990 | ||||
3991 | } else if (version == JVMPI_VERSION_1((jint)0x10000001) || | |||
3992 | version == JVMPI_VERSION_1_1((jint)0x10000002) || | |||
3993 | version == JVMPI_VERSION_1_2((jint)0x10000003)) { | |||
3994 | tty->print_cr("ERROR: JVMPI, an experimental interface, is no longer supported."); | |||
3995 | tty->print_cr("Please use the supported interface: the JVM Tool Interface (JVM TI)."); | |||
3996 | ret = JNI_EVERSION(-3); | |||
3997 | return ret; | |||
3998 | } else if (JvmtiExport::is_jvmdi_version(version)) { | |||
3999 | tty->print_cr("FATAL ERROR: JVMDI is no longer supported."); | |||
4000 | tty->print_cr("Please use the supported interface: the JVM Tool Interface (JVM TI)."); | |||
4001 | ret = JNI_EVERSION(-3); | |||
4002 | return ret; | |||
4003 | } else { | |||
4004 | *penv = NULL__null; | |||
4005 | ret = JNI_EVERSION(-3); | |||
4006 | return ret; | |||
4007 | } | |||
4008 | } else { | |||
4009 | *penv = NULL__null; | |||
4010 | ret = JNI_EDETACHED(-2); | |||
4011 | return ret; | |||
4012 | } | |||
4013 | } | |||
4014 | ||||
4015 | ||||
4016 | jint JNICALL jni_AttachCurrentThreadAsDaemon(JavaVM *vm, void **penv, void *_args) { | |||
4017 | HOTSPOT_JNI_ATTACHCURRENTTHREADASDAEMON_ENTRY(vm, penv, _args); | |||
4018 | if (vm_created == 0) { | |||
4019 | HOTSPOT_JNI_ATTACHCURRENTTHREADASDAEMON_RETURN((uint32_t) JNI_ERR); | |||
4020 | return JNI_ERR(-1); | |||
4021 | } | |||
4022 | ||||
4023 | jint ret = attach_current_thread(vm, penv, _args, true); | |||
4024 | HOTSPOT_JNI_ATTACHCURRENTTHREADASDAEMON_RETURN(ret); | |||
4025 | return ret; | |||
4026 | } | |||
4027 | ||||
4028 | ||||
4029 | } // End extern "C" | |||
4030 | ||||
4031 | const struct JNIInvokeInterface_ jni_InvokeInterface = { | |||
4032 | NULL__null, | |||
4033 | NULL__null, | |||
4034 | NULL__null, | |||
4035 | ||||
4036 | jni_DestroyJavaVM, | |||
4037 | jni_AttachCurrentThread, | |||
4038 | jni_DetachCurrentThread, | |||
4039 | jni_GetEnv, | |||
4040 | jni_AttachCurrentThreadAsDaemon | |||
4041 | }; |
1 | /* | |||
2 | * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. | |||
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |||
4 | * | |||
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 | |||
7 | * published by the Free Software Foundation. | |||
8 | * | |||
9 | * This code is distributed in the hope that it will be useful, but WITHOUT | |||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |||
12 | * version 2 for more details (a copy is included in the LICENSE file that | |||
13 | * accompanied this code). | |||
14 | * | |||
15 | * You should have received a copy of the GNU General Public License version | |||
16 | * 2 along with this work; if not, write to the Free Software Foundation, | |||
17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |||
18 | * | |||
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 | |||
21 | * questions. | |||
22 | * | |||
23 | */ | |||
24 | ||||
25 | #ifndef SHARE_UTILITIES_GLOBALDEFINITIONS_HPP | |||
26 | #define SHARE_UTILITIES_GLOBALDEFINITIONS_HPP | |||
27 | ||||
28 | #include "utilities/compilerWarnings.hpp" | |||
29 | #include "utilities/debug.hpp" | |||
30 | #include "utilities/macros.hpp" | |||
31 | ||||
32 | // Get constants like JVM_T_CHAR and JVM_SIGNATURE_INT, before pulling in <jvm.h>. | |||
33 | #include "classfile_constants.h" | |||
34 | ||||
35 | #include COMPILER_HEADER(utilities/globalDefinitions)"utilities/globalDefinitions_gcc.hpp" | |||
36 | ||||
37 | #include <cstddef> | |||
38 | ||||
39 | class oopDesc; | |||
40 | ||||
41 | // Defaults for macros that might be defined per compiler. | |||
42 | #ifndef NOINLINE__attribute__ ((noinline)) | |||
43 | #define NOINLINE__attribute__ ((noinline)) | |||
44 | #endif | |||
45 | #ifndef ALWAYSINLINEinline __attribute__ ((always_inline)) | |||
46 | #define ALWAYSINLINEinline __attribute__ ((always_inline)) inline | |||
47 | #endif | |||
48 | ||||
49 | #ifndef ATTRIBUTE_ALIGNED | |||
50 | #define ATTRIBUTE_ALIGNED(x)__attribute__((aligned(x))) | |||
51 | #endif | |||
52 | ||||
53 | #ifndef ATTRIBUTE_FLATTEN__attribute__ ((flatten)) | |||
54 | #define ATTRIBUTE_FLATTEN__attribute__ ((flatten)) | |||
55 | #endif | |||
56 | ||||
57 | // These are #defines to selectively turn on/off the Print(Opto)Assembly | |||
58 | // capabilities. Choices should be led by a tradeoff between | |||
59 | // code size and improved supportability. | |||
60 | // if PRINT_ASSEMBLY then PRINT_ABSTRACT_ASSEMBLY must be true as well | |||
61 | // to have a fallback in case hsdis is not available. | |||
62 | #if defined(PRODUCT) | |||
63 | #define SUPPORT_ABSTRACT_ASSEMBLY | |||
64 | #define SUPPORT_ASSEMBLY | |||
65 | #undef SUPPORT_OPTO_ASSEMBLY // Can't activate. In PRODUCT, many dump methods are missing. | |||
66 | #undef SUPPORT_DATA_STRUCTS // Of limited use. In PRODUCT, many print methods are empty. | |||
67 | #else | |||
68 | #define SUPPORT_ABSTRACT_ASSEMBLY | |||
69 | #define SUPPORT_ASSEMBLY | |||
70 | #define SUPPORT_OPTO_ASSEMBLY | |||
71 | #define SUPPORT_DATA_STRUCTS | |||
72 | #endif | |||
73 | #if defined(SUPPORT_ASSEMBLY) && !defined(SUPPORT_ABSTRACT_ASSEMBLY) | |||
74 | #define SUPPORT_ABSTRACT_ASSEMBLY | |||
75 | #endif | |||
76 | ||||
77 | // This file holds all globally used constants & types, class (forward) | |||
78 | // declarations and a few frequently used utility functions. | |||
79 | ||||
80 | // Declare the named class to be noncopyable. This macro must be followed by | |||
81 | // a semi-colon. The macro provides deleted declarations for the class's copy | |||
82 | // constructor and assignment operator. Because these operations are deleted, | |||
83 | // they cannot be defined and potential callers will fail to compile. | |||
84 | #define NONCOPYABLE(C)C(C const&) = delete; C& operator=(C const&) = delete C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */ | |||
85 | ||||
86 | ||||
87 | //---------------------------------------------------------------------------------------------------- | |||
88 | // Printf-style formatters for fixed- and variable-width types as pointers and | |||
89 | // integers. These are derived from the definitions in inttypes.h. If the platform | |||
90 | // doesn't provide appropriate definitions, they should be provided in | |||
91 | // the compiler-specific definitions file (e.g., globalDefinitions_gcc.hpp) | |||
92 | ||||
93 | #define BOOL_TO_STR(_b_)((_b_) ? "true" : "false") ((_b_) ? "true" : "false") | |||
94 | ||||
95 | // Format 32-bit quantities. | |||
96 | #define INT32_FORMAT"%" "d" "%" PRId32"d" | |||
97 | #define UINT32_FORMAT"%" "u" "%" PRIu32"u" | |||
98 | #define INT32_FORMAT_W(width)"%" "width" "d" "%" #width PRId32"d" | |||
99 | #define UINT32_FORMAT_W(width)"%" "width" "u" "%" #width PRIu32"u" | |||
100 | ||||
101 | #define PTR32_FORMAT"0x%08" "x" "0x%08" PRIx32"x" | |||
102 | #define PTR32_FORMAT_W(width)"0x%" "width" "x" "0x%" #width PRIx32"x" | |||
103 | ||||
104 | // Format 64-bit quantities. | |||
105 | #define INT64_FORMAT"%" "l" "d" "%" PRId64"l" "d" | |||
106 | #define UINT64_FORMAT"%" "l" "u" "%" PRIu64"l" "u" | |||
107 | #define UINT64_FORMAT_X"%" "l" "x" "%" PRIx64"l" "x" | |||
108 | #define INT64_FORMAT_W(width)"%" "width" "l" "d" "%" #width PRId64"l" "d" | |||
109 | #define UINT64_FORMAT_W(width)"%" "width" "l" "u" "%" #width PRIu64"l" "u" | |||
110 | #define UINT64_FORMAT_X_W(width)"%" "width" "l" "x" "%" #width PRIx64"l" "x" | |||
111 | ||||
112 | #define PTR64_FORMAT"0x%016" "l" "x" "0x%016" PRIx64"l" "x" | |||
113 | ||||
114 | // Format jlong, if necessary | |||
115 | #ifndef JLONG_FORMAT"%" "l" "d" | |||
116 | #define JLONG_FORMAT"%" "l" "d" INT64_FORMAT"%" "l" "d" | |||
117 | #endif | |||
118 | #ifndef JLONG_FORMAT_W | |||
119 | #define JLONG_FORMAT_W(width)"%" "width" "l" "d" INT64_FORMAT_W(width)"%" "width" "l" "d" | |||
120 | #endif | |||
121 | #ifndef JULONG_FORMAT"%" "l" "u" | |||
122 | #define JULONG_FORMAT"%" "l" "u" UINT64_FORMAT"%" "l" "u" | |||
123 | #endif | |||
124 | #ifndef JULONG_FORMAT_X"%" "l" "x" | |||
125 | #define JULONG_FORMAT_X"%" "l" "x" UINT64_FORMAT_X"%" "l" "x" | |||
126 | #endif | |||
127 | ||||
128 | // Format pointers which change size between 32- and 64-bit. | |||
129 | #ifdef _LP641 | |||
130 | #define INTPTR_FORMAT"0x%016" "l" "x" "0x%016" PRIxPTR"l" "x" | |||
131 | #define PTR_FORMAT"0x%016" "l" "x" "0x%016" PRIxPTR"l" "x" | |||
132 | #else // !_LP64 | |||
133 | #define INTPTR_FORMAT"0x%016" "l" "x" "0x%08" PRIxPTR"l" "x" | |||
134 | #define PTR_FORMAT"0x%016" "l" "x" "0x%08" PRIxPTR"l" "x" | |||
135 | #endif // _LP64 | |||
136 | ||||
137 | // Format pointers without leading zeros | |||
138 | #define INTPTRNZ_FORMAT"0x%" "l" "x" "0x%" PRIxPTR"l" "x" | |||
139 | ||||
140 | #define INTPTR_FORMAT_W(width)"%" "width" "l" "x" "%" #width PRIxPTR"l" "x" | |||
141 | ||||
142 | #define SSIZE_FORMAT"%" "l" "d" "%" PRIdPTR"l" "d" | |||
143 | #define SIZE_FORMAT"%" "l" "u" "%" PRIuPTR"l" "u" | |||
144 | #define SIZE_FORMAT_HEX"0x%" "l" "x" "0x%" PRIxPTR"l" "x" | |||
145 | #define SSIZE_FORMAT_W(width)"%" "width" "l" "d" "%" #width PRIdPTR"l" "d" | |||
146 | #define SIZE_FORMAT_W(width)"%" "width" "l" "u" "%" #width PRIuPTR"l" "u" | |||
147 | #define SIZE_FORMAT_HEX_W(width)"0x%" "width" "l" "x" "0x%" #width PRIxPTR"l" "x" | |||
148 | ||||
149 | #define INTX_FORMAT"%" "l" "d" "%" PRIdPTR"l" "d" | |||
150 | #define UINTX_FORMAT"%" "l" "u" "%" PRIuPTR"l" "u" | |||
151 | #define INTX_FORMAT_W(width)"%" "width" "l" "d" "%" #width PRIdPTR"l" "d" | |||
152 | #define UINTX_FORMAT_W(width)"%" "width" "l" "u" "%" #width PRIuPTR"l" "u" | |||
153 | ||||
154 | // Convert pointer to intptr_t, for use in printing pointers. | |||
155 | inline intptr_t p2i(const volatile void* p) { | |||
156 | return (intptr_t) p; | |||
157 | } | |||
158 | ||||
159 | //---------------------------------------------------------------------------------------------------- | |||
160 | // Constants | |||
161 | ||||
162 | const int LogBytesPerShort = 1; | |||
163 | const int LogBytesPerInt = 2; | |||
164 | #ifdef _LP641 | |||
165 | const int LogBytesPerWord = 3; | |||
166 | #else | |||
167 | const int LogBytesPerWord = 2; | |||
168 | #endif | |||
169 | const int LogBytesPerLong = 3; | |||
170 | ||||
171 | const int BytesPerShort = 1 << LogBytesPerShort; | |||
172 | const int BytesPerInt = 1 << LogBytesPerInt; | |||
173 | const int BytesPerWord = 1 << LogBytesPerWord; | |||
174 | const int BytesPerLong = 1 << LogBytesPerLong; | |||
175 | ||||
176 | const int LogBitsPerByte = 3; | |||
177 | const int LogBitsPerShort = LogBitsPerByte + LogBytesPerShort; | |||
178 | const int LogBitsPerInt = LogBitsPerByte + LogBytesPerInt; | |||
179 | const int LogBitsPerWord = LogBitsPerByte + LogBytesPerWord; | |||
180 | const int LogBitsPerLong = LogBitsPerByte + LogBytesPerLong; | |||
181 | ||||
182 | const int BitsPerByte = 1 << LogBitsPerByte; | |||
183 | const int BitsPerShort = 1 << LogBitsPerShort; | |||
184 | const int BitsPerInt = 1 << LogBitsPerInt; | |||
185 | const int BitsPerWord = 1 << LogBitsPerWord; | |||
186 | const int BitsPerLong = 1 << LogBitsPerLong; | |||
187 | ||||
188 | const int WordAlignmentMask = (1 << LogBytesPerWord) - 1; | |||
189 | const int LongAlignmentMask = (1 << LogBytesPerLong) - 1; | |||
190 | ||||
191 | const int WordsPerLong = 2; // Number of stack entries for longs | |||
192 | ||||
193 | const int oopSize = sizeof(char*); // Full-width oop | |||
194 | extern int heapOopSize; // Oop within a java object | |||
195 | const int wordSize = sizeof(char*); | |||
196 | const int longSize = sizeof(jlong); | |||
197 | const int jintSize = sizeof(jint); | |||
198 | const int size_tSize = sizeof(size_t); | |||
199 | ||||
200 | const int BytesPerOop = BytesPerWord; // Full-width oop | |||
201 | ||||
202 | extern int LogBytesPerHeapOop; // Oop within a java object | |||
203 | extern int LogBitsPerHeapOop; | |||
204 | extern int BytesPerHeapOop; | |||
205 | extern int BitsPerHeapOop; | |||
206 | ||||
207 | const int BitsPerJavaInteger = 32; | |||
208 | const int BitsPerJavaLong = 64; | |||
209 | const int BitsPerSize_t = size_tSize * BitsPerByte; | |||
210 | ||||
211 | // Size of a char[] needed to represent a jint as a string in decimal. | |||
212 | const int jintAsStringSize = 12; | |||
213 | ||||
214 | // An opaque type, so that HeapWord* can be a generic pointer into the heap. | |||
215 | // We require that object sizes be measured in units of heap words (e.g. | |||
216 | // pointer-sized values), so that given HeapWord* hw, | |||
217 | // hw += oop(hw)->foo(); | |||
218 | // works, where foo is a method (like size or scavenge) that returns the | |||
219 | // object size. | |||
220 | class HeapWordImpl; // Opaque, never defined. | |||
221 | typedef HeapWordImpl* HeapWord; | |||
222 | ||||
223 | // Analogous opaque struct for metadata allocated from metaspaces. | |||
224 | class MetaWordImpl; // Opaque, never defined. | |||
225 | typedef MetaWordImpl* MetaWord; | |||
226 | ||||
227 | // HeapWordSize must be 2^LogHeapWordSize. | |||
228 | const int HeapWordSize = sizeof(HeapWord); | |||
229 | #ifdef _LP641 | |||
230 | const int LogHeapWordSize = 3; | |||
231 | #else | |||
232 | const int LogHeapWordSize = 2; | |||
233 | #endif | |||
234 | const int HeapWordsPerLong = BytesPerLong / HeapWordSize; | |||
235 | const int LogHeapWordsPerLong = LogBytesPerLong - LogHeapWordSize; | |||
236 | ||||
237 | // The minimum number of native machine words necessary to contain "byte_size" | |||
238 | // bytes. | |||
239 | inline size_t heap_word_size(size_t byte_size) { | |||
240 | return (byte_size + (HeapWordSize-1)) >> LogHeapWordSize; | |||
241 | } | |||
242 | ||||
243 | inline jfloat jfloat_cast(jint x); | |||
244 | inline jdouble jdouble_cast(jlong x); | |||
245 | ||||
246 | //------------------------------------------- | |||
247 | // Constant for jlong (standardized by C++11) | |||
248 | ||||
249 | // Build a 64bit integer constant | |||
250 | #define CONST64(x)(xLL) (x ## LL) | |||
251 | #define UCONST64(x)(xULL) (x ## ULL) | |||
252 | ||||
253 | const jlong min_jlong = CONST64(0x8000000000000000)(0x8000000000000000LL); | |||
254 | const jlong max_jlong = CONST64(0x7fffffffffffffff)(0x7fffffffffffffffLL); | |||
255 | ||||
256 | //------------------------------------------- | |||
257 | // Constant for jdouble | |||
258 | const jlong min_jlongDouble = CONST64(0x0000000000000001)(0x0000000000000001LL); | |||
259 | const jdouble min_jdouble = jdouble_cast(min_jlongDouble); | |||
260 | const jlong max_jlongDouble = CONST64(0x7fefffffffffffff)(0x7fefffffffffffffLL); | |||
261 | const jdouble max_jdouble = jdouble_cast(max_jlongDouble); | |||
262 | ||||
263 | const size_t K = 1024; | |||
264 | const size_t M = K*K; | |||
265 | const size_t G = M*K; | |||
266 | const size_t HWperKB = K / sizeof(HeapWord); | |||
267 | ||||
268 | // Constants for converting from a base unit to milli-base units. For | |||
269 | // example from seconds to milliseconds and microseconds | |||
270 | ||||
271 | const int MILLIUNITS = 1000; // milli units per base unit | |||
272 | const int MICROUNITS = 1000000; // micro units per base unit | |||
273 | const int NANOUNITS = 1000000000; // nano units per base unit | |||
274 | const int NANOUNITS_PER_MILLIUNIT = NANOUNITS / MILLIUNITS; | |||
275 | ||||
276 | const jlong NANOSECS_PER_SEC = CONST64(1000000000)(1000000000LL); | |||
277 | const jint NANOSECS_PER_MILLISEC = 1000000; | |||
278 | ||||
279 | ||||
280 | // Unit conversion functions | |||
281 | // The caller is responsible for considering overlow. | |||
282 | ||||
283 | inline int64_t nanos_to_millis(int64_t nanos) { | |||
284 | return nanos / NANOUNITS_PER_MILLIUNIT; | |||
285 | } | |||
286 | inline int64_t millis_to_nanos(int64_t millis) { | |||
287 | return millis * NANOUNITS_PER_MILLIUNIT; | |||
288 | } | |||
289 | ||||
290 | // Proper units routines try to maintain at least three significant digits. | |||
291 | // In worst case, it would print five significant digits with lower prefix. | |||
292 | // G is close to MAX_SIZE on 32-bit platforms, so its product can easily overflow, | |||
293 | // and therefore we need to be careful. | |||
294 | ||||
295 | inline const char* proper_unit_for_byte_size(size_t s) { | |||
296 | #ifdef _LP641 | |||
297 | if (s >= 100*G) { | |||
298 | return "G"; | |||
299 | } | |||
300 | #endif | |||
301 | if (s >= 100*M) { | |||
302 | return "M"; | |||
303 | } else if (s >= 100*K) { | |||
304 | return "K"; | |||
305 | } else { | |||
306 | return "B"; | |||
307 | } | |||
308 | } | |||
309 | ||||
310 | template <class T> | |||
311 | inline T byte_size_in_proper_unit(T s) { | |||
312 | #ifdef _LP641 | |||
313 | if (s >= 100*G) { | |||
314 | return (T)(s/G); | |||
315 | } | |||
316 | #endif | |||
317 | if (s >= 100*M) { | |||
318 | return (T)(s/M); | |||
319 | } else if (s >= 100*K) { | |||
320 | return (T)(s/K); | |||
321 | } else { | |||
322 | return s; | |||
323 | } | |||
324 | } | |||
325 | ||||
326 | inline const char* exact_unit_for_byte_size(size_t s) { | |||
327 | #ifdef _LP641 | |||
328 | if (s >= G && (s % G) == 0) { | |||
329 | return "G"; | |||
330 | } | |||
331 | #endif | |||
332 | if (s >= M && (s % M) == 0) { | |||
333 | return "M"; | |||
334 | } | |||
335 | if (s >= K && (s % K) == 0) { | |||
336 | return "K"; | |||
337 | } | |||
338 | return "B"; | |||
339 | } | |||
340 | ||||
341 | inline size_t byte_size_in_exact_unit(size_t s) { | |||
342 | #ifdef _LP641 | |||
343 | if (s >= G && (s % G) == 0) { | |||
344 | return s / G; | |||
345 | } | |||
346 | #endif | |||
347 | if (s >= M && (s % M) == 0) { | |||
348 | return s / M; | |||
349 | } | |||
350 | if (s >= K && (s % K) == 0) { | |||
351 | return s / K; | |||
352 | } | |||
353 | return s; | |||
354 | } | |||
355 | ||||
356 | // Memory size transition formatting. | |||
357 | ||||
358 | #define HEAP_CHANGE_FORMAT"%s: " "%" "l" "u" "K(" "%" "l" "u" "K)->" "%" "l" "u" "K(" "%" "l" "u" "K)" "%s: " SIZE_FORMAT"%" "l" "u" "K(" SIZE_FORMAT"%" "l" "u" "K)->" SIZE_FORMAT"%" "l" "u" "K(" SIZE_FORMAT"%" "l" "u" "K)" | |||
359 | ||||
360 | #define HEAP_CHANGE_FORMAT_ARGS(_name_, _prev_used_, _prev_capacity_, _used_, _capacity_)(_name_), (_prev_used_) / K, (_prev_capacity_) / K, (_used_) / K, (_capacity_) / K \ | |||
361 | (_name_), (_prev_used_) / K, (_prev_capacity_) / K, (_used_) / K, (_capacity_) / K | |||
362 | ||||
363 | //---------------------------------------------------------------------------------------------------- | |||
364 | // VM type definitions | |||
365 | ||||
366 | // intx and uintx are the 'extended' int and 'extended' unsigned int types; | |||
367 | // they are 32bit wide on a 32-bit platform, and 64bit wide on a 64bit platform. | |||
368 | ||||
369 | typedef intptr_t intx; | |||
370 | typedef uintptr_t uintx; | |||
371 | ||||
372 | const intx min_intx = (intx)1 << (sizeof(intx)*BitsPerByte-1); | |||
373 | const intx max_intx = (uintx)min_intx - 1; | |||
374 | const uintx max_uintx = (uintx)-1; | |||
375 | ||||
376 | // Table of values: | |||
377 | // sizeof intx 4 8 | |||
378 | // min_intx 0x80000000 0x8000000000000000 | |||
379 | // max_intx 0x7FFFFFFF 0x7FFFFFFFFFFFFFFF | |||
380 | // max_uintx 0xFFFFFFFF 0xFFFFFFFFFFFFFFFF | |||
381 | ||||
382 | typedef unsigned int uint; NEEDS_CLEANUP | |||
383 | ||||
384 | ||||
385 | //---------------------------------------------------------------------------------------------------- | |||
386 | // Java type definitions | |||
387 | ||||
388 | // All kinds of 'plain' byte addresses | |||
389 | typedef signed char s_char; | |||
390 | typedef unsigned char u_char; | |||
391 | typedef u_char* address; | |||
392 | typedef uintptr_t address_word; // unsigned integer which will hold a pointer | |||
393 | // except for some implementations of a C++ | |||
394 | // linkage pointer to function. Should never | |||
395 | // need one of those to be placed in this | |||
396 | // type anyway. | |||
397 | ||||
398 | // Utility functions to "portably" (?) bit twiddle pointers | |||
399 | // Where portable means keep ANSI C++ compilers quiet | |||
400 | ||||
401 | inline address set_address_bits(address x, int m) { return address(intptr_t(x) | m); } | |||
402 | inline address clear_address_bits(address x, int m) { return address(intptr_t(x) & ~m); } | |||
403 | ||||
404 | // Utility functions to "portably" make cast to/from function pointers. | |||
405 | ||||
406 | inline address_word mask_address_bits(address x, int m) { return address_word(x) & m; } | |||
407 | inline address_word castable_address(address x) { return address_word(x) ; } | |||
408 | inline address_word castable_address(void* x) { return address_word(x) ; } | |||
409 | ||||
410 | // Pointer subtraction. | |||
411 | // The idea here is to avoid ptrdiff_t, which is signed and so doesn't have | |||
412 | // the range we might need to find differences from one end of the heap | |||
413 | // to the other. | |||
414 | // A typical use might be: | |||
415 | // if (pointer_delta(end(), top()) >= size) { | |||
416 | // // enough room for an object of size | |||
417 | // ... | |||
418 | // and then additions like | |||
419 | // ... top() + size ... | |||
420 | // are safe because we know that top() is at least size below end(). | |||
421 | inline size_t pointer_delta(const volatile void* left, | |||
422 | const volatile void* right, | |||
423 | size_t element_size) { | |||
424 | assert(left >= right, "avoid underflow - left: " PTR_FORMAT " right: " PTR_FORMAT, p2i(left), p2i(right))do { if (!(left >= right)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 424, "assert(" "left >= right" ") failed", "avoid underflow - left: " "0x%016" "l" "x" " right: " "0x%016" "l" "x", p2i(left), p2i (right)); ::breakpoint(); } } while (0); | |||
425 | return (((uintptr_t) left) - ((uintptr_t) right)) / element_size; | |||
426 | } | |||
427 | ||||
428 | // A version specialized for HeapWord*'s. | |||
429 | inline size_t pointer_delta(const HeapWord* left, const HeapWord* right) { | |||
430 | return pointer_delta(left, right, sizeof(HeapWord)); | |||
431 | } | |||
432 | // A version specialized for MetaWord*'s. | |||
433 | inline size_t pointer_delta(const MetaWord* left, const MetaWord* right) { | |||
434 | return pointer_delta(left, right, sizeof(MetaWord)); | |||
435 | } | |||
436 | ||||
437 | // | |||
438 | // ANSI C++ does not allow casting from one pointer type to a function pointer | |||
439 | // directly without at best a warning. This macro accomplishes it silently | |||
440 | // In every case that is present at this point the value be cast is a pointer | |||
441 | // to a C linkage function. In some case the type used for the cast reflects | |||
442 | // that linkage and a picky compiler would not complain. In other cases because | |||
443 | // there is no convenient place to place a typedef with extern C linkage (i.e | |||
444 | // a platform dependent header file) it doesn't. At this point no compiler seems | |||
445 | // picky enough to catch these instances (which are few). It is possible that | |||
446 | // using templates could fix these for all cases. This use of templates is likely | |||
447 | // so far from the middle of the road that it is likely to be problematic in | |||
448 | // many C++ compilers. | |||
449 | // | |||
450 | #define CAST_TO_FN_PTR(func_type, value)(reinterpret_cast<func_type>(value)) (reinterpret_cast<func_type>(value)) | |||
451 | #define CAST_FROM_FN_PTR(new_type, func_ptr)((new_type)((address_word)(func_ptr))) ((new_type)((address_word)(func_ptr))) | |||
452 | ||||
453 | // In many places we've added C-style casts to silence compiler | |||
454 | // warnings, for example when truncating a size_t to an int when we | |||
455 | // know the size_t is a small struct. Such casts are risky because | |||
456 | // they effectively disable useful compiler warnings. We can make our | |||
457 | // lives safer with this function, which ensures that any cast is | |||
458 | // reversible without loss of information. It doesn't check | |||
459 | // everything: it isn't intended to make sure that pointer types are | |||
460 | // compatible, for example. | |||
461 | template <typename T2, typename T1> | |||
462 | T2 checked_cast(T1 thing) { | |||
463 | T2 result = static_cast<T2>(thing); | |||
464 | assert(static_cast<T1>(result) == thing, "must be")do { if (!(static_cast<T1>(result) == thing)) { (*g_assert_poison ) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 464, "assert(" "static_cast<T1>(result) == thing" ") failed" , "must be"); ::breakpoint(); } } while (0); | |||
465 | return result; | |||
466 | } | |||
467 | ||||
468 | // Need the correct linkage to call qsort without warnings | |||
469 | extern "C" { | |||
470 | typedef int (*_sort_Fn)(const void *, const void *); | |||
471 | } | |||
472 | ||||
473 | // Unsigned byte types for os and stream.hpp | |||
474 | ||||
475 | // Unsigned one, two, four and eigth byte quantities used for describing | |||
476 | // the .class file format. See JVM book chapter 4. | |||
477 | ||||
478 | typedef jubyte u1; | |||
479 | typedef jushort u2; | |||
480 | typedef juint u4; | |||
481 | typedef julong u8; | |||
482 | ||||
483 | const jubyte max_jubyte = (jubyte)-1; // 0xFF largest jubyte | |||
484 | const jushort max_jushort = (jushort)-1; // 0xFFFF largest jushort | |||
485 | const juint max_juint = (juint)-1; // 0xFFFFFFFF largest juint | |||
486 | const julong max_julong = (julong)-1; // 0xFF....FF largest julong | |||
487 | ||||
488 | typedef jbyte s1; | |||
489 | typedef jshort s2; | |||
490 | typedef jint s4; | |||
491 | typedef jlong s8; | |||
492 | ||||
493 | const jbyte min_jbyte = -(1 << 7); // smallest jbyte | |||
494 | const jbyte max_jbyte = (1 << 7) - 1; // largest jbyte | |||
495 | const jshort min_jshort = -(1 << 15); // smallest jshort | |||
496 | const jshort max_jshort = (1 << 15) - 1; // largest jshort | |||
497 | ||||
498 | const jint min_jint = (jint)1 << (sizeof(jint)*BitsPerByte-1); // 0x80000000 == smallest jint | |||
499 | const jint max_jint = (juint)min_jint - 1; // 0x7FFFFFFF == largest jint | |||
500 | ||||
501 | const jint min_jintFloat = (jint)(0x00000001); | |||
502 | const jfloat min_jfloat = jfloat_cast(min_jintFloat); | |||
503 | const jint max_jintFloat = (jint)(0x7f7fffff); | |||
504 | const jfloat max_jfloat = jfloat_cast(max_jintFloat); | |||
505 | ||||
506 | //---------------------------------------------------------------------------------------------------- | |||
507 | // JVM spec restrictions | |||
508 | ||||
509 | const int max_method_code_size = 64*K - 1; // JVM spec, 2nd ed. section 4.8.1 (p.134) | |||
510 | ||||
511 | //---------------------------------------------------------------------------------------------------- | |||
512 | // old CDS options | |||
513 | extern bool DumpSharedSpaces; | |||
514 | extern bool DynamicDumpSharedSpaces; | |||
515 | extern bool RequireSharedSpaces; | |||
516 | extern "C" { | |||
517 | // Make sure UseSharedSpaces is accessible to the serviceability agent. | |||
518 | extern JNIEXPORT__attribute__((visibility("default"))) jboolean UseSharedSpaces; | |||
519 | } | |||
520 | ||||
521 | //---------------------------------------------------------------------------------------------------- | |||
522 | // Object alignment, in units of HeapWords. | |||
523 | // | |||
524 | // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and | |||
525 | // reference fields can be naturally aligned. | |||
526 | ||||
527 | extern int MinObjAlignment; | |||
528 | extern int MinObjAlignmentInBytes; | |||
529 | extern int MinObjAlignmentInBytesMask; | |||
530 | ||||
531 | extern int LogMinObjAlignment; | |||
532 | extern int LogMinObjAlignmentInBytes; | |||
533 | ||||
534 | const int LogKlassAlignmentInBytes = 3; | |||
535 | const int LogKlassAlignment = LogKlassAlignmentInBytes - LogHeapWordSize; | |||
536 | const int KlassAlignmentInBytes = 1 << LogKlassAlignmentInBytes; | |||
537 | const int KlassAlignment = KlassAlignmentInBytes / HeapWordSize; | |||
538 | ||||
539 | // Maximal size of heap where unscaled compression can be used. Also upper bound | |||
540 | // for heap placement: 4GB. | |||
541 | const uint64_t UnscaledOopHeapMax = (uint64_t(max_juint) + 1); | |||
542 | // Maximal size of heap where compressed oops can be used. Also upper bound for heap | |||
543 | // placement for zero based compression algorithm: UnscaledOopHeapMax << LogMinObjAlignmentInBytes. | |||
544 | extern uint64_t OopEncodingHeapMax; | |||
545 | ||||
546 | // Maximal size of compressed class space. Above this limit compression is not possible. | |||
547 | // Also upper bound for placement of zero based class space. (Class space is further limited | |||
548 | // to be < 3G, see arguments.cpp.) | |||
549 | const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes; | |||
550 | ||||
551 | // Machine dependent stuff | |||
552 | ||||
553 | // The maximum size of the code cache. Can be overridden by targets. | |||
554 | #define CODE_CACHE_SIZE_LIMIT(2*G) (2*G) | |||
555 | // Allow targets to reduce the default size of the code cache. | |||
556 | #define CODE_CACHE_DEFAULT_LIMIT(2*G) CODE_CACHE_SIZE_LIMIT(2*G) | |||
557 | ||||
558 | #include CPU_HEADER(globalDefinitions)"globalDefinitions_x86.hpp" | |||
559 | ||||
560 | // To assure the IRIW property on processors that are not multiple copy | |||
561 | // atomic, sync instructions must be issued between volatile reads to | |||
562 | // assure their ordering, instead of after volatile stores. | |||
563 | // (See "A Tutorial Introduction to the ARM and POWER Relaxed Memory Models" | |||
564 | // by Luc Maranget, Susmit Sarkar and Peter Sewell, INRIA/Cambridge) | |||
565 | #ifdef CPU_MULTI_COPY_ATOMIC | |||
566 | // Not needed. | |||
567 | const bool support_IRIW_for_not_multiple_copy_atomic_cpu = false; | |||
568 | #else | |||
569 | // From all non-multi-copy-atomic architectures, only PPC64 supports IRIW at the moment. | |||
570 | // Final decision is subject to JEP 188: Java Memory Model Update. | |||
571 | const bool support_IRIW_for_not_multiple_copy_atomic_cpu = PPC64_ONLY(true) NOT_PPC64(false)false; | |||
572 | #endif | |||
573 | ||||
574 | // The expected size in bytes of a cache line, used to pad data structures. | |||
575 | #ifndef DEFAULT_CACHE_LINE_SIZE128 | |||
576 | #define DEFAULT_CACHE_LINE_SIZE128 64 | |||
577 | #endif | |||
578 | ||||
579 | ||||
580 | //---------------------------------------------------------------------------------------------------- | |||
581 | // Utility macros for compilers | |||
582 | // used to silence compiler warnings | |||
583 | ||||
584 | #define Unused_Variable(var)var var | |||
585 | ||||
586 | ||||
587 | //---------------------------------------------------------------------------------------------------- | |||
588 | // Miscellaneous | |||
589 | ||||
590 | // 6302670 Eliminate Hotspot __fabsf dependency | |||
591 | // All fabs() callers should call this function instead, which will implicitly | |||
592 | // convert the operand to double, avoiding a dependency on __fabsf which | |||
593 | // doesn't exist in early versions of Solaris 8. | |||
594 | inline double fabsd(double value) { | |||
595 | return fabs(value); | |||
596 | } | |||
597 | ||||
598 | // Returns numerator/denominator as percentage value from 0 to 100. If denominator | |||
599 | // is zero, return 0.0. | |||
600 | template<typename T> | |||
601 | inline double percent_of(T numerator, T denominator) { | |||
602 | return denominator != 0 ? (double)numerator / denominator * 100.0 : 0.0; | |||
603 | } | |||
604 | ||||
605 | //---------------------------------------------------------------------------------------------------- | |||
606 | // Special casts | |||
607 | // Cast floats into same-size integers and vice-versa w/o changing bit-pattern | |||
608 | typedef union { | |||
609 | jfloat f; | |||
610 | jint i; | |||
611 | } FloatIntConv; | |||
612 | ||||
613 | typedef union { | |||
614 | jdouble d; | |||
615 | jlong l; | |||
616 | julong ul; | |||
617 | } DoubleLongConv; | |||
618 | ||||
619 | inline jint jint_cast (jfloat x) { return ((FloatIntConv*)&x)->i; } | |||
620 | inline jfloat jfloat_cast (jint x) { return ((FloatIntConv*)&x)->f; } | |||
621 | ||||
622 | inline jlong jlong_cast (jdouble x) { return ((DoubleLongConv*)&x)->l; } | |||
623 | inline julong julong_cast (jdouble x) { return ((DoubleLongConv*)&x)->ul; } | |||
624 | inline jdouble jdouble_cast (jlong x) { return ((DoubleLongConv*)&x)->d; } | |||
625 | ||||
626 | inline jint low (jlong value) { return jint(value); } | |||
627 | inline jint high(jlong value) { return jint(value >> 32); } | |||
628 | ||||
629 | // the fancy casts are a hopefully portable way | |||
630 | // to do unsigned 32 to 64 bit type conversion | |||
631 | inline void set_low (jlong* value, jint low ) { *value &= (jlong)0xffffffff << 32; | |||
632 | *value |= (jlong)(julong)(juint)low; } | |||
633 | ||||
634 | inline void set_high(jlong* value, jint high) { *value &= (jlong)(julong)(juint)0xffffffff; | |||
635 | *value |= (jlong)high << 32; } | |||
636 | ||||
637 | inline jlong jlong_from(jint h, jint l) { | |||
638 | jlong result = 0; // initialization to avoid warning | |||
639 | set_high(&result, h); | |||
640 | set_low(&result, l); | |||
641 | return result; | |||
642 | } | |||
643 | ||||
644 | union jlong_accessor { | |||
645 | jint words[2]; | |||
646 | jlong long_value; | |||
647 | }; | |||
648 | ||||
649 | void basic_types_init(); // cannot define here; uses assert | |||
650 | ||||
651 | ||||
652 | // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java | |||
653 | enum BasicType { | |||
654 | // The values T_BOOLEAN..T_LONG (4..11) are derived from the JVMS. | |||
655 | T_BOOLEAN = JVM_T_BOOLEAN, | |||
656 | T_CHAR = JVM_T_CHAR, | |||
657 | T_FLOAT = JVM_T_FLOAT, | |||
658 | T_DOUBLE = JVM_T_DOUBLE, | |||
659 | T_BYTE = JVM_T_BYTE, | |||
660 | T_SHORT = JVM_T_SHORT, | |||
661 | T_INT = JVM_T_INT, | |||
662 | T_LONG = JVM_T_LONG, | |||
663 | // The remaining values are not part of any standard. | |||
664 | // T_OBJECT and T_VOID denote two more semantic choices | |||
665 | // for method return values. | |||
666 | // T_OBJECT and T_ARRAY describe signature syntax. | |||
667 | // T_ADDRESS, T_METADATA, T_NARROWOOP, T_NARROWKLASS describe | |||
668 | // internal references within the JVM as if they were Java | |||
669 | // types in their own right. | |||
670 | T_OBJECT = 12, | |||
671 | T_ARRAY = 13, | |||
672 | T_VOID = 14, | |||
673 | T_ADDRESS = 15, | |||
674 | T_NARROWOOP = 16, | |||
675 | T_METADATA = 17, | |||
676 | T_NARROWKLASS = 18, | |||
677 | T_CONFLICT = 19, // for stack value type with conflicting contents | |||
678 | T_ILLEGAL = 99 | |||
679 | }; | |||
680 | ||||
681 | #define SIGNATURE_TYPES_DO(F, N)F(JVM_SIGNATURE_BOOLEAN, T_BOOLEAN, N) F(JVM_SIGNATURE_CHAR, T_CHAR , N) F(JVM_SIGNATURE_FLOAT, T_FLOAT, N) F(JVM_SIGNATURE_DOUBLE , T_DOUBLE, N) F(JVM_SIGNATURE_BYTE, T_BYTE, N) F(JVM_SIGNATURE_SHORT , T_SHORT, N) F(JVM_SIGNATURE_INT, T_INT, N) F(JVM_SIGNATURE_LONG , T_LONG, N) F(JVM_SIGNATURE_CLASS, T_OBJECT, N) F(JVM_SIGNATURE_ARRAY , T_ARRAY, N) F(JVM_SIGNATURE_VOID, T_VOID, N) \ | |||
682 | F(JVM_SIGNATURE_BOOLEAN, T_BOOLEAN, N) \ | |||
683 | F(JVM_SIGNATURE_CHAR, T_CHAR, N) \ | |||
684 | F(JVM_SIGNATURE_FLOAT, T_FLOAT, N) \ | |||
685 | F(JVM_SIGNATURE_DOUBLE, T_DOUBLE, N) \ | |||
686 | F(JVM_SIGNATURE_BYTE, T_BYTE, N) \ | |||
687 | F(JVM_SIGNATURE_SHORT, T_SHORT, N) \ | |||
688 | F(JVM_SIGNATURE_INT, T_INT, N) \ | |||
689 | F(JVM_SIGNATURE_LONG, T_LONG, N) \ | |||
690 | F(JVM_SIGNATURE_CLASS, T_OBJECT, N) \ | |||
691 | F(JVM_SIGNATURE_ARRAY, T_ARRAY, N) \ | |||
692 | F(JVM_SIGNATURE_VOID, T_VOID, N) \ | |||
693 | /*end*/ | |||
694 | ||||
695 | inline bool is_java_type(BasicType t) { | |||
696 | return T_BOOLEAN <= t && t <= T_VOID; | |||
697 | } | |||
698 | ||||
699 | inline bool is_java_primitive(BasicType t) { | |||
700 | return T_BOOLEAN <= t && t <= T_LONG; | |||
701 | } | |||
702 | ||||
703 | inline bool is_subword_type(BasicType t) { | |||
704 | // these guys are processed exactly like T_INT in calling sequences: | |||
705 | return (t == T_BOOLEAN || t == T_CHAR || t == T_BYTE || t == T_SHORT); | |||
706 | } | |||
707 | ||||
708 | inline bool is_signed_subword_type(BasicType t) { | |||
709 | return (t == T_BYTE || t == T_SHORT); | |||
710 | } | |||
711 | ||||
712 | inline bool is_double_word_type(BasicType t) { | |||
713 | return (t == T_DOUBLE || t == T_LONG); | |||
714 | } | |||
715 | ||||
716 | inline bool is_reference_type(BasicType t) { | |||
717 | return (t == T_OBJECT || t == T_ARRAY); | |||
718 | } | |||
719 | ||||
720 | inline bool is_integral_type(BasicType t) { | |||
721 | return is_subword_type(t) || t == T_INT || t == T_LONG; | |||
722 | } | |||
723 | ||||
724 | inline bool is_floating_point_type(BasicType t) { | |||
725 | return (t == T_FLOAT || t == T_DOUBLE); | |||
726 | } | |||
727 | ||||
728 | extern char type2char_tab[T_CONFLICT+1]; // Map a BasicType to a jchar | |||
729 | inline char type2char(BasicType t) { return (uint)t < T_CONFLICT+1 ? type2char_tab[t] : 0; } | |||
730 | extern int type2size[T_CONFLICT+1]; // Map BasicType to result stack elements | |||
731 | extern const char* type2name_tab[T_CONFLICT+1]; // Map a BasicType to a jchar | |||
732 | inline const char* type2name(BasicType t) { return (uint)t < T_CONFLICT+1 ? type2name_tab[t] : NULL__null; } | |||
733 | extern BasicType name2type(const char* name); | |||
734 | ||||
735 | inline jlong max_signed_integer(BasicType bt) { | |||
736 | if (bt == T_INT) { | |||
737 | return max_jint; | |||
738 | } | |||
739 | assert(bt == T_LONG, "unsupported")do { if (!(bt == T_LONG)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 739, "assert(" "bt == T_LONG" ") failed", "unsupported"); :: breakpoint(); } } while (0); | |||
740 | return max_jlong; | |||
741 | } | |||
742 | ||||
743 | inline jlong min_signed_integer(BasicType bt) { | |||
744 | if (bt == T_INT) { | |||
745 | return min_jint; | |||
746 | } | |||
747 | assert(bt == T_LONG, "unsupported")do { if (!(bt == T_LONG)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 747, "assert(" "bt == T_LONG" ") failed", "unsupported"); :: breakpoint(); } } while (0); | |||
748 | return min_jlong; | |||
749 | } | |||
750 | ||||
751 | // Auxiliary math routines | |||
752 | // least common multiple | |||
753 | extern size_t lcm(size_t a, size_t b); | |||
754 | ||||
755 | ||||
756 | // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java | |||
757 | enum BasicTypeSize { | |||
758 | T_BOOLEAN_size = 1, | |||
759 | T_CHAR_size = 1, | |||
760 | T_FLOAT_size = 1, | |||
761 | T_DOUBLE_size = 2, | |||
762 | T_BYTE_size = 1, | |||
763 | T_SHORT_size = 1, | |||
764 | T_INT_size = 1, | |||
765 | T_LONG_size = 2, | |||
766 | T_OBJECT_size = 1, | |||
767 | T_ARRAY_size = 1, | |||
768 | T_NARROWOOP_size = 1, | |||
769 | T_NARROWKLASS_size = 1, | |||
770 | T_VOID_size = 0 | |||
771 | }; | |||
772 | ||||
773 | // this works on valid parameter types but not T_VOID, T_CONFLICT, etc. | |||
774 | inline int parameter_type_word_count(BasicType t) { | |||
775 | if (is_double_word_type(t)) return 2; | |||
776 | assert(is_java_primitive(t) || is_reference_type(t), "no goofy types here please")do { if (!(is_java_primitive(t) || is_reference_type(t))) { ( *g_assert_poison) = 'X';; report_vm_error("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 776, "assert(" "is_java_primitive(t) || is_reference_type(t)" ") failed", "no goofy types here please"); ::breakpoint(); } } while (0); | |||
777 | assert(type2size[t] == 1, "must be")do { if (!(type2size[t] == 1)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 777, "assert(" "type2size[t] == 1" ") failed", "must be"); :: breakpoint(); } } while (0); | |||
778 | return 1; | |||
779 | } | |||
780 | ||||
781 | // maps a BasicType to its instance field storage type: | |||
782 | // all sub-word integral types are widened to T_INT | |||
783 | extern BasicType type2field[T_CONFLICT+1]; | |||
784 | extern BasicType type2wfield[T_CONFLICT+1]; | |||
785 | ||||
786 | ||||
787 | // size in bytes | |||
788 | enum ArrayElementSize { | |||
789 | T_BOOLEAN_aelem_bytes = 1, | |||
790 | T_CHAR_aelem_bytes = 2, | |||
791 | T_FLOAT_aelem_bytes = 4, | |||
792 | T_DOUBLE_aelem_bytes = 8, | |||
793 | T_BYTE_aelem_bytes = 1, | |||
794 | T_SHORT_aelem_bytes = 2, | |||
795 | T_INT_aelem_bytes = 4, | |||
796 | T_LONG_aelem_bytes = 8, | |||
797 | #ifdef _LP641 | |||
798 | T_OBJECT_aelem_bytes = 8, | |||
799 | T_ARRAY_aelem_bytes = 8, | |||
800 | #else | |||
801 | T_OBJECT_aelem_bytes = 4, | |||
802 | T_ARRAY_aelem_bytes = 4, | |||
803 | #endif | |||
804 | T_NARROWOOP_aelem_bytes = 4, | |||
805 | T_NARROWKLASS_aelem_bytes = 4, | |||
806 | T_VOID_aelem_bytes = 0 | |||
807 | }; | |||
808 | ||||
809 | extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element | |||
810 | #ifdef ASSERT1 | |||
811 | extern int type2aelembytes(BasicType t, bool allow_address = false); // asserts | |||
812 | #else | |||
813 | inline int type2aelembytes(BasicType t, bool allow_address = false) { return _type2aelembytes[t]; } | |||
814 | #endif | |||
815 | ||||
816 | ||||
817 | // JavaValue serves as a container for arbitrary Java values. | |||
818 | ||||
819 | class JavaValue { | |||
820 | ||||
821 | public: | |||
822 | typedef union JavaCallValue { | |||
823 | jfloat f; | |||
824 | jdouble d; | |||
825 | jint i; | |||
826 | jlong l; | |||
827 | jobject h; | |||
828 | oopDesc* o; | |||
829 | } JavaCallValue; | |||
830 | ||||
831 | private: | |||
832 | BasicType _type; | |||
833 | JavaCallValue _value; | |||
834 | ||||
835 | public: | |||
836 | JavaValue(BasicType t = T_ILLEGAL) { _type = t; } | |||
837 | ||||
838 | JavaValue(jfloat value) { | |||
839 | _type = T_FLOAT; | |||
840 | _value.f = value; | |||
841 | } | |||
842 | ||||
843 | JavaValue(jdouble value) { | |||
844 | _type = T_DOUBLE; | |||
845 | _value.d = value; | |||
846 | } | |||
847 | ||||
848 | jfloat get_jfloat() const { return _value.f; } | |||
| ||||
849 | jdouble get_jdouble() const { return _value.d; } | |||
850 | jint get_jint() const { return _value.i; } | |||
851 | jlong get_jlong() const { return _value.l; } | |||
852 | jobject get_jobject() const { return _value.h; } | |||
853 | oopDesc* get_oop() const { return _value.o; } | |||
854 | JavaCallValue* get_value_addr() { return &_value; } | |||
855 | BasicType get_type() const { return _type; } | |||
856 | ||||
857 | void set_jfloat(jfloat f) { _value.f = f;} | |||
858 | void set_jdouble(jdouble d) { _value.d = d;} | |||
859 | void set_jint(jint i) { _value.i = i;} | |||
860 | void set_jlong(jlong l) { _value.l = l;} | |||
861 | void set_jobject(jobject h) { _value.h = h;} | |||
862 | void set_oop(oopDesc* o) { _value.o = o;} | |||
863 | void set_type(BasicType t) { _type = t; } | |||
864 | ||||
865 | jboolean get_jboolean() const { return (jboolean) (_value.i);} | |||
866 | jbyte get_jbyte() const { return (jbyte) (_value.i);} | |||
867 | jchar get_jchar() const { return (jchar) (_value.i);} | |||
868 | jshort get_jshort() const { return (jshort) (_value.i);} | |||
869 | ||||
870 | }; | |||
871 | ||||
872 | ||||
873 | // TosState describes the top-of-stack state before and after the execution of | |||
874 | // a bytecode or method. The top-of-stack value may be cached in one or more CPU | |||
875 | // registers. The TosState corresponds to the 'machine representation' of this cached | |||
876 | // value. There's 4 states corresponding to the JAVA types int, long, float & double | |||
877 | // as well as a 5th state in case the top-of-stack value is actually on the top | |||
878 | // of stack (in memory) and thus not cached. The atos state corresponds to the itos | |||
879 | // state when it comes to machine representation but is used separately for (oop) | |||
880 | // type specific operations (e.g. verification code). | |||
881 | ||||
882 | enum TosState { // describes the tos cache contents | |||
883 | btos = 0, // byte, bool tos cached | |||
884 | ztos = 1, // byte, bool tos cached | |||
885 | ctos = 2, // char tos cached | |||
886 | stos = 3, // short tos cached | |||
887 | itos = 4, // int tos cached | |||
888 | ltos = 5, // long tos cached | |||
889 | ftos = 6, // float tos cached | |||
890 | dtos = 7, // double tos cached | |||
891 | atos = 8, // object cached | |||
892 | vtos = 9, // tos not cached | |||
893 | number_of_states, | |||
894 | ilgl // illegal state: should not occur | |||
895 | }; | |||
896 | ||||
897 | ||||
898 | inline TosState as_TosState(BasicType type) { | |||
899 | switch (type) { | |||
900 | case T_BYTE : return btos; | |||
901 | case T_BOOLEAN: return ztos; | |||
902 | case T_CHAR : return ctos; | |||
903 | case T_SHORT : return stos; | |||
904 | case T_INT : return itos; | |||
905 | case T_LONG : return ltos; | |||
906 | case T_FLOAT : return ftos; | |||
907 | case T_DOUBLE : return dtos; | |||
908 | case T_VOID : return vtos; | |||
909 | case T_ARRAY : // fall through | |||
910 | case T_OBJECT : return atos; | |||
911 | default : return ilgl; | |||
912 | } | |||
913 | } | |||
914 | ||||
915 | inline BasicType as_BasicType(TosState state) { | |||
916 | switch (state) { | |||
917 | case btos : return T_BYTE; | |||
918 | case ztos : return T_BOOLEAN; | |||
919 | case ctos : return T_CHAR; | |||
920 | case stos : return T_SHORT; | |||
921 | case itos : return T_INT; | |||
922 | case ltos : return T_LONG; | |||
923 | case ftos : return T_FLOAT; | |||
924 | case dtos : return T_DOUBLE; | |||
925 | case atos : return T_OBJECT; | |||
926 | case vtos : return T_VOID; | |||
927 | default : return T_ILLEGAL; | |||
928 | } | |||
929 | } | |||
930 | ||||
931 | ||||
932 | // Helper function to convert BasicType info into TosState | |||
933 | // Note: Cannot define here as it uses global constant at the time being. | |||
934 | TosState as_TosState(BasicType type); | |||
935 | ||||
936 | ||||
937 | // JavaThreadState keeps track of which part of the code a thread is executing in. This | |||
938 | // information is needed by the safepoint code. | |||
939 | // | |||
940 | // There are 4 essential states: | |||
941 | // | |||
942 | // _thread_new : Just started, but not executed init. code yet (most likely still in OS init code) | |||
943 | // _thread_in_native : In native code. This is a safepoint region, since all oops will be in jobject handles | |||
944 | // _thread_in_vm : Executing in the vm | |||
945 | // _thread_in_Java : Executing either interpreted or compiled Java code (or could be in a stub) | |||
946 | // | |||
947 | // Each state has an associated xxxx_trans state, which is an intermediate state used when a thread is in | |||
948 | // a transition from one state to another. These extra states makes it possible for the safepoint code to | |||
949 | // handle certain thread_states without having to suspend the thread - making the safepoint code faster. | |||
950 | // | |||
951 | // Given a state, the xxxx_trans state can always be found by adding 1. | |||
952 | // | |||
953 | enum JavaThreadState { | |||
954 | _thread_uninitialized = 0, // should never happen (missing initialization) | |||
955 | _thread_new = 2, // just starting up, i.e., in process of being initialized | |||
956 | _thread_new_trans = 3, // corresponding transition state (not used, included for completness) | |||
957 | _thread_in_native = 4, // running in native code | |||
958 | _thread_in_native_trans = 5, // corresponding transition state | |||
959 | _thread_in_vm = 6, // running in VM | |||
960 | _thread_in_vm_trans = 7, // corresponding transition state | |||
961 | _thread_in_Java = 8, // running in Java or in stub code | |||
962 | _thread_in_Java_trans = 9, // corresponding transition state (not used, included for completness) | |||
963 | _thread_blocked = 10, // blocked in vm | |||
964 | _thread_blocked_trans = 11, // corresponding transition state | |||
965 | _thread_max_state = 12 // maximum thread state+1 - used for statistics allocation | |||
966 | }; | |||
967 | ||||
968 | //---------------------------------------------------------------------------------------------------- | |||
969 | // Special constants for debugging | |||
970 | ||||
971 | const jint badInt = -3; // generic "bad int" value | |||
972 | const intptr_t badAddressVal = -2; // generic "bad address" value | |||
973 | const intptr_t badOopVal = -1; // generic "bad oop" value | |||
974 | const intptr_t badHeapOopVal = (intptr_t) CONST64(0x2BAD4B0BBAADBABE)(0x2BAD4B0BBAADBABELL); // value used to zap heap after GC | |||
975 | const int badStackSegVal = 0xCA; // value used to zap stack segments | |||
976 | const int badHandleValue = 0xBC; // value used to zap vm handle area | |||
977 | const int badResourceValue = 0xAB; // value used to zap resource area | |||
978 | const int freeBlockPad = 0xBA; // value used to pad freed blocks. | |||
979 | const int uninitBlockPad = 0xF1; // value used to zap newly malloc'd blocks. | |||
980 | const juint uninitMetaWordVal= 0xf7f7f7f7; // value used to zap newly allocated metachunk | |||
981 | const juint badHeapWordVal = 0xBAADBABE; // value used to zap heap after GC | |||
982 | const juint badMetaWordVal = 0xBAADFADE; // value used to zap metadata heap after GC | |||
983 | const int badCodeHeapNewVal= 0xCC; // value used to zap Code heap at allocation | |||
984 | const int badCodeHeapFreeVal = 0xDD; // value used to zap Code heap at deallocation | |||
985 | ||||
986 | ||||
987 | // (These must be implemented as #defines because C++ compilers are | |||
988 | // not obligated to inline non-integral constants!) | |||
989 | #define badAddress((address)::badAddressVal) ((address)::badAddressVal) | |||
990 | #define badOop(cast_to_oop(::badOopVal)) (cast_to_oop(::badOopVal)) | |||
991 | #define badHeapWord(::badHeapWordVal) (::badHeapWordVal) | |||
992 | ||||
993 | // Default TaskQueue size is 16K (32-bit) or 128K (64-bit) | |||
994 | #define TASKQUEUE_SIZE( 1<<17) (NOT_LP64(1<<14) LP64_ONLY(1<<17)1<<17) | |||
995 | ||||
996 | //---------------------------------------------------------------------------------------------------- | |||
997 | // Utility functions for bitfield manipulations | |||
998 | ||||
999 | const intptr_t AllBits = ~0; // all bits set in a word | |||
1000 | const intptr_t NoBits = 0; // no bits set in a word | |||
1001 | const jlong NoLongBits = 0; // no bits set in a long | |||
1002 | const intptr_t OneBit = 1; // only right_most bit set in a word | |||
1003 | ||||
1004 | // get a word with the n.th or the right-most or left-most n bits set | |||
1005 | // (note: #define used only so that they can be used in enum constant definitions) | |||
1006 | #define nth_bit(n)(((n) >= BitsPerWord) ? 0 : (OneBit << (n))) (((n) >= BitsPerWord) ? 0 : (OneBit << (n))) | |||
1007 | #define right_n_bits(n)((((n) >= BitsPerWord) ? 0 : (OneBit << (n))) - 1) (nth_bit(n)(((n) >= BitsPerWord) ? 0 : (OneBit << (n))) - 1) | |||
1008 | ||||
1009 | // bit-operations using a mask m | |||
1010 | inline void set_bits (intptr_t& x, intptr_t m) { x |= m; } | |||
1011 | inline void clear_bits (intptr_t& x, intptr_t m) { x &= ~m; } | |||
1012 | inline intptr_t mask_bits (intptr_t x, intptr_t m) { return x & m; } | |||
1013 | inline jlong mask_long_bits (jlong x, jlong m) { return x & m; } | |||
1014 | inline bool mask_bits_are_true (intptr_t flags, intptr_t mask) { return (flags & mask) == mask; } | |||
1015 | ||||
1016 | // bit-operations using the n.th bit | |||
1017 | inline void set_nth_bit(intptr_t& x, int n) { set_bits (x, nth_bit(n)(((n) >= BitsPerWord) ? 0 : (OneBit << (n)))); } | |||
1018 | inline void clear_nth_bit(intptr_t& x, int n) { clear_bits(x, nth_bit(n)(((n) >= BitsPerWord) ? 0 : (OneBit << (n)))); } | |||
1019 | inline bool is_set_nth_bit(intptr_t x, int n) { return mask_bits (x, nth_bit(n)(((n) >= BitsPerWord) ? 0 : (OneBit << (n)))) != NoBits; } | |||
1020 | ||||
1021 | // returns the bitfield of x starting at start_bit_no with length field_length (no sign-extension!) | |||
1022 | inline intptr_t bitfield(intptr_t x, int start_bit_no, int field_length) { | |||
1023 | return mask_bits(x >> start_bit_no, right_n_bits(field_length)((((field_length) >= BitsPerWord) ? 0 : (OneBit << ( field_length))) - 1)); | |||
1024 | } | |||
1025 | ||||
1026 | ||||
1027 | //---------------------------------------------------------------------------------------------------- | |||
1028 | // Utility functions for integers | |||
1029 | ||||
1030 | // Avoid use of global min/max macros which may cause unwanted double | |||
1031 | // evaluation of arguments. | |||
1032 | #ifdef max | |||
1033 | #undef max | |||
1034 | #endif | |||
1035 | ||||
1036 | #ifdef min | |||
1037 | #undef min | |||
1038 | #endif | |||
1039 | ||||
1040 | // It is necessary to use templates here. Having normal overloaded | |||
1041 | // functions does not work because it is necessary to provide both 32- | |||
1042 | // and 64-bit overloaded functions, which does not work, and having | |||
1043 | // explicitly-typed versions of these routines (i.e., MAX2I, MAX2L) | |||
1044 | // will be even more error-prone than macros. | |||
1045 | template<class T> constexpr T MAX2(T a, T b) { return (a > b) ? a : b; } | |||
1046 | template<class T> constexpr T MIN2(T a, T b) { return (a < b) ? a : b; } | |||
1047 | template<class T> constexpr T MAX3(T a, T b, T c) { return MAX2(MAX2(a, b), c); } | |||
1048 | template<class T> constexpr T MIN3(T a, T b, T c) { return MIN2(MIN2(a, b), c); } | |||
1049 | template<class T> constexpr T MAX4(T a, T b, T c, T d) { return MAX2(MAX3(a, b, c), d); } | |||
1050 | template<class T> constexpr T MIN4(T a, T b, T c, T d) { return MIN2(MIN3(a, b, c), d); } | |||
1051 | ||||
1052 | template<class T> inline T ABS(T x) { return (x > 0) ? x : -x; } | |||
1053 | ||||
1054 | // Return the given value clamped to the range [min ... max] | |||
1055 | template<typename T> | |||
1056 | inline T clamp(T value, T min, T max) { | |||
1057 | assert(min <= max, "must be")do { if (!(min <= max)) { (*g_assert_poison) = 'X';; report_vm_error ("/home/daniel/Projects/java/jdk/src/hotspot/share/utilities/globalDefinitions.hpp" , 1057, "assert(" "min <= max" ") failed", "must be"); ::breakpoint (); } } while (0); | |||
1058 | return MIN2(MAX2(value, min), max); | |||
1059 | } | |||
1060 | ||||
1061 | inline bool is_odd (intx x) { return x & 1; } | |||
1062 | inline bool is_even(intx x) { return !is_odd(x); } | |||
1063 | ||||
1064 | // abs methods which cannot overflow and so are well-defined across | |||
1065 | // the entire domain of integer types. | |||
1066 | static inline unsigned int uabs(unsigned int n) { | |||
1067 | union { | |||
1068 | unsigned int result; | |||
1069 | int value; | |||
1070 | }; | |||
1071 | result = n; | |||
1072 | if (value < 0) result = 0-result; | |||
1073 | return result; | |||
1074 | } | |||
1075 | static inline julong uabs(julong n) { | |||
1076 | union { | |||
1077 | julong result; | |||
1078 | jlong value; | |||
1079 | }; | |||
1080 | result = n; | |||
1081 | if (value < 0) result = 0-result; | |||
1082 | return result; | |||
1083 | } | |||
1084 | static inline julong uabs(jlong n) { return uabs((julong)n); } | |||
1085 | static inline unsigned int uabs(int n) { return uabs((unsigned int)n); } | |||
1086 | ||||
1087 | // "to" should be greater than "from." | |||
1088 | inline intx byte_size(void* from, void* to) { | |||
1089 | return (address)to - (address)from; | |||
1090 | } | |||
1091 | ||||
1092 | ||||
1093 | // Pack and extract shorts to/from ints: | |||
1094 | ||||
1095 | inline int extract_low_short_from_int(jint x) { | |||
1096 | return x & 0xffff; | |||
1097 | } | |||
1098 | ||||
1099 | inline int extract_high_short_from_int(jint x) { | |||
1100 | return (x >> 16) & 0xffff; | |||
1101 | } | |||
1102 | ||||
1103 | inline int build_int_from_shorts( jushort low, jushort high ) { | |||
1104 | return ((int)((unsigned int)high << 16) | (unsigned int)low); | |||
1105 | } | |||
1106 | ||||
1107 | // swap a & b | |||
1108 | template<class T> static void swap(T& a, T& b) { | |||
1109 | T tmp = a; | |||
1110 | a = b; | |||
1111 | b = tmp; | |||
1112 | } | |||
1113 | ||||
1114 | // array_size_impl is a function that takes a reference to T[N] and | |||
1115 | // returns a reference to char[N]. It is not ODR-used, so not defined. | |||
1116 | template<typename T, size_t N> char (&array_size_impl(T (&)[N]))[N]; | |||
1117 | ||||
1118 | #define ARRAY_SIZE(array)sizeof(array_size_impl(array)) sizeof(array_size_impl(array)) | |||
1119 | ||||
1120 | //---------------------------------------------------------------------------------------------------- | |||
1121 | // Sum and product which can never overflow: they wrap, just like the | |||
1122 | // Java operations. Note that we don't intend these to be used for | |||
1123 | // general-purpose arithmetic: their purpose is to emulate Java | |||
1124 | // operations. | |||
1125 | ||||
1126 | // The goal of this code to avoid undefined or implementation-defined | |||
1127 | // behavior. The use of an lvalue to reference cast is explicitly | |||
1128 | // permitted by Lvalues and rvalues [basic.lval]. [Section 3.10 Para | |||
1129 | // 15 in C++03] | |||
1130 | #define JAVA_INTEGER_OP(OP, NAME, TYPE, UNSIGNED_TYPE) \ | |||
1131 | inline TYPE NAME (TYPE in1, TYPE in2) { \ | |||
1132 | UNSIGNED_TYPE ures = static_cast<UNSIGNED_TYPE>(in1); \ | |||
1133 | ures OP ## = static_cast<UNSIGNED_TYPE>(in2); \ | |||
1134 | return reinterpret_cast<TYPE&>(ures); \ | |||
1135 | } | |||
1136 | ||||
1137 | JAVA_INTEGER_OP(+, java_add, jint, juint) | |||
1138 | JAVA_INTEGER_OP(-, java_subtract, jint, juint) | |||
1139 | JAVA_INTEGER_OP(*, java_multiply, jint, juint) | |||
1140 | JAVA_INTEGER_OP(+, java_add, jlong, julong) | |||
1141 | JAVA_INTEGER_OP(-, java_subtract, jlong, julong) | |||
1142 | JAVA_INTEGER_OP(*, java_multiply, jlong, julong) | |||
1143 | ||||
1144 | #undef JAVA_INTEGER_OP | |||
1145 | ||||
1146 | // Provide integer shift operations with Java semantics. No overflow | |||
1147 | // issues - left shifts simply discard shifted out bits. No undefined | |||
1148 | // behavior for large or negative shift quantities; instead the actual | |||
1149 | // shift distance is the argument modulo the lhs value's size in bits. | |||
1150 | // No undefined or implementation defined behavior for shifting negative | |||
1151 | // values; left shift discards bits, right shift sign extends. We use | |||
1152 | // the same safe conversion technique as above for java_add and friends. | |||
1153 | #define JAVA_INTEGER_SHIFT_OP(OP, NAME, TYPE, XTYPE) \ | |||
1154 | inline TYPE NAME (TYPE lhs, jint rhs) { \ | |||
1155 | const uint rhs_mask = (sizeof(TYPE) * 8) - 1; \ | |||
1156 | STATIC_ASSERT(rhs_mask == 31 || rhs_mask == 63)static_assert((rhs_mask == 31 || rhs_mask == 63), "rhs_mask == 31 || rhs_mask == 63" ); \ | |||
1157 | XTYPE xres = static_cast<XTYPE>(lhs); \ | |||
1158 | xres OP ## = (rhs & rhs_mask); \ | |||
1159 | return reinterpret_cast<TYPE&>(xres); \ | |||
1160 | } | |||
1161 | ||||
1162 | JAVA_INTEGER_SHIFT_OP(<<, java_shift_left, jint, juint) | |||
1163 | JAVA_INTEGER_SHIFT_OP(<<, java_shift_left, jlong, julong) | |||
1164 | // For signed shift right, assume C++ implementation >> sign extends. | |||
1165 | JAVA_INTEGER_SHIFT_OP(>>, java_shift_right, jint, jint) | |||
1166 | JAVA_INTEGER_SHIFT_OP(>>, java_shift_right, jlong, jlong) | |||
1167 | // For >>> use C++ unsigned >>. | |||
1168 | JAVA_INTEGER_SHIFT_OP(>>, java_shift_right_unsigned, jint, juint) | |||
1169 | JAVA_INTEGER_SHIFT_OP(>>, java_shift_right_unsigned, jlong, julong) | |||
1170 | ||||
1171 | #undef JAVA_INTEGER_SHIFT_OP | |||
1172 | ||||
1173 | //---------------------------------------------------------------------------------------------------- | |||
1174 | // The goal of this code is to provide saturating operations for int/uint. | |||
1175 | // Checks overflow conditions and saturates the result to min_jint/max_jint. | |||
1176 | #define SATURATED_INTEGER_OP(OP, NAME, TYPE1, TYPE2) \ | |||
1177 | inline int NAME (TYPE1 in1, TYPE2 in2) { \ | |||
1178 | jlong res = static_cast<jlong>(in1); \ | |||
1179 | res OP ## = static_cast<jlong>(in2); \ | |||
1180 | if (res > max_jint) { \ | |||
1181 | res = max_jint; \ | |||
1182 | } else if (res < min_jint) { \ | |||
1183 | res = min_jint; \ | |||
1184 | } \ | |||
1185 | return static_cast<int>(res); \ | |||
1186 | } | |||
1187 | ||||
1188 | SATURATED_INTEGER_OP(+, saturated_add, int, int) | |||
1189 | SATURATED_INTEGER_OP(+, saturated_add, int, uint) | |||
1190 | SATURATED_INTEGER_OP(+, saturated_add, uint, int) | |||
1191 | SATURATED_INTEGER_OP(+, saturated_add, uint, uint) | |||
1192 | ||||
1193 | #undef SATURATED_INTEGER_OP | |||
1194 | ||||
1195 | // Dereference vptr | |||
1196 | // All C++ compilers that we know of have the vtbl pointer in the first | |||
1197 | // word. If there are exceptions, this function needs to be made compiler | |||
1198 | // specific. | |||
1199 | static inline void* dereference_vptr(const void* addr) { | |||
1200 | return *(void**)addr; | |||
1201 | } | |||
1202 | ||||
1203 | //---------------------------------------------------------------------------------------------------- | |||
1204 | // String type aliases used by command line flag declarations and | |||
1205 | // processing utilities. | |||
1206 | ||||
1207 | typedef const char* ccstr; | |||
1208 | typedef const char* ccstrlist; // represents string arguments which accumulate | |||
1209 | ||||
1210 | //---------------------------------------------------------------------------------------------------- | |||
1211 | // Default hash/equals functions used by ResourceHashtable | |||
1212 | ||||
1213 | template<typename K> unsigned primitive_hash(const K& k) { | |||
1214 | unsigned hash = (unsigned)((uintptr_t)k); | |||
1215 | return hash ^ (hash >> 3); // just in case we're dealing with aligned ptrs | |||
1216 | } | |||
1217 | ||||
1218 | template<typename K> bool primitive_equals(const K& k0, const K& k1) { | |||
1219 | return k0 == k1; | |||
1220 | } | |||
1221 | ||||
1222 | ||||
1223 | #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_HPP |