< prev index next >

src/hotspot/share/ci/ciStreams.hpp

Print this page

202     return cur_bci() + bytecode().get_offset_s4(cur_bc_raw());
203   }
204 
205   // For a lookup or switch table, return target destination
206   int get_int_table( int index ) const {
207     return Bytes::get_Java_u4((address)&_table_base[index]); }
208 
209   int get_dest_table( int index ) const {
210     return cur_bci() + get_int_table(index); }
211 
212   // --- Constant pool access ---
213   int get_constant_raw_index() const;
214   int get_constant_pool_index() const;
215   int get_field_index();
216   int get_method_index();
217 
218   // If this bytecode is a new, newarray, multianewarray, instanceof,
219   // or checkcast, get the referenced klass.
220   ciKlass* get_klass(bool& will_link);
221   int get_klass_index() const;

222 
223   // If this bytecode is one of the ldc variants, get the referenced
224   // constant.  Do not attempt to resolve it, since that would require
225   // execution of Java code.  If it is not resolved, return an unloaded
226   // object (ciConstant.as_object()->is_loaded() == false).
227   ciConstant get_constant();
228   constantTag get_constant_pool_tag(int index) const;
229 
230   // True if the klass-using bytecode points to an unresolved klass
231   bool is_unresolved_klass() const {
232     constantTag tag = get_constant_pool_tag(get_klass_index());
233     return tag.is_unresolved_klass();
234   }
235 
236   bool is_unresolved_klass_in_error() const {
237     constantTag tag = get_constant_pool_tag(get_klass_index());
238     return tag.is_unresolved_klass_in_error();
239   }
240 
241   // If this bytecode is one of get_field, get_static, put_field,

273   }
274 
275   bool at_return_type() { return _pos == _sig->count(); }
276 
277   bool is_done() { return _pos > _sig->count(); }
278 
279   void next() {
280     if (_pos <= _sig->count()) {
281       _pos++;
282     }
283   }
284 
285   ciType* type() {
286     if (at_return_type()) {
287       return _sig->return_type();
288     } else {
289       return _sig->type_at(_pos);
290     }
291   }
292 








293   // next klass in the signature
294   ciKlass* next_klass() {
295     ciKlass* sig_k;
296     if (_holder != NULL) {
297       sig_k = _holder;
298       _holder = NULL;
299     } else {
300       while (!type()->is_klass()) {
301         next();
302       }
303       assert(!at_return_type(), "passed end of signature");
304       sig_k = type()->as_klass();
305       next();
306     }
307     return sig_k;
308   }
309 };
310 
311 
312 // ciExceptionHandlerStream

202     return cur_bci() + bytecode().get_offset_s4(cur_bc_raw());
203   }
204 
205   // For a lookup or switch table, return target destination
206   int get_int_table( int index ) const {
207     return Bytes::get_Java_u4((address)&_table_base[index]); }
208 
209   int get_dest_table( int index ) const {
210     return cur_bci() + get_int_table(index); }
211 
212   // --- Constant pool access ---
213   int get_constant_raw_index() const;
214   int get_constant_pool_index() const;
215   int get_field_index();
216   int get_method_index();
217 
218   // If this bytecode is a new, newarray, multianewarray, instanceof,
219   // or checkcast, get the referenced klass.
220   ciKlass* get_klass(bool& will_link);
221   int get_klass_index() const;
222   bool has_Q_signature() const;
223 
224   // If this bytecode is one of the ldc variants, get the referenced
225   // constant.  Do not attempt to resolve it, since that would require
226   // execution of Java code.  If it is not resolved, return an unloaded
227   // object (ciConstant.as_object()->is_loaded() == false).
228   ciConstant get_constant();
229   constantTag get_constant_pool_tag(int index) const;
230 
231   // True if the klass-using bytecode points to an unresolved klass
232   bool is_unresolved_klass() const {
233     constantTag tag = get_constant_pool_tag(get_klass_index());
234     return tag.is_unresolved_klass();
235   }
236 
237   bool is_unresolved_klass_in_error() const {
238     constantTag tag = get_constant_pool_tag(get_klass_index());
239     return tag.is_unresolved_klass_in_error();
240   }
241 
242   // If this bytecode is one of get_field, get_static, put_field,

274   }
275 
276   bool at_return_type() { return _pos == _sig->count(); }
277 
278   bool is_done() { return _pos > _sig->count(); }
279 
280   void next() {
281     if (_pos <= _sig->count()) {
282       _pos++;
283     }
284   }
285 
286   ciType* type() {
287     if (at_return_type()) {
288       return _sig->return_type();
289     } else {
290       return _sig->type_at(_pos);
291     }
292   }
293 
294   bool is_null_free() {
295     if (at_return_type()) {
296       return _sig->returns_null_free_inline_type();
297     } else {
298       return _sig->is_null_free_at(_pos);
299     }
300   }
301 
302   // next klass in the signature
303   ciKlass* next_klass() {
304     ciKlass* sig_k;
305     if (_holder != NULL) {
306       sig_k = _holder;
307       _holder = NULL;
308     } else {
309       while (!type()->is_klass()) {
310         next();
311       }
312       assert(!at_return_type(), "passed end of signature");
313       sig_k = type()->as_klass();
314       next();
315     }
316     return sig_k;
317   }
318 };
319 
320 
321 // ciExceptionHandlerStream
< prev index next >