Mercurial > hg > graal-compiler
comparison src/share/vm/oops/instanceKlass.hpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 89152779163c 386dd1c71858 |
children | e6637891a870 |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2014, 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. |
308 // The embedded implementor only exists if the current klass is an | 308 // The embedded implementor only exists if the current klass is an |
309 // iterface. The possible values of the implementor fall into following | 309 // iterface. The possible values of the implementor fall into following |
310 // three cases: | 310 // three cases: |
311 // NULL: no implementor. | 311 // NULL: no implementor. |
312 // A Klass* that's not itself: one implementor. | 312 // A Klass* that's not itself: one implementor. |
313 // Itsef: more than one implementors. | 313 // Itself: more than one implementors. |
314 // embedded host klass follows here | 314 // embedded host klass follows here |
315 // The embedded host klass only exists in an anonymous class for | 315 // The embedded host klass only exists in an anonymous class for |
316 // dynamic language support (JSR 292 enabled). The host class grants | 316 // dynamic language support (JSR 292 enabled). The host class grants |
317 // its access privileges to this class also. The host class is either | 317 // its access privileges to this class also. The host class is either |
318 // named, or a previously loaded anonymous class. A non-anonymous class | 318 // named, or a previously loaded anonymous class. A non-anonymous class |
520 Method* find_method(Symbol* name, Symbol* signature) const; | 520 Method* find_method(Symbol* name, Symbol* signature) const; |
521 static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature); | 521 static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature); |
522 static Method* find_instance_method(Array<Method*>* methods, Symbol* name, Symbol* signature); | 522 static Method* find_instance_method(Array<Method*>* methods, Symbol* name, Symbol* signature); |
523 | 523 |
524 // find a local method index in default_methods (returns -1 if not found) | 524 // find a local method index in default_methods (returns -1 if not found) |
525 static int find_method_index(Array<Method*>* methods, Symbol* name, Symbol* signature); | 525 static int find_method_index(Array<Method*>* methods, Symbol* name, Symbol* signature, bool skipping_overpass); |
526 | 526 |
527 // lookup operation (returns NULL if not found) | 527 // lookup operation (returns NULL if not found) |
528 Method* uncached_lookup_method(Symbol* name, Symbol* signature) const; | 528 Method* uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const; |
529 | 529 |
530 // lookup a method in all the interfaces that this class implements | 530 // lookup a method in all the interfaces that this class implements |
531 // (returns NULL if not found) | 531 // (returns NULL if not found) |
532 Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature, bool skip_default_methods) const; | 532 Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature, MethodLookupMode mode) const; |
533 | 533 |
534 // lookup a method in local defaults then in all interfaces | 534 // lookup a method in local defaults then in all interfaces |
535 // (returns NULL if not found) | 535 // (returns NULL if not found) |
536 Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const; | 536 Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const; |
537 | 537 |
556 Klass* host_klass() const { | 556 Klass* host_klass() const { |
557 Klass** hk = (Klass**)adr_host_klass(); | 557 Klass** hk = (Klass**)adr_host_klass(); |
558 if (hk == NULL) { | 558 if (hk == NULL) { |
559 return NULL; | 559 return NULL; |
560 } else { | 560 } else { |
561 assert(*hk != NULL, "host klass should always be set if the address is not null"); | |
561 return *hk; | 562 return *hk; |
562 } | 563 } |
563 } | 564 } |
564 void set_host_klass(Klass* host) { | 565 void set_host_klass(Klass* host) { |
565 assert(is_anonymous(), "not anonymous"); | 566 assert(is_anonymous(), "not anonymous"); |
841 bool oop_is_instance_slow() const { return true; } | 842 bool oop_is_instance_slow() const { return true; } |
842 | 843 |
843 // Iterators | 844 // Iterators |
844 void do_local_static_fields(FieldClosure* cl); | 845 void do_local_static_fields(FieldClosure* cl); |
845 void do_nonstatic_fields(FieldClosure* cl); // including inherited fields | 846 void do_nonstatic_fields(FieldClosure* cl); // including inherited fields |
846 void do_local_static_fields(void f(fieldDescriptor*, TRAPS), TRAPS); | 847 void do_local_static_fields(void f(fieldDescriptor*, Handle, TRAPS), Handle, TRAPS); |
847 | 848 |
848 void methods_do(void f(Method* method)); | 849 void methods_do(void f(Method* method)); |
849 void array_klasses_do(void f(Klass* k)); | 850 void array_klasses_do(void f(Klass* k)); |
850 void array_klasses_do(void f(Klass* k, TRAPS), TRAPS); | 851 void array_klasses_do(void f(Klass* k, TRAPS), TRAPS); |
851 bool super_types_do(SuperTypeClosure* blk); | 852 bool super_types_do(SuperTypeClosure* blk); |
1049 static void initialize_impl (instanceKlassHandle this_oop, TRAPS); | 1050 static void initialize_impl (instanceKlassHandle this_oop, TRAPS); |
1050 static void eager_initialize_impl (instanceKlassHandle this_oop); | 1051 static void eager_initialize_impl (instanceKlassHandle this_oop); |
1051 static void set_initialization_state_and_notify_impl (instanceKlassHandle this_oop, ClassState state, TRAPS); | 1052 static void set_initialization_state_and_notify_impl (instanceKlassHandle this_oop, ClassState state, TRAPS); |
1052 static void call_class_initializer_impl (instanceKlassHandle this_oop, TRAPS); | 1053 static void call_class_initializer_impl (instanceKlassHandle this_oop, TRAPS); |
1053 static Klass* array_klass_impl (instanceKlassHandle this_oop, bool or_null, int n, TRAPS); | 1054 static Klass* array_klass_impl (instanceKlassHandle this_oop, bool or_null, int n, TRAPS); |
1054 static void do_local_static_fields_impl (instanceKlassHandle this_oop, void f(fieldDescriptor* fd, TRAPS), TRAPS); | 1055 static void do_local_static_fields_impl (instanceKlassHandle this_oop, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS); |
1055 /* jni_id_for_impl for jfieldID only */ | 1056 /* jni_id_for_impl for jfieldID only */ |
1056 static JNIid* jni_id_for_impl (instanceKlassHandle this_oop, int offset); | 1057 static JNIid* jni_id_for_impl (instanceKlassHandle this_oop, int offset); |
1057 | 1058 |
1058 // Returns the array class for the n'th dimension | 1059 // Returns the array class for the n'th dimension |
1059 Klass* array_klass_impl(bool or_null, int n, TRAPS); | 1060 Klass* array_klass_impl(bool or_null, int n, TRAPS); |
1060 | 1061 |
1061 // Returns the array class with this class as element type | 1062 // Returns the array class with this class as element type |
1062 Klass* array_klass_impl(bool or_null, TRAPS); | 1063 Klass* array_klass_impl(bool or_null, TRAPS); |
1064 | |
1065 // find a local method (returns NULL if not found) | |
1066 Method* find_method_impl(Symbol* name, Symbol* signature, bool skipping_overpass) const; | |
1067 static Method* find_method_impl(Array<Method*>* methods, Symbol* name, Symbol* signature, bool skipping_overpass); | |
1063 | 1068 |
1064 // Free CHeap allocated fields. | 1069 // Free CHeap allocated fields. |
1065 void release_C_heap_structures(); | 1070 void release_C_heap_structures(); |
1066 public: | 1071 public: |
1067 // CDS support - remove and restore oops from metadata. Oops are not shared. | 1072 // CDS support - remove and restore oops from metadata. Oops are not shared. |
1098 #endif | 1103 #endif |
1099 | 1104 |
1100 const char* internal_name() const; | 1105 const char* internal_name() const; |
1101 | 1106 |
1102 // Verification | 1107 // Verification |
1103 void verify_on(outputStream* st, bool check_dictionary); | 1108 void verify_on(outputStream* st); |
1104 | 1109 |
1105 void oop_verify_on(oop obj, outputStream* st); | 1110 void oop_verify_on(oop obj, outputStream* st); |
1106 }; | 1111 }; |
1107 | 1112 |
1108 inline Method* InstanceKlass::method_at_vtable(int index) { | 1113 inline Method* InstanceKlass::method_at_vtable(int index) { |