comparison src/share/vm/ci/ciMethodHandle.cpp @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents da91efe96a93
children
comparison
equal deleted inserted replaced
6711:ae13cc658b80 6948:e522a00b91aa
1 /* 1 /*
2 * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
34 // Return: MH.form -> LF.vmentry -> MN.vmtarget 34 // Return: MH.form -> LF.vmentry -> MN.vmtarget
35 ciMethod* ciMethodHandle::get_vmtarget() const { 35 ciMethod* ciMethodHandle::get_vmtarget() const {
36 VM_ENTRY_MARK; 36 VM_ENTRY_MARK;
37 oop form_oop = java_lang_invoke_MethodHandle::form(get_oop()); 37 oop form_oop = java_lang_invoke_MethodHandle::form(get_oop());
38 oop vmentry_oop = java_lang_invoke_LambdaForm::vmentry(form_oop); 38 oop vmentry_oop = java_lang_invoke_LambdaForm::vmentry(form_oop);
39 oop vmtarget_oop = java_lang_invoke_MemberName::vmtarget(vmentry_oop); 39 // FIXME: Share code with ciMemberName::get_vmtarget
40 return CURRENT_ENV->get_object(vmtarget_oop)->as_method(); 40 Metadata* vmtarget = java_lang_invoke_MemberName::vmtarget(vmentry_oop);
41 if (vmtarget->is_method())
42 return CURRENT_ENV->get_method((Method*) vmtarget);
43 // FIXME: What if the vmtarget is a Klass?
44 assert(false, "");
45 return NULL;
41 } 46 }