464 static bool _jvmti_interp_events = 0;
465 #endif
466
467 static int _compiling; // (UseCompiler || CountCompiledCalls)
468
469 #ifdef ASSERT
470 if (istate->_msg != initialize) {
471 // We have a problem here if we are running with a pre-hsx24 JDK (for example during bootstrap)
472 // because in that case, EnableInvokeDynamic is true by default but will be later switched off
473 // if java_lang_invoke_MethodHandle::compute_offsets() detects that the JDK only has the classes
474 // for the old JSR292 implementation.
475 // This leads to a situation where 'istate->_stack_limit' always accounts for
476 // methodOopDesc::extra_stack_entries() because it is computed in
477 // CppInterpreterGenerator::generate_compute_interpreter_state() which was generated while
478 // EnableInvokeDynamic was still true. On the other hand, istate->_method->max_stack() doesn't
479 // account for extra_stack_entries() anymore because at the time when it is called
480 // EnableInvokeDynamic was already set to false.
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.
483 if (EnableInvokeDynamic || FLAG_IS_CMDLINE(EnableInvokeDynamic)) {
484 assert(abs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
485 } else {
486 const int extra_stack_entries = Method::extra_stack_entries_for_indy;
487 assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + extra_stack_entries
488 + 1), "bad stack limit");
489 }
490 #ifndef SHARK
491 IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong"));
492 #endif // !SHARK
493 }
494 // Verify linkages.
495 interpreterState l = istate;
496 do {
497 assert(l == l->_self_link, "bad link");
498 l = l->_prev_link;
499 } while (l != NULL);
500 // Screwups with stack management usually cause us to overwrite istate
501 // save a copy so we can verify it.
502 interpreterState orig = istate;
503 #endif
504
505 static volatile jbyte* _byte_map_base; // adjusted card table base for oop store barrier
506
|
464 static bool _jvmti_interp_events = 0;
465 #endif
466
467 static int _compiling; // (UseCompiler || CountCompiledCalls)
468
469 #ifdef ASSERT
470 if (istate->_msg != initialize) {
471 // We have a problem here if we are running with a pre-hsx24 JDK (for example during bootstrap)
472 // because in that case, EnableInvokeDynamic is true by default but will be later switched off
473 // if java_lang_invoke_MethodHandle::compute_offsets() detects that the JDK only has the classes
474 // for the old JSR292 implementation.
475 // This leads to a situation where 'istate->_stack_limit' always accounts for
476 // methodOopDesc::extra_stack_entries() because it is computed in
477 // CppInterpreterGenerator::generate_compute_interpreter_state() which was generated while
478 // EnableInvokeDynamic was still true. On the other hand, istate->_method->max_stack() doesn't
479 // account for extra_stack_entries() anymore because at the time when it is called
480 // EnableInvokeDynamic was already set to false.
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.
483 if (EnableInvokeDynamic || FLAG_IS_CMDLINE(EnableInvokeDynamic)) {
484 assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
485 } else {
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
488 + 1), "bad stack limit");
489 }
490 #ifndef SHARK
491 IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong"));
492 #endif // !SHARK
493 }
494 // Verify linkages.
495 interpreterState l = istate;
496 do {
497 assert(l == l->_self_link, "bad link");
498 l = l->_prev_link;
499 } while (l != NULL);
500 // Screwups with stack management usually cause us to overwrite istate
501 // save a copy so we can verify it.
502 interpreterState orig = istate;
503 #endif
504
505 static volatile jbyte* _byte_map_base; // adjusted card table base for oop store barrier
506
|