equal
deleted
inserted
replaced
220 } |
220 } |
221 } |
221 } |
222 return line_number; |
222 return line_number; |
223 } |
223 } |
224 |
224 |
225 /* |
|
226 * Returns the source file name of a given InstanceKlass and version |
|
227 */ |
|
228 inline Symbol* Backtrace::get_source_file_name(InstanceKlass* holder, int version) { |
225 inline Symbol* Backtrace::get_source_file_name(InstanceKlass* holder, int version) { |
229 // Find the specific ik version that contains this source_file_name_index |
226 // RedefineClasses() currently permits redefine operations to |
230 // via the previous versions list, but use the current version's |
227 // happen in parallel using a "last one wins" philosophy. That |
231 // constant pool to look it up. The previous version's index has been |
228 // spec laxness allows the constant pool entry associated with |
232 // merged for the current constant pool. |
229 // the source_file_name_index for any older constant pool version |
233 InstanceKlass* ik = holder->get_klass_version(version); |
230 // to be unstable so we shouldn't try to use it. |
234 // This version has been cleaned up. |
231 if (holder->constants()->version() != version) { |
235 if (ik == NULL) return NULL; |
232 return NULL; |
236 int source_file_name_index = ik->source_file_name_index(); |
233 } else { |
237 return (source_file_name_index == 0) ? |
234 return holder->source_file_name(); |
238 (Symbol*)NULL : holder->constants()->symbol_at(source_file_name_index); |
235 } |
239 } |
236 } |
240 |
237 |
241 #endif // SHARE_VM_CLASSFILE_JAVACLASSES_INLINE_HPP |
238 #endif // SHARE_VM_CLASSFILE_JAVACLASSES_INLINE_HPP |