src/share/vm/c1/c1_GraphBuilder.cpp

changeset 8758
e7db67a9ddfd
parent 8652
057571442f86
parent 8739
0b85ccd62409
child 8856
ac27a9c85bea
child 8882
279a5dd96f9b
child 9007
91894ffc746c
     1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp	Mon Mar 27 08:21:39 2017 -0700
     1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Mon Mar 27 11:31:27 2017 -0700
     1.3 @@ -1837,6 +1837,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