hotspot/src/share/vm/ci/ciSignature.cpp
changeset 13929 8da0dc50a6e4
parent 10734 065435337883
child 24424 2658d7834c6e
equal deleted inserted replaced
13918:b01a48301e67 13929:8da0dc50a6e4
    21  * questions.
    21  * questions.
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
       
    26 #include "ci/ciMethodType.hpp"
    26 #include "ci/ciSignature.hpp"
    27 #include "ci/ciSignature.hpp"
    27 #include "ci/ciUtilities.hpp"
    28 #include "ci/ciUtilities.hpp"
    28 #include "memory/allocation.inline.hpp"
    29 #include "memory/allocation.inline.hpp"
    29 #include "oops/oop.inline.hpp"
    30 #include "oops/oop.inline.hpp"
    30 #include "runtime/signature.hpp"
    31 #include "runtime/signature.hpp"
    78   _size = size;
    79   _size = size;
    79   _count = count;
    80   _count = count;
    80 }
    81 }
    81 
    82 
    82 // ------------------------------------------------------------------
    83 // ------------------------------------------------------------------
       
    84 // ciSignature::ciSignature
       
    85 ciSignature::ciSignature(ciKlass* accessing_klass, ciSymbol* symbol, ciMethodType* method_type) :
       
    86   _symbol(symbol),
       
    87   _accessing_klass(accessing_klass),
       
    88   _size( method_type->ptype_slot_count()),
       
    89   _count(method_type->ptype_count())
       
    90 {
       
    91   ASSERT_IN_VM;
       
    92   EXCEPTION_CONTEXT;
       
    93   Arena* arena = CURRENT_ENV->arena();
       
    94   _types = new (arena) GrowableArray<ciType*>(arena, _count + 1, 0, NULL);
       
    95   for (int i = 0; i < _count; i++) {
       
    96     _types->append(method_type->ptype_at(i));
       
    97   }
       
    98   _types->append(method_type->rtype());
       
    99 }
       
   100 
       
   101 // ------------------------------------------------------------------
    83 // ciSignature::return_type
   102 // ciSignature::return_type
    84 //
   103 //
    85 // What is the return type of this signature?
   104 // What is the return type of this signature?
    86 ciType* ciSignature::return_type() const {
   105 ciType* ciSignature::return_type() const {
    87   return _types->at(_count);
   106   return _types->at(_count);