Mercurial > hg > truffle
annotate c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java @ 1421:6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Fri, 23 Jul 2010 15:53:02 -0700 |
parents | 44efca8a02d6 |
children | 3483ec571caf |
rev | line source |
---|---|
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
1 package com.sun.hotspot.c1x; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
2 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
3 import com.sun.cri.ci.CiConstant; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
4 import com.sun.cri.ri.RiConstantPool; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
5 import com.sun.cri.ri.RiField; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
6 import com.sun.cri.ri.RiMethod; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
7 import com.sun.cri.ri.RiSignature; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
8 import com.sun.cri.ri.RiType; |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
9 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
10 public class HotSpotConstantPool implements RiConstantPool { |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
11 |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
12 private final Object constantPoolOop; |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
13 |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
14 public HotSpotConstantPool(Object o) { |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
15 this.constantPoolOop = o; |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
16 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
17 |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
18 @Override |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
19 public CiConstant encoding() { |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
20 // TODO: Check if this is correct. |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
21 return CiConstant.forObject(constantPoolOop); |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
22 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
23 |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
24 @Override |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
25 public Object lookupConstant(int cpi) { |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
26 return Compiler.getVMEntries().RiConstantPool_lookupConstant(constantPoolOop, cpi); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
27 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
28 |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
29 @Override |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
30 public RiMethod lookupMethod(int cpi, int byteCode) { |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
31 return Compiler.getVMEntries().RiConstantPool_lookupMethod(constantPoolOop, cpi, (byte) byteCode); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
32 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
33 |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
34 @Override |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
35 public RiSignature lookupSignature(int cpi) { |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
36 return Compiler.getVMEntries().RiConstantPool_lookupSignature(constantPoolOop, cpi); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
37 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
38 |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
39 @Override |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
40 public RiType lookupType(int cpi, int opcode) { |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
41 return Compiler.getVMEntries().RiConstantPool_lookupType(constantPoolOop, cpi); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
42 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
43 |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
44 @Override |
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
45 public RiField lookupField(int cpi, int opcode) { |
1421
6223633ce7dd
changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1420
diff
changeset
|
46 return Compiler.getVMEntries().RiConstantPool_lookupField(constantPoolOop, cpi); |
1420
44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1417
diff
changeset
|
47 } |
1416
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
48 |
1b41af477605
Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
49 } |