author | lfoltan |
Mon, 20 Aug 2018 08:25:57 -0400 | |
changeset 51444 | 3e5d28e6de32 |
parent 50858 | 2d3e99a72541 |
child 51691 | f036f767708e |
permissions | -rw-r--r-- |
43972 | 1 |
/* |
51444
3e5d28e6de32
8209301: JVM rename is_anonymous, host_klass to unsafe specific terminology ahead of Unsafe.defineAnonymousClass deprecation
lfoltan
parents:
50858
diff
changeset
|
2 |
* Copyright (c) 2011, 2018, 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 |
package jdk.vm.ci.hotspot; |
|
24 |
||
25 |
import jdk.vm.ci.meta.Assumptions.AssumptionResult; |
|
26 |
import jdk.vm.ci.meta.Constant; |
|
27 |
import jdk.vm.ci.meta.ConstantPool; |
|
28 |
import jdk.vm.ci.meta.JavaConstant; |
|
29 |
import jdk.vm.ci.meta.JavaKind; |
|
30 |
import jdk.vm.ci.meta.JavaType; |
|
31 |
import jdk.vm.ci.meta.ResolvedJavaMethod; |
|
32 |
import jdk.vm.ci.meta.ResolvedJavaType; |
|
33 |
||
34 |
/** |
|
35 |
* Implementation of {@link JavaType} for resolved non-primitive HotSpot classes. |
|
36 |
*/ |
|
37 |
public interface HotSpotResolvedObjectType extends ResolvedJavaType { |
|
38 |
||
50858 | 39 |
@Override |
43972 | 40 |
HotSpotResolvedObjectType getArrayClass(); |
41 |
||
50858 | 42 |
@Override |
43972 | 43 |
ResolvedJavaType getComponentType(); |
44 |
||
50858 | 45 |
@Override |
43972 | 46 |
AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype(); |
47 |
||
50858 | 48 |
@Override |
43972 | 49 |
HotSpotResolvedObjectType getSuperclass(); |
50 |
||
50858 | 51 |
@Override |
43972 | 52 |
HotSpotResolvedObjectType[] getInterfaces(); |
53 |
||
54 |
HotSpotResolvedObjectType getSupertype(); |
|
55 |
||
50858 | 56 |
@Override |
43972 | 57 |
HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType); |
58 |
||
50858 | 59 |
@Override |
43972 | 60 |
default boolean isPrimitive() { |
61 |
return false; |
|
62 |
} |
|
63 |
||
50858 | 64 |
@Override |
43972 | 65 |
default JavaKind getJavaKind() { |
66 |
return JavaKind.Object; |
|
67 |
} |
|
68 |
||
69 |
ConstantPool getConstantPool(); |
|
70 |
||
71 |
/** |
|
72 |
* Gets the instance size of this type. If an instance of this type cannot be fast path |
|
73 |
* allocated, then the returned value is negative (its absolute value gives the size). Must not |
|
74 |
* be called if this is an array or interface type. |
|
75 |
*/ |
|
76 |
int instanceSize(); |
|
77 |
||
78 |
int getVtableLength(); |
|
79 |
||
80 |
@Override |
|
81 |
AssumptionResult<ResolvedJavaMethod> findUniqueConcreteMethod(ResolvedJavaMethod method); |
|
82 |
||
83 |
/** |
|
84 |
* Performs a fast-path check that this type is resolved in the context of a given accessing |
|
85 |
* class. A negative result does not mean this type is not resolved with respect to |
|
86 |
* {@code accessingClass}. That can only be determined by |
|
87 |
* {@linkplain HotSpotJVMCIRuntime#lookupType(String, HotSpotResolvedObjectType, boolean) |
|
88 |
* re-resolving} the type. |
|
89 |
*/ |
|
90 |
boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass); |
|
91 |
||
92 |
/** |
|
93 |
* Gets the metaspace Klass boxed in a {@link JavaConstant}. |
|
94 |
*/ |
|
95 |
Constant klass(); |
|
96 |
||
97 |
boolean isPrimaryType(); |
|
98 |
||
99 |
int superCheckOffset(); |
|
100 |
||
101 |
long prototypeMarkWord(); |
|
102 |
||
103 |
int layoutHelper(); |
|
104 |
||
105 |
long getFingerprint(); |
|
106 |
||
50858 | 107 |
@Override |
43972 | 108 |
HotSpotResolvedObjectType getEnclosingType(); |
109 |
||
50858 | 110 |
@Override |
43972 | 111 |
ResolvedJavaMethod getClassInitializer(); |
47668 | 112 |
|
51444
3e5d28e6de32
8209301: JVM rename is_anonymous, host_klass to unsafe specific terminology ahead of Unsafe.defineAnonymousClass deprecation
lfoltan
parents:
50858
diff
changeset
|
113 |
boolean isUnsafeAnonymous(); |
47668 | 114 |
|
43972 | 115 |
} |