hotspot/src/share/vm/runtime/sharedRuntime.cpp
changeset 4567 7fc02fbe5c7a
parent 4564 55dfb20908d0
child 4571 80b553bddc26
equal deleted inserted replaced
4566:b363f6ef4068 4567:7fc02fbe5c7a
  2143   // Return argument 0 register.  In the LP64 build pointers
  2143   // Return argument 0 register.  In the LP64 build pointers
  2144   // take 2 registers, but the VM wants only the 'main' name.
  2144   // take 2 registers, but the VM wants only the 'main' name.
  2145   return regs.first();
  2145   return regs.first();
  2146 }
  2146 }
  2147 
  2147 
  2148 VMRegPair *SharedRuntime::find_callee_arguments(symbolOop sig, bool is_static, int* arg_size) {
  2148 VMRegPair *SharedRuntime::find_callee_arguments(symbolOop sig, bool has_receiver, int* arg_size) {
  2149   // This method is returning a data structure allocating as a
  2149   // This method is returning a data structure allocating as a
  2150   // ResourceObject, so do not put any ResourceMarks in here.
  2150   // ResourceObject, so do not put any ResourceMarks in here.
  2151   char *s = sig->as_C_string();
  2151   char *s = sig->as_C_string();
  2152   int len = (int)strlen(s);
  2152   int len = (int)strlen(s);
  2153   *s++; len--;                  // Skip opening paren
  2153   *s++; len--;                  // Skip opening paren
  2155   while( *(--t) != ')' ) ;      // Find close paren
  2155   while( *(--t) != ')' ) ;      // Find close paren
  2156 
  2156 
  2157   BasicType *sig_bt = NEW_RESOURCE_ARRAY( BasicType, 256 );
  2157   BasicType *sig_bt = NEW_RESOURCE_ARRAY( BasicType, 256 );
  2158   VMRegPair *regs = NEW_RESOURCE_ARRAY( VMRegPair, 256 );
  2158   VMRegPair *regs = NEW_RESOURCE_ARRAY( VMRegPair, 256 );
  2159   int cnt = 0;
  2159   int cnt = 0;
  2160   if (!is_static) {
  2160   if (has_receiver) {
  2161     sig_bt[cnt++] = T_OBJECT; // Receiver is argument 0; not in signature
  2161     sig_bt[cnt++] = T_OBJECT; // Receiver is argument 0; not in signature
  2162   }
  2162   }
  2163 
  2163 
  2164   while( s < t ) {
  2164   while( s < t ) {
  2165     switch( *s++ ) {            // Switch on signature character
  2165     switch( *s++ ) {            // Switch on signature character