Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/reflection.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 | 19241ae0d839 |
children | ade95d680b42 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 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. |
43 class FieldStream; | 43 class FieldStream; |
44 | 44 |
45 class Reflection: public AllStatic { | 45 class Reflection: public AllStatic { |
46 private: | 46 private: |
47 // Access checking | 47 // Access checking |
48 static bool reflect_check_access(klassOop field_class, AccessFlags acc, klassOop target_class, bool is_method_invoke, TRAPS); | 48 static bool reflect_check_access(Klass* field_class, AccessFlags acc, Klass* target_class, bool is_method_invoke, TRAPS); |
49 | 49 |
50 // Conversion | 50 // Conversion |
51 static klassOop basic_type_mirror_to_arrayklass(oop basic_type_mirror, TRAPS); | 51 static Klass* basic_type_mirror_to_arrayklass(oop basic_type_mirror, TRAPS); |
52 static oop basic_type_arrayklass_to_mirror(klassOop basic_type_arrayklass, TRAPS); | 52 static oop basic_type_arrayklass_to_mirror(Klass* basic_type_arrayklass, TRAPS); |
53 | 53 |
54 static objArrayHandle get_parameter_types(methodHandle method, int parameter_count, oop* return_type, TRAPS); | 54 static objArrayHandle get_parameter_types(methodHandle method, int parameter_count, oop* return_type, TRAPS); |
55 static objArrayHandle get_exception_types(methodHandle method, TRAPS); | 55 static objArrayHandle get_exception_types(methodHandle method, TRAPS); |
56 // Creating new java.lang.reflect.xxx wrappers | 56 // Creating new java.lang.reflect.xxx wrappers |
57 static Handle new_type(Symbol* signature, KlassHandle k, TRAPS); | 57 static Handle new_type(Symbol* signature, KlassHandle k, TRAPS); |
84 // Object creation | 84 // Object creation |
85 static arrayOop reflect_new_array(oop element_mirror, jint length, TRAPS); | 85 static arrayOop reflect_new_array(oop element_mirror, jint length, TRAPS); |
86 static arrayOop reflect_new_multi_array(oop element_mirror, typeArrayOop dimensions, TRAPS); | 86 static arrayOop reflect_new_multi_array(oop element_mirror, typeArrayOop dimensions, TRAPS); |
87 | 87 |
88 // Verification | 88 // Verification |
89 static bool verify_class_access(klassOop current_class, klassOop new_class, bool classloader_only); | 89 static bool verify_class_access(Klass* current_class, Klass* new_class, bool classloader_only); |
90 | 90 |
91 static bool verify_field_access(klassOop current_class, | 91 static bool verify_field_access(Klass* current_class, |
92 klassOop resolved_class, | 92 Klass* resolved_class, |
93 klassOop field_class, | 93 Klass* field_class, |
94 AccessFlags access, | 94 AccessFlags access, |
95 bool classloader_only, | 95 bool classloader_only, |
96 bool protected_restriction = false); | 96 bool protected_restriction = false); |
97 static bool is_same_class_package(klassOop class1, klassOop class2); | 97 static bool is_same_class_package(Klass* class1, Klass* class2); |
98 static bool is_same_package_member(klassOop class1, klassOop class2, TRAPS); | 98 static bool is_same_package_member(Klass* class1, Klass* class2, TRAPS); |
99 | 99 |
100 static bool can_relax_access_check_for( | 100 static bool can_relax_access_check_for( |
101 klassOop accessor, klassOop accesee, bool classloader_only); | 101 Klass* accessor, Klass* accesee, bool classloader_only); |
102 | 102 |
103 // inner class reflection | 103 // inner class reflection |
104 // raise an ICCE unless the required relationship can be proven to hold | 104 // raise an ICCE unless the required relationship can be proven to hold |
105 // If inner_is_member, require the inner to be a member of the outer. | 105 // If inner_is_member, require the inner to be a member of the outer. |
106 // If !inner_is_member, require the inner to be anonymous (a non-member). | 106 // If !inner_is_member, require the inner to be anonymous (a non-member). |