1138N/A/*
2002N/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/ciClassList.hpp"
1879N/A#include "ci/ciMethodHandle.hpp"
1879N/A#include "ci/ciUtilities.hpp"
3932N/A#include "classfile/javaClasses.hpp"
1138N/A
1138N/A// ------------------------------------------------------------------
3932N/A// ciMethodHandle::get_vmtarget
1138N/A//
3932N/A// Return: MH.form -> LF.vmentry -> MN.vmtarget
3932N/AciMethod* ciMethodHandle::get_vmtarget() const {
1138N/A VM_ENTRY_MARK;
3932N/A oop form_oop = java_lang_invoke_MethodHandle::form(get_oop());
3932N/A oop vmentry_oop = java_lang_invoke_LambdaForm::vmentry(form_oop);
3932N/A oop vmtarget_oop = java_lang_invoke_MemberName::vmtarget(vmentry_oop);
3932N/A return CURRENT_ENV->get_object(vmtarget_oop)->as_method();
1138N/A}