Mercurial > hg > graal-compiler
annotate graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedObjectType.java @ 21563:4f63449b4422
revived post option parsing handler notification
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 29 May 2015 00:06:22 +0200 |
parents | 48c1ebd24120 |
children |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
19801
diff
changeset
|
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
19801
diff
changeset
|
23 package com.oracle.jvmci.hotspot; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
21556
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21552
diff
changeset
|
25 import com.oracle.jvmci.meta.Assumptions.AssumptionResult; |
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21552
diff
changeset
|
26 import com.oracle.jvmci.meta.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 /** |
5775
2c088af17e59
Removed left over Ri* prefixed identifiers
Doug Simon <doug.simon@oracle.com>
parents:
5760
diff
changeset
|
29 * Implementation of {@link JavaType} for resolved non-primitive HotSpot classes. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 */ |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
31 public interface HotSpotResolvedObjectType extends ResolvedJavaType { |
18167
2bf5ea10eea7
sharpened return types for HotSpot specific Graal API implementations
Doug Simon <doug.simon@oracle.com>
parents:
17156
diff
changeset
|
32 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
33 HotSpotResolvedObjectType getArrayClass(); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
34 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
35 ResolvedJavaType getComponentType(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
37 AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
39 HotSpotResolvedObjectType getSuperclass(); |
13478
fe03864a2c72
replaced CompilerToVM.getUniqueImplementor with getKlassImplementor and moved the logic into Java
twisti
parents:
13375
diff
changeset
|
40 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
41 HotSpotResolvedObjectType[] getInterfaces(); |
13478
fe03864a2c72
replaced CompilerToVM.getUniqueImplementor with getKlassImplementor and moved the logic into Java
twisti
parents:
13375
diff
changeset
|
42 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
43 HotSpotResolvedObjectType getSupertype(); |
18182
e8c54fd622a4
Add ResolvedJavaType.getImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18176
diff
changeset
|
44 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
45 HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType); |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
7030
diff
changeset
|
46 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
47 HotSpotResolvedObjectType asExactType(); |
4635
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4484
diff
changeset
|
48 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
49 default boolean isPrimitive() { |
7059
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
50 return false; |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
51 } |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
52 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
53 default Kind getKind() { |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
54 return Kind.Object; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
57 ConstantPool constantPool(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 |
5616
310ed6650682
added check to ensure fast path allocation is never used for types that don't allow it
Doug Simon <doug.simon@oracle.com>
parents:
5554
diff
changeset
|
59 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7359
diff
changeset
|
60 * Gets the instance size of this type. If an instance of this type cannot be fast path |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7359
diff
changeset
|
61 * allocated, then the returned value is negative (its absolute value gives the size). Must not |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7359
diff
changeset
|
62 * be called if this is an array or interface type. |
5616
310ed6650682
added check to ensure fast path allocation is never used for types that don't allow it
Doug Simon <doug.simon@oracle.com>
parents:
5554
diff
changeset
|
63 */ |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
64 int instanceSize(); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
65 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
66 int getVtableLength(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 @Override |
19800
3362ba500371
Connect required Assumptions with answer to CHA query
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
18544
diff
changeset
|
69 AssumptionResult<ResolvedJavaMethod> findUniqueConcreteMethod(ResolvedJavaMethod method); |
4484
14a00ee82980
Implement eager type resolving.
Andreas Woess <andreas.woess@jku.at>
parents:
4433
diff
changeset
|
70 |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
71 /** |
16575
adafceb4da4a
improved name and documentation for method implementing fast-path check for type resolution
Doug Simon <doug.simon@oracle.com>
parents:
16492
diff
changeset
|
72 * Performs a fast-path check that this type is resolved in the context of a given accessing |
adafceb4da4a
improved name and documentation for method implementing fast-path check for type resolution
Doug Simon <doug.simon@oracle.com>
parents:
16492
diff
changeset
|
73 * class. A negative result does not mean this type is not resolved with respect to |
adafceb4da4a
improved name and documentation for method implementing fast-path check for type resolution
Doug Simon <doug.simon@oracle.com>
parents:
16492
diff
changeset
|
74 * {@code accessingClass}. That can only be determined by |
21552
9579a3c62a9e
use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
19801
diff
changeset
|
75 * {@linkplain HotSpotJVMCIRuntime#lookupType(String, HotSpotResolvedObjectType, boolean) |
16575
adafceb4da4a
improved name and documentation for method implementing fast-path check for type resolution
Doug Simon <doug.simon@oracle.com>
parents:
16492
diff
changeset
|
76 * re-resolving} the type. |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
77 */ |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
78 boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass); |
5326
a53162ca8219
introduced HotSpotKlassOop type to convey a klassOop value from the compiler to the C++ code instead of relying on the C++ code automagically converting a HotSpotTypeResolvedImpl value to a klassOop
Doug Simon <doug.simon@oracle.com>
parents:
5287
diff
changeset
|
79 |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
7030
diff
changeset
|
80 /** |
18187
9619ba4daf4c
Rename Constant to JavaConstant.
Roland Schatz <roland.schatz@oracle.com>
parents:
18182
diff
changeset
|
81 * Gets the metaspace Klass boxed in a {@link JavaConstant}. |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
7030
diff
changeset
|
82 */ |
18362
ea0fbb571466
Use pointer stamps in LoadHub and LoadMethod.
Roland Schatz <roland.schatz@oracle.com>
parents:
18223
diff
changeset
|
83 Constant klass(); |
7049
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
84 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
85 boolean isPrimaryType(); |
7819
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7530
diff
changeset
|
86 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
87 int superCheckOffset(); |
7829
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
88 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
89 long prototypeMarkWord(); |
9100
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
8959
diff
changeset
|
90 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
91 HotSpotResolvedObjectType getEnclosingType(); |
9100
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
8959
diff
changeset
|
92 |
18223
17c98fad6980
converted HotSpotResolvedObjectType to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18222
diff
changeset
|
93 ResolvedJavaMethod getClassInitializer(); |
18544
17b5e453ab41
replaced concrete types with interface types to support replay compilation
Doug Simon <doug.simon@oracle.com>
parents:
18362
diff
changeset
|
94 |
17b5e453ab41
replaced concrete types with interface types to support replay compilation
Doug Simon <doug.simon@oracle.com>
parents:
18362
diff
changeset
|
95 ResolvedJavaField createField(String name, JavaType type, long offset, int modifiers); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 } |