comparison src/share/vm/ci/ciField.cpp @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents 957c266d8bc5 da91efe96a93
children 989155e2d07a
comparison
equal deleted inserted replaced
6711:ae13cc658b80 6948:e522a00b91aa
123 _offset = -1; 123 _offset = -1;
124 _is_constant = false; 124 _is_constant = false;
125 return; 125 return;
126 } 126 }
127 127
128 instanceKlass* loaded_decl_holder = declared_holder->get_instanceKlass(); 128 InstanceKlass* loaded_decl_holder = declared_holder->get_instanceKlass();
129 129
130 // Perform the field lookup. 130 // Perform the field lookup.
131 fieldDescriptor field_desc; 131 fieldDescriptor field_desc;
132 klassOop canonical_holder = 132 Klass* canonical_holder =
133 loaded_decl_holder->find_field(name, signature, &field_desc); 133 loaded_decl_holder->find_field(name, signature, &field_desc);
134 if (canonical_holder == NULL) { 134 if (canonical_holder == NULL) {
135 // Field lookup failed. Will be detected by will_link. 135 // Field lookup failed. Will be detected by will_link.
136 _holder = declared_holder; 136 _holder = declared_holder;
137 _offset = -1; 137 _offset = -1;
184 184
185 void ciField::initialize_from(fieldDescriptor* fd) { 185 void ciField::initialize_from(fieldDescriptor* fd) {
186 // Get the flags, offset, and canonical holder of the field. 186 // Get the flags, offset, and canonical holder of the field.
187 _flags = ciFlags(fd->access_flags()); 187 _flags = ciFlags(fd->access_flags());
188 _offset = fd->offset(); 188 _offset = fd->offset();
189 _holder = CURRENT_ENV->get_object(fd->field_holder())->as_instance_klass(); 189 _holder = CURRENT_ENV->get_instance_klass(fd->field_holder());
190 190
191 // Check to see if the field is constant. 191 // Check to see if the field is constant.
192 if (_holder->is_initialized() && this->is_final()) { 192 if (_holder->is_initialized() && this->is_final()) {
193 if (!this->is_static()) { 193 if (!this->is_static()) {
194 // A field can be constant if it's a final static field or if 194 // A field can be constant if it's a final static field or if
211 // field to be not constant. 211 // field to be not constant.
212 // 2. The field is a *special* static&final field whose value 212 // 2. The field is a *special* static&final field whose value
213 // may change. The three examples are java.lang.System.in, 213 // may change. The three examples are java.lang.System.in,
214 // java.lang.System.out, and java.lang.System.err. 214 // java.lang.System.out, and java.lang.System.err.
215 215
216 KlassHandle k = _holder->get_klassOop(); 216 KlassHandle k = _holder->get_Klass();
217 assert( SystemDictionary::System_klass() != NULL, "Check once per vm"); 217 assert( SystemDictionary::System_klass() != NULL, "Check once per vm");
218 if( k() == SystemDictionary::System_klass() ) { 218 if( k() == SystemDictionary::System_klass() ) {
219 // Check offsets for case 2: System.in, System.out, or System.err 219 // Check offsets for case 2: System.in, System.out, or System.err
220 if( _offset == java_lang_System::in_offset_in_bytes() || 220 if( _offset == java_lang_System::in_offset_in_bytes() ||
221 _offset == java_lang_System::out_offset_in_bytes() || 221 _offset == java_lang_System::out_offset_in_bytes() ||