src/share/vm/c1/c1_LIRGenerator.cpp

changeset 3969
1d7922586cf6
parent 3848
e2fe93124108
child 4002
09aad8452938
     1.1 --- a/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Jul 23 13:04:59 2012 -0700
     1.2 +++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Tue Jul 24 10:51:00 2012 -0700
     1.3 @@ -1940,6 +1940,14 @@
     1.4  }
     1.5  
     1.6  
     1.7 +void LIRGenerator::do_TypeCast(TypeCast* x) {
     1.8 +  LIRItem value(x->obj(), this);
     1.9 +  value.load_item();
    1.10 +  // the result is the same as from the node we are casting
    1.11 +  set_result(x, value.result());
    1.12 +}
    1.13 +
    1.14 +
    1.15  void LIRGenerator::do_Throw(Throw* x) {
    1.16    LIRItem exception(x->exception(), this);
    1.17    exception.load_item();
    1.18 @@ -2767,7 +2775,10 @@
    1.19    // JSR 292
    1.20    // Preserve the SP over MethodHandle call sites.
    1.21    ciMethod* target = x->target();
    1.22 -  if (target->is_method_handle_invoke()) {
    1.23 +  bool is_method_handle_invoke = (// %%% FIXME: Are both of these relevant?
    1.24 +                                  target->is_method_handle_intrinsic() ||
    1.25 +                                  target->is_compiled_lambda_form());
    1.26 +  if (is_method_handle_invoke) {
    1.27      info->set_is_method_handle_invoke(true);
    1.28      __ move(FrameMap::stack_pointer(), FrameMap::method_handle_invoke_SP_save_opr());
    1.29    }
    1.30 @@ -2843,7 +2854,7 @@
    1.31  
    1.32    // JSR 292
    1.33    // Restore the SP after MethodHandle call sites.
    1.34 -  if (target->is_method_handle_invoke()) {
    1.35 +  if (is_method_handle_invoke) {
    1.36      __ move(FrameMap::method_handle_invoke_SP_save_opr(), FrameMap::stack_pointer());
    1.37    }
    1.38  
    1.39 @@ -3027,7 +3038,7 @@
    1.40      recv = new_register(T_OBJECT);
    1.41      __ move(value.result(), recv);
    1.42    }
    1.43 -  __ profile_call(x->method(), x->bci_of_invoke(), mdo, recv, tmp, x->known_holder());
    1.44 +  __ profile_call(x->method(), x->bci_of_invoke(), x->callee(), mdo, recv, tmp, x->known_holder());
    1.45  }
    1.46  
    1.47  void LIRGenerator::do_ProfileInvoke(ProfileInvoke* x) {

mercurial