< prev index next >

src/hotspot/share/classfile/javaClasses.inline.hpp

Print this page




 247   assert((jushort)cpref == cpref, "cpref should be short");
 248   return build_int_from_shorts(cpref, mid);
 249 }
 250 
 251 inline int Backtrace::bci_at(unsigned int merged) {
 252   return extract_high_short_from_int(merged);
 253 }
 254 
 255 inline int Backtrace::version_at(unsigned int merged) {
 256   return extract_low_short_from_int(merged);
 257 }
 258 
 259 inline int Backtrace::mid_at(unsigned int merged) {
 260   return extract_high_short_from_int(merged);
 261 }
 262 
 263 inline int Backtrace::cpref_at(unsigned int merged) {
 264   return extract_low_short_from_int(merged);
 265 }
 266 
 267 inline int Backtrace::get_line_number(const methodHandle& method, int bci) {
 268   int line_number = 0;
 269   if (method->is_native()) {
 270     // Negative value different from -1 below, enabling Java code in
 271     // class java.lang.StackTraceElement to distinguish "native" from
 272     // "no LineNumberTable".  JDK tests for -2.
 273     line_number = -2;
 274   } else {
 275     // Returns -1 if no LineNumberTable, and otherwise actual line number
 276     line_number = method->line_number_from_bci(bci);
 277   }
 278   return line_number;
 279 }
 280 
 281 inline Symbol* Backtrace::get_source_file_name(InstanceKlass* holder, int version) {
 282   // RedefineClasses() currently permits redefine operations to
 283   // happen in parallel using a "last one wins" philosophy. That
 284   // spec laxness allows the constant pool entry associated with
 285   // the source_file_name_index for any older constant pool version
 286   // to be unstable so we shouldn't try to use it.
 287   if (holder->constants()->version() != version) {


 247   assert((jushort)cpref == cpref, "cpref should be short");
 248   return build_int_from_shorts(cpref, mid);
 249 }
 250 
 251 inline int Backtrace::bci_at(unsigned int merged) {
 252   return extract_high_short_from_int(merged);
 253 }
 254 
 255 inline int Backtrace::version_at(unsigned int merged) {
 256   return extract_low_short_from_int(merged);
 257 }
 258 
 259 inline int Backtrace::mid_at(unsigned int merged) {
 260   return extract_high_short_from_int(merged);
 261 }
 262 
 263 inline int Backtrace::cpref_at(unsigned int merged) {
 264   return extract_low_short_from_int(merged);
 265 }
 266 
 267 inline int Backtrace::get_line_number(Method* method, int bci) {
 268   int line_number = 0;
 269   if (method->is_native()) {
 270     // Negative value different from -1 below, enabling Java code in
 271     // class java.lang.StackTraceElement to distinguish "native" from
 272     // "no LineNumberTable".  JDK tests for -2.
 273     line_number = -2;
 274   } else {
 275     // Returns -1 if no LineNumberTable, and otherwise actual line number
 276     line_number = method->line_number_from_bci(bci);
 277   }
 278   return line_number;
 279 }
 280 
 281 inline Symbol* Backtrace::get_source_file_name(InstanceKlass* holder, int version) {
 282   // RedefineClasses() currently permits redefine operations to
 283   // happen in parallel using a "last one wins" philosophy. That
 284   // spec laxness allows the constant pool entry associated with
 285   // the source_file_name_index for any older constant pool version
 286   // to be unstable so we shouldn't try to use it.
 287   if (holder->constants()->version() != version) {
< prev index next >