Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciStreams.hpp @ 12875:d13d7aba8c12
8023657: New type profiling points: arguments to call
Summary: x86 interpreter and c1 type profiling for arguments at calls
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Wed, 09 Oct 2013 16:32:21 +0200 |
parents | f6b0eb4e44cf |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
12874:46ef27bcacb3 | 12875:d13d7aba8c12 |
---|---|
275 // | 275 // |
276 // The class is used to iterate over the elements of a method signature. | 276 // The class is used to iterate over the elements of a method signature. |
277 class ciSignatureStream : public StackObj { | 277 class ciSignatureStream : public StackObj { |
278 private: | 278 private: |
279 ciSignature* _sig; | 279 ciSignature* _sig; |
280 int _pos; | 280 int _pos; |
281 // holder is a method's holder | |
282 ciKlass* _holder; | |
281 public: | 283 public: |
282 ciSignatureStream(ciSignature* signature) { | 284 ciSignatureStream(ciSignature* signature, ciKlass* holder = NULL) { |
283 _sig = signature; | 285 _sig = signature; |
284 _pos = 0; | 286 _pos = 0; |
287 _holder = holder; | |
285 } | 288 } |
286 | 289 |
287 bool at_return_type() { return _pos == _sig->count(); } | 290 bool at_return_type() { return _pos == _sig->count(); } |
288 | 291 |
289 bool is_done() { return _pos > _sig->count(); } | 292 bool is_done() { return _pos > _sig->count(); } |
298 if (at_return_type()) { | 301 if (at_return_type()) { |
299 return _sig->return_type(); | 302 return _sig->return_type(); |
300 } else { | 303 } else { |
301 return _sig->type_at(_pos); | 304 return _sig->type_at(_pos); |
302 } | 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; | |
303 } | 323 } |
304 }; | 324 }; |
305 | 325 |
306 | 326 |
307 // ciExceptionHandlerStream | 327 // ciExceptionHandlerStream |