comparison src/share/vm/ci/ciMethodHandle.cpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 1d7922586cf6
children
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
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 }