comparison src/share/vm/prims/jvmtiRedefineClasses.cpp @ 6217:e74da3c2b827

Merge
author jiangli
date Fri, 13 Jul 2012 20:14:27 -0400
parents 04ade88d9712 8150fa46d2ed
children da91efe96a93
comparison
equal deleted inserted replaced
6208:cc787232c4c5 6217:e74da3c2b827
2476 2476
2477 // Update each catch type index in the method's exception table 2477 // Update each catch type index in the method's exception table
2478 // to use new constant pool indices as needed. The exception table 2478 // to use new constant pool indices as needed. The exception table
2479 // holds quadruple entries of the form: 2479 // holds quadruple entries of the form:
2480 // (beg_bci, end_bci, handler_bci, klass_index) 2480 // (beg_bci, end_bci, handler_bci, klass_index)
2481 const int beg_bci_offset = 0; 2481
2482 const int end_bci_offset = 1; 2482 ExceptionTable ex_table(method());
2483 const int handler_bci_offset = 2; 2483 int ext_length = ex_table.length();
2484 const int klass_index_offset = 3; 2484
2485 const int entry_size = 4; 2485 for (int j = 0; j < ext_length; j ++) {
2486 2486 int cur_index = ex_table.catch_type_index(j);
2487 typeArrayHandle ex_table (THREAD, method->exception_table());
2488 int ext_length = ex_table->length();
2489 assert(ext_length % entry_size == 0, "exception table format has changed");
2490
2491 for (int j = 0; j < ext_length; j += entry_size) {
2492 int cur_index = ex_table->int_at(j + klass_index_offset);
2493 int new_index = find_new_index(cur_index); 2487 int new_index = find_new_index(cur_index);
2494 if (new_index != 0) { 2488 if (new_index != 0) {
2495 RC_TRACE_WITH_THREAD(0x00080000, THREAD, 2489 RC_TRACE_WITH_THREAD(0x00080000, THREAD,
2496 ("ext-klass_index change: %d to %d", cur_index, new_index)); 2490 ("ext-klass_index change: %d to %d", cur_index, new_index));
2497 ex_table->int_at_put(j + klass_index_offset, new_index); 2491 ex_table.set_catch_type_index(j, new_index);
2498 } 2492 }
2499 } // end for each exception table entry 2493 } // end for each exception table entry
2500 2494
2501 // Update constant pool indices in the method's local variable 2495 // Update constant pool indices in the method's local variable
2502 // table to use new constant indices as needed. The local variable 2496 // table to use new constant indices as needed. The local variable