Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/jdk17u
Path: blob/master/src/hotspot/share/jvmci/jvmciEnv.hpp
64441 views
1
/*
2
* Copyright (c) 1999, 2022, 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_JVMCI_JVMCIENV_HPP
26
#define SHARE_JVMCI_JVMCIENV_HPP
27
28
#include "classfile/javaClasses.hpp"
29
#include "jvmci/jvmciJavaClasses.hpp"
30
#include "runtime/jniHandles.hpp"
31
#include "runtime/thread.hpp"
32
33
class CompileTask;
34
class JVMCIObject;
35
class JVMCIObjectArray;
36
class JVMCIPrimitiveArray;
37
class JVMCICompiler;
38
class JVMCIRuntime;
39
class nmethodLocker;
40
41
#define JVMCI_EXCEPTION_CONTEXT \
42
JavaThread* thread = JavaThread::current(); \
43
JavaThread* THREAD = thread; // For exception macros.
44
45
// Helper to log more context on a JNI exception
46
#define JVMCI_EXCEPTION_CHECK(env, ...) \
47
do { \
48
if (env->ExceptionCheck()) { \
49
if (env != JavaThread::current()->jni_environment()) { \
50
char* sl_path; \
51
if (::JVMCI::get_shared_library(sl_path, false) != NULL) { \
52
tty->print_cr("In JVMCI shared library (%s):", sl_path); \
53
} \
54
} \
55
tty->print_cr(__VA_ARGS__); \
56
return; \
57
} \
58
} while(0)
59
60
// Helper class to ensure that references to Klass* are kept alive for G1
61
class JVMCIKlassHandle : public StackObj {
62
private:
63
Klass* _klass;
64
Handle _holder;
65
Thread* _thread;
66
67
Klass* klass() const { return _klass; }
68
Klass* non_null_klass() const { assert(_klass != NULL, "resolving NULL _klass"); return _klass; }
69
70
public:
71
/* Constructors */
72
JVMCIKlassHandle (Thread* thread) : _klass(NULL), _thread(thread) {}
73
JVMCIKlassHandle (Thread* thread, Klass* klass);
74
75
JVMCIKlassHandle (const JVMCIKlassHandle &h): _klass(h._klass), _holder(h._holder), _thread(h._thread) {}
76
JVMCIKlassHandle& operator=(const JVMCIKlassHandle &s);
77
JVMCIKlassHandle& operator=(Klass* klass);
78
79
/* Operators for ease of use */
80
Klass* operator () () const { return klass(); }
81
Klass* operator -> () const { return non_null_klass(); }
82
83
bool operator == (Klass* o) const { return klass() == o; }
84
bool operator == (const JVMCIKlassHandle& h) const { return klass() == h.klass(); }
85
86
/* Null checks */
87
bool is_null() const { return _klass == NULL; }
88
bool not_null() const { return _klass != NULL; }
89
};
90
91
// A class that maintains the state needed for compilations requested
92
// by the CompileBroker. It is created in the broker and passed through
93
// into the code installation step.
94
class JVMCICompileState : public ResourceObj {
95
friend class JVMCIVMStructs;
96
private:
97
CompileTask* _task;
98
JVMCICompiler* _compiler;
99
100
// Cache JVMTI state. Defined as bytes so that reading them from Java
101
// via Unsafe is well defined (the C++ type for bool is implementation
102
// defined and may not be the same as a Java boolean).
103
uint64_t _jvmti_redefinition_count;
104
jbyte _jvmti_can_hotswap_or_post_breakpoint;
105
jbyte _jvmti_can_access_local_variables;
106
jbyte _jvmti_can_post_on_exceptions;
107
jbyte _jvmti_can_pop_frame;
108
bool _target_method_is_old;
109
110
// Compilation result values.
111
bool _retryable;
112
const char* _failure_reason;
113
114
// Specifies if _failure_reason is on the C heap. If so, it is allocated
115
// with the mtJVMCI NMT flag.
116
bool _failure_reason_on_C_heap;
117
118
// A value indicating compilation activity during the compilation.
119
// If successive calls to this method return a different value, then
120
// some degree of JVMCI compilation occurred between the calls.
121
jint _compilation_ticks;
122
123
public:
124
JVMCICompileState(CompileTask* task, JVMCICompiler* compiler);
125
126
CompileTask* task() { return _task; }
127
128
bool jvmti_state_changed() const;
129
uint64_t jvmti_redefinition_count() const { return _jvmti_redefinition_count; }
130
bool jvmti_can_hotswap_or_post_breakpoint() const { return _jvmti_can_hotswap_or_post_breakpoint != 0; }
131
bool jvmti_can_access_local_variables() const { return _jvmti_can_access_local_variables != 0; }
132
bool jvmti_can_post_on_exceptions() const { return _jvmti_can_post_on_exceptions != 0; }
133
bool jvmti_can_pop_frame() const { return _jvmti_can_pop_frame != 0; }
134
bool target_method_is_old() const { return _target_method_is_old; }
135
136
const char* failure_reason() { return _failure_reason; }
137
bool failure_reason_on_C_heap() { return _failure_reason_on_C_heap; }
138
bool retryable() { return _retryable; }
139
140
void set_failure(bool retryable, const char* reason, bool reason_on_C_heap = false) {
141
_failure_reason = reason;
142
_failure_reason_on_C_heap = reason_on_C_heap;
143
_retryable = retryable;
144
}
145
146
jint compilation_ticks() const { return _compilation_ticks; }
147
void inc_compilation_ticks();
148
};
149
150
151
// This class is a top level wrapper around interactions between HotSpot
152
// and the JVMCI Java code. It supports both a HotSpot heap based
153
// runtime with HotSpot oop based accessors as well as a shared library
154
// based runtime that is accessed through JNI. It abstracts away all
155
// interactions with JVMCI objects so that a single version of the
156
// HotSpot C++ code can can work with either runtime.
157
class JVMCIEnv : public ResourceObj {
158
friend class JNIAccessMark;
159
160
// Initializes the _env, _mode and _runtime fields.
161
void init_env_mode_runtime(JavaThread* thread, JNIEnv* parent_env);
162
163
void init(JavaThread* thread, bool is_hotspot, const char* file, int line);
164
165
JNIEnv* _env; // JNI env for calling into shared library
166
bool _pop_frame_on_close; // Must pop frame on close?
167
bool _detach_on_close; // Must detach on close?
168
JVMCIRuntime* _runtime; // Access to a HotSpotJVMCIRuntime
169
bool _is_hotspot; // Which heap is the HotSpotJVMCIRuntime in
170
bool _throw_to_caller; // Propagate an exception raised in this env to the caller?
171
const char* _file; // The file and ...
172
int _line; // ... line where this JNIEnv was created
173
174
// Translates an exception on the HotSpot heap (i.e., hotspot_env) to an exception on
175
// the shared library heap (i.e., jni_env). The translation includes the stack and cause(s) of `throwable`.
176
// The translated exception is pending in jni_env upon returning.
177
static void translate_to_jni_exception(JavaThread* THREAD, const Handle& throwable, JVMCIEnv* hotspot_env, JVMCIEnv* jni_env);
178
179
// Translates an exception on the shared library heap (i.e., jni_env) to an exception on
180
// the HotSpot heap (i.e., hotspot_env). The translation includes the stack and cause(s) of `throwable`.
181
// The translated exception is pending in hotspot_env upon returning.
182
static void translate_from_jni_exception(JavaThread* THREAD, jthrowable throwable, JVMCIEnv* hotspot_env, JVMCIEnv* jni_env);
183
184
public:
185
// Opens a JVMCIEnv scope for a Java to VM call (e.g., via CompilerToVM).
186
// An exception occurring within the scope is left pending when the
187
// scope closes so that it will be propagated back to Java.
188
// The JVMCIEnv destructor translates the exception object for the
189
// Java runtime if necessary.
190
JVMCIEnv(JavaThread* thread, JNIEnv* env, const char* file, int line);
191
192
// Opens a JVMCIEnv scope for a compilation scheduled by the CompileBroker.
193
// An exception occurring within the scope must not be propagated back to
194
// the CompileBroker.
195
JVMCIEnv(JavaThread* thread, JVMCICompileState* compile_state, const char* file, int line);
196
197
// Opens a JNIEnv scope for a call from within the VM. An exception occurring
198
// within the scope must not be propagated back to the caller.
199
JVMCIEnv(JavaThread* env, const char* file, int line);
200
201
// Opens a JNIEnv scope for accessing `for_object`. An exception occurring
202
// within the scope must not be propagated back to the caller.
203
JVMCIEnv(JavaThread* thread, JVMCIObject for_object, const char* file, int line) {
204
// A JNI call to access an object in the shared library heap
205
// can block or take a long time so do not allow such access
206
// on the VM thread.
207
assert(for_object.is_hotspot() || !Thread::current()->is_VM_thread(),
208
"cannot open JVMCIEnv scope when in the VM thread for accessing a shared library heap object");
209
init(thread, for_object.is_hotspot(), file, line);
210
}
211
212
// Opens a JNIEnv scope for the HotSpot runtime if `is_hotspot` is true
213
// otherwise for the shared library runtime. An exception occurring
214
// within the scope must not be propagated back to the caller.
215
JVMCIEnv(JavaThread* thread, bool is_hotspot, const char* file, int line) {
216
init(thread, is_hotspot, file, line);
217
}
218
219
~JVMCIEnv();
220
221
JVMCIRuntime* runtime() {
222
return _runtime;
223
}
224
225
// Initializes Services.savedProperties in the shared library by copying
226
// the values from the same field in the HotSpot heap.
227
void copy_saved_properties();
228
229
jboolean has_pending_exception();
230
void clear_pending_exception();
231
232
// If this env has a pending exception, it is translated to be a pending
233
// exception in `peer_env` and is cleared from this env. Returns true
234
// if a pending exception was transferred, false otherwise.
235
jboolean transfer_pending_exception(JavaThread* THREAD, JVMCIEnv* peer_env);
236
237
// Prints an exception and stack trace of a pending exception.
238
void describe_pending_exception(bool clear);
239
240
int get_length(JVMCIArray array);
241
242
JVMCIObject get_object_at(JVMCIObjectArray array, int index);
243
void put_object_at(JVMCIObjectArray array, int index, JVMCIObject value);
244
245
jboolean get_bool_at(JVMCIPrimitiveArray array, int index);
246
void put_bool_at(JVMCIPrimitiveArray array, int index, jboolean value);
247
248
jbyte get_byte_at(JVMCIPrimitiveArray array, int index);
249
void put_byte_at(JVMCIPrimitiveArray array, int index, jbyte value);
250
251
jint get_int_at(JVMCIPrimitiveArray array, int index);
252
void put_int_at(JVMCIPrimitiveArray array, int index, jint value);
253
254
long get_long_at(JVMCIPrimitiveArray array, int index);
255
void put_long_at(JVMCIPrimitiveArray array, int index, jlong value);
256
257
void copy_bytes_to(JVMCIPrimitiveArray src, jbyte* dest, int offset, jsize length);
258
void copy_bytes_from(jbyte* src, JVMCIPrimitiveArray dest, int offset, jsize length);
259
260
void copy_longs_from(jlong* src, JVMCIPrimitiveArray dest, int offset, jsize length);
261
262
JVMCIObjectArray initialize_intrinsics(JVMCI_TRAPS);
263
264
jboolean is_boxing_object(BasicType type, JVMCIObject object);
265
266
// Get the primitive value from a Java boxing object. It's hard error to
267
// pass a non-primitive BasicType.
268
jvalue get_boxed_value(BasicType type, JVMCIObject object);
269
270
// Return the BasicType of the object if it's a boxing object, otherwise return T_ILLEGAL.
271
BasicType get_box_type(JVMCIObject object);
272
273
// Create a boxing object of the appropriate primitive type.
274
JVMCIObject create_box(BasicType type, jvalue* value, JVMCI_TRAPS);
275
276
const char* as_utf8_string(JVMCIObject str);
277
278
JVMCIObject create_string(Symbol* str, JVMCI_TRAPS) {
279
JVMCIObject s = create_string(str->as_C_string(), JVMCI_CHECK_(JVMCIObject()));
280
return s;
281
}
282
283
JVMCIObject create_string(const char* str, JVMCI_TRAPS);
284
285
bool equals(JVMCIObject a, JVMCIObject b);
286
287
// Convert into a JNI handle for the appropriate runtime
288
jobject get_jobject(JVMCIObject object) { assert(object.as_jobject() == NULL || is_hotspot() == object.is_hotspot(), "mismatch"); return object.as_jobject(); }
289
jarray get_jarray(JVMCIArray array) { assert(array.as_jobject() == NULL || is_hotspot() == array.is_hotspot(), "mismatch"); return array.as_jobject(); }
290
jobjectArray get_jobjectArray(JVMCIObjectArray objectArray) { assert(objectArray.as_jobject() == NULL || is_hotspot() == objectArray.is_hotspot(), "mismatch"); return objectArray.as_jobject(); }
291
jbyteArray get_jbyteArray(JVMCIPrimitiveArray primitiveArray) { assert(primitiveArray.as_jobject() == NULL || is_hotspot() == primitiveArray.is_hotspot(), "mismatch"); return primitiveArray.as_jbyteArray(); }
292
293
JVMCIObject wrap(jobject obj);
294
JVMCIObjectArray wrap(jobjectArray obj) { return (JVMCIObjectArray) wrap((jobject) obj); }
295
JVMCIPrimitiveArray wrap(jintArray obj) { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
296
JVMCIPrimitiveArray wrap(jbooleanArray obj) { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
297
JVMCIPrimitiveArray wrap(jbyteArray obj) { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
298
JVMCIPrimitiveArray wrap(jlongArray obj) { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
299
300
private:
301
JVMCIObject wrap(oop obj) { assert(is_hotspot(), "must be"); return wrap(JNIHandles::make_local(obj)); }
302
JVMCIObjectArray wrap(objArrayOop obj) { assert(is_hotspot(), "must be"); return (JVMCIObjectArray) wrap(JNIHandles::make_local(obj)); }
303
JVMCIPrimitiveArray wrap(typeArrayOop obj) { assert(is_hotspot(), "must be"); return (JVMCIPrimitiveArray) wrap(JNIHandles::make_local(obj)); }
304
305
public:
306
// Compiles a method with the JVMCI compiler.
307
// Caller must handle pending exception.
308
JVMCIObject call_HotSpotJVMCIRuntime_compileMethod(JVMCIObject runtime, JVMCIObject method, int entry_bci,
309
jlong compile_state, int id);
310
311
void call_HotSpotJVMCIRuntime_bootstrapFinished(JVMCIObject runtime, JVMCI_TRAPS);
312
void call_HotSpotJVMCIRuntime_shutdown(JVMCIObject runtime);
313
JVMCIObject call_HotSpotJVMCIRuntime_runtime(JVMCI_TRAPS);
314
JVMCIObject call_JVMCI_getRuntime(JVMCI_TRAPS);
315
JVMCIObject call_HotSpotJVMCIRuntime_getCompiler(JVMCIObject runtime, JVMCI_TRAPS);
316
317
JVMCIObject call_HotSpotJVMCIRuntime_callToString(JVMCIObject object, JVMCI_TRAPS);
318
319
JVMCIObject call_JavaConstant_forPrimitive(JVMCIObject kind, jlong value, JVMCI_TRAPS);
320
321
jboolean call_HotSpotJVMCIRuntime_isGCSupported(JVMCIObject runtime, jint gcIdentifier);
322
323
void call_HotSpotJVMCIRuntime_postTranslation(JVMCIObject object, JVMCI_TRAPS);
324
325
BasicType kindToBasicType(JVMCIObject kind, JVMCI_TRAPS);
326
327
#define DO_THROW(name) \
328
void throw_##name(const char* msg = NULL);
329
330
DO_THROW(InternalError)
331
DO_THROW(ArrayIndexOutOfBoundsException)
332
DO_THROW(IllegalStateException)
333
DO_THROW(NullPointerException)
334
DO_THROW(IllegalArgumentException)
335
DO_THROW(InvalidInstalledCodeException)
336
DO_THROW(UnsatisfiedLinkError)
337
DO_THROW(UnsupportedOperationException)
338
DO_THROW(ClassNotFoundException)
339
340
#undef DO_THROW
341
342
void fthrow_error(const char* file, int line, const char* format, ...) ATTRIBUTE_PRINTF(4, 5);
343
344
// Given an instance of HotSpotInstalledCode return the corresponding CodeBlob*. The
345
// nmethodLocker is required to keep the CodeBlob alive in the case where it's an nmethod.
346
CodeBlob* get_code_blob(JVMCIObject code, nmethodLocker& locker);
347
348
// Given an instance of HotSpotInstalledCode return the corresponding nmethod. The
349
// nmethodLocker is required to keep the nmethod alive.
350
nmethod* get_nmethod(JVMCIObject code, nmethodLocker& locker);
351
352
MethodData* asMethodData(jlong metaspaceMethodData) {
353
return (MethodData*) (address) metaspaceMethodData;
354
}
355
356
const char* klass_name(JVMCIObject object);
357
358
// Unpack an instance of HotSpotResolvedJavaMethodImpl into the original Method*
359
Method* asMethod(JVMCIObject jvmci_method);
360
Method* asMethod(jobject jvmci_method) { return asMethod(wrap(jvmci_method)); }
361
362
// Unpack an instance of HotSpotResolvedObjectTypeImpl into the original Klass*
363
Klass* asKlass(JVMCIObject jvmci_type);
364
Klass* asKlass(jobject jvmci_type) { return asKlass(wrap(jvmci_type)); }
365
366
JVMCIObject get_jvmci_method(const methodHandle& method, JVMCI_TRAPS);
367
368
JVMCIObject get_jvmci_type(const JVMCIKlassHandle& klass, JVMCI_TRAPS);
369
370
// Unpack an instance of HotSpotConstantPool into the original ConstantPool*
371
ConstantPool* asConstantPool(JVMCIObject constant_pool);
372
ConstantPool* asConstantPool(jobject constant_pool) { return asConstantPool(wrap(constant_pool)); }
373
374
JVMCIObject get_jvmci_constant_pool(const constantPoolHandle& cp, JVMCI_TRAPS);
375
JVMCIObject get_jvmci_primitive_type(BasicType type);
376
377
Handle asConstant(JVMCIObject object, JVMCI_TRAPS);
378
JVMCIObject get_object_constant(oop objOop, bool compressed = false, bool dont_register = false);
379
380
JVMCIPrimitiveArray new_booleanArray(int length, JVMCI_TRAPS);
381
JVMCIPrimitiveArray new_byteArray(int length, JVMCI_TRAPS);
382
JVMCIPrimitiveArray new_intArray(int length, JVMCI_TRAPS);
383
JVMCIPrimitiveArray new_longArray(int length, JVMCI_TRAPS);
384
385
JVMCIObjectArray new_byte_array_array(int length, JVMCI_TRAPS);
386
387
JVMCIObject new_StackTraceElement(const methodHandle& method, int bci, JVMCI_TRAPS);
388
JVMCIObject new_HotSpotNmethod(const methodHandle& method, const char* name, jboolean isDefault, jlong compileId, JVMCI_TRAPS);
389
JVMCIObject new_VMField(JVMCIObject name, JVMCIObject type, jlong offset, jlong address, JVMCIObject value, JVMCI_TRAPS);
390
JVMCIObject new_VMFlag(JVMCIObject name, JVMCIObject type, JVMCIObject value, JVMCI_TRAPS);
391
JVMCIObject new_VMIntrinsicMethod(JVMCIObject declaringClass, JVMCIObject name, JVMCIObject descriptor, int id, JVMCI_TRAPS);
392
JVMCIObject new_HotSpotStackFrameReference(JVMCI_TRAPS);
393
JVMCIObject new_JVMCIError(JVMCI_TRAPS);
394
395
jlong make_handle(const Handle& obj);
396
oop resolve_handle(jlong objectHandle);
397
398
// These are analagous to the JNI routines
399
JVMCIObject make_local(JVMCIObject object);
400
void destroy_local(JVMCIObject object);
401
402
// Makes a JNI global handle that is not scoped by the
403
// lifetime of a JVMCIRuntime (cf JVMCIRuntime::make_global).
404
// These JNI handles are used when translating an object
405
// between the HotSpot and JVMCI shared library heap via
406
// HotSpotJVMCIRuntime.translate(Object) and
407
// HotSpotJVMCIRuntime.unhand(Class<T>, long). Translation
408
// can happen in either direction so the referenced object
409
// can reside in either heap which is why JVMCIRuntime scoped
410
// handles cannot be used (they are specific to HotSpot heap objects).
411
JVMCIObject make_global(JVMCIObject object);
412
413
// Destroys a JNI global handle created by JVMCIEnv::make_global.
414
void destroy_global(JVMCIObject object);
415
416
// Deoptimizes the nmethod (if any) in the HotSpotNmethod.address
417
// field of mirror. The field is subsequently zeroed.
418
void invalidate_nmethod_mirror(JVMCIObject mirror, JVMCI_TRAPS);
419
420
void initialize_installed_code(JVMCIObject installed_code, CodeBlob* cb, JVMCI_TRAPS);
421
422
private:
423
JVMCICompileState* _compile_state;
424
425
public:
426
427
// Determines if this is for the JVMCI runtime in the HotSpot
428
// heap (true) or the shared library heap (false).
429
bool is_hotspot() { return _is_hotspot; }
430
431
JVMCICompileState* compile_state() { return _compile_state; }
432
void set_compile_state(JVMCICompileState* compile_state) {
433
assert(_compile_state == NULL, "set only once");
434
_compile_state = compile_state;
435
}
436
// Generate declarations for the initialize, new, isa, get and set methods for all the types and
437
// fields declared in the JVMCI_CLASSES_DO macro.
438
439
#define START_CLASS(className, fullClassName) \
440
void className##_initialize(JVMCI_TRAPS); \
441
JVMCIObjectArray new_##className##_array(int length, JVMCI_TRAPS); \
442
bool isa_##className(JVMCIObject object);
443
444
#define END_CLASS
445
446
#define FIELD(className, name, type, accessor) \
447
type get_ ## className ## _ ## name(JVMCIObject obj); \
448
void set_ ## className ## _ ## name(JVMCIObject obj, type x);
449
450
#define OOPISH_FIELD(className, name, type, hstype, accessor) \
451
FIELD(className, name, type, accessor)
452
453
#define STATIC_FIELD(className, name, type) \
454
type get_ ## className ## _ ## name(); \
455
void set_ ## className ## _ ## name(type x);
456
457
#define STATIC_OOPISH_FIELD(className, name, type, hstype) \
458
STATIC_FIELD(className, name, type)
459
460
#define EMPTY_CAST
461
#define CHAR_FIELD(className, name) FIELD(className, name, jchar, char_field)
462
#define INT_FIELD(className, name) FIELD(className, name, jint, int_field)
463
#define BOOLEAN_FIELD(className, name) FIELD(className, name, jboolean, bool_field)
464
#define LONG_FIELD(className, name) FIELD(className, name, jlong, long_field)
465
#define FLOAT_FIELD(className, name) FIELD(className, name, jfloat, float_field)
466
#define OBJECT_FIELD(className, name, signature) OOPISH_FIELD(className, name, JVMCIObject, oop, obj_field)
467
#define OBJECTARRAY_FIELD(className, name, signature) OOPISH_FIELD(className, name, JVMCIObjectArray, objArrayOop, obj_field)
468
#define PRIMARRAY_FIELD(className, name, signature) OOPISH_FIELD(className, name, JVMCIPrimitiveArray, typeArrayOop, obj_field)
469
470
#define STATIC_INT_FIELD(className, name) STATIC_FIELD(className, name, jint)
471
#define STATIC_BOOLEAN_FIELD(className, name) STATIC_FIELD(className, name, jboolean)
472
#define STATIC_OBJECT_FIELD(className, name, signature) STATIC_OOPISH_FIELD(className, name, JVMCIObject, oop)
473
#define STATIC_OBJECTARRAY_FIELD(className, name, signature) STATIC_OOPISH_FIELD(className, name, JVMCIObjectArray, objArrayOop)
474
#define METHOD(jniCallType, jniGetMethod, hsCallType, returnType, className, methodName, signatureSymbolName, args)
475
#define CONSTRUCTOR(className, signature)
476
477
JVMCI_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OBJECT_FIELD, PRIMARRAY_FIELD, OBJECTARRAY_FIELD, STATIC_OBJECT_FIELD, STATIC_OBJECTARRAY_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD, METHOD, CONSTRUCTOR)
478
479
#undef JNI_START_CLASS
480
#undef START_CLASS
481
#undef END_CLASS
482
#undef METHOD
483
#undef CONSTRUCTOR
484
#undef FIELD
485
#undef CHAR_FIELD
486
#undef INT_FIELD
487
#undef BOOLEAN_FIELD
488
#undef LONG_FIELD
489
#undef FLOAT_FIELD
490
#undef OBJECT_FIELD
491
#undef PRIMARRAY_FIELD
492
#undef OBJECTARRAY_FIELD
493
#undef FIELD
494
#undef OOPISH_FIELD
495
#undef STATIC_FIELD
496
#undef STATIC_OOPISH_FIELD
497
#undef STATIC_FIELD
498
#undef STATIC_OBJECT_FIELD
499
#undef STATIC_OBJECTARRAY_FIELD
500
#undef STATIC_INT_FIELD
501
#undef STATIC_BOOLEAN_FIELD
502
#undef EMPTY_CAST
503
504
// End of JVMCIEnv
505
};
506
507
#endif // SHARE_JVMCI_JVMCIENV_HPP
508
509