< prev index next >
src/hotspot/cpu/x86/templateTable_x86.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 3710,3727 ****
void TemplateTable::invokeinterface(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
! prepare_invoke(byte_no, rax, rbx, // get f1 Klass*, f2 itable index
rcx, rdx); // recv, flags
// rax: interface klass (from f1)
! // rbx: itable index (from f2)
// rcx: receiver
// rdx: flags
// Special case of invokeinterface called for virtual method of
// java.lang.Object. See cpCacheOop.cpp for details.
// This code isn't produced by javac, but could be produced by
// another compliant java compiler.
Label notMethod;
--- 3710,3744 ----
void TemplateTable::invokeinterface(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
! prepare_invoke(byte_no, rax, rbx, // get f1 Klass*, f2 itable index or Method*
rcx, rdx); // recv, flags
// rax: interface klass (from f1)
! // rbx: itable index or Method* (from f2)
// rcx: receiver
// rdx: flags
+ // Check for private method invocation - indicated by vfinal
+ Label notVFinal;
+ __ movl(rlocals, rdx);
+ __ andl(rlocals, (1 << ConstantPoolCacheEntry::is_vfinal_shift));
+ __ jcc(Assembler::zero, notVFinal);
+
+ // do the call - rbx is actually the method to call
+
+ __ null_check(rcx);
+
+ __ profile_final_call(rdx);
+ __ profile_arguments_type(rdx, rbx, rbcp, true);
+
+ __ jump_from_interpreted(rbx, rdx);
+
+ __ bind(notVFinal);
+
// Special case of invokeinterface called for virtual method of
// java.lang.Object. See cpCacheOop.cpp for details.
// This code isn't produced by javac, but could be produced by
// another compliant java compiler.
Label notMethod;
< prev index next >