Mercurial > hg > graal-compiler
comparison graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedObjectType.java @ 21551:5324104ac4f3
moved com.oracle.graal.hotspot.jvmci classes to com.oracle.jvmci.hotspot module (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 26 May 2015 17:13:37 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
21550:f48a6cea31eb | 21551:5324104ac4f3 |
---|---|
1 /* | |
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.oracle.jvmci.hotspot; | |
24 | |
25 import com.oracle.graal.api.meta.Assumptions.AssumptionResult; | |
26 import com.oracle.graal.api.meta.*; | |
27 | |
28 /** | |
29 * Implementation of {@link JavaType} for resolved non-primitive HotSpot classes. | |
30 */ | |
31 public interface HotSpotResolvedObjectType extends ResolvedJavaType { | |
32 | |
33 HotSpotResolvedObjectType getArrayClass(); | |
34 | |
35 ResolvedJavaType getComponentType(); | |
36 | |
37 AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype(); | |
38 | |
39 HotSpotResolvedObjectType getSuperclass(); | |
40 | |
41 HotSpotResolvedObjectType[] getInterfaces(); | |
42 | |
43 HotSpotResolvedObjectType getSupertype(); | |
44 | |
45 HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType); | |
46 | |
47 HotSpotResolvedObjectType asExactType(); | |
48 | |
49 default boolean isPrimitive() { | |
50 return false; | |
51 } | |
52 | |
53 default Kind getKind() { | |
54 return Kind.Object; | |
55 } | |
56 | |
57 ConstantPool constantPool(); | |
58 | |
59 /** | |
60 * Gets the instance size of this type. If an instance of this type cannot be fast path | |
61 * allocated, then the returned value is negative (its absolute value gives the size). Must not | |
62 * be called if this is an array or interface type. | |
63 */ | |
64 int instanceSize(); | |
65 | |
66 int getVtableLength(); | |
67 | |
68 @Override | |
69 AssumptionResult<ResolvedJavaMethod> findUniqueConcreteMethod(ResolvedJavaMethod method); | |
70 | |
71 /** | |
72 * Performs a fast-path check that this type is resolved in the context of a given accessing | |
73 * class. A negative result does not mean this type is not resolved with respect to | |
74 * {@code accessingClass}. That can only be determined by | |
75 * {@linkplain HotSpotJVMCIRuntime#lookupType(String, HotSpotResolvedObjectType, boolean) | |
76 * re-resolving} the type. | |
77 */ | |
78 boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass); | |
79 | |
80 /** | |
81 * Gets the metaspace Klass boxed in a {@link JavaConstant}. | |
82 */ | |
83 Constant klass(); | |
84 | |
85 boolean isPrimaryType(); | |
86 | |
87 int superCheckOffset(); | |
88 | |
89 long prototypeMarkWord(); | |
90 | |
91 HotSpotResolvedObjectType getEnclosingType(); | |
92 | |
93 ResolvedJavaMethod getClassInitializer(); | |
94 | |
95 ResolvedJavaField createField(String name, JavaType type, long offset, int modifiers); | |
96 } |