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