src/share/vm/opto/callGenerator.cpp

changeset 3094
b27c72d69fd1
parent 3050
fdb992d83a87
child 3100
a32de5085326
     1.1 --- a/src/share/vm/opto/callGenerator.cpp	Sat Aug 27 00:23:47 2011 -0700
     1.2 +++ b/src/share/vm/opto/callGenerator.cpp	Mon Aug 29 05:07:35 2011 -0700
     1.3 @@ -336,7 +336,7 @@
     1.4  }
     1.5  
     1.6  CallGenerator* CallGenerator::for_dynamic_call(ciMethod* m) {
     1.7 -  assert(m->is_method_handle_invoke(), "for_dynamic_call mismatch");
     1.8 +  assert(m->is_method_handle_invoke() || m->is_method_handle_adapter(), "for_dynamic_call mismatch");
     1.9    return new DynamicCallGenerator(m);
    1.10  }
    1.11  
    1.12 @@ -715,9 +715,9 @@
    1.13      // Get an adapter for the MethodHandle.
    1.14      ciMethod* target_method = method_handle->get_method_handle_adapter();
    1.15      if (target_method != NULL) {
    1.16 -      CallGenerator* hit_cg = Compile::current()->call_generator(target_method, -1, false, jvms, true, 1);
    1.17 -      if (hit_cg != NULL && hit_cg->is_inline())
    1.18 -        return hit_cg;
    1.19 +      CallGenerator* cg = Compile::current()->call_generator(target_method, -1, false, jvms, true, PROB_ALWAYS);
    1.20 +      if (cg != NULL && cg->is_inline())
    1.21 +        return cg;
    1.22      }
    1.23    } else if (method_handle->Opcode() == Op_Phi && method_handle->req() == 3 &&
    1.24               method_handle->in(1)->Opcode() == Op_ConP && method_handle->in(2)->Opcode() == Op_ConP) {
    1.25 @@ -754,13 +754,13 @@
    1.26    ciMethod* target_method = method_handle->get_invokedynamic_adapter();
    1.27    if (target_method != NULL) {
    1.28      Compile *C = Compile::current();
    1.29 -    CallGenerator* hit_cg = C->call_generator(target_method, -1, false, jvms, true, PROB_ALWAYS);
    1.30 -    if (hit_cg != NULL && hit_cg->is_inline()) {
    1.31 +    CallGenerator* cg = C->call_generator(target_method, -1, false, jvms, true, PROB_ALWAYS);
    1.32 +    if (cg != NULL && cg->is_inline()) {
    1.33        // Add a dependence for invalidation of the optimization.
    1.34        if (call_site->is_mutable_call_site()) {
    1.35 -        C->dependencies()->assert_call_site_target_value(C->env()->CallSite_klass(), call_site, method_handle);
    1.36 +        C->dependencies()->assert_call_site_target_value(call_site, method_handle);
    1.37        }
    1.38 -      return hit_cg;
    1.39 +      return cg;
    1.40      }
    1.41    }
    1.42    return NULL;

mercurial