< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2019, 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.
*** 1374,1395 **** tty->print_cr(" at pc: " INTPTR_FORMAT " to code: " INTPTR_FORMAT, p2i(caller_frame.pc()), p2i(callee_method->code())); } #endif ! // Do not patch call site for static call to another class ! // when the class is not fully initialized. ! if (invoke_code == Bytecodes::_invokestatic) { ! if (!callee_method->method_holder()->is_initialized() && ! callee_method->method_holder() != caller_nm->method()->method_holder()) { assert(callee_method->method_holder()->is_linked(), "must be"); return callee_method; - } else { - assert(callee_method->method_holder()->is_initialized() || - callee_method->method_holder()->is_reentrant_initialization(thread), - "invalid class initialization state for invoke_static"); - } } // JSR 292 key invariant: // If the resolved method is a MethodHandle invoke target, the call // site must be a MethodHandle call site, because the lambda form might tail-call --- 1374,1389 ---- tty->print_cr(" at pc: " INTPTR_FORMAT " to code: " INTPTR_FORMAT, p2i(caller_frame.pc()), p2i(callee_method->code())); } #endif ! // Do not patch call site for static call when the class is not ! // fully initialized. ! if (invoke_code == Bytecodes::_invokestatic && ! !callee_method->method_holder()->is_initialized()) { assert(callee_method->method_holder()->is_linked(), "must be"); return callee_method; } // JSR 292 key invariant: // If the resolved method is a MethodHandle invoke target, the call // site must be a MethodHandle call site, because the lambda form might tail-call
< prev index next >