Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java @ 1416:1b41af477605
Added HotSpotVM project Java source files.
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Wed, 23 Jun 2010 16:36:58 +0200 |
parents | |
children | 2c41834aa270 |
comparison
equal
deleted
inserted
replaced
1415:712c7ff1afc1 | 1416:1b41af477605 |
---|---|
1 package com.sun.hotspot.c1x; | |
2 | |
3 import com.sun.cri.ci.CiConstant; | |
4 import com.sun.cri.ri.RiConstantPool; | |
5 import com.sun.cri.ri.RiField; | |
6 import com.sun.cri.ri.RiMethod; | |
7 import com.sun.cri.ri.RiSignature; | |
8 import com.sun.cri.ri.RiType; | |
9 | |
10 public class HotSpotConstantPool implements RiConstantPool { | |
11 | |
12 private final Object constantPoolOop; | |
13 | |
14 public HotSpotConstantPool(Object o) { | |
15 this.constantPoolOop = o; | |
16 } | |
17 | |
18 @Override | |
19 public CiConstant encoding() { | |
20 // TODO: Check if this is correct. | |
21 return CiConstant.forObject(constantPoolOop); | |
22 } | |
23 | |
24 @Override | |
25 public Object lookupConstant(int cpi) { | |
26 return VMEntries.RiConstantPool_lookupConstant(constantPoolOop, cpi); | |
27 } | |
28 | |
29 @Override | |
30 public RiMethod lookupMethod(int cpi, byte byteCode) { | |
31 return VMEntries.RiConstantPool_lookupMethod(constantPoolOop, cpi, byteCode); | |
32 } | |
33 | |
34 @Override | |
35 public RiSignature lookupSignature(int cpi) { | |
36 return VMEntries.RiConstantPool_lookupSignature(constantPoolOop, cpi); | |
37 } | |
38 | |
39 @Override | |
40 public RiType lookupType(int cpi) { | |
41 return VMEntries.RiConstantPool_lookupType(constantPoolOop, cpi); | |
42 } | |
43 | |
44 @Override | |
45 public RiField lookupField(int cpi) { | |
46 return VMEntries.RiConstantPool_lookupField(constantPoolOop, cpi); | |
47 } | |
48 | |
49 } |