Mercurial > hg > truffle
annotate graal/Runtime/src/com/sun/hotspot/c1x/HotSpotField.java @ 2297:099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 22 Apr 2011 15:08:53 +0200 |
parents | |
children | 4e5515d09314 |
rev | line source |
---|---|
2297
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * that is described in this document. In particular, and without limitation, these intellectual property |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * more additional patents or pending patent applications in the U.S. and in other countries. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * supplements. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * U.S. and other countries. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Company, Ltd. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 */ |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 package com.sun.hotspot.c1x; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 import java.lang.reflect.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 import com.sun.c1x.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 import com.sun.cri.ci.CiConstant; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 import com.sun.cri.ci.CiKind; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 import com.sun.cri.ri.RiField; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 import com.sun.cri.ri.RiType; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 /** |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 * Represents a field in a HotSpot type. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 * @author Thomas Wuerthinger, Lukas Stadler |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 */ |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 public class HotSpotField extends CompilerObject implements RiField { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 private final RiType holder; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 private final String name; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 private final RiType type; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 private final int offset; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 private CiConstant constant; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
45 public HotSpotField(Compiler compiler, RiType holder, String name, RiType type, int offset) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 super(compiler); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 this.holder = holder; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 this.name = name; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 this.type = type; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 this.offset = offset; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 public int accessFlags() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 // TODO Auto-generated method stub |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 return 0; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 public CiConstant constantValue(CiConstant receiver) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 if (receiver == null) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 if (constant == null && holder.isResolved() && holder.isSubtypeOf(compiler.getVMEntries().getType(C1XOptions.class))) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 Field f; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 try { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 f = C1XOptions.class.getField(name); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 } catch (SecurityException e1) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 } catch (NoSuchFieldException e1) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 f.setAccessible(true); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 if (Modifier.isStatic(f.getModifiers())) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 CiKind kind = CiKind.fromJavaClass(f.getType()); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 Object value; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 try { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
76 value = f.get(null); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 } catch (IllegalArgumentException e) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 } catch (IllegalAccessException e) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 constant = CiConstant.forBoxed(kind, value); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
84 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
85 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 // Constant part only valid for static fields. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
87 return constant; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
92 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
93 public RiType holder() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 return holder; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
95 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
97 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 public boolean equals(Object obj) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 if (obj instanceof HotSpotField) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 HotSpotField other = (HotSpotField) obj; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 return other.offset == offset && other.holder.equals(holder()); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
102 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 return false; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
105 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
107 public boolean isResolved() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
108 return offset != -1; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 public CiKind kind() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 return type().kind(); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 public String name() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
118 return name; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
119 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 public RiType type() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
123 return type; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 public int offset() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
127 return offset; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
128 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
129 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
131 public String toString() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
132 return "HotSpotField<" + holder.name() + "." + name + ">"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
133 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
134 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 } |