src/share/vm/c1/c1_LIRAssembler.cpp

Print this page




 153 
 154 bool LIR_Assembler::needs_icache(ciMethod* method) const {
 155   return !method->is_static();
 156 }
 157 
 158 
 159 int LIR_Assembler::code_offset() const {
 160   return _masm->offset();
 161 }
 162 
 163 
 164 address LIR_Assembler::pc() const {
 165   return _masm->pc();
 166 }
 167 
 168 // To bang the stack of this compiled method we use the stack size
 169 // that the interpreter would need in case of a deoptimization. This
 170 // removes the need to bang the stack in the deoptimization blob which
 171 // in turn simplifies stack overflow handling.
 172 int LIR_Assembler::bang_size_in_bytes() const {
 173   return MAX2(initial_frame_size_in_bytes(), _compilation->interpreter_frame_size());
 174 }
 175 
 176 void LIR_Assembler::emit_exception_entries(ExceptionInfoList* info_list) {
 177   for (int i = 0; i < info_list->length(); i++) {
 178     XHandlers* handlers = info_list->at(i)->exception_handlers();
 179 
 180     for (int j = 0; j < handlers->length(); j++) {
 181       XHandler* handler = handlers->handler_at(j);
 182       assert(handler->lir_op_id() != -1, "handler not processed by LinearScan");
 183       assert(handler->entry_code() == NULL ||
 184              handler->entry_code()->instructions_list()->last()->code() == lir_branch ||
 185              handler->entry_code()->instructions_list()->last()->code() == lir_delay_slot, "last operation must be branch");
 186 
 187       if (handler->entry_pco() == -1) {
 188         // entry code not emitted yet
 189         if (handler->entry_code() != NULL && handler->entry_code()->instructions_list()->length() > 1) {
 190           handler->set_entry_pco(code_offset());
 191           if (CommentedAssembly) {
 192             _masm->block_comment("Exception adapter block");
 193           }




 153 
 154 bool LIR_Assembler::needs_icache(ciMethod* method) const {
 155   return !method->is_static();
 156 }
 157 
 158 
 159 int LIR_Assembler::code_offset() const {
 160   return _masm->offset();
 161 }
 162 
 163 
 164 address LIR_Assembler::pc() const {
 165   return _masm->pc();
 166 }
 167 
 168 // To bang the stack of this compiled method we use the stack size
 169 // that the interpreter would need in case of a deoptimization. This
 170 // removes the need to bang the stack in the deoptimization blob which
 171 // in turn simplifies stack overflow handling.
 172 int LIR_Assembler::bang_size_in_bytes() const {
 173   return MAX2(initial_frame_size_in_bytes() + os::extra_bang_size_in_bytes(), _compilation->interpreter_frame_size());
 174 }
 175 
 176 void LIR_Assembler::emit_exception_entries(ExceptionInfoList* info_list) {
 177   for (int i = 0; i < info_list->length(); i++) {
 178     XHandlers* handlers = info_list->at(i)->exception_handlers();
 179 
 180     for (int j = 0; j < handlers->length(); j++) {
 181       XHandler* handler = handlers->handler_at(j);
 182       assert(handler->lir_op_id() != -1, "handler not processed by LinearScan");
 183       assert(handler->entry_code() == NULL ||
 184              handler->entry_code()->instructions_list()->last()->code() == lir_branch ||
 185              handler->entry_code()->instructions_list()->last()->code() == lir_delay_slot, "last operation must be branch");
 186 
 187       if (handler->entry_pco() == -1) {
 188         // entry code not emitted yet
 189         if (handler->entry_code() != NULL && handler->entry_code()->instructions_list()->length() > 1) {
 190           handler->set_entry_pco(code_offset());
 191           if (CommentedAssembly) {
 192             _masm->block_comment("Exception adapter block");
 193           }