479 // account for extra_stack_entries() anymore because at the time when it is called |
479 // account for extra_stack_entries() anymore because at the time when it is called |
480 // EnableInvokeDynamic was already set to false. |
480 // EnableInvokeDynamic was already set to false. |
481 // So we have a second version of the assertion which handles the case where EnableInvokeDynamic was |
481 // So we have a second version of the assertion which handles the case where EnableInvokeDynamic was |
482 // switched off because of the wrong classes. |
482 // switched off because of the wrong classes. |
483 if (EnableInvokeDynamic || FLAG_IS_CMDLINE(EnableInvokeDynamic)) { |
483 if (EnableInvokeDynamic || FLAG_IS_CMDLINE(EnableInvokeDynamic)) { |
484 assert(abs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit"); |
484 assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit"); |
485 } else { |
485 } else { |
486 const int extra_stack_entries = Method::extra_stack_entries_for_indy; |
486 const int extra_stack_entries = Method::extra_stack_entries_for_jsr292; |
487 assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + extra_stack_entries |
487 assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + extra_stack_entries |
488 + 1), "bad stack limit"); |
488 + 1), "bad stack limit"); |
489 } |
489 } |
490 #ifndef SHARK |
490 #ifndef SHARK |
491 IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong")); |
491 IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong")); |
2231 handle_exception); |
2231 handle_exception); |
2232 cache = cp->constant_pool()->invokedynamic_cp_cache_entry_at(index); |
2232 cache = cp->constant_pool()->invokedynamic_cp_cache_entry_at(index); |
2233 } |
2233 } |
2234 |
2234 |
2235 Method* method = cache->f1_as_method(); |
2235 Method* method = cache->f1_as_method(); |
2236 VERIFY_OOP(method); |
2236 if (VerifyOops) method->verify(); |
2237 |
2237 |
2238 if (cache->has_appendix()) { |
2238 if (cache->has_appendix()) { |
2239 ConstantPool* constants = METHOD->constants(); |
2239 ConstantPool* constants = METHOD->constants(); |
2240 SET_STACK_OBJECT(cache->appendix_if_resolved(constants), 0); |
2240 SET_STACK_OBJECT(cache->appendix_if_resolved(constants), 0); |
2241 MORE_STACK(1); |
2241 MORE_STACK(1); |
2263 handle_exception); |
2263 handle_exception); |
2264 cache = cp->entry_at(index); |
2264 cache = cp->entry_at(index); |
2265 } |
2265 } |
2266 |
2266 |
2267 Method* method = cache->f1_as_method(); |
2267 Method* method = cache->f1_as_method(); |
2268 |
2268 if (VerifyOops) method->verify(); |
2269 VERIFY_OOP(method); |
|
2270 |
2269 |
2271 if (cache->has_appendix()) { |
2270 if (cache->has_appendix()) { |
2272 ConstantPool* constants = METHOD->constants(); |
2271 ConstantPool* constants = METHOD->constants(); |
2273 SET_STACK_OBJECT(cache->appendix_if_resolved(constants), 0); |
2272 SET_STACK_OBJECT(cache->appendix_if_resolved(constants), 0); |
2274 MORE_STACK(1); |
2273 MORE_STACK(1); |