Mercurial > hg > truffle
comparison src/share/vm/ci/ciEnv.hpp @ 4001:5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
Reviewed-by: jrose, never
author | twisti |
---|---|
date | Wed, 12 Oct 2011 21:00:13 -0700 |
parents | c124e2e7463e |
children | 04b9a2566eec aa3d708d67c4 |
comparison
equal
deleted
inserted
replaced
4000:0abefdb54d21 | 4001:5eb9169b1a14 |
---|---|
151 int field_index); | 151 int field_index); |
152 ciMethod* get_method_by_index_impl(constantPoolHandle cpool, | 152 ciMethod* get_method_by_index_impl(constantPoolHandle cpool, |
153 int method_index, Bytecodes::Code bc, | 153 int method_index, Bytecodes::Code bc, |
154 ciInstanceKlass* loading_klass); | 154 ciInstanceKlass* loading_klass); |
155 ciMethod* get_fake_invokedynamic_method_impl(constantPoolHandle cpool, | 155 ciMethod* get_fake_invokedynamic_method_impl(constantPoolHandle cpool, |
156 int index, Bytecodes::Code bc); | 156 int index, Bytecodes::Code bc, |
157 ciInstanceKlass* accessor); | |
157 | 158 |
158 // Helper methods | 159 // Helper methods |
159 bool check_klass_accessibility(ciKlass* accessing_klass, | 160 bool check_klass_accessibility(ciKlass* accessing_klass, |
160 klassOop resolved_klassOop); | 161 klassOop resolved_klassOop); |
161 methodOop lookup_method(instanceKlass* accessor, | 162 methodOop lookup_method(instanceKlass* accessor, |
190 // Get a ciMethod representing either an unfound method or | 191 // Get a ciMethod representing either an unfound method or |
191 // a method with an unloaded holder. Ensures uniqueness of | 192 // a method with an unloaded holder. Ensures uniqueness of |
192 // the result. | 193 // the result. |
193 ciMethod* get_unloaded_method(ciInstanceKlass* holder, | 194 ciMethod* get_unloaded_method(ciInstanceKlass* holder, |
194 ciSymbol* name, | 195 ciSymbol* name, |
195 ciSymbol* signature) { | 196 ciSymbol* signature, |
196 return _factory->get_unloaded_method(holder, name, signature); | 197 ciInstanceKlass* accessor) { |
198 return _factory->get_unloaded_method(holder, name, signature, accessor); | |
197 } | 199 } |
198 | 200 |
199 // Get a ciKlass representing an unloaded klass. | 201 // Get a ciKlass representing an unloaded klass. |
200 // Ensures uniqueness of the result. | 202 // Ensures uniqueness of the result. |
201 ciKlass* get_unloaded_klass(ciKlass* accessing_klass, | 203 ciKlass* get_unloaded_klass(ciKlass* accessing_klass, |
202 ciSymbol* name) { | 204 ciSymbol* name) { |
203 return _factory->get_unloaded_klass(accessing_klass, name, true); | 205 return _factory->get_unloaded_klass(accessing_klass, name, true); |
204 } | 206 } |
205 | 207 |
206 // Get a ciKlass representing an unloaded klass mirror. | 208 // Get a ciKlass representing an unloaded klass mirror. |
222 return _factory->get_unloaded_method_type_constant(signature); | 224 return _factory->get_unloaded_method_type_constant(signature); |
223 } | 225 } |
224 | 226 |
225 // See if we already have an unloaded klass for the given name | 227 // See if we already have an unloaded klass for the given name |
226 // or return NULL if not. | 228 // or return NULL if not. |
227 ciKlass *check_get_unloaded_klass(ciKlass* accessing_klass, ciSymbol* name) { | 229 ciKlass *check_get_unloaded_klass(ciKlass* accessing_klass, ciSymbol* name) { |
228 return _factory->get_unloaded_klass(accessing_klass, name, false); | 230 return _factory->get_unloaded_klass(accessing_klass, name, false); |
229 } | 231 } |
230 | 232 |
231 // Get a ciReturnAddress corresponding to the given bci. | 233 // Get a ciReturnAddress corresponding to the given bci. |
232 // Ensures uniqueness of the result. | 234 // Ensures uniqueness of the result. |