Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciEnv.hpp @ 1602:136b78722a08
6939203: JSR 292 needs method handle constants
Summary: Add new CP types CONSTANT_MethodHandle, CONSTANT_MethodType; extend 'ldc' bytecode.
Reviewed-by: twisti, never
author | jrose |
---|---|
date | Wed, 09 Jun 2010 18:50:45 -0700 |
parents | c18cbe5936b8 |
children | 2d26b0046e0d f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1585:49fac4acd688 | 1602:136b78722a08 |
---|---|
114 ciKlass* get_klass_by_index(constantPoolHandle cpool, | 114 ciKlass* get_klass_by_index(constantPoolHandle cpool, |
115 int klass_index, | 115 int klass_index, |
116 bool& is_accessible, | 116 bool& is_accessible, |
117 ciInstanceKlass* loading_klass); | 117 ciInstanceKlass* loading_klass); |
118 ciConstant get_constant_by_index(constantPoolHandle cpool, | 118 ciConstant get_constant_by_index(constantPoolHandle cpool, |
119 int constant_index, | 119 int pool_index, int cache_index, |
120 ciInstanceKlass* accessor); | 120 ciInstanceKlass* accessor); |
121 bool is_unresolved_string(ciInstanceKlass* loading_klass, | |
122 int constant_index) const; | |
123 bool is_unresolved_klass(ciInstanceKlass* loading_klass, | |
124 int constant_index) const; | |
125 ciField* get_field_by_index(ciInstanceKlass* loading_klass, | 121 ciField* get_field_by_index(ciInstanceKlass* loading_klass, |
126 int field_index); | 122 int field_index); |
127 ciMethod* get_method_by_index(constantPoolHandle cpool, | 123 ciMethod* get_method_by_index(constantPoolHandle cpool, |
128 int method_index, Bytecodes::Code bc, | 124 int method_index, Bytecodes::Code bc, |
129 ciInstanceKlass* loading_klass); | 125 ciInstanceKlass* loading_klass); |
135 ciKlass* get_klass_by_index_impl(constantPoolHandle cpool, | 131 ciKlass* get_klass_by_index_impl(constantPoolHandle cpool, |
136 int klass_index, | 132 int klass_index, |
137 bool& is_accessible, | 133 bool& is_accessible, |
138 ciInstanceKlass* loading_klass); | 134 ciInstanceKlass* loading_klass); |
139 ciConstant get_constant_by_index_impl(constantPoolHandle cpool, | 135 ciConstant get_constant_by_index_impl(constantPoolHandle cpool, |
140 int constant_index, | 136 int pool_index, int cache_index, |
141 ciInstanceKlass* loading_klass); | 137 ciInstanceKlass* loading_klass); |
142 bool is_unresolved_string_impl (instanceKlass* loading_klass, | |
143 int constant_index) const; | |
144 bool is_unresolved_klass_impl (instanceKlass* loading_klass, | |
145 int constant_index) const; | |
146 ciField* get_field_by_index_impl(ciInstanceKlass* loading_klass, | 138 ciField* get_field_by_index_impl(ciInstanceKlass* loading_klass, |
147 int field_index); | 139 int field_index); |
148 ciMethod* get_method_by_index_impl(constantPoolHandle cpool, | 140 ciMethod* get_method_by_index_impl(constantPoolHandle cpool, |
149 int method_index, Bytecodes::Code bc, | 141 int method_index, Bytecodes::Code bc, |
150 ciInstanceKlass* loading_klass); | 142 ciInstanceKlass* loading_klass); |
186 // Get a ciKlass representing an unloaded klass. | 178 // Get a ciKlass representing an unloaded klass. |
187 // Ensures uniqueness of the result. | 179 // Ensures uniqueness of the result. |
188 ciKlass* get_unloaded_klass(ciKlass* accessing_klass, | 180 ciKlass* get_unloaded_klass(ciKlass* accessing_klass, |
189 ciSymbol* name) { | 181 ciSymbol* name) { |
190 return _factory->get_unloaded_klass(accessing_klass, name, true); | 182 return _factory->get_unloaded_klass(accessing_klass, name, true); |
183 } | |
184 | |
185 // Get a ciKlass representing an unloaded klass mirror. | |
186 // Result is not necessarily unique, but will be unloaded. | |
187 ciInstance* get_unloaded_klass_mirror(ciKlass* type) { | |
188 return _factory->get_unloaded_klass_mirror(type); | |
189 } | |
190 | |
191 // Get a ciInstance representing an unresolved method handle constant. | |
192 ciInstance* get_unloaded_method_handle_constant(ciKlass* holder, | |
193 ciSymbol* name, | |
194 ciSymbol* signature, | |
195 int ref_kind) { | |
196 return _factory->get_unloaded_method_handle_constant(holder, name, signature, ref_kind); | |
197 } | |
198 | |
199 // Get a ciInstance representing an unresolved method type constant. | |
200 ciInstance* get_unloaded_method_type_constant(ciSymbol* signature) { | |
201 return _factory->get_unloaded_method_type_constant(signature); | |
191 } | 202 } |
192 | 203 |
193 // See if we already have an unloaded klass for the given name | 204 // See if we already have an unloaded klass for the given name |
194 // or return NULL if not. | 205 // or return NULL if not. |
195 ciKlass *check_get_unloaded_klass(ciKlass* accessing_klass, ciSymbol* name) { | 206 ciKlass *check_get_unloaded_klass(ciKlass* accessing_klass, ciSymbol* name) { |