1 /* |
1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, 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. |
162 Klass(); |
162 Klass(); |
163 |
163 |
164 void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); |
164 void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); |
165 |
165 |
166 public: |
166 public: |
167 enum MethodLookupMode { normal, skip_overpass, skip_defaults }; |
167 enum DefaultsLookupMode { find_defaults, skip_defaults }; |
|
168 enum OverpassLookupMode { find_overpass, skip_overpass }; |
|
169 enum StaticLookupMode { find_static, skip_static }; |
168 |
170 |
169 bool is_klass() const volatile { return true; } |
171 bool is_klass() const volatile { return true; } |
170 |
172 |
171 // super |
173 // super |
172 Klass* super() const { return _super; } |
174 Klass* super() const { return _super; } |
411 // initializes the klass |
413 // initializes the klass |
412 virtual void initialize(TRAPS); |
414 virtual void initialize(TRAPS); |
413 // lookup operation for MethodLookupCache |
415 // lookup operation for MethodLookupCache |
414 friend class MethodLookupCache; |
416 friend class MethodLookupCache; |
415 virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const; |
417 virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const; |
416 virtual Method* uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const; |
418 virtual Method* uncached_lookup_method(Symbol* name, Symbol* signature, OverpassLookupMode overpass_mode) const; |
417 public: |
419 public: |
418 Method* lookup_method(Symbol* name, Symbol* signature) const { |
420 Method* lookup_method(Symbol* name, Symbol* signature) const { |
419 return uncached_lookup_method(name, signature, normal); |
421 return uncached_lookup_method(name, signature, find_overpass); |
420 } |
422 } |
421 |
423 |
422 // array class with specific rank |
424 // array class with specific rank |
423 Klass* array_klass(int rank, TRAPS) { return array_klass_impl(false, rank, THREAD); } |
425 Klass* array_klass(int rank, TRAPS) { return array_klass_impl(false, rank, THREAD); } |
424 |
426 |