Mercurial > hg > graal-compiler
annotate graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotField.java @ 3528:6b841b6b2437
First round of refactoring.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Tue, 09 Aug 2011 23:56:10 +0200 |
parents | b9ed7199f6fb |
children |
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 |
2874
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
24 package com.oracle.max.graal.runtime; |
2501
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 |
2874
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
28 import com.oracle.max.graal.compiler.*; |
3487
b9ed7199f6fb
special handling for VirtualObject(Field) in IdentifyBlocksPhase (don't schedule out of loops), better toString for HotSpotMethod/Field
Lukas Stadler <lukas.stadler@jku.at>
parents:
3098
diff
changeset
|
29 import com.sun.cri.ci.*; |
3528
6b841b6b2437
First round of refactoring.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
3487
diff
changeset
|
30 import com.sun.cri.ri.*; |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 /** |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 * Represents a field in a HotSpot type. |
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 public class HotSpotField extends CompilerObject implements RiField { |
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 private final RiType holder; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 private final String name; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 private final RiType type; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 private final int offset; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 private final int accessFlags; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 private CiConstant constant; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 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
|
45 super(compiler); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 this.holder = holder; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 this.name = name; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 this.type = type; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 this.offset = offset; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 this.accessFlags = accessFlags; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 public int accessFlags() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 return accessFlags; |
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 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 public CiConstant constantValue(CiConstant receiver) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 if (receiver == null) { |
2888
224412c24426
Changed C1X=>Graal and c1x=>graal in Java code.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2874
diff
changeset
|
61 if (constant == null && holder.isResolved() && holder.isSubtypeOf(compiler.getVMEntries().getType(GraalOptions.class))) { |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 Field f; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 try { |
2888
224412c24426
Changed C1X=>Graal and c1x=>graal in Java code.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2874
diff
changeset
|
64 f = GraalOptions.class.getField(name); |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 } catch (SecurityException e1) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 } catch (NoSuchFieldException e1) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 f.setAccessible(true); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 if (Modifier.isStatic(f.getModifiers())) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 CiKind kind = CiKind.fromJavaClass(f.getType()); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 Object value; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 try { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 value = f.get(null); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
76 } catch (IllegalArgumentException e) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 } catch (IllegalAccessException e) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 constant = CiConstant.forBoxed(kind, value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 } |
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 part only valid for static fields. |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 return constant; |
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 return null; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
92 public RiType holder() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
93 return holder; |
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 |
3098
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
96 // @Override |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
97 // public boolean equals(Object obj) { |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
98 // if (obj instanceof HotSpotField) { |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
99 // HotSpotField other = (HotSpotField) obj; |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
100 // return other.offset == offset && other.holder.equals(holder()); |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
101 // } |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
102 // return false; |
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
103 // } |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
105 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 public boolean isResolved() { |
3098
2fb14099d069
fix for unresolved exception bug, exactType and declaredType logic for inlining, more on escape analysis
Lukas Stadler <lukas.stadler@jku.at>
parents:
2888
diff
changeset
|
107 return holder.isResolved(); |
2501
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 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 public CiKind kind() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 return type().kind(); |
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 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 public String name() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 return name; |
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 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 public RiType type() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 return type; |
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 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 public int offset() { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 return offset; |
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 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 public String toString() { |
3487
b9ed7199f6fb
special handling for VirtualObject(Field) in IdentifyBlocksPhase (don't schedule out of loops), better toString for HotSpotMethod/Field
Lukas Stadler <lukas.stadler@jku.at>
parents:
3098
diff
changeset
|
131 return "HotSpotField<" + CiUtil.format("%h.%n", this, false) + ":" + offset + ">"; |
2501
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 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
134 } |