1820 CompileLog* log = compilation()->log(); |
1820 CompileLog* log = compilation()->log(); |
1821 if (log != NULL) |
1821 if (log != NULL) |
1822 log->elem("call method='%d' instr='%s'", |
1822 log->elem("call method='%d' instr='%s'", |
1823 log->identify(target), |
1823 log->identify(target), |
1824 Bytecodes::name(code)); |
1824 Bytecodes::name(code)); |
|
1825 |
|
1826 // invoke-special-super |
|
1827 if (bc_raw == Bytecodes::_invokespecial && !target->is_object_initializer()) { |
|
1828 ciInstanceKlass* sender_klass = |
|
1829 calling_klass->is_anonymous() ? calling_klass->host_klass() : |
|
1830 calling_klass; |
|
1831 if (sender_klass->is_interface()) { |
|
1832 int index = state()->stack_size() - (target->arg_size_no_receiver() + 1); |
|
1833 Value receiver = state()->stack_at(index); |
|
1834 CheckCast* c = new CheckCast(sender_klass, receiver, copy_state_before()); |
|
1835 c->set_invokespecial_receiver_check(); |
|
1836 state()->stack_at_put(index, append_split(c)); |
|
1837 } |
|
1838 } |
1825 |
1839 |
1826 // Some methods are obviously bindable without any type checks so |
1840 // Some methods are obviously bindable without any type checks so |
1827 // convert them directly to an invokespecial or invokestatic. |
1841 // convert them directly to an invokespecial or invokestatic. |
1828 if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) { |
1842 if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) { |
1829 switch (bc_raw) { |
1843 switch (bc_raw) { |