1138N/A/*
2204N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
1138N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1138N/A *
1138N/A * This code is free software; you can redistribute it and/or modify it
1138N/A * under the terms of the GNU General Public License version 2 only, as
1138N/A * published by the Free Software Foundation.
1138N/A *
1138N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1138N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1138N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1138N/A * version 2 for more details (a copy is included in the LICENSE file that
1138N/A * accompanied this code).
1138N/A *
1138N/A * You should have received a copy of the GNU General Public License version
1138N/A * 2 along with this work; if not, write to the Free Software Foundation,
1138N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1138N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
1138N/A *
1138N/A */
1138N/A
1879N/A#include "precompiled.hpp"
1879N/A#include "ci/ciCallSite.hpp"
1879N/A#include "ci/ciUtilities.hpp"
1138N/A
1138N/A// ciCallSite
1138N/A
2677N/Abool ciCallSite::is_constant_call_site() {
2677N/A return klass()->is_subclass_of(CURRENT_ENV->ConstantCallSite_klass());
2677N/A}
2677N/Abool ciCallSite::is_mutable_call_site() {
2677N/A return klass()->is_subclass_of(CURRENT_ENV->MutableCallSite_klass());
2677N/A}
2677N/Abool ciCallSite::is_volatile_call_site() {
2677N/A return klass()->is_subclass_of(CURRENT_ENV->VolatileCallSite_klass());
2677N/A}
2677N/A
1138N/A// ------------------------------------------------------------------
1138N/A// ciCallSite::get_target
1138N/A//
1138N/A// Return the target MethodHandle of this CallSite.
1138N/AciMethodHandle* ciCallSite::get_target() const {
1138N/A VM_ENTRY_MARK;
2204N/A oop method_handle_oop = java_lang_invoke_CallSite::target(get_oop());
1138N/A return CURRENT_ENV->get_object(method_handle_oop)->as_method_handle();
1138N/A}
1138N/A
1138N/A// ------------------------------------------------------------------
1138N/A// ciCallSite::print
1138N/A//
1138N/A// Print debugging information about the CallSite.
1138N/Avoid ciCallSite::print() {
1138N/A Unimplemented();
1138N/A}