src/share/vm/ci/ciTypeFlow.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6829187 Sdiff src/share/vm/ci

src/share/vm/ci/ciTypeFlow.cpp

Print this page
rev 1082 : [mq]: indy.compiler.patch


 618       // get an endless loop of recompilations, when all the code
 619       // needs to do is load a series of null values.  Also, a trap
 620       // here can make an OSR entry point unreachable, triggering the
 621       // assert on non_osr_block in ciTypeFlow::get_start_state.
 622       // (See bug 4379915.)
 623       do_null_assert(field_type->as_klass());
 624     } else {
 625       push_translate(field_type);
 626     }
 627   }
 628 }
 629 
 630 // ------------------------------------------------------------------
 631 // ciTypeFlow::StateVector::do_invoke
 632 void ciTypeFlow::StateVector::do_invoke(ciBytecodeStream* str,
 633                                         bool has_receiver) {
 634   bool will_link;
 635   ciMethod* method = str->get_method(will_link);
 636   if (!will_link) {
 637     // We weren't able to find the method.






 638     ciKlass* unloaded_holder = method->holder();
 639     trap(str, unloaded_holder, str->get_method_holder_index());

 640   } else {
 641     ciSignature* signature = method->signature();
 642     ciSignatureStream sigstr(signature);
 643     int arg_size = signature->size();
 644     int stack_base = stack_size() - arg_size;
 645     int i = 0;
 646     for( ; !sigstr.at_return_type(); sigstr.next()) {
 647       ciType* type = sigstr.type();
 648       ciType* stack_type = type_at(stack(stack_base + i++));
 649       // Do I want to check this type?
 650       // assert(stack_type->is_subtype_of(type), "bad type for field value");
 651       if (type->is_two_word()) {
 652         ciType* stack_type2 = type_at(stack(stack_base + i++));
 653         assert(stack_type2->equals(half_type(type)), "must be 2nd half");
 654       }
 655     }
 656     assert(arg_size == i, "must match");
 657     for (int j = 0; j < arg_size; j++) {
 658       pop();
 659     }


1275       store_to_local(lnum);
1276       break;
1277     }
1278   case Bytecodes::_iload:   load_local_int(str->get_index()); break;
1279   case Bytecodes::_iload_0: load_local_int(0);                      break;
1280   case Bytecodes::_iload_1: load_local_int(1);                      break;
1281   case Bytecodes::_iload_2: load_local_int(2);                      break;
1282   case Bytecodes::_iload_3: load_local_int(3);                      break;
1283 
1284   case Bytecodes::_instanceof:
1285     {
1286       // Check for uncommon trap:
1287       do_checkcast(str);
1288       pop_object();
1289       push_int();
1290       break;
1291     }
1292   case Bytecodes::_invokeinterface: do_invoke(str, true);           break;
1293   case Bytecodes::_invokespecial:   do_invoke(str, true);           break;
1294   case Bytecodes::_invokestatic:    do_invoke(str, false);          break;
1295 
1296   case Bytecodes::_invokevirtual:   do_invoke(str, true);           break;

1297 
1298   case Bytecodes::_istore:   store_local_int(str->get_index());     break;
1299   case Bytecodes::_istore_0: store_local_int(0);                    break;
1300   case Bytecodes::_istore_1: store_local_int(1);                    break;
1301   case Bytecodes::_istore_2: store_local_int(2);                    break;
1302   case Bytecodes::_istore_3: store_local_int(3);                    break;
1303 
1304   case Bytecodes::_jsr:
1305   case Bytecodes::_jsr_w: do_jsr(str);                              break;
1306 
1307   case Bytecodes::_l2d:
1308     {
1309       pop_long();
1310       push_double();
1311       break;
1312     }
1313   case Bytecodes::_l2f:
1314     {
1315       pop_long();
1316       push_float();




 618       // get an endless loop of recompilations, when all the code
 619       // needs to do is load a series of null values.  Also, a trap
 620       // here can make an OSR entry point unreachable, triggering the
 621       // assert on non_osr_block in ciTypeFlow::get_start_state.
 622       // (See bug 4379915.)
 623       do_null_assert(field_type->as_klass());
 624     } else {
 625       push_translate(field_type);
 626     }
 627   }
 628 }
 629 
 630 // ------------------------------------------------------------------
 631 // ciTypeFlow::StateVector::do_invoke
 632 void ciTypeFlow::StateVector::do_invoke(ciBytecodeStream* str,
 633                                         bool has_receiver) {
 634   bool will_link;
 635   ciMethod* method = str->get_method(will_link);
 636   if (!will_link) {
 637     // We weren't able to find the method.
 638     if (str->cur_bc() == Bytecodes::_invokedynamic) {
 639       trap(str, NULL,
 640            Deoptimization::make_trap_request
 641            (Deoptimization::Reason_uninitialized,
 642             Deoptimization::Action_reinterpret));
 643     } else {
 644       ciKlass* unloaded_holder = method->holder();
 645       trap(str, unloaded_holder, str->get_method_holder_index());
 646     }
 647   } else {
 648     ciSignature* signature = method->signature();
 649     ciSignatureStream sigstr(signature);
 650     int arg_size = signature->size();
 651     int stack_base = stack_size() - arg_size;
 652     int i = 0;
 653     for( ; !sigstr.at_return_type(); sigstr.next()) {
 654       ciType* type = sigstr.type();
 655       ciType* stack_type = type_at(stack(stack_base + i++));
 656       // Do I want to check this type?
 657       // assert(stack_type->is_subtype_of(type), "bad type for field value");
 658       if (type->is_two_word()) {
 659         ciType* stack_type2 = type_at(stack(stack_base + i++));
 660         assert(stack_type2->equals(half_type(type)), "must be 2nd half");
 661       }
 662     }
 663     assert(arg_size == i, "must match");
 664     for (int j = 0; j < arg_size; j++) {
 665       pop();
 666     }


1282       store_to_local(lnum);
1283       break;
1284     }
1285   case Bytecodes::_iload:   load_local_int(str->get_index()); break;
1286   case Bytecodes::_iload_0: load_local_int(0);                      break;
1287   case Bytecodes::_iload_1: load_local_int(1);                      break;
1288   case Bytecodes::_iload_2: load_local_int(2);                      break;
1289   case Bytecodes::_iload_3: load_local_int(3);                      break;
1290 
1291   case Bytecodes::_instanceof:
1292     {
1293       // Check for uncommon trap:
1294       do_checkcast(str);
1295       pop_object();
1296       push_int();
1297       break;
1298     }
1299   case Bytecodes::_invokeinterface: do_invoke(str, true);           break;
1300   case Bytecodes::_invokespecial:   do_invoke(str, true);           break;
1301   case Bytecodes::_invokestatic:    do_invoke(str, false);          break;

1302   case Bytecodes::_invokevirtual:   do_invoke(str, true);           break;
1303   case Bytecodes::_invokedynamic:   do_invoke(str, false);          break;
1304 
1305   case Bytecodes::_istore:   store_local_int(str->get_index());     break;
1306   case Bytecodes::_istore_0: store_local_int(0);                    break;
1307   case Bytecodes::_istore_1: store_local_int(1);                    break;
1308   case Bytecodes::_istore_2: store_local_int(2);                    break;
1309   case Bytecodes::_istore_3: store_local_int(3);                    break;
1310 
1311   case Bytecodes::_jsr:
1312   case Bytecodes::_jsr_w: do_jsr(str);                              break;
1313 
1314   case Bytecodes::_l2d:
1315     {
1316       pop_long();
1317       push_double();
1318       break;
1319     }
1320   case Bytecodes::_l2f:
1321     {
1322       pop_long();
1323       push_float();


src/share/vm/ci/ciTypeFlow.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File