Mercurial > hg > truffle
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedPrimitiveType.java @ 17156:ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 18 Sep 2014 17:42:46 +0200 |
parents | 8853b9304083 |
children | 2bf5ea10eea7 |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
7819
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7530
diff
changeset
|
2 * Copyright (c) 2011, 2013, 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 */ |
5548
8872bc0eebdf
Renaming hotspot.ri => hotspot.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5545
diff
changeset
|
23 package com.oracle.graal.hotspot.meta; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
25 import static java.util.Objects.*; |
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
26 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 import java.lang.annotation.*; |
4566 | 28 import java.lang.reflect.*; |
7828
49921d2ee9ce
class file path retrieval returns URL
Michael Haupt <michael.haupt@oracle.com>
parents:
7819
diff
changeset
|
29 import java.net.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 |
5507
dc71b06d09f8
Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5504
diff
changeset
|
31 import com.oracle.graal.api.meta.*; |
15193
96bb07a5d667
Spit up and move GraalInternalError.
Josef Eisl <josef.eisl@jku.at>
parents:
15018
diff
changeset
|
32 import com.oracle.graal.compiler.common.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 /** |
5775
2c088af17e59
Removed left over Ri* prefixed identifiers
Doug Simon <doug.simon@oracle.com>
parents:
5682
diff
changeset
|
35 * Implementation of {@link JavaType} for primitive HotSpot types. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 */ |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7083
diff
changeset
|
37 public final class HotSpotResolvedPrimitiveType extends HotSpotResolvedJavaType { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 |
4142
bc8527f3071c
Adjust code base to new level of warnings.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3733
diff
changeset
|
39 private static final long serialVersionUID = -6208552348908071473L; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
40 private final Kind kind; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 |
13479 | 42 /** |
43 * Gets the Graal mirror for a {@link Kind}. | |
15839
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
44 * |
13479 | 45 * @return the {@link HotSpotResolvedObjectType} corresponding to {@code kind} |
46 */ | |
47 public static ResolvedJavaType fromKind(Kind kind) { | |
48 Class<?> javaClass = kind.toJavaClass(); | |
49 return fromClass(javaClass); | |
50 } | |
51 | |
52 /** | |
53 * Creates the Graal mirror for a primitive {@link Kind}. | |
15839
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
54 * |
13479 | 55 * <p> |
56 * <b>NOTE</b>: Creating an instance of this class does not install the mirror for the | |
57 * {@link Class} type. Use {@link #fromKind(Kind)} or {@link #fromClass(Class)} instead. | |
58 * </p> | |
15839
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
59 * |
13479 | 60 * @param kind the Kind to create the mirror for |
61 */ | |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7083
diff
changeset
|
62 public HotSpotResolvedPrimitiveType(Kind kind) { |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
63 super(String.valueOf(Character.toUpperCase(kind.getTypeChar()))); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 this.kind = kind; |
14090
98e0e315d727
removed java.lang.Class fields in HotSpotResolvedPrimitiveType
Doug Simon <doug.simon@oracle.com>
parents:
13479
diff
changeset
|
65 assert mirror().isPrimitive() : mirror() + " not a primitive type"; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 } |
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 |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
69 public int getModifiers() { |
4566 | 70 return Modifier.ABSTRACT | Modifier.FINAL | Modifier.PUBLIC; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
74 public ResolvedJavaType getArrayClass() { |
14157 | 75 if (kind == Kind.Void) { |
76 return null; | |
77 } | |
78 Class<?> javaArrayMirror = Array.newInstance(mirror(), 0).getClass(); | |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7083
diff
changeset
|
79 return HotSpotResolvedObjectType.fromClass(javaArrayMirror); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
82 public ResolvedJavaType getElementalType() { |
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
83 return this; |
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
84 } |
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
85 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
87 public ResolvedJavaType getComponentType() { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 return null; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
92 public ResolvedJavaType asExactType() { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
93 return this; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
95 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
97 public ResolvedJavaType getSuperclass() { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 return null; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 @Override |
6699
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
102 public ResolvedJavaType[] getInterfaces() { |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
103 return new ResolvedJavaType[0]; |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
104 } |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
105 |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
106 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
107 public ResolvedJavaType findLeastCommonAncestor(ResolvedJavaType otherType) { |
4635
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4566
diff
changeset
|
108 return null; |
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4566
diff
changeset
|
109 } |
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4566
diff
changeset
|
110 |
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4566
diff
changeset
|
111 @Override |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
112 public Constant getEncoding(Representation r) { |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7083
diff
changeset
|
113 throw GraalInternalError.unimplemented("HotSpotResolvedPrimitiveType.getEncoding"); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 @Override |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 public boolean hasFinalizableSubclass() { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
118 return false; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
119 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 @Override |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 public boolean hasFinalizer() { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
123 return false; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 @Override |
7060
06d5f450f32b
rename: ResolvedJavaType.isArrayClass() -> ResolvedJavaType.isArray()
Doug Simon <doug.simon@oracle.com>
parents:
7059
diff
changeset
|
127 public boolean isArray() { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
128 return false; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
129 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
131 @Override |
7059
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
132 public boolean isPrimitive() { |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
133 return true; |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
134 } |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
135 |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
136 @Override |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
137 public boolean isInitialized() { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
138 return true; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
139 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
140 |
11520
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9835
diff
changeset
|
141 public boolean isLinked() { |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9835
diff
changeset
|
142 return true; |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9835
diff
changeset
|
143 } |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9835
diff
changeset
|
144 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
145 @Override |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
146 public boolean isInstance(Constant obj) { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
147 return false; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
148 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
149 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
150 @Override |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
151 public boolean isInstanceClass() { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
152 return false; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
153 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
154 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
155 @Override |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
156 public boolean isInterface() { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
157 return false; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
158 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
159 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
160 @Override |
7097
6644cecbd3a7
Replace ResolvedJavaType.isAssignableTo with isAssignableFrom to be consistent with java.lang.Class
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7096
diff
changeset
|
161 public boolean isAssignableFrom(ResolvedJavaType other) { |
9835
fcfedd3dd2eb
ResolvedJavaType.isAssignableFrom must not be called with null argument. Check that with assertions in HotSpot implementation.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9100
diff
changeset
|
162 assert other != null; |
14160
fd7fcd2d2072
replaced == with .equals() for comparisons between JavaMethod/JavaField/JavaType values
Doug Simon <doug.simon@oracle.com>
parents:
14157
diff
changeset
|
163 return other.equals(this); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
164 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
165 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
166 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
167 public Kind getKind() { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
168 return kind; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
169 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
170 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
171 @Override |
16491
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
172 public boolean isJavaLangObject() { |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
173 return false; |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
174 } |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
175 |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
176 @Override |
15722
c583759bbcfd
ResolvedJavaType.resolveMethod now takes a callerType that is used to check access rules. Make it work for default methods.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15193
diff
changeset
|
177 public ResolvedJavaMethod resolveMethod(ResolvedJavaMethod method, ResolvedJavaType callerType) { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
178 return null; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
179 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
180 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
181 @Override |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
182 public String toString() { |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7083
diff
changeset
|
183 return "HotSpotResolvedPrimitiveType<" + kind + ">"; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
184 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
185 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
186 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
187 public ResolvedJavaType findUniqueConcreteSubtype() { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
188 return this; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
189 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
190 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
191 @Override |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6293
diff
changeset
|
192 public ResolvedJavaMethod findUniqueConcreteMethod(ResolvedJavaMethod method) { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
193 return null; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
194 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
195 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
196 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
197 public ResolvedJavaField[] getInstanceFields(boolean includeSuperclasses) { |
6293
6550737d7807
an empty array is now returned by ResolvedJavaType.declaredFields() for array and primitive types
Doug Simon <doug.simon@oracle.com>
parents:
5775
diff
changeset
|
198 return new ResolvedJavaField[0]; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
199 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
200 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
201 @Override |
15839
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
202 public ResolvedJavaField[] getStaticFields() { |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
203 return new ResolvedJavaField[0]; |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
204 } |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
205 |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15722
diff
changeset
|
206 @Override |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
207 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { |
14090
98e0e315d727
removed java.lang.Class fields in HotSpotResolvedPrimitiveType
Doug Simon <doug.simon@oracle.com>
parents:
13479
diff
changeset
|
208 return null; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
209 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
210 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
211 @Override |
5541
b4c406861c33
More renamings to drop Ri* prefix completely. Deleted graph.BitMap class and replaced with java.util.BitSet.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5540
diff
changeset
|
212 public ResolvedJavaType resolve(ResolvedJavaType accessingClass) { |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
213 requireNonNull(accessingClass); |
4484
14a00ee82980
Implement eager type resolving.
Andreas Woess <andreas.woess@jku.at>
parents:
4199
diff
changeset
|
214 return this; |
14a00ee82980
Implement eager type resolving.
Andreas Woess <andreas.woess@jku.at>
parents:
4199
diff
changeset
|
215 } |
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:
5321
diff
changeset
|
216 |
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:
5321
diff
changeset
|
217 @Override |
6549
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
218 public void initialize() { |
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
219 } |
7049
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
220 |
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
221 @Override |
7057
c37022832f1a
rename: findFieldWithOffset -> findInstanceFieldWithOffset
Doug Simon <doug.simon@oracle.com>
parents:
7055
diff
changeset
|
222 public ResolvedJavaField findInstanceFieldWithOffset(long offset) { |
7049
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
223 return null; |
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
224 } |
7055 | 225 |
226 @Override | |
7310
79a7b761755c
Added getLineNumberTable and getFileName capabilities.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7098
diff
changeset
|
227 public String getSourceFileName() { |
79a7b761755c
Added getLineNumberTable and getFileName capabilities.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7098
diff
changeset
|
228 throw GraalInternalError.shouldNotReachHere(); |
79a7b761755c
Added getLineNumberTable and getFileName capabilities.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7098
diff
changeset
|
229 } |
79a7b761755c
Added getLineNumberTable and getFileName capabilities.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7098
diff
changeset
|
230 |
79a7b761755c
Added getLineNumberTable and getFileName capabilities.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7098
diff
changeset
|
231 @Override |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7310
diff
changeset
|
232 public Class<?> mirror() { |
14090
98e0e315d727
removed java.lang.Class fields in HotSpotResolvedPrimitiveType
Doug Simon <doug.simon@oracle.com>
parents:
13479
diff
changeset
|
233 return kind.toJavaClass(); |
7053
014727292ae0
removed more usages of ResolvedJavaType.toJava()
Doug Simon <doug.simon@oracle.com>
parents:
7037
diff
changeset
|
234 } |
7819
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7530
diff
changeset
|
235 |
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7530
diff
changeset
|
236 @Override |
7828
49921d2ee9ce
class file path retrieval returns URL
Michael Haupt <michael.haupt@oracle.com>
parents:
7819
diff
changeset
|
237 public URL getClassFilePath() { |
7819
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7530
diff
changeset
|
238 return null; |
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7530
diff
changeset
|
239 } |
7829
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
240 |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
241 @Override |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
242 public boolean isLocal() { |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
243 return false; |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
244 } |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
245 |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
246 @Override |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
247 public boolean isMember() { |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
248 return false; |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
249 } |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
250 |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
251 @Override |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
252 public ResolvedJavaType getEnclosingType() { |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
253 return null; |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
254 } |
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:
7829
diff
changeset
|
255 |
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:
7829
diff
changeset
|
256 @Override |
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:
7829
diff
changeset
|
257 public ResolvedJavaMethod[] getDeclaredConstructors() { |
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:
7829
diff
changeset
|
258 return new ResolvedJavaMethod[0]; |
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:
7829
diff
changeset
|
259 } |
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:
7829
diff
changeset
|
260 |
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:
7829
diff
changeset
|
261 @Override |
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:
7829
diff
changeset
|
262 public ResolvedJavaMethod[] getDeclaredMethods() { |
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:
7829
diff
changeset
|
263 return new ResolvedJavaMethod[0]; |
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:
7829
diff
changeset
|
264 } |
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:
7829
diff
changeset
|
265 |
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:
7829
diff
changeset
|
266 @Override |
11952
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11520
diff
changeset
|
267 public ResolvedJavaMethod getClassInitializer() { |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11520
diff
changeset
|
268 return null; |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11520
diff
changeset
|
269 } |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11520
diff
changeset
|
270 |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11520
diff
changeset
|
271 @Override |
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:
7829
diff
changeset
|
272 public Constant newArray(int length) { |
15018
db4254246f9a
Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
14160
diff
changeset
|
273 return HotSpotObjectConstant.forObject(Array.newInstance(mirror(), length)); |
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:
7829
diff
changeset
|
274 } |
17156
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
275 |
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
276 @Override |
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
277 public boolean isTrustedInterfaceType() { |
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
278 return false; |
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
279 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
280 } |