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