568 , _hir(nullptr)
569 , _frame_map(nullptr)
570 , _masm(nullptr)
571 , _has_exception_handlers(false)
572 , _has_fpu_code(true) // pessimistic assumption
573 , _has_unsafe_access(false)
574 , _has_irreducible_loops(false)
575 , _would_profile(false)
576 , _has_method_handle_invokes(false)
577 , _has_reserved_stack_access(method->has_reserved_stack_access())
578 , _has_monitors(method->is_synchronized() || method->has_monitor_bytecodes())
579 , _has_scoped_access(method->is_scoped())
580 , _install_code(install_code)
581 , _bailout_msg(nullptr)
582 , _first_failure_details(nullptr)
583 , _exception_info_list(nullptr)
584 , _allocator(nullptr)
585 , _code(buffer_blob)
586 , _has_access_indexed(false)
587 , _interpreter_frame_size(0)
588 , _immediate_oops_patched(0)
589 , _current_instruction(nullptr)
590 #ifndef PRODUCT
591 , _last_instruction_printed(nullptr)
592 , _cfg_printer_output(nullptr)
593 #endif // PRODUCT
594 {
595 _arena = Thread::current()->resource_area();
596 _env->set_compiler_data(this);
597 _exception_info_list = new ExceptionInfoList();
598 _implicit_exception_table.set_size(0);
599 PhaseTraceTime timeit(_t_compile);
600 #ifndef PRODUCT
601 if (PrintCFGToFile) {
602 _cfg_printer_output = new CFGPrinterOutput(this);
603 }
604 #endif
605
606 CompilationMemoryStatisticMark cmsm(directive);
607
608 compile_method();
609 if (bailed_out()) {
610 _env->record_method_not_compilable(bailout_msg());
611 if (is_profiling()) {
612 // Compilation failed, create MDO, which would signal the interpreter
613 // to start profiling on its own.
614 _method->ensure_method_data();
615 }
616 } else if (is_profiling()) {
617 ciMethodData *md = method->method_data_or_null();
618 if (md != nullptr) {
619 md->set_would_profile(_would_profile);
620 }
621 }
622 }
623
624 Compilation::~Compilation() {
625 // simulate crash during compilation
626 assert(CICrashAt < 0 || (uintx)_env->compile_id() != (uintx)CICrashAt, "just as planned");
627 delete _first_failure_details;
|
568 , _hir(nullptr)
569 , _frame_map(nullptr)
570 , _masm(nullptr)
571 , _has_exception_handlers(false)
572 , _has_fpu_code(true) // pessimistic assumption
573 , _has_unsafe_access(false)
574 , _has_irreducible_loops(false)
575 , _would_profile(false)
576 , _has_method_handle_invokes(false)
577 , _has_reserved_stack_access(method->has_reserved_stack_access())
578 , _has_monitors(method->is_synchronized() || method->has_monitor_bytecodes())
579 , _has_scoped_access(method->is_scoped())
580 , _install_code(install_code)
581 , _bailout_msg(nullptr)
582 , _first_failure_details(nullptr)
583 , _exception_info_list(nullptr)
584 , _allocator(nullptr)
585 , _code(buffer_blob)
586 , _has_access_indexed(false)
587 , _interpreter_frame_size(0)
588 , _compiled_entry_signature(method->get_Method())
589 , _immediate_oops_patched(0)
590 , _current_instruction(nullptr)
591 #ifndef PRODUCT
592 , _last_instruction_printed(nullptr)
593 , _cfg_printer_output(nullptr)
594 #endif // PRODUCT
595 {
596 _arena = Thread::current()->resource_area();
597 _env->set_compiler_data(this);
598 _exception_info_list = new ExceptionInfoList();
599 _implicit_exception_table.set_size(0);
600 PhaseTraceTime timeit(_t_compile);
601 #ifndef PRODUCT
602 if (PrintCFGToFile) {
603 _cfg_printer_output = new CFGPrinterOutput(this);
604 }
605 #endif
606 CompilationMemoryStatisticMark cmsm(directive);
607
608 {
609 ResetNoHandleMark rnhm; // Huh? Required when doing class lookup of the Q-types
610 // TODO 8284443 Should only be computed once
611 _compiled_entry_signature.compute_calling_conventions(false);
612 }
613
614 compile_method();
615 if (bailed_out()) {
616 _env->record_method_not_compilable(bailout_msg());
617 if (is_profiling()) {
618 // Compilation failed, create MDO, which would signal the interpreter
619 // to start profiling on its own.
620 _method->ensure_method_data();
621 }
622 } else if (is_profiling()) {
623 ciMethodData *md = method->method_data_or_null();
624 if (md != nullptr) {
625 md->set_would_profile(_would_profile);
626 }
627 }
628 }
629
630 Compilation::~Compilation() {
631 // simulate crash during compilation
632 assert(CICrashAt < 0 || (uintx)_env->compile_id() != (uintx)CICrashAt, "just as planned");
633 delete _first_failure_details;
|