Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java @ 1420:44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Tue, 13 Jul 2010 11:47:55 -0700 |
parents | 2c41834aa270 |
children | 6223633ce7dd |
comparison
equal
deleted
inserted
replaced
1419:7bf6a77b9c5a | 1420:44efca8a02d6 |
---|---|
6 import com.sun.cri.ri.RiMethod; | 6 import com.sun.cri.ri.RiMethod; |
7 import com.sun.cri.ri.RiSignature; | 7 import com.sun.cri.ri.RiSignature; |
8 import com.sun.cri.ri.RiType; | 8 import com.sun.cri.ri.RiType; |
9 | 9 |
10 public class HotSpotConstantPool implements RiConstantPool { | 10 public class HotSpotConstantPool implements RiConstantPool { |
11 | |
12 private final Object constantPoolOop; | |
13 | |
14 public HotSpotConstantPool(Object o) { | |
15 this.constantPoolOop = o; | |
16 } | |
17 | 11 |
18 @Override | 12 private final Object constantPoolOop; |
19 public CiConstant encoding() { | |
20 // TODO: Check if this is correct. | |
21 return CiConstant.forObject(constantPoolOop); | |
22 } | |
23 | 13 |
24 @Override | 14 public HotSpotConstantPool(Object o) { |
25 public Object lookupConstant(int cpi) { | 15 this.constantPoolOop = o; |
26 return VMEntries.RiConstantPool_lookupConstant(constantPoolOop, cpi); | 16 } |
27 } | |
28 | 17 |
29 @Override | 18 @Override |
30 public RiMethod lookupMethod(int cpi, int byteCode) { | 19 public CiConstant encoding() { |
31 return VMEntries.RiConstantPool_lookupMethod(constantPoolOop, cpi, (byte)byteCode); | 20 // TODO: Check if this is correct. |
32 } | 21 return CiConstant.forObject(constantPoolOop); |
22 } | |
33 | 23 |
34 @Override | 24 @Override |
35 public RiSignature lookupSignature(int cpi) { | 25 public Object lookupConstant(int cpi) { |
36 return VMEntries.RiConstantPool_lookupSignature(constantPoolOop, cpi); | 26 return VMEntries.RiConstantPool_lookupConstant(constantPoolOop, cpi); |
37 } | 27 } |
38 | 28 |
39 @Override | 29 @Override |
40 public RiType lookupType(int cpi, int opcode) { | 30 public RiMethod lookupMethod(int cpi, int byteCode) { |
41 return VMEntries.RiConstantPool_lookupType(constantPoolOop, cpi); | 31 return VMEntries.RiConstantPool_lookupMethod(constantPoolOop, cpi, (byte) byteCode); |
42 } | 32 } |
43 | 33 |
44 @Override | 34 @Override |
45 public RiField lookupField(int cpi, int opcode) { | 35 public RiSignature lookupSignature(int cpi) { |
46 return VMEntries.RiConstantPool_lookupField(constantPoolOop, cpi); | 36 return VMEntries.RiConstantPool_lookupSignature(constantPoolOop, cpi); |
47 } | 37 } |
38 | |
39 @Override | |
40 public RiType lookupType(int cpi, int opcode) { | |
41 return VMEntries.RiConstantPool_lookupType(constantPoolOop, cpi); | |
42 } | |
43 | |
44 @Override | |
45 public RiField lookupField(int cpi, int opcode) { | |
46 return VMEntries.RiConstantPool_lookupField(constantPoolOop, cpi); | |
47 } | |
48 | 48 |
49 } | 49 } |