author | hannesw |
Tue, 05 Nov 2019 17:27:18 +0100 | |
changeset 58936 | f4b1addb9742 |
parent 58851 | f1e6442241ca |
permissions | -rw-r--r-- |
43972 | 1 |
/* |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
43972 | 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 |
package jdk.vm.ci.hotspot; |
|
25 |
||
26 |
import static jdk.vm.ci.common.InitTimer.timer; |
|
27 |
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; |
|
28 |
||
29 |
import java.lang.reflect.Executable; |
|
52645
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
30 |
import java.lang.reflect.Field; |
43972 | 31 |
|
32 |
import jdk.vm.ci.code.BytecodeFrame; |
|
33 |
import jdk.vm.ci.code.InstalledCode; |
|
34 |
import jdk.vm.ci.code.InvalidInstalledCodeException; |
|
35 |
import jdk.vm.ci.code.TargetDescription; |
|
49358 | 36 |
import jdk.vm.ci.code.stack.InspectedFrameVisitor; |
43972 | 37 |
import jdk.vm.ci.common.InitTimer; |
38 |
import jdk.vm.ci.common.JVMCIError; |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
39 |
import jdk.vm.ci.meta.Constant; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
40 |
import jdk.vm.ci.meta.ConstantReflectionProvider; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
41 |
import jdk.vm.ci.meta.JavaConstant; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
42 |
import jdk.vm.ci.meta.JavaKind; |
43972 | 43 |
import jdk.vm.ci.meta.JavaType; |
44 |
import jdk.vm.ci.meta.ResolvedJavaMethod; |
|
45 |
import jdk.vm.ci.meta.ResolvedJavaType; |
|
46 |
||
47 |
/** |
|
48 |
* Calls from Java into HotSpot. The behavior of all the methods in this class that take a native |
|
49 |
* pointer as an argument (e.g., {@link #getSymbol(long)}) is undefined if the argument does not |
|
50 |
* denote a valid native object. |
|
51 |
*/ |
|
52 |
final class CompilerToVM { |
|
53 |
/** |
|
54 |
* Initializes the native part of the JVMCI runtime. |
|
55 |
*/ |
|
56 |
private static native void registerNatives(); |
|
57 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
58 |
/** |
58851 | 59 |
* These values mirror the equivalent values from {@code Unsafe} but are appropriate for the JVM |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
60 |
* being compiled against. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
61 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
62 |
// Checkstyle: stop |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
63 |
final int ARRAY_BOOLEAN_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
64 |
final int ARRAY_BYTE_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
65 |
final int ARRAY_SHORT_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
66 |
final int ARRAY_CHAR_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
67 |
final int ARRAY_INT_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
68 |
final int ARRAY_LONG_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
69 |
final int ARRAY_FLOAT_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
70 |
final int ARRAY_DOUBLE_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
71 |
final int ARRAY_OBJECT_BASE_OFFSET; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
72 |
final int ARRAY_BOOLEAN_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
73 |
final int ARRAY_BYTE_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
74 |
final int ARRAY_SHORT_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
75 |
final int ARRAY_CHAR_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
76 |
final int ARRAY_INT_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
77 |
final int ARRAY_LONG_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
78 |
final int ARRAY_FLOAT_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
79 |
final int ARRAY_DOUBLE_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
80 |
final int ARRAY_OBJECT_INDEX_SCALE; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
81 |
// Checkstyle: resume |
43972 | 82 |
|
83 |
@SuppressWarnings("try") |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
84 |
CompilerToVM() { |
43972 | 85 |
try (InitTimer t = timer("CompilerToVM.registerNatives")) { |
86 |
registerNatives(); |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
87 |
ARRAY_BOOLEAN_BASE_OFFSET = arrayBaseOffset(JavaKind.Boolean); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
88 |
ARRAY_BYTE_BASE_OFFSET = arrayBaseOffset(JavaKind.Byte); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
89 |
ARRAY_SHORT_BASE_OFFSET = arrayBaseOffset(JavaKind.Short); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
90 |
ARRAY_CHAR_BASE_OFFSET = arrayBaseOffset(JavaKind.Char); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
91 |
ARRAY_INT_BASE_OFFSET = arrayBaseOffset(JavaKind.Int); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
92 |
ARRAY_LONG_BASE_OFFSET = arrayBaseOffset(JavaKind.Long); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
93 |
ARRAY_FLOAT_BASE_OFFSET = arrayBaseOffset(JavaKind.Float); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
94 |
ARRAY_DOUBLE_BASE_OFFSET = arrayBaseOffset(JavaKind.Double); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
95 |
ARRAY_OBJECT_BASE_OFFSET = arrayBaseOffset(JavaKind.Object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
96 |
ARRAY_BOOLEAN_INDEX_SCALE = arrayIndexScale(JavaKind.Boolean); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
97 |
ARRAY_BYTE_INDEX_SCALE = arrayIndexScale(JavaKind.Byte); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
98 |
ARRAY_SHORT_INDEX_SCALE = arrayIndexScale(JavaKind.Short); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
99 |
ARRAY_CHAR_INDEX_SCALE = arrayIndexScale(JavaKind.Char); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
100 |
ARRAY_INT_INDEX_SCALE = arrayIndexScale(JavaKind.Int); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
101 |
ARRAY_LONG_INDEX_SCALE = arrayIndexScale(JavaKind.Long); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
102 |
ARRAY_FLOAT_INDEX_SCALE = arrayIndexScale(JavaKind.Float); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
103 |
ARRAY_DOUBLE_INDEX_SCALE = arrayIndexScale(JavaKind.Double); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
104 |
ARRAY_OBJECT_INDEX_SCALE = arrayIndexScale(JavaKind.Object); |
43972 | 105 |
} |
106 |
} |
|
107 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
108 |
native int arrayBaseOffset(JavaKind kind); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
109 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
110 |
native int arrayIndexScale(JavaKind kind); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
111 |
|
43972 | 112 |
/** |
113 |
* Gets the {@link CompilerToVM} instance associated with the singleton |
|
114 |
* {@link HotSpotJVMCIRuntime} instance. |
|
115 |
*/ |
|
116 |
public static CompilerToVM compilerToVM() { |
|
117 |
return runtime().getCompilerToVM(); |
|
118 |
} |
|
119 |
||
120 |
/** |
|
121 |
* Copies the original bytecode of {@code method} into a new byte array and returns it. |
|
122 |
* |
|
123 |
* @return a new byte array containing the original bytecode of {@code method} |
|
124 |
*/ |
|
125 |
native byte[] getBytecode(HotSpotResolvedJavaMethodImpl method); |
|
126 |
||
127 |
/** |
|
128 |
* Gets the number of entries in {@code method}'s exception handler table or 0 if it has no |
|
129 |
* exception handler table. |
|
130 |
*/ |
|
131 |
native int getExceptionTableLength(HotSpotResolvedJavaMethodImpl method); |
|
132 |
||
133 |
/** |
|
134 |
* Gets the address of the first entry in {@code method}'s exception handler table. |
|
135 |
* |
|
136 |
* Each entry is a native object described by these fields: |
|
137 |
* |
|
138 |
* <ul> |
|
139 |
* <li>{@link HotSpotVMConfig#exceptionTableElementSize}</li> |
|
140 |
* <li>{@link HotSpotVMConfig#exceptionTableElementStartPcOffset}</li> |
|
141 |
* <li>{@link HotSpotVMConfig#exceptionTableElementEndPcOffset}</li> |
|
142 |
* <li>{@link HotSpotVMConfig#exceptionTableElementHandlerPcOffset}</li> |
|
143 |
* <li>{@link HotSpotVMConfig#exceptionTableElementCatchTypeIndexOffset} |
|
144 |
* </ul> |
|
145 |
* |
|
146 |
* @return 0 if {@code method} has no exception handlers (i.e. |
|
147 |
* {@code getExceptionTableLength(method) == 0}) |
|
148 |
*/ |
|
149 |
native long getExceptionTableStart(HotSpotResolvedJavaMethodImpl method); |
|
150 |
||
151 |
/** |
|
152 |
* Determines whether {@code method} is currently compilable by the JVMCI compiler being used by |
|
153 |
* the VM. This can return false if JVMCI compilation failed earlier for {@code method}, a |
|
154 |
* breakpoint is currently set in {@code method} or {@code method} contains other bytecode |
|
155 |
* features that require special handling by the VM. |
|
156 |
*/ |
|
157 |
native boolean isCompilable(HotSpotResolvedJavaMethodImpl method); |
|
158 |
||
159 |
/** |
|
160 |
* Determines if {@code method} is targeted by a VM directive (e.g., |
|
161 |
* {@code -XX:CompileCommand=dontinline,<pattern>}) or annotation (e.g., |
|
162 |
* {@code jdk.internal.vm.annotation.DontInline}) that specifies it should not be inlined. |
|
163 |
*/ |
|
164 |
native boolean hasNeverInlineDirective(HotSpotResolvedJavaMethodImpl method); |
|
165 |
||
166 |
/** |
|
167 |
* Determines if {@code method} should be inlined at any cost. This could be because: |
|
168 |
* <ul> |
|
169 |
* <li>a CompileOracle directive may forces inlining of this methods</li> |
|
170 |
* <li>an annotation forces inlining of this method</li> |
|
171 |
* </ul> |
|
172 |
*/ |
|
173 |
native boolean shouldInlineMethod(HotSpotResolvedJavaMethodImpl method); |
|
174 |
||
175 |
/** |
|
176 |
* Used to implement {@link ResolvedJavaType#findUniqueConcreteMethod(ResolvedJavaMethod)}. |
|
177 |
* |
|
178 |
* @param method the method on which to base the search |
|
179 |
* @param actualHolderType the best known type of receiver |
|
180 |
* @return the method result or 0 is there is no unique concrete method for {@code method} |
|
181 |
*/ |
|
182 |
native HotSpotResolvedJavaMethodImpl findUniqueConcreteMethod(HotSpotResolvedObjectTypeImpl actualHolderType, HotSpotResolvedJavaMethodImpl method); |
|
183 |
||
184 |
/** |
|
185 |
* Gets the implementor for the interface class {@code type}. |
|
186 |
* |
|
48480
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
187 |
* @return the implementor if there is a single implementor, {@code null} if there is no |
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
188 |
* implementor, or {@code type} itself if there is more than one implementor |
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
189 |
* @throws IllegalArgumentException if type is not an interface type |
43972 | 190 |
*/ |
191 |
native HotSpotResolvedObjectTypeImpl getImplementor(HotSpotResolvedObjectTypeImpl type); |
|
192 |
||
193 |
/** |
|
194 |
* Determines if {@code method} is ignored by security stack walks. |
|
195 |
*/ |
|
196 |
native boolean methodIsIgnoredBySecurityStackWalk(HotSpotResolvedJavaMethodImpl method); |
|
197 |
||
198 |
/** |
|
199 |
* Converts a name to a type. |
|
200 |
* |
|
201 |
* @param name a well formed Java type in {@linkplain JavaType#getName() internal} format |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
202 |
* @param accessingClass the context of resolution. A value of {@code null} implies that the |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
203 |
* class should be resolved with the class loader. |
43972 | 204 |
* @param resolve force resolution to a {@link ResolvedJavaType}. If true, this method will |
205 |
* either return a {@link ResolvedJavaType} or throw an exception |
|
206 |
* @return the type for {@code name} or 0 if resolution failed and {@code resolve == false} |
|
46972
3e88de95fccf
8186459: [JVMCI] ClassNotFoundException thrown by CompilerToVM.lookupType() should be converted to a LinkageError
dnsimon
parents:
46632
diff
changeset
|
207 |
* @throws ClassNotFoundException if {@code resolve == true} and the resolution failed |
43972 | 208 |
*/ |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
209 |
native HotSpotResolvedJavaType lookupType(String name, HotSpotResolvedObjectTypeImpl accessingClass, boolean resolve) throws ClassNotFoundException; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
210 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
211 |
native HotSpotResolvedJavaType lookupClass(Class<?> javaClass); |
43972 | 212 |
|
213 |
/** |
|
214 |
* Resolves the entry at index {@code cpi} in {@code constantPool} to an object, looking in the |
|
215 |
* constant pool cache first. |
|
216 |
* |
|
55487
79c32c7b0992
8225369: [AOT] vm/classfmt/cpl/cplres001/cplres00101m004/cplres00101m004.html fails
dlong
parents:
55206
diff
changeset
|
217 |
* The behavior of this method is undefined if {@code cpi} does not denote one of the following |
79c32c7b0992
8225369: [AOT] vm/classfmt/cpl/cplres001/cplres00101m004/cplres00101m004.html fails
dlong
parents:
55206
diff
changeset
|
218 |
* entry types: {@code JVM_CONSTANT_String}, {@code JVM_CONSTANT_MethodHandle}, |
79c32c7b0992
8225369: [AOT] vm/classfmt/cpl/cplres001/cplres00101m004/cplres00101m004.html fails
dlong
parents:
55206
diff
changeset
|
219 |
* {@code JVM_CONSTANT_MethodHandleInError}, {@code JVM_CONSTANT_MethodType} and |
79c32c7b0992
8225369: [AOT] vm/classfmt/cpl/cplres001/cplres00101m004/cplres00101m004.html fails
dlong
parents:
55206
diff
changeset
|
220 |
* {@code JVM_CONSTANT_MethodTypeInError}. |
43972 | 221 |
*/ |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
222 |
native HotSpotObjectConstantImpl resolvePossiblyCachedConstantInPool(HotSpotConstantPool constantPool, int cpi); |
43972 | 223 |
|
224 |
/** |
|
225 |
* Gets the {@code JVM_CONSTANT_NameAndType} index from the entry at index {@code cpi} in |
|
226 |
* {@code constantPool}. |
|
227 |
* |
|
228 |
* The behavior of this method is undefined if {@code cpi} does not denote an entry containing a |
|
229 |
* {@code JVM_CONSTANT_NameAndType} index. |
|
230 |
*/ |
|
231 |
native int lookupNameAndTypeRefIndexInPool(HotSpotConstantPool constantPool, int cpi); |
|
232 |
||
233 |
/** |
|
234 |
* Gets the name of the {@code JVM_CONSTANT_NameAndType} entry referenced by another entry |
|
235 |
* denoted by {@code which} in {@code constantPool}. |
|
236 |
* |
|
237 |
* The behavior of this method is undefined if {@code which} does not denote a entry that |
|
238 |
* references a {@code JVM_CONSTANT_NameAndType} entry. |
|
239 |
*/ |
|
240 |
native String lookupNameInPool(HotSpotConstantPool constantPool, int which); |
|
241 |
||
242 |
/** |
|
243 |
* Gets the signature of the {@code JVM_CONSTANT_NameAndType} entry referenced by another entry |
|
244 |
* denoted by {@code which} in {@code constantPool}. |
|
245 |
* |
|
246 |
* The behavior of this method is undefined if {@code which} does not denote a entry that |
|
247 |
* references a {@code JVM_CONSTANT_NameAndType} entry. |
|
248 |
*/ |
|
249 |
native String lookupSignatureInPool(HotSpotConstantPool constantPool, int which); |
|
250 |
||
251 |
/** |
|
252 |
* Gets the {@code JVM_CONSTANT_Class} index from the entry at index {@code cpi} in |
|
253 |
* {@code constantPool}. |
|
254 |
* |
|
255 |
* The behavior of this method is undefined if {@code cpi} does not denote an entry containing a |
|
256 |
* {@code JVM_CONSTANT_Class} index. |
|
257 |
*/ |
|
258 |
native int lookupKlassRefIndexInPool(HotSpotConstantPool constantPool, int cpi); |
|
259 |
||
260 |
/** |
|
261 |
* Looks up a class denoted by the {@code JVM_CONSTANT_Class} entry at index {@code cpi} in |
|
262 |
* {@code constantPool}. This method does not perform any resolution. |
|
263 |
* |
|
264 |
* The behavior of this method is undefined if {@code cpi} does not denote a |
|
265 |
* {@code JVM_CONSTANT_Class} entry. |
|
266 |
* |
|
267 |
* @return the resolved class entry or a String otherwise |
|
268 |
*/ |
|
269 |
native Object lookupKlassInPool(HotSpotConstantPool constantPool, int cpi); |
|
270 |
||
271 |
/** |
|
272 |
* Looks up a method denoted by the entry at index {@code cpi} in {@code constantPool}. This |
|
273 |
* method does not perform any resolution. |
|
274 |
* |
|
275 |
* The behavior of this method is undefined if {@code cpi} does not denote an entry representing |
|
276 |
* a method. |
|
277 |
* |
|
278 |
* @param opcode the opcode of the instruction for which the lookup is being performed or |
|
279 |
* {@code -1}. If non-negative, then resolution checks specific to the bytecode it |
|
280 |
* denotes are performed if the method is already resolved. Should any of these |
|
281 |
* checks fail, 0 is returned. |
|
282 |
* @return the resolved method entry, 0 otherwise |
|
283 |
*/ |
|
284 |
native HotSpotResolvedJavaMethodImpl lookupMethodInPool(HotSpotConstantPool constantPool, int cpi, byte opcode); |
|
285 |
||
48826 | 286 |
// TODO resolving JVM_CONSTANT_Dynamic |
287 |
||
43972 | 288 |
/** |
289 |
* Ensures that the type referenced by the specified {@code JVM_CONSTANT_InvokeDynamic} entry at |
|
290 |
* index {@code cpi} in {@code constantPool} is loaded and initialized. |
|
291 |
* |
|
292 |
* The behavior of this method is undefined if {@code cpi} does not denote a |
|
293 |
* {@code JVM_CONSTANT_InvokeDynamic} entry. |
|
294 |
*/ |
|
295 |
native void resolveInvokeDynamicInPool(HotSpotConstantPool constantPool, int cpi); |
|
296 |
||
297 |
/** |
|
298 |
* If {@code cpi} denotes an entry representing a |
|
299 |
* <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.9">signature |
|
300 |
* polymorphic</a> method, this method ensures that the type referenced by the entry is loaded |
|
301 |
* and initialized. It {@code cpi} does not denote a signature polymorphic method, this method |
|
302 |
* does nothing. |
|
303 |
*/ |
|
304 |
native void resolveInvokeHandleInPool(HotSpotConstantPool constantPool, int cpi); |
|
305 |
||
306 |
/** |
|
48480
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
307 |
* If {@code cpi} denotes an entry representing a resolved dynamic adapter (see |
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
308 |
* {@link #resolveInvokeDynamicInPool} and {@link #resolveInvokeHandleInPool}), return the |
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
309 |
* opcode of the instruction for which the resolution was performed ({@code invokedynamic} or |
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
310 |
* {@code invokevirtual}), or {@code -1} otherwise. |
47668 | 311 |
*/ |
312 |
native int isResolvedInvokeHandleInPool(HotSpotConstantPool constantPool, int cpi); |
|
313 |
||
314 |
/** |
|
43972 | 315 |
* Gets the list of type names (in the format of {@link JavaType#getName()}) denoting the |
316 |
* classes that define signature polymorphic methods. |
|
317 |
*/ |
|
318 |
native String[] getSignaturePolymorphicHolders(); |
|
319 |
||
320 |
/** |
|
321 |
* Gets the resolved type denoted by the entry at index {@code cpi} in {@code constantPool}. |
|
322 |
* |
|
323 |
* The behavior of this method is undefined if {@code cpi} does not denote an entry representing |
|
324 |
* a class. |
|
325 |
* |
|
326 |
* @throws LinkageError if resolution failed |
|
327 |
*/ |
|
328 |
native HotSpotResolvedObjectTypeImpl resolveTypeInPool(HotSpotConstantPool constantPool, int cpi) throws LinkageError; |
|
329 |
||
330 |
/** |
|
331 |
* Looks up and attempts to resolve the {@code JVM_CONSTANT_Field} entry for at index |
|
332 |
* {@code cpi} in {@code constantPool}. For some opcodes, checks are performed that require the |
|
333 |
* {@code method} that contains {@code opcode} to be specified. The values returned in |
|
334 |
* {@code info} are: |
|
335 |
* |
|
336 |
* <pre> |
|
337 |
* [ flags, // fieldDescriptor::access_flags() |
|
338 |
* offset, // fieldDescriptor::offset() |
|
339 |
* index // fieldDescriptor::index() |
|
340 |
* ] |
|
341 |
* </pre> |
|
342 |
* |
|
343 |
* The behavior of this method is undefined if {@code cpi} does not denote a |
|
344 |
* {@code JVM_CONSTANT_Field} entry. |
|
345 |
* |
|
346 |
* @param info an array in which the details of the field are returned |
|
347 |
* @return the type defining the field if resolution is successful, 0 otherwise |
|
348 |
*/ |
|
349 |
native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, HotSpotResolvedJavaMethodImpl method, byte opcode, int[] info); |
|
350 |
||
351 |
/** |
|
352 |
* Converts {@code cpci} from an index into the cache for {@code constantPool} to an index |
|
353 |
* directly into {@code constantPool}. |
|
354 |
* |
|
355 |
* The behavior of this method is undefined if {@code ccpi} is an invalid constant pool cache |
|
356 |
* index. |
|
357 |
*/ |
|
358 |
native int constantPoolRemapInstructionOperandFromCache(HotSpotConstantPool constantPool, int cpci); |
|
359 |
||
360 |
/** |
|
361 |
* Gets the appendix object (if any) associated with the entry at index {@code cpi} in |
|
362 |
* {@code constantPool}. |
|
363 |
*/ |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
364 |
native HotSpotObjectConstantImpl lookupAppendixInPool(HotSpotConstantPool constantPool, int cpi); |
43972 | 365 |
|
366 |
/** |
|
367 |
* Installs the result of a compilation into the code cache. |
|
368 |
* |
|
369 |
* @param target the target where this code should be installed |
|
370 |
* @param compiledCode the result of a compilation |
|
371 |
* @param code the details of the installed CodeBlob are written to this object |
|
372 |
* @return the outcome of the installation which will be one of |
|
373 |
* {@link HotSpotVMConfig#codeInstallResultOk}, |
|
374 |
* {@link HotSpotVMConfig#codeInstallResultCacheFull}, |
|
57957
4364524f8cac
8229797: [JVMCI] Clean up no longer used JVMCI::dependencies_invalid value
pli
parents:
55488
diff
changeset
|
375 |
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or |
4364524f8cac
8229797: [JVMCI] Clean up no longer used JVMCI::dependencies_invalid value
pli
parents:
55488
diff
changeset
|
376 |
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}. |
43972 | 377 |
* @throws JVMCIError if there is something wrong with the compiled code or the associated |
378 |
* metadata. |
|
379 |
*/ |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
380 |
native int installCode(TargetDescription target, HotSpotCompiledCode compiledCode, InstalledCode code, long failedSpeculationsAddress, byte[] speculations); |
43972 | 381 |
|
382 |
/** |
|
383 |
* Generates the VM metadata for some compiled code and copies them into {@code metaData}. This |
|
384 |
* method does not install anything into the code cache. |
|
385 |
* |
|
386 |
* @param target the target where this code would be installed |
|
387 |
* @param compiledCode the result of a compilation |
|
388 |
* @param metaData the metadata is written to this object |
|
389 |
* @return the outcome of the installation which will be one of |
|
390 |
* {@link HotSpotVMConfig#codeInstallResultOk}, |
|
391 |
* {@link HotSpotVMConfig#codeInstallResultCacheFull}, |
|
57957
4364524f8cac
8229797: [JVMCI] Clean up no longer used JVMCI::dependencies_invalid value
pli
parents:
55488
diff
changeset
|
392 |
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or |
4364524f8cac
8229797: [JVMCI] Clean up no longer used JVMCI::dependencies_invalid value
pli
parents:
55488
diff
changeset
|
393 |
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}. |
43972 | 394 |
* @throws JVMCIError if there is something wrong with the compiled code or the metadata |
395 |
*/ |
|
396 |
native int getMetadata(TargetDescription target, HotSpotCompiledCode compiledCode, HotSpotMetaData metaData); |
|
397 |
||
398 |
/** |
|
399 |
* Resets all compilation statistics. |
|
400 |
*/ |
|
401 |
native void resetCompilationStatistics(); |
|
402 |
||
403 |
/** |
|
404 |
* Reads the database of VM info. The return value encodes the info in a nested object array |
|
405 |
* that is described by the pseudo Java object {@code info} below: |
|
406 |
* |
|
407 |
* <pre> |
|
408 |
* info = [ |
|
409 |
* VMField[] vmFields, |
|
410 |
* [String name, Long size, ...] vmTypeSizes, |
|
411 |
* [String name, Long value, ...] vmConstants, |
|
412 |
* [String name, Long value, ...] vmAddresses, |
|
413 |
* VMFlag[] vmFlags |
|
414 |
* VMIntrinsicMethod[] vmIntrinsics |
|
415 |
* ] |
|
416 |
* </pre> |
|
417 |
* |
|
418 |
* @return VM info as encoded above |
|
419 |
*/ |
|
420 |
native Object[] readConfiguration(); |
|
421 |
||
422 |
/** |
|
423 |
* Resolves the implementation of {@code method} for virtual dispatches on objects of dynamic |
|
424 |
* type {@code exactReceiver}. This resolution process only searches "up" the class hierarchy of |
|
425 |
* {@code exactReceiver}. |
|
426 |
* |
|
427 |
* @param caller the caller or context type used to perform access checks |
|
428 |
* @return the link-time resolved method (might be abstract) or {@code null} if it is either a |
|
429 |
* signature polymorphic method or can not be linked. |
|
430 |
*/ |
|
431 |
native HotSpotResolvedJavaMethodImpl resolveMethod(HotSpotResolvedObjectTypeImpl exactReceiver, HotSpotResolvedJavaMethodImpl method, HotSpotResolvedObjectTypeImpl caller); |
|
432 |
||
433 |
/** |
|
434 |
* Gets the static initializer of {@code type}. |
|
435 |
* |
|
48480
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
436 |
* @return {@code null} if {@code type} has no static initializer |
43972 | 437 |
*/ |
438 |
native HotSpotResolvedJavaMethodImpl getClassInitializer(HotSpotResolvedObjectTypeImpl type); |
|
439 |
||
440 |
/** |
|
441 |
* Determines if {@code type} or any of its currently loaded subclasses overrides |
|
442 |
* {@code Object.finalize()}. |
|
443 |
*/ |
|
444 |
native boolean hasFinalizableSubclass(HotSpotResolvedObjectTypeImpl type); |
|
445 |
||
446 |
/** |
|
447 |
* Gets the method corresponding to {@code executable}. |
|
448 |
*/ |
|
449 |
native HotSpotResolvedJavaMethodImpl asResolvedJavaMethod(Executable executable); |
|
450 |
||
451 |
/** |
|
452 |
* Gets the maximum absolute offset of a PC relative call to {@code address} from any position |
|
453 |
* in the code cache. |
|
454 |
* |
|
455 |
* @param address an address that may be called from any code in the code cache |
|
456 |
* @return -1 if {@code address == 0} |
|
457 |
*/ |
|
458 |
native long getMaxCallTargetOffset(long address); |
|
459 |
||
460 |
/** |
|
461 |
* Gets a textual disassembly of {@code codeBlob}. |
|
462 |
* |
|
463 |
* @return a non-zero length string containing a disassembly of {@code codeBlob} or null if |
|
464 |
* {@code codeBlob} could not be disassembled for some reason |
|
465 |
*/ |
|
466 |
// The HotSpot disassembler seems not to be thread safe so it's better to synchronize its usage |
|
467 |
synchronized native String disassembleCodeBlob(InstalledCode installedCode); |
|
468 |
||
469 |
/** |
|
470 |
* Gets a stack trace element for {@code method} at bytecode index {@code bci}. |
|
471 |
*/ |
|
472 |
native StackTraceElement getStackTraceElement(HotSpotResolvedJavaMethodImpl method, int bci); |
|
473 |
||
474 |
/** |
|
475 |
* Executes some {@code installedCode} with arguments {@code args}. |
|
476 |
* |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
477 |
* @return the result of executing {@code nmethodMirror} |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
478 |
* @throws InvalidInstalledCodeException if {@code nmethodMirror} has been invalidated |
43972 | 479 |
*/ |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
480 |
native Object executeHotSpotNmethod(Object[] args, HotSpotNmethod nmethodMirror) throws InvalidInstalledCodeException; |
43972 | 481 |
|
482 |
/** |
|
483 |
* Gets the line number table for {@code method}. The line number table is encoded as (bci, |
|
484 |
* source line number) pairs. |
|
485 |
* |
|
486 |
* @return the line number table for {@code method} or null if it doesn't have one |
|
487 |
*/ |
|
488 |
native long[] getLineNumberTable(HotSpotResolvedJavaMethodImpl method); |
|
489 |
||
490 |
/** |
|
491 |
* Gets the number of entries in the local variable table for {@code method}. |
|
492 |
* |
|
493 |
* @return the number of entries in the local variable table for {@code method} |
|
494 |
*/ |
|
495 |
native int getLocalVariableTableLength(HotSpotResolvedJavaMethodImpl method); |
|
496 |
||
497 |
/** |
|
498 |
* Gets the address of the first entry in the local variable table for {@code method}. |
|
499 |
* |
|
500 |
* Each entry is a native object described by these fields: |
|
501 |
* |
|
502 |
* <ul> |
|
503 |
* <li>{@link HotSpotVMConfig#localVariableTableElementSize}</li> |
|
504 |
* <li>{@link HotSpotVMConfig#localVariableTableElementLengthOffset}</li> |
|
505 |
* <li>{@link HotSpotVMConfig#localVariableTableElementNameCpIndexOffset}</li> |
|
506 |
* <li>{@link HotSpotVMConfig#localVariableTableElementDescriptorCpIndexOffset}</li> |
|
507 |
* <li>{@link HotSpotVMConfig#localVariableTableElementSlotOffset} |
|
508 |
* <li>{@link HotSpotVMConfig#localVariableTableElementStartBciOffset} |
|
509 |
* </ul> |
|
510 |
* |
|
511 |
* @return 0 if {@code method} does not have a local variable table |
|
512 |
*/ |
|
513 |
native long getLocalVariableTableStart(HotSpotResolvedJavaMethodImpl method); |
|
514 |
||
515 |
/** |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
516 |
* Reads an object pointer within a VM data structure. That is, any {@link VMField} whose |
58851 | 517 |
* {@link VMField#type type} is {@code "oop"} (e.g., {@code Klass::_java_mirror}, |
518 |
* {@code JavaThread::_threadObj}). |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
519 |
* |
58851 | 520 |
* Note that {@code Unsafe.getObject(Object, long)} cannot be used for this since it does a |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
521 |
* {@code narrowOop} read if the VM is using compressed oops whereas oops within VM data |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
522 |
* structures are (currently) always uncompressed. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
523 |
* |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
524 |
* @param address address of an oop field within a VM data structure |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
525 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
526 |
native HotSpotObjectConstantImpl readUncompressedOop(long address); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
527 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
528 |
/** |
48480
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
529 |
* Sets flags on {@code method} indicating that it should never be inlined or compiled by the |
614068b0ddd7
8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
dnsimon
parents:
47793
diff
changeset
|
530 |
* VM. |
43972 | 531 |
*/ |
47793
3dcd54513db1
8186478: [JVMCI] rename HotSpotResolvedJavaMethod#setNotInlineableOrCompileable
dnsimon
parents:
47668
diff
changeset
|
532 |
native void setNotInlinableOrCompilable(HotSpotResolvedJavaMethodImpl method); |
43972 | 533 |
|
534 |
/** |
|
535 |
* Invalidates the profiling information for {@code method} and (re)initializes it such that |
|
536 |
* profiling restarts upon its next invocation. |
|
537 |
*/ |
|
538 |
native void reprofile(HotSpotResolvedJavaMethodImpl method); |
|
539 |
||
540 |
/** |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
541 |
* Invalidates {@code nmethodMirror} such that {@link InvalidInstalledCodeException} will be |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
542 |
* raised the next time {@code nmethodMirror} is {@linkplain #executeHotSpotNmethod executed}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
543 |
* The {@code nmethod} associated with {@code nmethodMirror} is also made non-entrant and any |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
544 |
* current activations of the {@code nmethod} are deoptimized. |
43972 | 545 |
*/ |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
546 |
native void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror); |
43972 | 547 |
|
548 |
/** |
|
549 |
* Collects the current values of all JVMCI benchmark counters, summed up over all threads. |
|
550 |
*/ |
|
551 |
native long[] collectCounters(); |
|
552 |
||
553 |
/** |
|
55206 | 554 |
* Get the current number of counters allocated for use by JVMCI. Should be the same value as |
555 |
* the flag {@code JVMCICounterSize}. |
|
556 |
*/ |
|
557 |
native int getCountersSize(); |
|
558 |
||
559 |
/** |
|
58282
03fce7b04b42
8230395: Code checks for NULL value returned from NEW_C_HEAP_ARRAY which can not happen
dholmes
parents:
57957
diff
changeset
|
560 |
* Change the size of the counters allocated for JVMCI. This requires a safepoint to |
55206 | 561 |
* safely reallocate the storage but it's advisable to increase the size in reasonable chunks. |
562 |
*/ |
|
58282
03fce7b04b42
8230395: Code checks for NULL value returned from NEW_C_HEAP_ARRAY which can not happen
dholmes
parents:
57957
diff
changeset
|
563 |
native void setCountersSize(int newSize); |
55206 | 564 |
|
565 |
/** |
|
43972 | 566 |
* Determines if {@code metaspaceMethodData} is mature. |
567 |
*/ |
|
568 |
native boolean isMature(long metaspaceMethodData); |
|
569 |
||
570 |
/** |
|
571 |
* Generate a unique id to identify the result of the compile. |
|
572 |
*/ |
|
573 |
native int allocateCompileId(HotSpotResolvedJavaMethodImpl method, int entryBCI); |
|
574 |
||
575 |
/** |
|
576 |
* Determines if {@code method} has OSR compiled code identified by {@code entryBCI} for |
|
577 |
* compilation level {@code level}. |
|
578 |
*/ |
|
579 |
native boolean hasCompiledCodeForOSR(HotSpotResolvedJavaMethodImpl method, int entryBCI, int level); |
|
580 |
||
581 |
/** |
|
582 |
* Gets the value of {@code metaspaceSymbol} as a String. |
|
583 |
*/ |
|
584 |
native String getSymbol(long metaspaceSymbol); |
|
585 |
||
586 |
/** |
|
49358 | 587 |
* @see jdk.vm.ci.code.stack.StackIntrospection#iterateFrames |
43972 | 588 |
*/ |
49358 | 589 |
native <T> T iterateFrames(ResolvedJavaMethod[] initialMethods, ResolvedJavaMethod[] matchingMethods, int initialSkip, InspectedFrameVisitor<T> visitor); |
43972 | 590 |
|
591 |
/** |
|
592 |
* Materializes all virtual objects within {@code stackFrame} and updates its locals. |
|
593 |
* |
|
594 |
* @param invalidate if {@code true}, the compiled method for the stack frame will be |
|
595 |
* invalidated |
|
596 |
*/ |
|
597 |
native void materializeVirtualObjects(HotSpotStackFrameReference stackFrame, boolean invalidate); |
|
598 |
||
599 |
/** |
|
600 |
* Gets the v-table index for interface method {@code method} in the receiver {@code type} or |
|
601 |
* {@link HotSpotVMConfig#invalidVtableIndex} if {@code method} is not in {@code type}'s |
|
602 |
* v-table. |
|
603 |
* |
|
604 |
* @throws InternalError if {@code type} is an interface or {@code method} is not held by an |
|
605 |
* interface or class represented by {@code type} is not initialized |
|
606 |
*/ |
|
607 |
native int getVtableIndexForInterfaceMethod(HotSpotResolvedObjectTypeImpl type, HotSpotResolvedJavaMethodImpl method); |
|
608 |
||
609 |
/** |
|
610 |
* Determines if debug info should also be emitted at non-safepoint locations. |
|
611 |
*/ |
|
612 |
native boolean shouldDebugNonSafepoints(); |
|
613 |
||
614 |
/** |
|
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
615 |
* Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to HotSpot's |
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
616 |
* log stream. |
43972 | 617 |
* |
54732 | 618 |
* @param flush specifies if the log stream should be flushed after writing |
619 |
* @param canThrow specifies if an error in the {@code bytes}, {@code offset} or {@code length} |
|
620 |
* arguments should result in an exception or a negative return value |
|
621 |
* @return 0 on success, -1 if {@code bytes == null && !canThrow}, -2 if {@code !canThrow} and |
|
622 |
* copying would cause access of data outside array bounds |
|
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
623 |
* @throws NullPointerException if {@code bytes == null} |
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
624 |
* @throws IndexOutOfBoundsException if copying would cause access of data outside array bounds |
43972 | 625 |
*/ |
54732 | 626 |
native int writeDebugOutput(byte[] bytes, int offset, int length, boolean flush, boolean canThrow); |
43972 | 627 |
|
628 |
/** |
|
629 |
* Flush HotSpot's log stream. |
|
630 |
*/ |
|
631 |
native void flushDebugOutput(); |
|
632 |
||
633 |
/** |
|
634 |
* Read a HotSpot Method* value from the memory location described by {@code base} plus |
|
635 |
* {@code displacement} and return the {@link HotSpotResolvedJavaMethodImpl} wrapping it. This |
|
636 |
* method does no checking that the memory location actually contains a valid pointer and may |
|
637 |
* crash the VM if an invalid location is provided. If the {@code base} is null then |
|
638 |
* {@code displacement} is used by itself. If {@code base} is a |
|
639 |
* {@link HotSpotResolvedJavaMethodImpl}, {@link HotSpotConstantPool} or |
|
640 |
* {@link HotSpotResolvedObjectTypeImpl} then the metaspace pointer is fetched from that object |
|
641 |
* and added to {@code displacement}. Any other non-null object type causes an |
|
642 |
* {@link IllegalArgumentException} to be thrown. |
|
643 |
* |
|
644 |
* @param base an object to read from or null |
|
645 |
* @param displacement |
|
646 |
* @return null or the resolved method for this location |
|
647 |
*/ |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
648 |
native HotSpotResolvedJavaMethodImpl getResolvedJavaMethod(HotSpotObjectConstantImpl base, long displacement); |
43972 | 649 |
|
650 |
/** |
|
651 |
* Gets the {@code ConstantPool*} associated with {@code object} and returns a |
|
652 |
* {@link HotSpotConstantPool} wrapping it. |
|
653 |
* |
|
654 |
* @param object a {@link HotSpotResolvedJavaMethodImpl} or |
|
655 |
* {@link HotSpotResolvedObjectTypeImpl} object |
|
656 |
* @return a {@link HotSpotConstantPool} wrapping the {@code ConstantPool*} associated with |
|
657 |
* {@code object} |
|
658 |
* @throws NullPointerException if {@code object == null} |
|
659 |
* @throws IllegalArgumentException if {@code object} is neither a |
|
660 |
* {@link HotSpotResolvedJavaMethodImpl} nor a {@link HotSpotResolvedObjectTypeImpl} |
|
661 |
*/ |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
662 |
native HotSpotConstantPool getConstantPool(MetaspaceObject object); |
43972 | 663 |
|
664 |
/** |
|
665 |
* Read a HotSpot Klass* value from the memory location described by {@code base} plus |
|
666 |
* {@code displacement} and return the {@link HotSpotResolvedObjectTypeImpl} wrapping it. This |
|
667 |
* method does no checking that the memory location actually contains a valid pointer and may |
|
668 |
* crash the VM if an invalid location is provided. If the {@code base} is null then |
|
669 |
* {@code displacement} is used by itself. If {@code base} is a |
|
670 |
* {@link HotSpotResolvedJavaMethodImpl}, {@link HotSpotConstantPool} or |
|
671 |
* {@link HotSpotResolvedObjectTypeImpl} then the metaspace pointer is fetched from that object |
|
672 |
* and added to {@code displacement}. Any other non-null object type causes an |
|
673 |
* {@link IllegalArgumentException} to be thrown. |
|
674 |
* |
|
675 |
* @param base an object to read from or null |
|
676 |
* @param displacement |
|
677 |
* @param compressed true if the location contains a compressed Klass* |
|
678 |
* @return null or the resolved method for this location |
|
679 |
*/ |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
680 |
private native HotSpotResolvedObjectTypeImpl getResolvedJavaType0(Object base, long displacement, boolean compressed); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
681 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
682 |
HotSpotResolvedObjectTypeImpl getResolvedJavaType(MetaspaceObject base, long displacement, boolean compressed) { |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
683 |
return getResolvedJavaType0(base, displacement, compressed); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
684 |
} |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
685 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
686 |
HotSpotResolvedObjectTypeImpl getResolvedJavaType(HotSpotObjectConstantImpl base, long displacement, boolean compressed) { |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
687 |
return getResolvedJavaType0(base, displacement, compressed); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
688 |
} |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
689 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
690 |
HotSpotResolvedObjectTypeImpl getResolvedJavaType(long displacement, boolean compressed) { |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
691 |
return getResolvedJavaType0(null, displacement, compressed); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
692 |
} |
43972 | 693 |
|
694 |
/** |
|
695 |
* Return the size of the HotSpot ProfileData* pointed at by {@code position}. If |
|
696 |
* {@code position} is outside the space of the MethodData then an |
|
697 |
* {@link IllegalArgumentException} is thrown. A {@code position} inside the MethodData but that |
|
698 |
* isn't pointing at a valid ProfileData will crash the VM. |
|
699 |
* |
|
700 |
* @param metaspaceMethodData |
|
701 |
* @param position |
|
702 |
* @return the size of the ProfileData item pointed at by {@code position} |
|
703 |
* @throws IllegalArgumentException if an out of range position is given |
|
704 |
*/ |
|
705 |
native int methodDataProfileDataSize(long metaspaceMethodData, int position); |
|
706 |
||
707 |
/** |
|
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
49358
diff
changeset
|
708 |
* Gets the fingerprint for a given Klass*. |
43972 | 709 |
* |
710 |
* @param metaspaceKlass |
|
711 |
* @return the value of the fingerprint (zero for arrays and synthetic classes). |
|
712 |
*/ |
|
713 |
native long getFingerprint(long metaspaceKlass); |
|
714 |
||
715 |
/** |
|
716 |
* Return the amount of native stack required for the interpreter frames represented by |
|
717 |
* {@code frame}. This is used when emitting the stack banging code to ensure that there is |
|
718 |
* enough space for the frames during deoptimization. |
|
719 |
* |
|
720 |
* @param frame |
|
721 |
* @return the number of bytes required for deoptimization of this frame state |
|
722 |
*/ |
|
723 |
native int interpreterFrameSize(BytecodeFrame frame); |
|
724 |
||
725 |
/** |
|
726 |
* Invokes non-public method {@code java.lang.invoke.LambdaForm.compileToBytecode()} on |
|
727 |
* {@code lambdaForm} (which must be a {@code java.lang.invoke.LambdaForm} instance). |
|
728 |
*/ |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
729 |
native void compileToBytecode(HotSpotObjectConstantImpl lambdaForm); |
43972 | 730 |
|
731 |
/** |
|
732 |
* Gets the value of the VM flag named {@code name}. |
|
733 |
* |
|
734 |
* @param name name of a VM option |
|
735 |
* @return {@code this} if the named VM option doesn't exist, a {@link String} or {@code null} |
|
736 |
* if its type is {@code ccstr} or {@code ccstrlist}, a {@link Double} if its type is |
|
737 |
* {@code double}, a {@link Boolean} if its type is {@code bool} otherwise a |
|
738 |
* {@link Long} |
|
739 |
*/ |
|
740 |
native Object getFlagValue(String name); |
|
45626
c4ea64135530
8182310: [AOT][JVMCI] Get host class of VM anonymous class
dnsimon
parents:
43972
diff
changeset
|
741 |
|
c4ea64135530
8182310: [AOT][JVMCI] Get host class of VM anonymous class
dnsimon
parents:
43972
diff
changeset
|
742 |
/** |
c4ea64135530
8182310: [AOT][JVMCI] Get host class of VM anonymous class
dnsimon
parents:
43972
diff
changeset
|
743 |
* Gets the host class for {@code type}. |
c4ea64135530
8182310: [AOT][JVMCI] Get host class of VM anonymous class
dnsimon
parents:
43972
diff
changeset
|
744 |
*/ |
c4ea64135530
8182310: [AOT][JVMCI] Get host class of VM anonymous class
dnsimon
parents:
43972
diff
changeset
|
745 |
native HotSpotResolvedObjectTypeImpl getHostClass(HotSpotResolvedObjectTypeImpl type); |
52645
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
746 |
|
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
747 |
/** |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
748 |
* Gets the object at the address {@code oopAddress}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
749 |
* |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
750 |
* @param oopAddress a valid {@code oopDesc**} value |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
751 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
752 |
native Object getObjectAtAddress(long oopAddress); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
753 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
754 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
755 |
* @see ResolvedJavaType#getInterfaces() |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
756 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
757 |
native HotSpotResolvedObjectTypeImpl[] getInterfaces(HotSpotResolvedObjectTypeImpl type); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
758 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
759 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
760 |
* @see ResolvedJavaType#getComponentType() |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
761 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
762 |
native HotSpotResolvedJavaType getComponentType(HotSpotResolvedObjectTypeImpl type); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
763 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
764 |
/** |
55463 | 765 |
* Get the array class for {@code type}. This can't be done symbolically since anonymous types |
766 |
* can't be looked up by name. |
|
767 |
*/ |
|
768 |
native HotSpotResolvedObjectTypeImpl getArrayType(HotSpotResolvedJavaType type); |
|
769 |
||
770 |
/** |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
771 |
* Forces initialization of {@code type}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
772 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
773 |
native void ensureInitialized(HotSpotResolvedObjectTypeImpl type); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
774 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
775 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
776 |
* Checks if {@code object} is a String and is an interned string value. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
777 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
778 |
native boolean isInternedString(HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
779 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
780 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
781 |
* Gets the {@linkplain System#identityHashCode(Object) identity} has code for the object |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
782 |
* represented by this constant. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
783 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
784 |
native int getIdentityHashCode(HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
785 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
786 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
787 |
* Converts a constant object representing a boxed primitive into a boxed primitive. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
788 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
789 |
native Object unboxPrimitive(HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
790 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
791 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
792 |
* Converts a boxed primitive into a JavaConstant representing the same value. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
793 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
794 |
native HotSpotObjectConstantImpl boxPrimitive(Object source); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
795 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
796 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
797 |
* Gets the {@link ResolvedJavaMethod}s for all the constructors of the type {@code holder}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
798 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
799 |
native ResolvedJavaMethod[] getDeclaredConstructors(HotSpotResolvedObjectTypeImpl holder); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
800 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
801 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
802 |
* Gets the {@link ResolvedJavaMethod}s for all the non-constructor methods of the type |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
803 |
* {@code holder}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
804 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
805 |
native ResolvedJavaMethod[] getDeclaredMethods(HotSpotResolvedObjectTypeImpl holder); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
806 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
807 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
808 |
* Reads the current value of a static field. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
809 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
810 |
native JavaConstant readFieldValue(HotSpotResolvedObjectTypeImpl resolvedObjectType, HotSpotResolvedJavaField field, boolean isVolatile); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
811 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
812 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
813 |
* Reads the current value of an instance field. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
814 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
815 |
native JavaConstant readFieldValue(HotSpotObjectConstantImpl object, HotSpotResolvedJavaField field, boolean isVolatile); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
816 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
817 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
818 |
* @see ResolvedJavaType#isInstance(JavaConstant) |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
819 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
820 |
native boolean isInstance(HotSpotResolvedObjectTypeImpl holder, HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
821 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
822 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
823 |
* @see ResolvedJavaType#isAssignableFrom(ResolvedJavaType) |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
824 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
825 |
native boolean isAssignableFrom(HotSpotResolvedObjectTypeImpl holder, HotSpotResolvedObjectTypeImpl otherType); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
826 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
827 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
828 |
* @see ConstantReflectionProvider#asJavaType(Constant) |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
829 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
830 |
native HotSpotResolvedJavaType asJavaType(HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
831 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
832 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
833 |
* Converts a String constant into a String. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
834 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
835 |
native String asString(HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
836 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
837 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
838 |
* Compares the contents of {@code xHandle} and {@code yHandle} for pointer equality. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
839 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
840 |
native boolean equals(HotSpotObjectConstantImpl x, long xHandle, HotSpotObjectConstantImpl y, long yHandle); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
841 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
842 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
843 |
* Gets a {@link JavaConstant} wrapping the {@link java.lang.Class} mirror for {@code type}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
844 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
845 |
native HotSpotObjectConstantImpl getJavaMirror(HotSpotResolvedJavaType type); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
846 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
847 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
848 |
* Returns the length of the array if {@code object} represents an array or -1 otherwise. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
849 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
850 |
native int getArrayLength(HotSpotObjectConstantImpl object); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
851 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
852 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
853 |
* Reads the element at {@code index} if {@code object} is an array. Elements of an object array |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
854 |
* are returned as {@link JavaConstant}s and primitives are returned as boxed values. The value |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
855 |
* {@code null} is returned if the {@code index} is out of range or object is not an array. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
856 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
857 |
native Object readArrayElement(HotSpotObjectConstantImpl object, int index); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
858 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
859 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
860 |
* Reads a byte sized value from {@code displacement} in {@code object}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
861 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
862 |
native byte getByte(HotSpotObjectConstantImpl object, long displacement); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
863 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
864 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
865 |
* Reads a short sized value from {@code displacement} in {@code object}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
866 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
867 |
native short getShort(HotSpotObjectConstantImpl object, long displacement); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
868 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
869 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
870 |
* Reads an int sized value from {@code displacement} in {@code object}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
871 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
872 |
native int getInt(HotSpotObjectConstantImpl object, long displacement); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
873 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
874 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
875 |
* Reads a long sized value from {@code displacement} in {@code object}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
876 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
877 |
native long getLong(HotSpotObjectConstantImpl object, long displacement); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
878 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
879 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
880 |
* Reads a Java object from {@code displacement} in {@code object}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
881 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
882 |
native HotSpotObjectConstantImpl getObject(HotSpotObjectConstantImpl object, long displacement); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
883 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
884 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
885 |
* @see HotSpotJVMCIRuntime#registerNativeMethods |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
886 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
887 |
native long[] registerNativeMethods(Class<?> clazz); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
888 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
889 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
890 |
* @see HotSpotJVMCIRuntime#translate(Object) |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
891 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
892 |
native long translate(Object obj); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
893 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
894 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
895 |
* @see HotSpotJVMCIRuntime#unhand(Class, long) |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
896 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
897 |
native Object unhand(long handle); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
898 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
899 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
900 |
* Updates {@code address} and {@code entryPoint} fields of {@code nmethodMirror} based on the |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
901 |
* current state of the {@code nmethod} identified by {@code address} and |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
902 |
* {@code nmethodMirror.compileId} in the code cache. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
903 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
904 |
native void updateHotSpotNmethod(HotSpotNmethod nmethodMirror); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
905 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
906 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
907 |
* @see InstalledCode#getCode() |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
908 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
909 |
native byte[] getCode(HotSpotInstalledCode code); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
910 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
911 |
/** |
52645
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
912 |
* Gets a {@link Executable} corresponding to {@code method}. |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
913 |
*/ |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
914 |
native Executable asReflectionExecutable(HotSpotResolvedJavaMethodImpl method); |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
915 |
|
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
916 |
/** |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
917 |
* Gets a {@link Field} denoted by {@code holder} and {@code index}. |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
918 |
* |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
919 |
* @param holder the class in which the requested field is declared |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
920 |
* @param fieldIndex the {@code fieldDescriptor::index()} denoting the field |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
921 |
*/ |
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
52381
diff
changeset
|
922 |
native Field asReflectionField(HotSpotResolvedObjectTypeImpl holder, int fieldIndex); |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
923 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
924 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
925 |
* @see HotSpotJVMCIRuntime#getIntrinsificationTrustPredicate(Class...) |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
926 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
927 |
native boolean isTrustedForIntrinsics(HotSpotResolvedObjectTypeImpl type); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
928 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
929 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
930 |
* Releases the resources backing the global JNI {@code handle}. This is equivalent to the |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
931 |
* {@code DeleteGlobalRef} JNI function. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
932 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
933 |
native void deleteGlobalHandle(long handle); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
934 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
935 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
936 |
* Gets the failed speculations pointed to by {@code *failedSpeculationsAddress}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
937 |
* |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
938 |
* @param currentFailures the known failures at {@code failedSpeculationsAddress} |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
939 |
* @return the list of failed speculations with each entry being a single speculation in the |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
940 |
* format emitted by {@link HotSpotSpeculationEncoding#toByteArray()} |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
941 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
942 |
native byte[][] getFailedSpeculations(long failedSpeculationsAddress, byte[][] currentFailures); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
943 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
944 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
945 |
* Gets the address of the {@code MethodData::_failed_speculations} field in the |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
946 |
* {@code MethodData} associated with {@code method}. This will create and install the |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
947 |
* {@code MethodData} if it didn't already exist. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
948 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
949 |
native long getFailedSpeculationsAddress(HotSpotResolvedJavaMethodImpl method); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
950 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
951 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
952 |
* Frees the failed speculations pointed to by {@code *failedSpeculationsAddress}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
953 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
954 |
native void releaseFailedSpeculations(long failedSpeculationsAddress); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
955 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
956 |
/** |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
957 |
* Adds a speculation to the failed speculations pointed to by |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
958 |
* {@code *failedSpeculationsAddress}. |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
959 |
* |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
960 |
* @return {@code false} if the speculation could not be appended to the list |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
961 |
*/ |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
962 |
native boolean addFailedSpeculation(long failedSpeculationsAddress, byte[] speculation); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
52645
diff
changeset
|
963 |
|
54732 | 964 |
/** |
965 |
* @see HotSpotJVMCIRuntime#isCurrentThreadAttached() |
|
966 |
*/ |
|
967 |
native boolean isCurrentThreadAttached(); |
|
968 |
||
969 |
/** |
|
58793 | 970 |
* @see HotSpotJVMCIRuntime#getCurrentJavaThread() |
971 |
*/ |
|
972 |
native long getCurrentJavaThread(); |
|
973 |
||
974 |
/** |
|
54732 | 975 |
* @see HotSpotJVMCIRuntime#attachCurrentThread |
976 |
*/ |
|
977 |
native boolean attachCurrentThread(boolean asDaemon); |
|
978 |
||
979 |
/** |
|
980 |
* @see HotSpotJVMCIRuntime#detachCurrentThread() |
|
981 |
*/ |
|
982 |
native void detachCurrentThread(); |
|
55463 | 983 |
|
984 |
/** |
|
985 |
* @see HotSpotJVMCIRuntime#exitHotSpot(int) |
|
986 |
*/ |
|
987 |
native void callSystemExit(int status); |
|
43972 | 988 |
} |