1.1 --- a/src/share/vm/ci/ciStreams.hpp Wed Oct 09 11:05:17 2013 -0700 1.2 +++ b/src/share/vm/ci/ciStreams.hpp Wed Oct 09 16:32:21 2013 +0200 1.3 @@ -277,11 +277,14 @@ 1.4 class ciSignatureStream : public StackObj { 1.5 private: 1.6 ciSignature* _sig; 1.7 - int _pos; 1.8 + int _pos; 1.9 + // holder is a method's holder 1.10 + ciKlass* _holder; 1.11 public: 1.12 - ciSignatureStream(ciSignature* signature) { 1.13 + ciSignatureStream(ciSignature* signature, ciKlass* holder = NULL) { 1.14 _sig = signature; 1.15 _pos = 0; 1.16 + _holder = holder; 1.17 } 1.18 1.19 bool at_return_type() { return _pos == _sig->count(); } 1.20 @@ -301,6 +304,23 @@ 1.21 return _sig->type_at(_pos); 1.22 } 1.23 } 1.24 + 1.25 + // next klass in the signature 1.26 + ciKlass* next_klass() { 1.27 + ciKlass* sig_k; 1.28 + if (_holder != NULL) { 1.29 + sig_k = _holder; 1.30 + _holder = NULL; 1.31 + } else { 1.32 + while (!type()->is_klass()) { 1.33 + next(); 1.34 + } 1.35 + assert(!at_return_type(), "passed end of signature"); 1.36 + sig_k = type()->as_klass(); 1.37 + next(); 1.38 + } 1.39 + return sig_k; 1.40 + } 1.41 }; 1.42 1.43