50 class LIR_OprDesc;
51 class C1_MacroAssembler;
52 class CFGPrinter;
53 typedef LIR_OprDesc* LIR_Opr;
54
55
56 define_array(BasicTypeArray, BasicType)
57 define_stack(BasicTypeList, BasicTypeArray)
58
59 define_array(ExceptionInfoArray, ExceptionInfo*)
60 define_stack(ExceptionInfoList, ExceptionInfoArray)
61
62 class Compilation: public StackObj {
63 friend class CompilationResourceObj;
64 private:
65 // compilation specifics
66 Arena* _arena;
67 int _next_id;
68 int _next_block_id;
69 AbstractCompiler* _compiler;
70 ciEnv* _env;
71 CompileLog* _log;
72 ciMethod* _method;
73 int _osr_bci;
74 IR* _hir;
75 int _max_spills;
76 FrameMap* _frame_map;
77 C1_MacroAssembler* _masm;
78 bool _has_exception_handlers;
79 bool _has_fpu_code;
80 bool _has_unsafe_access;
81 bool _would_profile;
82 bool _has_method_handle_invokes; // True if this method has MethodHandle invokes.
83 const char* _bailout_msg;
84 ExceptionInfoList* _exception_info_list;
85 ExceptionHandlerTable _exception_handler_table;
86 ImplicitExceptionTable _implicit_exception_table;
87 LinearScan* _allocator;
88 CodeOffsets _offsets;
89 CodeBuffer _code;
101 int compile_java_method();
102 void install_code(int frame_size);
103 void compile_method();
104
105 void generate_exception_handler_table();
106
107 ExceptionInfoList* exception_info_list() const { return _exception_info_list; }
108 ExceptionHandlerTable* exception_handler_table() { return &_exception_handler_table; }
109
110 LinearScan* allocator() { return _allocator; }
111 void set_allocator(LinearScan* allocator) { _allocator = allocator; }
112
113 Instruction* _current_instruction; // the instruction currently being processed
114 #ifndef PRODUCT
115 Instruction* _last_instruction_printed; // the last instruction printed during traversal
116 #endif // PRODUCT
117
118 public:
119 // creation
120 Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
121 int osr_bci, BufferBlob* buffer_blob);
122 ~Compilation();
123
124
125 static Compilation* current() {
126 return (Compilation*) ciEnv::current()->compiler_data();
127 }
128
129 // accessors
130 ciEnv* env() const { return _env; }
131 CompileLog* log() const { return _log; }
132 AbstractCompiler* compiler() const { return _compiler; }
133 bool has_exception_handlers() const { return _has_exception_handlers; }
134 bool has_fpu_code() const { return _has_fpu_code; }
135 bool has_unsafe_access() const { return _has_unsafe_access; }
136 int max_vector_size() const { return 0; }
137 ciMethod* method() const { return _method; }
138 int osr_bci() const { return _osr_bci; }
139 bool is_osr_compile() const { return osr_bci() >= 0; }
140 IR* hir() const { return _hir; }
141 int max_spills() const { return _max_spills; }
142 FrameMap* frame_map() const { return _frame_map; }
143 CodeBuffer* code() { return &_code; }
144 C1_MacroAssembler* masm() const { return _masm; }
145 CodeOffsets* offsets() { return &_offsets; }
146 Arena* arena() { return _arena; }
147 bool has_access_indexed() { return _has_access_indexed; }
148
149 // Instruction ids
150 int get_next_id() { return _next_id++; }
|
50 class LIR_OprDesc;
51 class C1_MacroAssembler;
52 class CFGPrinter;
53 typedef LIR_OprDesc* LIR_Opr;
54
55
56 define_array(BasicTypeArray, BasicType)
57 define_stack(BasicTypeList, BasicTypeArray)
58
59 define_array(ExceptionInfoArray, ExceptionInfo*)
60 define_stack(ExceptionInfoList, ExceptionInfoArray)
61
62 class Compilation: public StackObj {
63 friend class CompilationResourceObj;
64 private:
65 // compilation specifics
66 Arena* _arena;
67 int _next_id;
68 int _next_block_id;
69 AbstractCompiler* _compiler;
70 DirectiveSet* _directive;
71 ciEnv* _env;
72 CompileLog* _log;
73 ciMethod* _method;
74 int _osr_bci;
75 IR* _hir;
76 int _max_spills;
77 FrameMap* _frame_map;
78 C1_MacroAssembler* _masm;
79 bool _has_exception_handlers;
80 bool _has_fpu_code;
81 bool _has_unsafe_access;
82 bool _would_profile;
83 bool _has_method_handle_invokes; // True if this method has MethodHandle invokes.
84 const char* _bailout_msg;
85 ExceptionInfoList* _exception_info_list;
86 ExceptionHandlerTable _exception_handler_table;
87 ImplicitExceptionTable _implicit_exception_table;
88 LinearScan* _allocator;
89 CodeOffsets _offsets;
90 CodeBuffer _code;
102 int compile_java_method();
103 void install_code(int frame_size);
104 void compile_method();
105
106 void generate_exception_handler_table();
107
108 ExceptionInfoList* exception_info_list() const { return _exception_info_list; }
109 ExceptionHandlerTable* exception_handler_table() { return &_exception_handler_table; }
110
111 LinearScan* allocator() { return _allocator; }
112 void set_allocator(LinearScan* allocator) { _allocator = allocator; }
113
114 Instruction* _current_instruction; // the instruction currently being processed
115 #ifndef PRODUCT
116 Instruction* _last_instruction_printed; // the last instruction printed during traversal
117 #endif // PRODUCT
118
119 public:
120 // creation
121 Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
122 int osr_bci, BufferBlob* buffer_blob, DirectiveSet* directive);
123 ~Compilation();
124
125
126 static Compilation* current() {
127 return (Compilation*) ciEnv::current()->compiler_data();
128 }
129
130 // accessors
131 ciEnv* env() const { return _env; }
132 DirectiveSet* directive() const { return _directive; }
133 CompileLog* log() const { return _log; }
134 AbstractCompiler* compiler() const { return _compiler; }
135 bool has_exception_handlers() const { return _has_exception_handlers; }
136 bool has_fpu_code() const { return _has_fpu_code; }
137 bool has_unsafe_access() const { return _has_unsafe_access; }
138 int max_vector_size() const { return 0; }
139 ciMethod* method() const { return _method; }
140 int osr_bci() const { return _osr_bci; }
141 bool is_osr_compile() const { return osr_bci() >= 0; }
142 IR* hir() const { return _hir; }
143 int max_spills() const { return _max_spills; }
144 FrameMap* frame_map() const { return _frame_map; }
145 CodeBuffer* code() { return &_code; }
146 C1_MacroAssembler* masm() const { return _masm; }
147 CodeOffsets* offsets() { return &_offsets; }
148 Arena* arena() { return _arena; }
149 bool has_access_indexed() { return _has_access_indexed; }
150
151 // Instruction ids
152 int get_next_id() { return _next_id++; }
|