author | herrick |
Wed, 27 Mar 2019 08:27:58 -0400 | |
branch | JDK-8200758-branch |
changeset 57288 | 0be43184f52a |
parent 53244 | 9807daeb47c4 |
child 54647 | c0d9bc9b4e1f |
permissions | -rw-r--r-- |
33160 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52195
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
33160 | 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 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52195
diff
changeset
|
24 |
#ifndef SHARE_JVMCI_JVMCIJAVACLASSES_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52195
diff
changeset
|
25 |
#define SHARE_JVMCI_JVMCIJAVACLASSES_HPP |
33160 | 26 |
|
27 |
#include "classfile/systemDictionary.hpp" |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
28 |
#include "oops/access.hpp" |
33160 | 29 |
#include "oops/instanceMirrorKlass.hpp" |
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
30 |
#include "oops/oop.hpp" |
33160 | 31 |
|
32 |
class JVMCIJavaClasses : AllStatic { |
|
33 |
public: |
|
34192
6da4892d7cd5
8142511: [JVMCI] must eagerly initialize classes with static fields accessed by JVMCI native code
twisti
parents:
34185
diff
changeset
|
34 |
static void compute_offsets(TRAPS); |
33160 | 35 |
}; |
36 |
||
38666
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
37 |
/* This macro defines the structure of the JVMCI classes accessed from VM code. |
33160 | 38 |
* It will generate classes with accessors similar to javaClasses.hpp, but with specializations for oops, Handles and jni handles. |
39 |
* |
|
40 |
* The public interface of these classes will look like this: |
|
41 |
||
42 |
* class StackSlot : AllStatic { |
|
43 |
* public: |
|
44 |
* static Klass* klass(); |
|
45 |
* static jint index(oop obj); |
|
46 |
* static jint index(Handle obj); |
|
47 |
* static jint index(jobject obj); |
|
48 |
* static void set_index(oop obj, jint x); |
|
49 |
* static void set_index(Handle obj, jint x); |
|
50 |
* static void set_index(jobject obj, jint x); |
|
51 |
* }; |
|
52 |
* |
|
53 |
*/ |
|
54 |
||
55 |
#define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, float_field, oop_field, typeArrayOop_field, objArrayOop_field, static_oop_field, static_objArrayOop_field, static_int_field, static_boolean_field) \ |
|
56 |
start_class(Architecture) \ |
|
57 |
oop_field(Architecture, wordKind, "Ljdk/vm/ci/meta/PlatformKind;") \ |
|
58 |
end_class \ |
|
59 |
start_class(TargetDescription) \ |
|
60 |
oop_field(TargetDescription, arch, "Ljdk/vm/ci/code/Architecture;") \ |
|
61 |
end_class \ |
|
62 |
start_class(HotSpotResolvedObjectTypeImpl) \ |
|
63 |
oop_field(HotSpotResolvedObjectTypeImpl, javaClass, "Ljava/lang/Class;") \ |
|
64 |
end_class \ |
|
65 |
start_class(HotSpotResolvedJavaMethodImpl) \ |
|
66 |
long_field(HotSpotResolvedJavaMethodImpl, metaspaceMethod) \ |
|
67 |
end_class \ |
|
68 |
start_class(InstalledCode) \ |
|
69 |
long_field(InstalledCode, address) \ |
|
33632 | 70 |
long_field(InstalledCode, entryPoint) \ |
33160 | 71 |
long_field(InstalledCode, version) \ |
72 |
oop_field(InstalledCode, name, "Ljava/lang/String;") \ |
|
73 |
end_class \ |
|
74 |
start_class(HotSpotInstalledCode) \ |
|
75 |
int_field(HotSpotInstalledCode, size) \ |
|
76 |
long_field(HotSpotInstalledCode, codeStart) \ |
|
77 |
int_field(HotSpotInstalledCode, codeSize) \ |
|
78 |
end_class \ |
|
79 |
start_class(HotSpotNmethod) \ |
|
80 |
boolean_field(HotSpotNmethod, isDefault) \ |
|
81 |
end_class \ |
|
82 |
start_class(HotSpotCompiledCode) \ |
|
83 |
oop_field(HotSpotCompiledCode, name, "Ljava/lang/String;") \ |
|
84 |
typeArrayOop_field(HotSpotCompiledCode, targetCode, "[B") \ |
|
85 |
int_field(HotSpotCompiledCode, targetCodeSize) \ |
|
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
86 |
objArrayOop_field(HotSpotCompiledCode, sites, "[Ljdk/vm/ci/code/site/Site;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
87 |
objArrayOop_field(HotSpotCompiledCode, assumptions, "[Ljdk/vm/ci/meta/Assumptions$Assumption;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
88 |
objArrayOop_field(HotSpotCompiledCode, methods, "[Ljdk/vm/ci/meta/ResolvedJavaMethod;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
89 |
objArrayOop_field(HotSpotCompiledCode, comments, "[Ljdk/vm/ci/hotspot/HotSpotCompiledCode$Comment;") \ |
33160 | 90 |
typeArrayOop_field(HotSpotCompiledCode, dataSection, "[B") \ |
91 |
int_field(HotSpotCompiledCode, dataSectionAlignment) \ |
|
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
92 |
objArrayOop_field(HotSpotCompiledCode, dataSectionPatches, "[Ljdk/vm/ci/code/site/DataPatch;") \ |
33160 | 93 |
boolean_field(HotSpotCompiledCode, isImmutablePIC) \ |
94 |
int_field(HotSpotCompiledCode, totalFrameSize) \ |
|
35823
59a847ec6ee3
8146608: [JVMCI] DebugInfo Tests on DeoptimizeALot runs fails in assert(_pc == *pc_addr || pc == *pc_addr) frame::patch_pc() /frame_x86.cpp:285
rschatz
parents:
35606
diff
changeset
|
95 |
oop_field(HotSpotCompiledCode, deoptRescueSlot, "Ljdk/vm/ci/code/StackSlot;") \ |
33160 | 96 |
end_class \ |
97 |
start_class(HotSpotCompiledCode_Comment) \ |
|
98 |
oop_field(HotSpotCompiledCode_Comment, text, "Ljava/lang/String;") \ |
|
99 |
int_field(HotSpotCompiledCode_Comment, pcOffset) \ |
|
100 |
end_class \ |
|
101 |
start_class(HotSpotCompiledNmethod) \ |
|
102 |
oop_field(HotSpotCompiledNmethod, method, "Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;") \ |
|
103 |
oop_field(HotSpotCompiledNmethod, installationFailureMessage, "Ljava/lang/String;") \ |
|
104 |
int_field(HotSpotCompiledNmethod, entryBCI) \ |
|
105 |
int_field(HotSpotCompiledNmethod, id) \ |
|
106 |
long_field(HotSpotCompiledNmethod, jvmciEnv) \ |
|
107 |
boolean_field(HotSpotCompiledNmethod, hasUnsafeAccess) \ |
|
108 |
end_class \ |
|
109 |
start_class(HotSpotJVMCIMetaAccessContext) \ |
|
110 |
static_objArrayOop_field(HotSpotJVMCIMetaAccessContext, allContexts, "[Ljava/lang/ref/WeakReference;") \ |
|
111 |
objArrayOop_field(HotSpotJVMCIMetaAccessContext, metadataRoots, "[Ljava/lang/Object;") \ |
|
112 |
end_class \ |
|
113 |
start_class(HotSpotForeignCallTarget) \ |
|
114 |
long_field(HotSpotForeignCallTarget, address) \ |
|
115 |
end_class \ |
|
39423
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
116 |
start_class(VMField) \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
117 |
oop_field(VMField, name, "Ljava/lang/String;") \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
118 |
oop_field(VMField, type, "Ljava/lang/String;") \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
119 |
long_field(VMField, offset) \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
120 |
long_field(VMField, address) \ |
43962 | 121 |
oop_field(VMField, value, "Ljava/lang/Object;") \ |
39423
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
122 |
end_class \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
123 |
start_class(VMFlag) \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
124 |
oop_field(VMFlag, name, "Ljava/lang/String;") \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
125 |
oop_field(VMFlag, type, "Ljava/lang/String;") \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
126 |
oop_field(VMFlag, value, "Ljava/lang/Object;") \ |
0f8dc3693499
8159167: [JVMCI] fix HotSpotVMConfig startup performance
rschatz
parents:
38695
diff
changeset
|
127 |
end_class \ |
40878
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39423
diff
changeset
|
128 |
start_class(VMIntrinsicMethod) \ |
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39423
diff
changeset
|
129 |
oop_field(VMIntrinsicMethod, declaringClass, "Ljava/lang/String;") \ |
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39423
diff
changeset
|
130 |
oop_field(VMIntrinsicMethod, name, "Ljava/lang/String;") \ |
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39423
diff
changeset
|
131 |
oop_field(VMIntrinsicMethod, descriptor, "Ljava/lang/String;") \ |
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39423
diff
changeset
|
132 |
int_field(VMIntrinsicMethod, id) \ |
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39423
diff
changeset
|
133 |
end_class \ |
33160 | 134 |
start_class(Assumptions_NoFinalizableSubclass) \ |
135 |
oop_field(Assumptions_NoFinalizableSubclass, receiverType, "Ljdk/vm/ci/meta/ResolvedJavaType;") \ |
|
136 |
end_class \ |
|
137 |
start_class(Assumptions_ConcreteSubtype) \ |
|
138 |
oop_field(Assumptions_ConcreteSubtype, context, "Ljdk/vm/ci/meta/ResolvedJavaType;") \ |
|
139 |
oop_field(Assumptions_ConcreteSubtype, subtype, "Ljdk/vm/ci/meta/ResolvedJavaType;") \ |
|
140 |
end_class \ |
|
141 |
start_class(Assumptions_LeafType) \ |
|
142 |
oop_field(Assumptions_LeafType, context, "Ljdk/vm/ci/meta/ResolvedJavaType;") \ |
|
143 |
end_class \ |
|
144 |
start_class(Assumptions_ConcreteMethod) \ |
|
145 |
oop_field(Assumptions_ConcreteMethod, method, "Ljdk/vm/ci/meta/ResolvedJavaMethod;") \ |
|
146 |
oop_field(Assumptions_ConcreteMethod, context, "Ljdk/vm/ci/meta/ResolvedJavaType;") \ |
|
147 |
oop_field(Assumptions_ConcreteMethod, impl, "Ljdk/vm/ci/meta/ResolvedJavaMethod;") \ |
|
148 |
end_class \ |
|
149 |
start_class(Assumptions_CallSiteTargetValue) \ |
|
50858 | 150 |
oop_field(Assumptions_CallSiteTargetValue, callSite, "Ljdk/vm/ci/meta/JavaConstant;") \ |
151 |
oop_field(Assumptions_CallSiteTargetValue, methodHandle, "Ljdk/vm/ci/meta/JavaConstant;") \ |
|
33160 | 152 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
153 |
start_class(site_Site) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
154 |
int_field(site_Site, pcOffset) \ |
33160 | 155 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
156 |
start_class(site_Call) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
157 |
oop_field(site_Call, target, "Ljdk/vm/ci/meta/InvokeTarget;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
158 |
oop_field(site_Call, debugInfo, "Ljdk/vm/ci/code/DebugInfo;") \ |
33160 | 159 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
160 |
start_class(site_DataPatch) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
161 |
oop_field(site_DataPatch, reference, "Ljdk/vm/ci/code/site/Reference;") \ |
33160 | 162 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
163 |
start_class(site_ConstantReference) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
164 |
oop_field(site_ConstantReference, constant, "Ljdk/vm/ci/meta/VMConstant;") \ |
33160 | 165 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
166 |
start_class(site_DataSectionReference) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
167 |
int_field(site_DataSectionReference, offset) \ |
33160 | 168 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
169 |
start_class(site_InfopointReason) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
170 |
static_oop_field(site_InfopointReason, SAFEPOINT, "Ljdk/vm/ci/code/site/InfopointReason;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
171 |
static_oop_field(site_InfopointReason, CALL, "Ljdk/vm/ci/code/site/InfopointReason;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
172 |
static_oop_field(site_InfopointReason, IMPLICIT_EXCEPTION, "Ljdk/vm/ci/code/site/InfopointReason;") \ |
33160 | 173 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
174 |
start_class(site_Infopoint) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
175 |
oop_field(site_Infopoint, debugInfo, "Ljdk/vm/ci/code/DebugInfo;") \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
176 |
oop_field(site_Infopoint, reason, "Ljdk/vm/ci/code/site/InfopointReason;") \ |
33160 | 177 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
178 |
start_class(site_ExceptionHandler) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
179 |
int_field(site_ExceptionHandler, handlerPos) \ |
33160 | 180 |
end_class \ |
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
181 |
start_class(site_Mark) \ |
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
34502
diff
changeset
|
182 |
oop_field(site_Mark, id, "Ljava/lang/Object;") \ |
33160 | 183 |
end_class \ |
38695 | 184 |
start_class(HotSpotCompilationRequestResult) \ |
185 |
oop_field(HotSpotCompilationRequestResult, failureMessage, "Ljava/lang/String;") \ |
|
186 |
boolean_field(HotSpotCompilationRequestResult, retry) \ |
|
187 |
int_field(HotSpotCompilationRequestResult, inlinedBytecodes) \ |
|
35592
5814f874d736
8147432: JVMCI should report bailouts in PrintCompilation output
never
parents:
35582
diff
changeset
|
188 |
end_class \ |
33160 | 189 |
start_class(DebugInfo) \ |
190 |
oop_field(DebugInfo, bytecodePosition, "Ljdk/vm/ci/code/BytecodePosition;") \ |
|
191 |
oop_field(DebugInfo, referenceMap, "Ljdk/vm/ci/code/ReferenceMap;") \ |
|
192 |
oop_field(DebugInfo, calleeSaveInfo, "Ljdk/vm/ci/code/RegisterSaveLayout;") \ |
|
193 |
objArrayOop_field(DebugInfo, virtualObjectMapping, "[Ljdk/vm/ci/code/VirtualObject;") \ |
|
194 |
end_class \ |
|
195 |
start_class(HotSpotReferenceMap) \ |
|
196 |
objArrayOop_field(HotSpotReferenceMap, objects, "[Ljdk/vm/ci/code/Location;") \ |
|
197 |
objArrayOop_field(HotSpotReferenceMap, derivedBase, "[Ljdk/vm/ci/code/Location;") \ |
|
198 |
typeArrayOop_field(HotSpotReferenceMap, sizeInBytes, "[I") \ |
|
199 |
int_field(HotSpotReferenceMap, maxRegisterSize) \ |
|
200 |
end_class \ |
|
201 |
start_class(RegisterSaveLayout) \ |
|
202 |
objArrayOop_field(RegisterSaveLayout, registers, "[Ljdk/vm/ci/code/Register;") \ |
|
203 |
typeArrayOop_field(RegisterSaveLayout, slots, "[I") \ |
|
204 |
end_class \ |
|
205 |
start_class(BytecodeFrame) \ |
|
206 |
objArrayOop_field(BytecodeFrame, values, "[Ljdk/vm/ci/meta/JavaValue;") \ |
|
207 |
objArrayOop_field(BytecodeFrame, slotKinds, "[Ljdk/vm/ci/meta/JavaKind;") \ |
|
208 |
int_field(BytecodeFrame, numLocals) \ |
|
209 |
int_field(BytecodeFrame, numStack) \ |
|
210 |
int_field(BytecodeFrame, numLocks) \ |
|
211 |
boolean_field(BytecodeFrame, rethrowException) \ |
|
212 |
boolean_field(BytecodeFrame, duringCall) \ |
|
50729
7755c93d3923
8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents:
50409
diff
changeset
|
213 |
static_int_field(BytecodeFrame, UNKNOWN_BCI) \ |
7755c93d3923
8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents:
50409
diff
changeset
|
214 |
static_int_field(BytecodeFrame, UNWIND_BCI) \ |
33160 | 215 |
static_int_field(BytecodeFrame, BEFORE_BCI) \ |
50729
7755c93d3923
8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents:
50409
diff
changeset
|
216 |
static_int_field(BytecodeFrame, AFTER_BCI) \ |
7755c93d3923
8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents:
50409
diff
changeset
|
217 |
static_int_field(BytecodeFrame, AFTER_EXCEPTION_BCI) \ |
7755c93d3923
8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents:
50409
diff
changeset
|
218 |
static_int_field(BytecodeFrame, INVALID_FRAMESTATE_BCI) \ |
33160 | 219 |
end_class \ |
220 |
start_class(BytecodePosition) \ |
|
221 |
oop_field(BytecodePosition, caller, "Ljdk/vm/ci/code/BytecodePosition;") \ |
|
222 |
oop_field(BytecodePosition, method, "Ljdk/vm/ci/meta/ResolvedJavaMethod;") \ |
|
223 |
int_field(BytecodePosition, bci) \ |
|
224 |
end_class \ |
|
225 |
start_class(JavaConstant) \ |
|
226 |
end_class \ |
|
227 |
start_class(PrimitiveConstant) \ |
|
228 |
oop_field(PrimitiveConstant, kind, "Ljdk/vm/ci/meta/JavaKind;") \ |
|
229 |
long_field(PrimitiveConstant, primitive) \ |
|
230 |
end_class \ |
|
231 |
start_class(RawConstant) \ |
|
232 |
long_field(RawConstant, primitive) \ |
|
233 |
end_class \ |
|
234 |
start_class(NullConstant) \ |
|
235 |
end_class \ |
|
236 |
start_class(HotSpotCompressedNullConstant) \ |
|
237 |
end_class \ |
|
238 |
start_class(HotSpotObjectConstantImpl) \ |
|
239 |
oop_field(HotSpotObjectConstantImpl, object, "Ljava/lang/Object;") \ |
|
240 |
boolean_field(HotSpotObjectConstantImpl, compressed) \ |
|
241 |
end_class \ |
|
242 |
start_class(HotSpotMetaspaceConstantImpl) \ |
|
38666
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
243 |
oop_field(HotSpotMetaspaceConstantImpl, metaspaceObject, "Ljdk/vm/ci/hotspot/MetaspaceWrapperObject;") \ |
33160 | 244 |
boolean_field(HotSpotMetaspaceConstantImpl, compressed) \ |
245 |
end_class \ |
|
246 |
start_class(HotSpotSentinelConstant) \ |
|
247 |
end_class \ |
|
248 |
start_class(JavaKind) \ |
|
249 |
char_field(JavaKind, typeChar) \ |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
250 |
static_oop_field(JavaKind, Boolean, "Ljdk/vm/ci/meta/JavaKind;") \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
251 |
static_oop_field(JavaKind, Byte, "Ljdk/vm/ci/meta/JavaKind;") \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
252 |
static_oop_field(JavaKind, Char, "Ljdk/vm/ci/meta/JavaKind;") \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
253 |
static_oop_field(JavaKind, Short, "Ljdk/vm/ci/meta/JavaKind;") \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
254 |
static_oop_field(JavaKind, Int, "Ljdk/vm/ci/meta/JavaKind;") \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
255 |
static_oop_field(JavaKind, Long, "Ljdk/vm/ci/meta/JavaKind;") \ |
33160 | 256 |
end_class \ |
38692
54a84b7f3721
8156942: [JVMCI] replace LIRKind with abstract base class
rschatz
parents:
38678
diff
changeset
|
257 |
start_class(ValueKind) \ |
54a84b7f3721
8156942: [JVMCI] replace LIRKind with abstract base class
rschatz
parents:
38678
diff
changeset
|
258 |
oop_field(ValueKind, platformKind, "Ljdk/vm/ci/meta/PlatformKind;") \ |
33160 | 259 |
end_class \ |
260 |
start_class(Value) \ |
|
38692
54a84b7f3721
8156942: [JVMCI] replace LIRKind with abstract base class
rschatz
parents:
38678
diff
changeset
|
261 |
oop_field(Value, valueKind, "Ljdk/vm/ci/meta/ValueKind;") \ |
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
262 |
static_oop_field(Value, ILLEGAL, "Ljdk/vm/ci/meta/AllocatableValue;") \ |
33160 | 263 |
end_class \ |
264 |
start_class(RegisterValue) \ |
|
265 |
oop_field(RegisterValue, reg, "Ljdk/vm/ci/code/Register;") \ |
|
266 |
end_class \ |
|
267 |
start_class(code_Location) \ |
|
268 |
oop_field(code_Location, reg, "Ljdk/vm/ci/code/Register;") \ |
|
269 |
int_field(code_Location, offset) \ |
|
270 |
end_class \ |
|
271 |
start_class(code_Register) \ |
|
272 |
int_field(code_Register, number) \ |
|
273 |
int_field(code_Register, encoding) \ |
|
274 |
end_class \ |
|
275 |
start_class(StackSlot) \ |
|
276 |
int_field(StackSlot, offset) \ |
|
277 |
boolean_field(StackSlot, addFrameSize) \ |
|
278 |
end_class \ |
|
279 |
start_class(VirtualObject) \ |
|
280 |
int_field(VirtualObject, id) \ |
|
281 |
oop_field(VirtualObject, type, "Ljdk/vm/ci/meta/ResolvedJavaType;") \ |
|
282 |
objArrayOop_field(VirtualObject, values, "[Ljdk/vm/ci/meta/JavaValue;") \ |
|
283 |
objArrayOop_field(VirtualObject, slotKinds, "[Ljdk/vm/ci/meta/JavaKind;") \ |
|
284 |
end_class \ |
|
285 |
start_class(StackLockValue) \ |
|
286 |
oop_field(StackLockValue, owner, "Ljdk/vm/ci/meta/JavaValue;") \ |
|
33632 | 287 |
oop_field(StackLockValue, slot, "Ljdk/vm/ci/meta/AllocatableValue;") \ |
33160 | 288 |
boolean_field(StackLockValue, eliminated) \ |
289 |
end_class \ |
|
33632 | 290 |
start_class(HotSpotSpeculationLog) \ |
50858 | 291 |
long_field(HotSpotSpeculationLog, lastFailed) \ |
33160 | 292 |
end_class \ |
293 |
start_class(HotSpotStackFrameReference) \ |
|
294 |
oop_field(HotSpotStackFrameReference, compilerToVM, "Ljdk/vm/ci/hotspot/CompilerToVM;") \ |
|
49358 | 295 |
boolean_field(HotSpotStackFrameReference, objectsMaterialized) \ |
33160 | 296 |
long_field(HotSpotStackFrameReference, stackPointer) \ |
297 |
int_field(HotSpotStackFrameReference, frameNumber) \ |
|
298 |
int_field(HotSpotStackFrameReference, bci) \ |
|
299 |
oop_field(HotSpotStackFrameReference, method, "Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;") \ |
|
300 |
objArrayOop_field(HotSpotStackFrameReference, locals, "[Ljava/lang/Object;") \ |
|
301 |
typeArrayOop_field(HotSpotStackFrameReference, localIsVirtual, "[Z") \ |
|
302 |
end_class \ |
|
38666
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
303 |
start_class(HotSpotMetaData) \ |
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
304 |
typeArrayOop_field(HotSpotMetaData, pcDescBytes, "[B") \ |
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
305 |
typeArrayOop_field(HotSpotMetaData, scopesDescBytes, "[B") \ |
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
306 |
typeArrayOop_field(HotSpotMetaData, relocBytes, "[B") \ |
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
307 |
typeArrayOop_field(HotSpotMetaData, exceptionBytes, "[B") \ |
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
308 |
typeArrayOop_field(HotSpotMetaData, oopMaps, "[B") \ |
47668 | 309 |
objArrayOop_field(HotSpotMetaData, metadata, "[Ljava/lang/Object;") \ |
38666
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
310 |
end_class \ |
33160 | 311 |
start_class(HotSpotConstantPool) \ |
312 |
long_field(HotSpotConstantPool, metaspaceConstantPool) \ |
|
313 |
end_class \ |
|
33632 | 314 |
start_class(HotSpotJVMCIRuntime) \ |
38666
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
315 |
int_field(HotSpotJVMCIRuntime, compilationLevelAdjustment) \ |
33632 | 316 |
end_class \ |
33160 | 317 |
/* end*/ |
318 |
||
319 |
#define START_CLASS(name) \ |
|
320 |
class name : AllStatic { \ |
|
321 |
private: \ |
|
322 |
friend class JVMCICompiler; \ |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
323 |
static void check(oop obj, const char* field_name, int offset); \ |
38666
5ff19807abd5
8152311: [JVMCI] allow JVMCI compiler to change the compilation policy for a method
dnsimon
parents:
36842
diff
changeset
|
324 |
static void compute_offsets(TRAPS); \ |
33160 | 325 |
public: \ |
52195 | 326 |
static InstanceKlass* klass() { return SystemDictionary::name##_klass_is_loaded() ? SystemDictionary::name##_klass() : NULL; } |
33160 | 327 |
|
328 |
#define END_CLASS }; |
|
329 |
||
330 |
#define FIELD(name, type, accessor, cast) \ |
|
331 |
static int _##name##_offset; \ |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
332 |
static type name(oop obj) { check(obj, #name, _##name##_offset); return cast obj->accessor(_##name##_offset); } \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
333 |
static type name(Handle obj) { check(obj(), #name, _##name##_offset); return cast obj->accessor(_##name##_offset); } \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
334 |
static type name(jobject obj); \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
335 |
static void set_##name(oop obj, type x) { check(obj, #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); } \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
336 |
static void set_##name(Handle obj, type x) { check(obj(), #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); } \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
337 |
static void set_##name(jobject obj, type x); \ |
33160 | 338 |
|
339 |
#define EMPTY_CAST |
|
340 |
#define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field, EMPTY_CAST) |
|
341 |
#define INT_FIELD(klass, name) FIELD(name, jint, int_field, EMPTY_CAST) |
|
342 |
#define BOOLEAN_FIELD(klass, name) FIELD(name, jboolean, bool_field, EMPTY_CAST) |
|
343 |
#define LONG_FIELD(klass, name) FIELD(name, jlong, long_field, EMPTY_CAST) |
|
344 |
#define FLOAT_FIELD(klass, name) FIELD(name, jfloat, float_field, EMPTY_CAST) |
|
345 |
#define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field, EMPTY_CAST) |
|
346 |
#define OBJARRAYOOP_FIELD(klass, name, signature) FIELD(name, objArrayOop, obj_field, (objArrayOop)) |
|
347 |
#define TYPEARRAYOOP_FIELD(klass, name, signature) FIELD(name, typeArrayOop, obj_field, (typeArrayOop)) |
|
348 |
#define STATIC_OOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, oop, signature) |
|
349 |
#define STATIC_OBJARRAYOOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, objArrayOop, signature) |
|
350 |
#define STATIC_OOPISH_FIELD(klassName, name, type, signature) \ |
|
351 |
static int _##name##_offset; \ |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
352 |
static type name(); \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
353 |
static void set_##name(type x); |
33160 | 354 |
#define STATIC_PRIMITIVE_FIELD(klassName, name, jtypename) \ |
355 |
static int _##name##_offset; \ |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
356 |
static jtypename name(); \ |
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
357 |
static void set_##name(jtypename x); |
33160 | 358 |
|
359 |
#define STATIC_INT_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, jint) |
|
360 |
#define STATIC_BOOLEAN_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, jboolean) |
|
361 |
||
362 |
COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, TYPEARRAYOOP_FIELD, OBJARRAYOOP_FIELD, STATIC_OOP_FIELD, STATIC_OBJARRAYOOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD) |
|
363 |
#undef START_CLASS |
|
364 |
#undef END_CLASS |
|
365 |
#undef FIELD |
|
366 |
#undef CHAR_FIELD |
|
367 |
#undef INT_FIELD |
|
368 |
#undef BOOLEAN_FIELD |
|
369 |
#undef LONG_FIELD |
|
370 |
#undef FLOAT_FIELD |
|
371 |
#undef OOP_FIELD |
|
372 |
#undef TYPEARRAYOOP_FIELD |
|
373 |
#undef OBJARRAYOOP_FIELD |
|
374 |
#undef STATIC_OOPISH_FIELD |
|
375 |
#undef STATIC_OOP_FIELD |
|
376 |
#undef STATIC_OBJARRAYOOP_FIELD |
|
377 |
#undef STATIC_INT_FIELD |
|
378 |
#undef STATIC_BOOLEAN_FIELD |
|
50409
76bca6678913
8204237: Clean up incorrectly included .inline.hpp files from jvmciJavaClasses.hpp
coleenp
parents:
49473
diff
changeset
|
379 |
#undef STATIC_PRIMITIVE_FIELD |
33160 | 380 |
#undef EMPTY_CAST |
381 |
||
34192
6da4892d7cd5
8142511: [JVMCI] must eagerly initialize classes with static fields accessed by JVMCI native code
twisti
parents:
34185
diff
changeset
|
382 |
void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field, TRAPS); |
33160 | 383 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52195
diff
changeset
|
384 |
#endif // SHARE_JVMCI_JVMCIJAVACLASSES_HPP |