equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2010, 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. |
42 |
42 |
43 AccessFlags access_flags = ik->access_flags(); |
43 AccessFlags access_flags = ik->access_flags(); |
44 _flags = ciFlags(access_flags); |
44 _flags = ciFlags(access_flags); |
45 _has_finalizer = access_flags.has_finalizer(); |
45 _has_finalizer = access_flags.has_finalizer(); |
46 _has_subklass = ik->subklass() != NULL; |
46 _has_subklass = ik->subklass() != NULL; |
47 _is_initialized = ik->is_initialized(); |
47 _init_state = (instanceKlass::ClassState)ik->get_init_state(); |
48 // Next line must follow and use the result of the previous line: |
|
49 _is_linked = _is_initialized || ik->is_linked(); |
|
50 _nonstatic_field_size = ik->nonstatic_field_size(); |
48 _nonstatic_field_size = ik->nonstatic_field_size(); |
51 _has_nonstatic_fields = ik->has_nonstatic_fields(); |
49 _has_nonstatic_fields = ik->has_nonstatic_fields(); |
52 _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields: |
50 _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields: |
53 |
51 |
54 _nof_implementors = ik->nof_implementors(); |
52 _nof_implementors = ik->nof_implementors(); |
89 ciInstanceKlass::ciInstanceKlass(ciSymbol* name, |
87 ciInstanceKlass::ciInstanceKlass(ciSymbol* name, |
90 jobject loader, jobject protection_domain) |
88 jobject loader, jobject protection_domain) |
91 : ciKlass(name, ciInstanceKlassKlass::make()) |
89 : ciKlass(name, ciInstanceKlassKlass::make()) |
92 { |
90 { |
93 assert(name->byte_at(0) != '[', "not an instance klass"); |
91 assert(name->byte_at(0) != '[', "not an instance klass"); |
94 _is_initialized = false; |
92 _init_state = (instanceKlass::ClassState)0; |
95 _is_linked = false; |
|
96 _nonstatic_field_size = -1; |
93 _nonstatic_field_size = -1; |
97 _has_nonstatic_fields = false; |
94 _has_nonstatic_fields = false; |
98 _nonstatic_fields = NULL; |
95 _nonstatic_fields = NULL; |
99 _nof_implementors = -1; |
96 _nof_implementors = -1; |
100 _loader = loader; |
97 _loader = loader; |
107 |
104 |
108 |
105 |
109 |
106 |
110 // ------------------------------------------------------------------ |
107 // ------------------------------------------------------------------ |
111 // ciInstanceKlass::compute_shared_is_initialized |
108 // ciInstanceKlass::compute_shared_is_initialized |
112 bool ciInstanceKlass::compute_shared_is_initialized() { |
109 void ciInstanceKlass::compute_shared_init_state() { |
113 GUARDED_VM_ENTRY( |
110 GUARDED_VM_ENTRY( |
114 instanceKlass* ik = get_instanceKlass(); |
111 instanceKlass* ik = get_instanceKlass(); |
115 _is_initialized = ik->is_initialized(); |
112 _init_state = (instanceKlass::ClassState)ik->get_init_state(); |
116 return _is_initialized; |
|
117 ) |
|
118 } |
|
119 |
|
120 // ------------------------------------------------------------------ |
|
121 // ciInstanceKlass::compute_shared_is_linked |
|
122 bool ciInstanceKlass::compute_shared_is_linked() { |
|
123 GUARDED_VM_ENTRY( |
|
124 instanceKlass* ik = get_instanceKlass(); |
|
125 _is_linked = ik->is_linked(); |
|
126 return _is_linked; |
|
127 ) |
113 ) |
128 } |
114 } |
129 |
115 |
130 // ------------------------------------------------------------------ |
116 // ------------------------------------------------------------------ |
131 // ciInstanceKlass::compute_shared_has_subklass |
117 // ciInstanceKlass::compute_shared_has_subklass |