Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotType.java @ 1423:760213a60e8b
* rewrite of the code installation
* partial support for safepoints
* macro-based CiTargetMethod interface
* code stub support
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Mon, 16 Aug 2010 18:59:36 -0700 |
parents | 3483ec571caf |
children | efba53f86c4f |
comparison
equal
deleted
inserted
replaced
1422:3483ec571caf | 1423:760213a60e8b |
---|---|
1 /* | |
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved. | |
3 * | |
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is | |
5 * described in this document. In particular, and without limitation, these intellectual property rights may include one | |
6 * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent | |
7 * applications in the U.S. and in other countries. | |
8 * | |
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard | |
10 * license agreement and applicable provisions of the FAR and its supplements. | |
11 * | |
12 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or registered | |
13 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and | |
14 * are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. | |
15 * | |
16 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. | |
17 */ | |
1 package com.sun.hotspot.c1x; | 18 package com.sun.hotspot.c1x; |
2 | 19 |
3 import com.sun.cri.ci.CiConstant; | |
4 import com.sun.cri.ci.CiKind; | |
5 import com.sun.cri.ri.*; | 20 import com.sun.cri.ri.*; |
6 | 21 |
7 public class HotSpotType implements RiType { | 22 /** |
8 | 23 * Common interface for all HotSpot RiType-implementations |
9 // do not query this class object directly, use the VMEntries methods instead! | 24 * |
10 // (otherwise this query won't be recorded correctly) | 25 * @author Lukas Stadler |
11 final Class<?> klass; | 26 */ |
12 | 27 public interface HotSpotType extends RiType, CompilerObject { |
13 public HotSpotType(Class<?> klass) { | |
14 this.klass = klass; | |
15 assert klass != null; | |
16 } | |
17 | |
18 @Override | |
19 public int accessFlags() { | |
20 // TODO Auto-generated method stub | |
21 return 0; | |
22 } | |
23 | |
24 @Override | |
25 public RiType arrayOf() { | |
26 // TODO Auto-generated method stub | |
27 return null; | |
28 } | |
29 | |
30 @Override | |
31 public RiType componentType() { | |
32 // TODO Auto-generated method stub | |
33 return null; | |
34 } | |
35 | |
36 @Override | |
37 public RiType exactType() { | |
38 // TODO Auto-generated method stub | |
39 return null; | |
40 } | |
41 | |
42 @Override | |
43 public CiConstant getEncoding(Representation r) { | |
44 // TODO Auto-generated method stub | |
45 return null; | |
46 } | |
47 | |
48 @Override | |
49 public CiKind getRepresentationKind(Representation r) { | |
50 return CiKind.Object; | |
51 } | |
52 | |
53 @Override | |
54 public boolean hasFinalizableSubclass() { | |
55 // TODO Auto-generated method stub | |
56 return false; | |
57 } | |
58 | |
59 @Override | |
60 public boolean hasFinalizer() { | |
61 // TODO Auto-generated method stub | |
62 return false; | |
63 } | |
64 | |
65 @Override | |
66 public boolean hasSubclass() { | |
67 // TODO Auto-generated method stub | |
68 return false; | |
69 } | |
70 | |
71 @Override | |
72 public boolean isArrayClass() { | |
73 System.out.println("Checking for array class " + name()); | |
74 return Compiler.getVMEntries().RiType_isArrayClass(klass); | |
75 } | |
76 | |
77 @Override | |
78 public boolean isInitialized() { | |
79 // TODO Auto-generated method stub | |
80 return false; | |
81 } | |
82 | |
83 @Override | |
84 public boolean isInstance(Object obj) { | |
85 // TODO Auto-generated method stub | |
86 return false; | |
87 } | |
88 | |
89 @Override | |
90 public boolean isInstanceClass() { | |
91 return Compiler.getVMEntries().RiType_isInstanceClass(klass); | |
92 } | |
93 | |
94 @Override | |
95 public boolean isInterface() { | |
96 return Compiler.getVMEntries().RiType_isInterface(klass); | |
97 } | |
98 | |
99 @Override | |
100 public boolean isResolved() { | |
101 return true; | |
102 } | |
103 | |
104 @Override | |
105 public boolean isSubtypeOf(RiType other) { | |
106 // TODO Auto-generated method stub | |
107 return false; | |
108 } | |
109 | |
110 @Override | |
111 public Class<?> javaClass() { | |
112 return klass; | |
113 } | |
114 | |
115 @Override | |
116 public CiKind kind() { | |
117 return CiKind.Object; | |
118 } | |
119 | |
120 @Override | |
121 public String name() { | |
122 return Compiler.getVMEntries().RiType_name(klass); | |
123 } | |
124 | |
125 @Override | |
126 public RiMethod resolveMethodImpl(RiMethod method) { | |
127 // TODO Auto-generated method stub | |
128 return null; | |
129 } | |
130 | |
131 public Class<?> klass() { | |
132 return klass; | |
133 } | |
134 | 28 |
135 } | 29 } |