comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedObjectType.java @ 21526:1da7aef31a08

created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Tue, 19 May 2015 23:16:07 +0200
parents graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java@deab43a789ad
children
comparison
equal deleted inserted replaced
21489:b3f1d8b23037 21526:1da7aef31a08
1 /*
2 * Copyright (c) 2011, 2014, 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.graal.hotspot.jvmci;
24
25 import com.oracle.graal.api.meta.*;
26 import com.oracle.graal.api.meta.Assumptions.AssumptionResult;
27 import com.oracle.graal.hotspot.*;
28
29 /**
30 * Implementation of {@link JavaType} for resolved non-primitive HotSpot classes.
31 */
32 public interface HotSpotResolvedObjectType extends ResolvedJavaType {
33
34 HotSpotResolvedObjectType getArrayClass();
35
36 ResolvedJavaType getComponentType();
37
38 AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype();
39
40 HotSpotResolvedObjectType getSuperclass();
41
42 HotSpotResolvedObjectType[] getInterfaces();
43
44 HotSpotResolvedObjectType getSupertype();
45
46 HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType);
47
48 HotSpotResolvedObjectType asExactType();
49
50 default boolean isPrimitive() {
51 return false;
52 }
53
54 default Kind getKind() {
55 return Kind.Object;
56 }
57
58 ConstantPool constantPool();
59
60 /**
61 * Gets the instance size of this type. If an instance of this type cannot be fast path
62 * allocated, then the returned value is negative (its absolute value gives the size). Must not
63 * be called if this is an array or interface type.
64 */
65 int instanceSize();
66
67 int getVtableLength();
68
69 @Override
70 AssumptionResult<ResolvedJavaMethod> findUniqueConcreteMethod(ResolvedJavaMethod method);
71
72 /**
73 * Performs a fast-path check that this type is resolved in the context of a given accessing
74 * class. A negative result does not mean this type is not resolved with respect to
75 * {@code accessingClass}. That can only be determined by
76 * {@linkplain HotSpotGraalRuntime#lookupType(String, HotSpotResolvedObjectType, boolean)
77 * re-resolving} the type.
78 */
79 boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass);
80
81 /**
82 * Gets the metaspace Klass boxed in a {@link JavaConstant}.
83 */
84 Constant klass();
85
86 boolean isPrimaryType();
87
88 int superCheckOffset();
89
90 long prototypeMarkWord();
91
92 HotSpotResolvedObjectType getEnclosingType();
93
94 ResolvedJavaMethod getClassInitializer();
95
96 ResolvedJavaField createField(String name, JavaType type, long offset, int modifiers);
97 }