comparison src/share/vm/prims/methodHandles.hpp @ 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 65d07d9ee446
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2008, 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.
53 // working with member names 53 // working with member names
54 static Handle resolve_MemberName(Handle mname, TRAPS); // compute vmtarget/vmindex from name/type 54 static Handle resolve_MemberName(Handle mname, TRAPS); // compute vmtarget/vmindex from name/type
55 static void expand_MemberName(Handle mname, int suppress, TRAPS); // expand defc/name/type if missing 55 static void expand_MemberName(Handle mname, int suppress, TRAPS); // expand defc/name/type if missing
56 static Handle new_MemberName(TRAPS); // must be followed by init_MemberName 56 static Handle new_MemberName(TRAPS); // must be followed by init_MemberName
57 static oop init_MemberName(oop mname_oop, oop target_oop); // compute vmtarget/vmindex from target 57 static oop init_MemberName(oop mname_oop, oop target_oop); // compute vmtarget/vmindex from target
58 static oop init_method_MemberName(oop mname_oop, methodOop m, bool do_dispatch, 58 static oop init_method_MemberName(oop mname_oop, Method* m, bool do_dispatch,
59 klassOop receiver_limit); 59 Klass* receiver_limit);
60 static oop init_field_MemberName(oop mname_oop, klassOop field_holder, 60 static oop init_field_MemberName(oop mname_oop, Klass* field_holder,
61 AccessFlags mods, oop type, oop name, 61 AccessFlags mods, oop type, oop name,
62 intptr_t offset, bool is_setter = false); 62 intptr_t offset, bool is_setter = false);
63 static Handle init_method_MemberName(oop mname_oop, CallInfo& info, TRAPS); 63 static Handle init_method_MemberName(oop mname_oop, CallInfo& info, TRAPS);
64 static Handle init_field_MemberName(oop mname_oop, FieldAccessInfo& info, TRAPS); 64 static Handle init_field_MemberName(oop mname_oop, FieldAccessInfo& info, TRAPS);
65 static int method_ref_kind(methodOop m, bool do_dispatch_if_possible = true); 65 static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true);
66 static int find_MemberNames(klassOop k, Symbol* name, Symbol* sig, 66 static int find_MemberNames(Klass* k, Symbol* name, Symbol* sig,
67 int mflags, klassOop caller, 67 int mflags, Klass* caller,
68 int skip, objArrayOop results); 68 int skip, objArrayOop results);
69 // bit values for suppress argument to expand_MemberName: 69 // bit values for suppress argument to expand_MemberName:
70 enum { _suppress_defc = 1, _suppress_name = 2, _suppress_type = 4 }; 70 enum { _suppress_defc = 1, _suppress_name = 2, _suppress_type = 4 };
71 71
72 // Generate MethodHandles adapters. 72 // Generate MethodHandles adapters.
114 } 114 }
115 115
116 static Symbol* signature_polymorphic_intrinsic_name(vmIntrinsics::ID iid); 116 static Symbol* signature_polymorphic_intrinsic_name(vmIntrinsics::ID iid);
117 static int signature_polymorphic_intrinsic_ref_kind(vmIntrinsics::ID iid); 117 static int signature_polymorphic_intrinsic_ref_kind(vmIntrinsics::ID iid);
118 118
119 static vmIntrinsics::ID signature_polymorphic_name_id(klassOop klass, Symbol* name); 119 static vmIntrinsics::ID signature_polymorphic_name_id(Klass* klass, Symbol* name);
120 static vmIntrinsics::ID signature_polymorphic_name_id(Symbol* name); 120 static vmIntrinsics::ID signature_polymorphic_name_id(Symbol* name);
121 static bool is_signature_polymorphic_name(Symbol* name) { 121 static bool is_signature_polymorphic_name(Symbol* name) {
122 return signature_polymorphic_name_id(name) != vmIntrinsics::_none; 122 return signature_polymorphic_name_id(name) != vmIntrinsics::_none;
123 } 123 }
124 static bool is_method_handle_invoke_name(klassOop klass, Symbol* name); 124 static bool is_method_handle_invoke_name(Klass* klass, Symbol* name);
125 static bool is_signature_polymorphic_name(klassOop klass, Symbol* name) { 125 static bool is_signature_polymorphic_name(Klass* klass, Symbol* name) {
126 return signature_polymorphic_name_id(klass, name) != vmIntrinsics::_none; 126 return signature_polymorphic_name_id(klass, name) != vmIntrinsics::_none;
127 } 127 }
128 128
129 enum { 129 enum {
130 // format of query to getConstant: 130 // format of query to getConstant: