hotspot/src/share/vm/opto/graphKit.cpp
changeset 13522 5ad4627e792a
parent 13391 30245956af37
child 13728 882756847a04
equal deleted inserted replaced
13521:97a23be06f4e 13522:5ad4627e792a
  1004   case Bytecodes::_putstatic:
  1004   case Bytecodes::_putstatic:
  1005   case Bytecodes::_getfield:
  1005   case Bytecodes::_getfield:
  1006   case Bytecodes::_putfield:
  1006   case Bytecodes::_putfield:
  1007     {
  1007     {
  1008       bool is_get = (depth >= 0), is_static = (depth & 1);
  1008       bool is_get = (depth >= 0), is_static = (depth & 1);
  1009       bool ignore;
       
  1010       ciBytecodeStream iter(method());
  1009       ciBytecodeStream iter(method());
  1011       iter.reset_to_bci(bci());
  1010       iter.reset_to_bci(bci());
  1012       iter.next();
  1011       iter.next();
  1013       ciField* field = iter.get_field(ignore);
  1012       bool ignored_will_link;
       
  1013       ciField* field = iter.get_field(ignored_will_link);
  1014       int      size  = field->type()->size();
  1014       int      size  = field->type()->size();
  1015       inputs  = (is_static ? 0 : 1);
  1015       inputs  = (is_static ? 0 : 1);
  1016       if (is_get) {
  1016       if (is_get) {
  1017         depth = size - inputs;
  1017         depth = size - inputs;
  1018       } else {
  1018       } else {
  1026   case Bytecodes::_invokespecial:
  1026   case Bytecodes::_invokespecial:
  1027   case Bytecodes::_invokestatic:
  1027   case Bytecodes::_invokestatic:
  1028   case Bytecodes::_invokedynamic:
  1028   case Bytecodes::_invokedynamic:
  1029   case Bytecodes::_invokeinterface:
  1029   case Bytecodes::_invokeinterface:
  1030     {
  1030     {
  1031       bool ignore;
       
  1032       ciBytecodeStream iter(method());
  1031       ciBytecodeStream iter(method());
  1033       iter.reset_to_bci(bci());
  1032       iter.reset_to_bci(bci());
  1034       iter.next();
  1033       iter.next();
  1035       ciMethod* callee = iter.get_method(ignore);
  1034       bool ignored_will_link;
       
  1035       ciSignature* declared_signature = NULL;
       
  1036       ciMethod* callee = iter.get_method(ignored_will_link, &declared_signature);
       
  1037       assert(declared_signature != NULL, "cannot be null");
  1036       // (Do not use ciMethod::arg_size(), because
  1038       // (Do not use ciMethod::arg_size(), because
  1037       // it might be an unloaded method, which doesn't
  1039       // it might be an unloaded method, which doesn't
  1038       // know whether it is static or not.)
  1040       // know whether it is static or not.)
  1039       if (for_parse) {
  1041       if (for_parse) {
  1040         // Case 1: When called from parse we are *before* the invoke (in the
  1042         // Case 1: When called from parse we are *before* the invoke (in the
  1044       } else {
  1046       } else {
  1045         // Case 2: Here we are *after* the invoke (in the callee) and need to
  1047         // Case 2: Here we are *after* the invoke (in the callee) and need to
  1046         //         remove any appendix arguments that were popped.
  1048         //         remove any appendix arguments that were popped.
  1047         inputs = callee->invoke_arg_size(code) - (callee->has_member_arg() ? 1 : 0);
  1049         inputs = callee->invoke_arg_size(code) - (callee->has_member_arg() ? 1 : 0);
  1048       }
  1050       }
  1049       int size = callee->return_type()->size();
  1051       int size = declared_signature->return_type()->size();
  1050       depth = size - inputs;
  1052       depth = size - inputs;
  1051     }
  1053     }
  1052     break;
  1054     break;
  1053 
  1055 
  1054   case Bytecodes::_multianewarray:
  1056   case Bytecodes::_multianewarray: