Mercurial > hg > truffle
annotate c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java @ 2283:f21664b3dd1c
Keeping up-to-date with Maxine/CRI changes.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 11 Apr 2011 10:22:05 +0200 |
parents | 99ad52189524 |
children | 6190d20bd6d6 |
rev | line source |
---|---|
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
1 /* |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
3 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
5 * that is described in this document. In particular, and without limitation, these intellectual property |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
6 * rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
7 * more additional patents or pending patent applications in the U.S. and in other countries. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
8 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
10 * Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
11 * supplements. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
12 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
13 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
14 * registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
15 * are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
16 * U.S. and other countries. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
17 * |
1437
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open |
9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1433
diff
changeset
|
19 * Company, Ltd. |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
20 */ |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
21 package com.sun.hotspot.c1x; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
22 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
23 import com.sun.cri.ci.*; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
24 import com.sun.cri.ri.*; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
25 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
26 /** |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
27 * Implementation of RiType for unresolved HotSpot classes. |
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
28 * |
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
29 * @author Thomas Wuerthinger, Lukas Stadler |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
30 */ |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
31 public class HotSpotTypeUnresolved extends HotSpotType { |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
32 |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
33 public final String simpleName; |
1433
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
34 public final int dimensions; |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
35 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
36 /** |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
37 * Creates a new unresolved type for a specified type descriptor. |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
38 */ |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1480
diff
changeset
|
39 public HotSpotTypeUnresolved(String name) { |
1480
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
40 assert name.length() > 0 : "name cannot be empty"; |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
41 |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
42 int dimensions = 0; |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
43 // Decode name if necessary. |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
44 if (name.charAt(name.length() - 1) == ';') { |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
45 int startIndex = 0; |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
46 while (name.charAt(startIndex) == '[') { |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
47 startIndex++; |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
48 dimensions++; |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
49 } |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
50 assert name.charAt(startIndex) == 'L'; |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
51 this.simpleName = name.substring(startIndex + 1, name.length() - 1); |
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
52 this.name = name; |
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
53 } else { |
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
54 this.simpleName = name; |
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
55 this.name = getFullName(name, dimensions); |
1480
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
56 } |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
57 |
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
58 this.dimensions = dimensions; |
1433
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
59 } |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
60 |
1941
79d04223b8a5
Added caching for resolved types and resolved fields.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1480
diff
changeset
|
61 public HotSpotTypeUnresolved(String name, int dimensions) { |
1479
71cd4b9610eb
Two fixes for DaCapo / SpecJVM2008 runs.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1437
diff
changeset
|
62 assert dimensions >= 0; |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
63 this.simpleName = name; |
1433
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
64 this.dimensions = dimensions; |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
65 this.name = getFullName(name, dimensions); |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
66 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
67 |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
68 private String getFullName(String name, int dimensions) { |
1433
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
69 StringBuilder str = new StringBuilder(); |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
70 for (int i = 0; i < dimensions; i++) { |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
71 str.append('['); |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
72 } |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
73 str.append('L').append(simpleName).append(';'); |
1433
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
74 return str.toString(); |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
75 } |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
76 |
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
77 @Override |
2048
177398c6147d
Added unique concrete subtype assumption.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1941
diff
changeset
|
78 public RiType uniqueConcreteSubtype() { |
177398c6147d
Added unique concrete subtype assumption.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1941
diff
changeset
|
79 throw unresolved("uniqueConcreteSubtype"); |
177398c6147d
Added unique concrete subtype assumption.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1941
diff
changeset
|
80 } |
177398c6147d
Added unique concrete subtype assumption.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1941
diff
changeset
|
81 |
177398c6147d
Added unique concrete subtype assumption.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1941
diff
changeset
|
82 @Override |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
83 public Class<?> javaClass() { |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
84 throw unresolved("javaClass"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
85 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
86 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
87 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
88 public boolean hasSubclass() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
89 throw unresolved("hasSubclass()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
90 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
91 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
92 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
93 public boolean hasFinalizer() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
94 throw unresolved("hasFinalizer()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
95 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
96 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
97 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
98 public boolean hasFinalizableSubclass() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
99 throw unresolved("hasFinalizableSubclass()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
100 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
101 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
102 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
103 public boolean isInterface() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
104 throw unresolved("isInterface()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
105 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
106 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
107 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
108 public boolean isArrayClass() { |
1433
efba53f86c4f
various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1429
diff
changeset
|
109 return dimensions > 0; |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
110 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
111 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
112 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
113 public boolean isInstanceClass() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
114 throw unresolved("isInstanceClass()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
115 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
116 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
117 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
118 public int accessFlags() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
119 throw unresolved("accessFlags()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
120 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
121 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
122 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
123 public boolean isResolved() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
124 return false; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
125 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
126 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
127 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
128 public boolean isInitialized() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
129 throw unresolved("isInitialized()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
130 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
131 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
132 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
133 public boolean isSubtypeOf(RiType other) { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
134 throw unresolved("isSubtypeOf()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
135 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
136 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
137 @Override |
2283
f21664b3dd1c
Keeping up-to-date with Maxine/CRI changes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2055
diff
changeset
|
138 public boolean isInstance(CiConstant obj) { |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
139 throw unresolved("isInstance()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
140 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
141 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
142 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
143 public RiType componentType() { |
1480
2fe369533fed
Additional debug output.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1479
diff
changeset
|
144 assert isArrayClass() : "no array class" + name(); |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
145 return new HotSpotTypeUnresolved(simpleName, dimensions - 1); |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
146 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
147 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
148 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
149 public RiType exactType() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
150 throw unresolved("exactType()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
151 } |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1416
diff
changeset
|
152 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
153 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
154 public RiType arrayOf() { |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
155 return new HotSpotTypeUnresolved(simpleName, dimensions + 1); |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
156 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
157 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
158 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
159 public RiMethod resolveMethodImpl(RiMethod method) { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
160 throw unresolved("resolveMethodImpl()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
161 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
162 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
163 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
164 public CiKind kind() { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
165 return CiKind.Object; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
166 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
167 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
168 private CiUnresolvedException unresolved(String operation) { |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
169 throw new CiUnresolvedException(operation + " not defined for unresolved class " + simpleName); |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
170 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
171 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
172 @Override |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
173 public int hashCode() { |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
174 return simpleName.hashCode(); |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
175 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
176 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
177 @Override |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
178 public boolean equals(Object o) { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
179 return o == this; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
180 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
181 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
182 @Override |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
183 public String toString() { |
2055
99ad52189524
Refactorings to get towards less CRI overhead.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
2048
diff
changeset
|
184 return "HotSpotType<" + simpleName + ", unresolved>"; |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
185 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
186 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
187 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
188 public CiConstant getEncoding(RiType.Representation r) { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
189 throw unresolved("getEncoding()"); |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
190 } |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
191 |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
192 @Override |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
193 public CiKind getRepresentationKind(RiType.Representation r) { |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
194 return CiKind.Object; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
195 } |
1423
760213a60e8b
* rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
196 |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
197 } |