twisti@3969: /* twisti@3969: * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. twisti@3969: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. twisti@3969: * twisti@3969: * This code is free software; you can redistribute it and/or modify it twisti@3969: * under the terms of the GNU General Public License version 2 only, as twisti@3969: * published by the Free Software Foundation. twisti@3969: * twisti@3969: * This code is distributed in the hope that it will be useful, but WITHOUT twisti@3969: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or twisti@3969: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License twisti@3969: * version 2 for more details (a copy is included in the LICENSE file that twisti@3969: * accompanied this code). twisti@3969: * twisti@3969: * You should have received a copy of the GNU General Public License version twisti@3969: * 2 along with this work; if not, write to the Free Software Foundation, twisti@3969: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. twisti@3969: * twisti@3969: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA twisti@3969: * or visit www.oracle.com if you need additional information or have any twisti@3969: * questions. twisti@3969: * twisti@3969: */ twisti@3969: twisti@3969: #include "precompiled.hpp" twisti@3969: #include "ci/ciClassList.hpp" twisti@3969: #include "ci/ciMemberName.hpp" twisti@3969: #include "ci/ciUtilities.hpp" twisti@3969: #include "classfile/javaClasses.hpp" twisti@3969: twisti@3969: // ------------------------------------------------------------------ twisti@3969: // ciMemberName::get_vmtarget twisti@3969: // twisti@3969: // Return: MN.vmtarget twisti@3969: ciMethod* ciMemberName::get_vmtarget() const { twisti@3969: VM_ENTRY_MARK; coleenp@4037: // FIXME: Share code with ciMethodHandle::get_vmtarget coleenp@4037: Metadata* vmtarget = java_lang_invoke_MemberName::vmtarget(get_oop()); coleenp@4037: if (vmtarget->is_method()) coleenp@4037: return CURRENT_ENV->get_method((Method*) vmtarget); coleenp@4037: // FIXME: What if the vmtarget is a Klass? coleenp@4037: assert(false, ""); coleenp@4037: return NULL; twisti@3969: }