205 // For a lookup or switch table, return target destination
206 jint get_int_table( int index ) const {
207 return (jint)Bytes::get_Java_u4((address)&_table_base[index]);
208 }
209
210 int get_dest_table( int index ) const {
211 return cur_bci() + get_int_table(index);
212 }
213
214 // --- Constant pool access ---
215 int get_constant_raw_index() const;
216 int get_constant_pool_index() const;
217 int get_field_index();
218 int get_method_index();
219
220 // If this bytecode is a new, newarray, multianewarray, instanceof,
221 // or checkcast, get the referenced klass.
222 ciKlass* get_klass();
223 ciKlass* get_klass(bool& will_link);
224 int get_klass_index() const;
225
226 // If this bytecode is one of the ldc variants, get the referenced
227 // constant. Do not attempt to resolve it, since that would require
228 // execution of Java code. If it is not resolved, return an unloaded
229 // object (ciConstant.as_object()->is_loaded() == false).
230 ciConstant get_constant();
231 constantTag get_constant_pool_tag(int index) const;
232 BasicType get_basic_type_for_constant_at(int index) const;
233
234 constantTag get_raw_pool_tag_at(int index) const;
235
236 constantTag get_raw_pool_tag() const {
237 int index = get_constant_pool_index();
238 return get_raw_pool_tag_at(index);
239 }
240
241 // True if the klass-using bytecode points to an unresolved klass
242 bool is_unresolved_klass() const {
243 constantTag tag = get_constant_pool_tag(get_klass_index());
244 return tag.is_unresolved_klass();
311 }
312
313 bool at_return_type() { return _pos == _sig->count(); }
314
315 bool is_done() { return _pos > _sig->count(); }
316
317 void next() {
318 if (_pos <= _sig->count()) {
319 _pos++;
320 }
321 }
322
323 ciType* type() {
324 if (at_return_type()) {
325 return _sig->return_type();
326 } else {
327 return _sig->type_at(_pos);
328 }
329 }
330
331 // next klass in the signature
332 ciKlass* next_klass() {
333 ciKlass* sig_k;
334 if (_holder != NULL) {
335 sig_k = _holder;
336 _holder = NULL;
337 } else {
338 while (!type()->is_klass()) {
339 next();
340 }
341 assert(!at_return_type(), "passed end of signature");
342 sig_k = type()->as_klass();
343 next();
344 }
345 return sig_k;
346 }
347 };
348
349
350 // ciExceptionHandlerStream
|
205 // For a lookup or switch table, return target destination
206 jint get_int_table( int index ) const {
207 return (jint)Bytes::get_Java_u4((address)&_table_base[index]);
208 }
209
210 int get_dest_table( int index ) const {
211 return cur_bci() + get_int_table(index);
212 }
213
214 // --- Constant pool access ---
215 int get_constant_raw_index() const;
216 int get_constant_pool_index() const;
217 int get_field_index();
218 int get_method_index();
219
220 // If this bytecode is a new, newarray, multianewarray, instanceof,
221 // or checkcast, get the referenced klass.
222 ciKlass* get_klass();
223 ciKlass* get_klass(bool& will_link);
224 int get_klass_index() const;
225 bool has_Q_signature() const;
226
227 // If this bytecode is one of the ldc variants, get the referenced
228 // constant. Do not attempt to resolve it, since that would require
229 // execution of Java code. If it is not resolved, return an unloaded
230 // object (ciConstant.as_object()->is_loaded() == false).
231 ciConstant get_constant();
232 constantTag get_constant_pool_tag(int index) const;
233 BasicType get_basic_type_for_constant_at(int index) const;
234
235 constantTag get_raw_pool_tag_at(int index) const;
236
237 constantTag get_raw_pool_tag() const {
238 int index = get_constant_pool_index();
239 return get_raw_pool_tag_at(index);
240 }
241
242 // True if the klass-using bytecode points to an unresolved klass
243 bool is_unresolved_klass() const {
244 constantTag tag = get_constant_pool_tag(get_klass_index());
245 return tag.is_unresolved_klass();
312 }
313
314 bool at_return_type() { return _pos == _sig->count(); }
315
316 bool is_done() { return _pos > _sig->count(); }
317
318 void next() {
319 if (_pos <= _sig->count()) {
320 _pos++;
321 }
322 }
323
324 ciType* type() {
325 if (at_return_type()) {
326 return _sig->return_type();
327 } else {
328 return _sig->type_at(_pos);
329 }
330 }
331
332 bool is_null_free() {
333 if (at_return_type()) {
334 return _sig->returns_null_free_inline_type();
335 } else {
336 return _sig->is_null_free_at(_pos);
337 }
338 }
339
340 // next klass in the signature
341 ciKlass* next_klass() {
342 ciKlass* sig_k;
343 if (_holder != NULL) {
344 sig_k = _holder;
345 _holder = NULL;
346 } else {
347 while (!type()->is_klass()) {
348 next();
349 }
350 assert(!at_return_type(), "passed end of signature");
351 sig_k = type()->as_klass();
352 next();
353 }
354 return sig_k;
355 }
356 };
357
358
359 // ciExceptionHandlerStream
|