src/share/vm/opto/doCall.cpp

changeset 2744
4124a5a27707
parent 2687
3d58a4983660
child 2898
e2a92dd0d3d2
     1.1 --- a/src/share/vm/opto/doCall.cpp	Thu Apr 07 17:12:21 2011 -0700
     1.2 +++ b/src/share/vm/opto/doCall.cpp	Thu Apr 07 17:12:23 2011 -0700
     1.3 @@ -63,6 +63,7 @@
     1.4                                         JVMState* jvms, bool allow_inline,
     1.5                                         float prof_factor) {
     1.6    CallGenerator* cg;
     1.7 +  guarantee(call_method != NULL, "failed method resolution");
     1.8  
     1.9    // Dtrace currently doesn't work unless all calls are vanilla
    1.10    if (env()->dtrace_method_probes()) {
    1.11 @@ -130,8 +131,9 @@
    1.12  
    1.13          // Get an adapter for the MethodHandle.
    1.14          ciMethod* target_method = method_handle->get_method_handle_adapter();
    1.15 -
    1.16 -        CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor);
    1.17 +        CallGenerator* hit_cg = NULL;
    1.18 +        if (target_method != NULL)
    1.19 +          hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor);
    1.20          if (hit_cg != NULL && hit_cg->is_inline())
    1.21            return hit_cg;
    1.22        }
    1.23 @@ -152,8 +154,9 @@
    1.24  
    1.25        // Get an adapter for the MethodHandle.
    1.26        ciMethod* target_method = method_handle->get_invokedynamic_adapter();
    1.27 -
    1.28 -      CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor);
    1.29 +      CallGenerator* hit_cg = NULL;
    1.30 +      if (target_method != NULL)
    1.31 +        hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor);
    1.32        if (hit_cg != NULL && hit_cg->is_inline()) {
    1.33          CallGenerator* miss_cg = CallGenerator::for_dynamic_call(call_method);
    1.34          return CallGenerator::for_predicted_dynamic_call(method_handle, miss_cg, hit_cg, prof_factor);

mercurial