src/share/vm/opto/doCall.cpp

changeset 2903
fabcf26ee72f
parent 2898
e2a92dd0d3d2
child 2949
f918d6096e23
     1.1 --- a/src/share/vm/opto/doCall.cpp	Thu May 12 10:33:17 2011 -0700
     1.2 +++ b/src/share/vm/opto/doCall.cpp	Thu May 12 14:04:48 2011 -0700
     1.3 @@ -62,7 +62,10 @@
     1.4  CallGenerator* Compile::call_generator(ciMethod* call_method, int vtable_index, bool call_is_virtual,
     1.5                                         JVMState* jvms, bool allow_inline,
     1.6                                         float prof_factor) {
     1.7 -  CallGenerator* cg;
     1.8 +  CallGenerator*  cg;
     1.9 +  ciMethod*       caller   = jvms->method();
    1.10 +  int             bci      = jvms->bci();
    1.11 +  Bytecodes::Code bytecode = caller->java_code_at_bci(bci);
    1.12    guarantee(call_method != NULL, "failed method resolution");
    1.13  
    1.14    // Dtrace currently doesn't work unless all calls are vanilla
    1.15 @@ -73,8 +76,7 @@
    1.16    // Note: When we get profiling during stage-1 compiles, we want to pull
    1.17    // from more specific profile data which pertains to this inlining.
    1.18    // Right now, ignore the information in jvms->caller(), and do method[bci].
    1.19 -  ciCallProfile profile    = jvms->method()->call_profile_at_bci(jvms->bci());
    1.20 -  Bytecodes::Code bytecode = jvms->method()->java_code_at_bci(jvms->bci());
    1.21 +  ciCallProfile profile = caller->call_profile_at_bci(bci);
    1.22  
    1.23    // See how many times this site has been invoked.
    1.24    int site_count = profile.count();
    1.25 @@ -126,9 +128,10 @@
    1.26          ciObject* const_oop = oop_ptr->const_oop();
    1.27          ciMethodHandle* method_handle = const_oop->as_method_handle();
    1.28  
    1.29 -        // Set the actually called method to have access to the class
    1.30 -        // and signature in the MethodHandleCompiler.
    1.31 +        // Set the callee to have access to the class and signature in
    1.32 +        // the MethodHandleCompiler.
    1.33          method_handle->set_callee(call_method);
    1.34 +        method_handle->set_caller(caller);
    1.35          method_handle->set_call_profile(&profile);
    1.36  
    1.37          // Get an adapter for the MethodHandle.
    1.38 @@ -150,9 +153,10 @@
    1.39        ciCallSite*     call_site     = str.get_call_site();
    1.40        ciMethodHandle* method_handle = call_site->get_target();
    1.41  
    1.42 -      // Set the actually called method to have access to the class
    1.43 -      // and signature in the MethodHandleCompiler.
    1.44 +      // Set the callee to have access to the class and signature in
    1.45 +      // the MethodHandleCompiler.
    1.46        method_handle->set_callee(call_method);
    1.47 +      method_handle->set_caller(caller);
    1.48        method_handle->set_call_profile(&profile);
    1.49  
    1.50        // Get an adapter for the MethodHandle.

mercurial