src/share/vm/ci/ciStreams.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/ci

src/share/vm/ci/ciStreams.hpp

Print this page
rev 5349 : 8023657: New type profiling points: arguments to call
Summary: x86 interpreter and c1 type profiling for arguments at calls
Reviewed-by:


 261   bool          has_appendix();
 262   ciObject*     get_appendix();
 263   bool          has_method_type();
 264   ciMethodType* get_method_type();
 265   ciKlass*      get_declared_method_holder();
 266   int           get_method_holder_index();
 267   int           get_method_signature_index();
 268 
 269   // Get the resolved references arrays from the constant pool
 270   ciObjArray* get_resolved_references();
 271 };
 272 
 273 
 274 // ciSignatureStream
 275 //
 276 // The class is used to iterate over the elements of a method signature.
 277 class ciSignatureStream : public StackObj {
 278 private:
 279   ciSignature* _sig;
 280   int    _pos;


 281 public:
 282   ciSignatureStream(ciSignature* signature) {
 283     _sig = signature;
 284     _pos = 0;

 285   }
 286 
 287   bool at_return_type() { return _pos == _sig->count(); }
 288 
 289   bool is_done() { return _pos > _sig->count(); }
 290 
 291   void next() {
 292     if (_pos <= _sig->count()) {
 293       _pos++;
 294     }
 295   }
 296 
 297   ciType* type() {
 298     if (at_return_type()) {
 299       return _sig->return_type();
 300     } else {
 301       return _sig->type_at(_pos);
 302     }

















 303   }
 304 };
 305 
 306 
 307 // ciExceptionHandlerStream
 308 //
 309 // The class is used to iterate over the exception handlers of
 310 // a method.
 311 class ciExceptionHandlerStream : public StackObj {
 312 private:
 313   // The method whose handlers we are traversing
 314   ciMethod* _method;
 315 
 316   // Our current position in the list of handlers
 317   int        _pos;
 318   int        _end;
 319 
 320   ciInstanceKlass*  _exception_klass;
 321   int        _bci;
 322   bool       _is_exact;




 261   bool          has_appendix();
 262   ciObject*     get_appendix();
 263   bool          has_method_type();
 264   ciMethodType* get_method_type();
 265   ciKlass*      get_declared_method_holder();
 266   int           get_method_holder_index();
 267   int           get_method_signature_index();
 268 
 269   // Get the resolved references arrays from the constant pool
 270   ciObjArray* get_resolved_references();
 271 };
 272 
 273 
 274 // ciSignatureStream
 275 //
 276 // The class is used to iterate over the elements of a method signature.
 277 class ciSignatureStream : public StackObj {
 278 private:
 279   ciSignature* _sig;
 280   int          _pos;
 281   // holder is a method's holder
 282   ciKlass*     _holder;
 283 public:
 284   ciSignatureStream(ciSignature* signature, ciKlass* holder = NULL) {
 285     _sig = signature;
 286     _pos = 0;
 287     _holder = holder;
 288   }
 289 
 290   bool at_return_type() { return _pos == _sig->count(); }
 291 
 292   bool is_done() { return _pos > _sig->count(); }
 293 
 294   void next() {
 295     if (_pos <= _sig->count()) {
 296       _pos++;
 297     }
 298   }
 299 
 300   ciType* type() {
 301     if (at_return_type()) {
 302       return _sig->return_type();
 303     } else {
 304       return _sig->type_at(_pos);
 305     }
 306   }
 307 
 308   // next klass in the signature
 309   ciKlass* next_klass() {
 310     ciKlass* sig_k;
 311     if (_holder != NULL) {
 312       sig_k = _holder;
 313       _holder = NULL;
 314     } else {
 315       while (!type()->is_klass()) {
 316         next();
 317       }
 318       assert(!at_return_type(), "passed end of signature");
 319       sig_k = type()->as_klass();
 320       next();
 321     }
 322     return sig_k;
 323   }
 324 };
 325 
 326 
 327 // ciExceptionHandlerStream
 328 //
 329 // The class is used to iterate over the exception handlers of
 330 // a method.
 331 class ciExceptionHandlerStream : public StackObj {
 332 private:
 333   // The method whose handlers we are traversing
 334   ciMethod* _method;
 335 
 336   // Our current position in the list of handlers
 337   int        _pos;
 338   int        _end;
 339 
 340   ciInstanceKlass*  _exception_klass;
 341   int        _bci;
 342   bool       _is_exact;


src/share/vm/ci/ciStreams.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File