aoqi@0: /* aoqi@0: * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: * aoqi@0: */ aoqi@0: aoqi@0: #include "precompiled.hpp" aoqi@0: #include "classfile/systemDictionary.hpp" aoqi@0: #include "code/codeCache.hpp" aoqi@0: #include "code/compiledIC.hpp" aoqi@0: #include "code/icBuffer.hpp" aoqi@0: #include "code/nmethod.hpp" aoqi@0: #include "code/vtableStubs.hpp" aoqi@0: #include "interpreter/interpreter.hpp" aoqi@0: #include "interpreter/linkResolver.hpp" aoqi@0: #include "memory/metadataFactory.hpp" aoqi@0: #include "memory/oopFactory.hpp" aoqi@0: #include "oops/method.hpp" aoqi@0: #include "oops/oop.inline.hpp" aoqi@0: #include "oops/symbol.hpp" aoqi@0: #include "runtime/icache.hpp" aoqi@0: #include "runtime/sharedRuntime.hpp" aoqi@0: #include "runtime/stubRoutines.hpp" aoqi@0: #include "utilities/events.hpp" aoqi@0: aoqi@0: aoqi@0: // Release the CompiledICHolder* associated with this call site is there is one. aoqi@0: void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) { aoqi@0: // This call site might have become stale so inspect it carefully. aoqi@0: NativeCall* call = nativeCall_at(call_site->addr()); aoqi@0: if (is_icholder_entry(call->destination())) { aoqi@0: NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value()); aoqi@0: InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data()); aoqi@0: } aoqi@0: } aoqi@0: aoqi@0: bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { aoqi@0: // This call site might have become stale so inspect it carefully. aoqi@0: NativeCall* call = nativeCall_at(call_site->addr()); aoqi@0: return is_icholder_entry(call->destination()); aoqi@0: } aoqi@0: aoqi@0: // ---------------------------------------------------------------------------- aoqi@0: vkempik@8427: address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { aoqi@0: ShouldNotReachHere(); // Only needed for COMPILER2. vkempik@8427: return NULL; aoqi@0: } aoqi@0: aoqi@0: int CompiledStaticCall::to_interp_stub_size() { aoqi@0: ShouldNotReachHere(); // Only needed for COMPILER2. aoqi@0: return 0; aoqi@0: } aoqi@0: aoqi@0: // Relocation entries for call stub, compiled java to interpreter. aoqi@0: int CompiledStaticCall::reloc_to_interp_stub() { aoqi@0: ShouldNotReachHere(); // Only needed for COMPILER2. aoqi@0: return 0; aoqi@0: } aoqi@0: aoqi@0: void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) { aoqi@0: ShouldNotReachHere(); // Only needed for COMPILER2. aoqi@0: } aoqi@0: aoqi@0: void CompiledStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) { aoqi@0: ShouldNotReachHere(); // Only needed for COMPILER2. aoqi@0: } aoqi@0: aoqi@0: //----------------------------------------------------------------------------- aoqi@0: // Non-product mode code. aoqi@0: #ifndef PRODUCT aoqi@0: aoqi@0: void CompiledStaticCall::verify() { aoqi@0: ShouldNotReachHere(); // Only needed for COMPILER2. aoqi@0: } aoqi@0: aoqi@0: #endif // !PRODUCT