src/share/vm/c1/c1_GraphBuilder.cpp

changeset 8739
0b85ccd62409
parent 8415
d109bda16490
child 8758
e7db67a9ddfd
child 9000
f5ded236c413
     1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Dec 13 10:07:12 2016 -0800
     1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Dec 13 14:37:04 2016 -0500
     1.3 @@ -1823,6 +1823,20 @@
     1.4                  log->identify(target),
     1.5                  Bytecodes::name(code));
     1.6  
     1.7 +  // invoke-special-super
     1.8 +  if (bc_raw == Bytecodes::_invokespecial && !target->is_object_initializer()) {
     1.9 +    ciInstanceKlass* sender_klass =
    1.10 +          calling_klass->is_anonymous() ? calling_klass->host_klass() :
    1.11 +                                          calling_klass;
    1.12 +    if (sender_klass->is_interface()) {
    1.13 +      int index = state()->stack_size() - (target->arg_size_no_receiver() + 1);
    1.14 +      Value receiver = state()->stack_at(index);
    1.15 +      CheckCast* c = new CheckCast(sender_klass, receiver, copy_state_before());
    1.16 +      c->set_invokespecial_receiver_check();
    1.17 +      state()->stack_at_put(index, append_split(c));
    1.18 +    }
    1.19 +  }
    1.20 +
    1.21    // Some methods are obviously bindable without any type checks so
    1.22    // convert them directly to an invokespecial or invokestatic.
    1.23    if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) {

mercurial