Mercurial > hg > graal-compiler
annotate graal/Runtime/src/com/oracle/graal/runtime/HotSpotField.java @ 2502:3e3e8bd12730
Copyright rebranding. Update checkstyle file.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 26 Apr 2011 21:48:09 +0200 |
parents | 6594e6d8bfe7 |
children | 6bc5ec0255df |
rev | line source |
---|---|
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
7 * published by the Free Software Foundation. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
13 * accompanied this code). |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
21 * questions. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 package com.oracle.graal.runtime; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 import java.lang.reflect.*; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 import com.sun.c1x.*; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 import com.sun.cri.ci.CiConstant; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 import com.sun.cri.ci.CiKind; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 import com.sun.cri.ri.RiField; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 import com.sun.cri.ri.RiType; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 /** |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 * Represents a field in a HotSpot type. |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 * |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 * @author Thomas Wuerthinger, Lukas Stadler |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 */ |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 public class HotSpotField extends CompilerObject implements RiField { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 private final RiType holder; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 private final String name; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 private final RiType type; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 private final int offset; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
45 private final int accessFlags; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 private CiConstant constant; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 public HotSpotField(Compiler compiler, RiType holder, String name, RiType type, int offset, int accessFlags) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 super(compiler); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 this.holder = holder; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 this.name = name; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 this.type = type; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 this.offset = offset; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 this.accessFlags = accessFlags; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 public int accessFlags() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 return accessFlags; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 public CiConstant constantValue(CiConstant receiver) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 if (receiver == null) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 if (constant == null && holder.isResolved() && holder.isSubtypeOf(compiler.getVMEntries().getType(C1XOptions.class))) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 Field f; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 try { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 f = C1XOptions.class.getField(name); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 } catch (SecurityException e1) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 } catch (NoSuchFieldException e1) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 f.setAccessible(true); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 if (Modifier.isStatic(f.getModifiers())) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
76 CiKind kind = CiKind.fromJavaClass(f.getType()); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 Object value; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 try { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 value = f.get(null); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 } catch (IllegalArgumentException e) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 } catch (IllegalAccessException e) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
84 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
85 constant = CiConstant.forBoxed(kind, value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
87 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 // Constant part only valid for static fields. |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 return constant; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
92 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
93 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
95 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 public RiType holder() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
97 return holder; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 public boolean equals(Object obj) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
102 if (obj instanceof HotSpotField) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 HotSpotField other = (HotSpotField) obj; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 return other.offset == offset && other.holder.equals(holder()); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
105 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 return false; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
107 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
108 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 public boolean isResolved() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 return offset != -1; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 public CiKind kind() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 return type().kind(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
118 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
119 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 public String name() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 return name; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
123 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 public RiType type() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 return type; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
127 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
128 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
129 public int offset() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 return offset; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
131 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
132 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
133 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
134 public String toString() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 return "HotSpotField<" + holder.name() + "." + name + ">"; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
136 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
137 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
138 } |