1602 // Rewrite the method and set up the constant pool cache. |
1602 // Rewrite the method and set up the constant pool cache. |
1603 objArrayOop m_array = oopFactory::new_system_objArray(1, CHECK_(empty)); |
1603 objArrayOop m_array = oopFactory::new_system_objArray(1, CHECK_(empty)); |
1604 objArrayHandle methods(THREAD, m_array); |
1604 objArrayHandle methods(THREAD, m_array); |
1605 methods->obj_at_put(0, m()); |
1605 methods->obj_at_put(0, m()); |
1606 Rewriter::rewrite(_target_klass(), cpool, methods, CHECK_(empty)); // Use fake class. |
1606 Rewriter::rewrite(_target_klass(), cpool, methods, CHECK_(empty)); // Use fake class. |
|
1607 Rewriter::relocate_and_link(_target_klass(), methods, CHECK_(empty)); // Use fake class. |
1607 |
1608 |
1608 // Set the invocation counter's count to the invoke count of the |
1609 // Set the invocation counter's count to the invoke count of the |
1609 // original call site. |
1610 // original call site. |
1610 InvocationCounter* ic = m->invocation_counter(); |
1611 InvocationCounter* ic = m->invocation_counter(); |
1611 ic->set(InvocationCounter::wait_for_compile, _invoke_count); |
1612 ic->set(InvocationCounter::wait_for_compile, _invoke_count); |