< prev index next >

src/hotspot/share/c1/c1_FrameMap.cpp

Print this page




  24 
  25 #include "precompiled.hpp"
  26 #include "c1/c1_FrameMap.hpp"
  27 #include "c1/c1_LIR.hpp"
  28 #include "code/vmreg.inline.hpp"
  29 #include "runtime/sharedRuntime.hpp"
  30 #include "utilities/align.hpp"
  31 
  32 //-----------------------------------------------------
  33 
  34 // Convert method signature into an array of BasicTypes for the arguments
  35 BasicTypeArray* FrameMap::signature_type_array_for(const ciMethod* method) {
  36   ciSignature* sig = method->signature();
  37   BasicTypeList* sta = new BasicTypeList(method->arg_size());
  38   // add receiver, if any
  39   if (!method->is_static()) sta->append(T_OBJECT);
  40   // add remaining arguments
  41   for (int i = 0; i < sig->count(); i++) {
  42     ciType* type = sig->type_at(i);
  43     BasicType t = type->basic_type();
  44     if (t == T_ARRAY) {
  45       t = T_OBJECT;
  46     }
  47     sta->append(t);
  48   }
  49   // done
  50   return sta;
  51 }
  52 
  53 
  54 CallingConvention* FrameMap::java_calling_convention(const BasicTypeArray* signature, bool outgoing) {
  55   // compute the size of the arguments first.  The signature array
  56   // that java_calling_convention takes includes a T_VOID after double
  57   // work items but our signatures do not.
  58   int i;
  59   int sizeargs = 0;
  60   for (i = 0; i < signature->length(); i++) {
  61     sizeargs += type2size[signature->at(i)];
  62   }
  63 
  64   BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);




  24 
  25 #include "precompiled.hpp"
  26 #include "c1/c1_FrameMap.hpp"
  27 #include "c1/c1_LIR.hpp"
  28 #include "code/vmreg.inline.hpp"
  29 #include "runtime/sharedRuntime.hpp"
  30 #include "utilities/align.hpp"
  31 
  32 //-----------------------------------------------------
  33 
  34 // Convert method signature into an array of BasicTypes for the arguments
  35 BasicTypeArray* FrameMap::signature_type_array_for(const ciMethod* method) {
  36   ciSignature* sig = method->signature();
  37   BasicTypeList* sta = new BasicTypeList(method->arg_size());
  38   // add receiver, if any
  39   if (!method->is_static()) sta->append(T_OBJECT);
  40   // add remaining arguments
  41   for (int i = 0; i < sig->count(); i++) {
  42     ciType* type = sig->type_at(i);
  43     BasicType t = type->basic_type();
  44     if (t == T_ARRAY || t == T_VALUETYPE) {
  45       t = T_OBJECT;
  46     }
  47     sta->append(t);
  48   }
  49   // done
  50   return sta;
  51 }
  52 
  53 
  54 CallingConvention* FrameMap::java_calling_convention(const BasicTypeArray* signature, bool outgoing) {
  55   // compute the size of the arguments first.  The signature array
  56   // that java_calling_convention takes includes a T_VOID after double
  57   // work items but our signatures do not.
  58   int i;
  59   int sizeargs = 0;
  60   for (i = 0; i < signature->length(); i++) {
  61     sizeargs += type2size[signature->at(i)];
  62   }
  63 
  64   BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);


< prev index next >