Mercurial > hg > truffle
diff src/share/vm/ci/ciStreams.hpp @ 12883:f50418dfb1b7
Merge
author | iveresov |
---|---|
date | Sun, 13 Oct 2013 13:22:24 -0700 |
parents | d13d7aba8c12 |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/ci/ciStreams.hpp Fri Oct 11 13:14:48 2013 -0700 +++ b/src/share/vm/ci/ciStreams.hpp Sun Oct 13 13:22:24 2013 -0700 @@ -277,11 +277,14 @@ class ciSignatureStream : public StackObj { private: ciSignature* _sig; - int _pos; + int _pos; + // holder is a method's holder + ciKlass* _holder; public: - ciSignatureStream(ciSignature* signature) { + ciSignatureStream(ciSignature* signature, ciKlass* holder = NULL) { _sig = signature; _pos = 0; + _holder = holder; } bool at_return_type() { return _pos == _sig->count(); } @@ -301,6 +304,23 @@ return _sig->type_at(_pos); } } + + // next klass in the signature + ciKlass* next_klass() { + ciKlass* sig_k; + if (_holder != NULL) { + sig_k = _holder; + _holder = NULL; + } else { + while (!type()->is_klass()) { + next(); + } + assert(!at_return_type(), "passed end of signature"); + sig_k = type()->as_klass(); + next(); + } + return sig_k; + } };