1 /* |
1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2016, 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. |
56 _has_subklass = ik->subklass() != NULL; |
56 _has_subklass = ik->subklass() != NULL; |
57 _init_state = ik->init_state(); |
57 _init_state = ik->init_state(); |
58 _nonstatic_field_size = ik->nonstatic_field_size(); |
58 _nonstatic_field_size = ik->nonstatic_field_size(); |
59 _has_nonstatic_fields = ik->has_nonstatic_fields(); |
59 _has_nonstatic_fields = ik->has_nonstatic_fields(); |
60 _has_default_methods = ik->has_default_methods(); |
60 _has_default_methods = ik->has_default_methods(); |
|
61 _is_anonymous = ik->is_anonymous(); |
61 _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields: |
62 _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields: |
62 |
63 |
63 _implementor = NULL; // we will fill these lazily |
64 _implementor = NULL; // we will fill these lazily |
64 |
65 |
65 Thread *thread = Thread::current(); |
66 Thread *thread = Thread::current(); |
98 assert(name->byte_at(0) != '[', "not an instance klass"); |
99 assert(name->byte_at(0) != '[', "not an instance klass"); |
99 _init_state = (InstanceKlass::ClassState)0; |
100 _init_state = (InstanceKlass::ClassState)0; |
100 _nonstatic_field_size = -1; |
101 _nonstatic_field_size = -1; |
101 _has_nonstatic_fields = false; |
102 _has_nonstatic_fields = false; |
102 _nonstatic_fields = NULL; |
103 _nonstatic_fields = NULL; |
|
104 _is_anonymous = false; |
103 _loader = loader; |
105 _loader = loader; |
104 _protection_domain = protection_domain; |
106 _protection_domain = protection_domain; |
105 _is_shared = false; |
107 _is_shared = false; |
106 _super = NULL; |
108 _super = NULL; |
107 _java_mirror = NULL; |
109 _java_mirror = NULL; |
587 if (!is_shared()) { |
589 if (!is_shared()) { |
588 _implementor = impl; |
590 _implementor = impl; |
589 } |
591 } |
590 } |
592 } |
591 return impl; |
593 return impl; |
|
594 } |
|
595 |
|
596 ciInstanceKlass* ciInstanceKlass::host_klass() { |
|
597 assert(is_loaded(), "must be loaded"); |
|
598 if (is_anonymous()) { |
|
599 VM_ENTRY_MARK |
|
600 Klass* host_klass = get_instanceKlass()->host_klass(); |
|
601 return CURRENT_ENV->get_instance_klass(host_klass); |
|
602 } |
|
603 return NULL; |
592 } |
604 } |
593 |
605 |
594 // Utility class for printing of the contents of the static fields for |
606 // Utility class for printing of the contents of the static fields for |
595 // use by compilation replay. It only prints out the information that |
607 // use by compilation replay. It only prints out the information that |
596 // could be consumed by the compiler, so for primitive types it prints |
608 // could be consumed by the compiler, so for primitive types it prints |