src/share/vm/c1/c1_IR.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6930772 Sdiff src/share/vm/c1

src/share/vm/c1/c1_IR.cpp

Print this page




 213   int       cur_bci    = bci();
 214   if (cur_method != NULL && cur_bci != SynchronizationEntryBCI) {
 215     Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci);
 216     return Interpreter::bytecode_should_reexecute(code);
 217   } else
 218     return false;
 219 }
 220 
 221 
 222 // Implementation of CodeEmitInfo
 223 
 224 // Stack must be NON-null
 225 CodeEmitInfo::CodeEmitInfo(int bci, ValueStack* stack, XHandlers* exception_handlers)
 226   : _scope(stack->scope())
 227   , _bci(bci)
 228   , _scope_debug_info(NULL)
 229   , _oop_map(NULL)
 230   , _stack(stack)
 231   , _exception_handlers(exception_handlers)
 232   , _next(NULL)
 233   , _id(-1) {

 234   assert(_stack != NULL, "must be non null");
 235   assert(_bci == SynchronizationEntryBCI || Bytecodes::is_defined(scope()->method()->java_code_at_bci(_bci)), "make sure bci points at a real bytecode");
 236 }
 237 
 238 
 239 CodeEmitInfo::CodeEmitInfo(CodeEmitInfo* info, bool lock_stack_only)
 240   : _scope(info->_scope)
 241   , _exception_handlers(NULL)
 242   , _bci(info->_bci)
 243   , _scope_debug_info(NULL)
 244   , _oop_map(NULL) {

 245   if (lock_stack_only) {
 246     if (info->_stack != NULL) {
 247       _stack = info->_stack->copy_locks();
 248     } else {
 249       _stack = NULL;
 250     }
 251   } else {
 252     _stack = info->_stack;
 253   }
 254 
 255   // deep copy of exception handlers
 256   if (info->_exception_handlers != NULL) {
 257     _exception_handlers = new XHandlers(info->_exception_handlers);
 258   }
 259 }
 260 
 261 
 262 void CodeEmitInfo::record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool is_method_handle_invoke) {
 263   // record the safepoint before recording the debug info for enclosing scopes
 264   recorder->add_safepoint(pc_offset, _oop_map->deep_copy());
 265   _scope_debug_info->record_debug_info(recorder, pc_offset, true/*topmost*/, is_method_handle_invoke);
 266   recorder->end_safepoint(pc_offset);
 267 }
 268 
 269 
 270 void CodeEmitInfo::add_register_oop(LIR_Opr opr) {
 271   assert(_oop_map != NULL, "oop map must already exist");
 272   assert(opr->is_single_cpu(), "should not call otherwise");
 273 
 274   int frame_size = frame_map()->framesize();
 275   int arg_count = frame_map()->oop_map_arg_count();
 276   VMReg name = frame_map()->regname(opr);
 277   _oop_map->set_oop(name);
 278 }
 279 
 280 
 281 
 282 
 283 // Implementation of IR
 284 
 285 IR::IR(Compilation* compilation, ciMethod* method, int osr_bci) :




 213   int       cur_bci    = bci();
 214   if (cur_method != NULL && cur_bci != SynchronizationEntryBCI) {
 215     Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci);
 216     return Interpreter::bytecode_should_reexecute(code);
 217   } else
 218     return false;
 219 }
 220 
 221 
 222 // Implementation of CodeEmitInfo
 223 
 224 // Stack must be NON-null
 225 CodeEmitInfo::CodeEmitInfo(int bci, ValueStack* stack, XHandlers* exception_handlers)
 226   : _scope(stack->scope())
 227   , _bci(bci)
 228   , _scope_debug_info(NULL)
 229   , _oop_map(NULL)
 230   , _stack(stack)
 231   , _exception_handlers(exception_handlers)
 232   , _next(NULL)
 233   , _id(-1)
 234   , _is_method_handle_invoke(false) {
 235   assert(_stack != NULL, "must be non null");
 236   assert(_bci == SynchronizationEntryBCI || Bytecodes::is_defined(scope()->method()->java_code_at_bci(_bci)), "make sure bci points at a real bytecode");
 237 }
 238 
 239 
 240 CodeEmitInfo::CodeEmitInfo(CodeEmitInfo* info, bool lock_stack_only)
 241   : _scope(info->_scope)
 242   , _exception_handlers(NULL)
 243   , _bci(info->_bci)
 244   , _scope_debug_info(NULL)
 245   , _oop_map(NULL)
 246   , _is_method_handle_invoke(info->_is_method_handle_invoke) {
 247   if (lock_stack_only) {
 248     if (info->_stack != NULL) {
 249       _stack = info->_stack->copy_locks();
 250     } else {
 251       _stack = NULL;
 252     }
 253   } else {
 254     _stack = info->_stack;
 255   }
 256 
 257   // deep copy of exception handlers
 258   if (info->_exception_handlers != NULL) {
 259     _exception_handlers = new XHandlers(info->_exception_handlers);
 260   }
 261 }
 262 
 263 
 264 void CodeEmitInfo::record_debug_info(DebugInformationRecorder* recorder, int pc_offset) {
 265   // record the safepoint before recording the debug info for enclosing scopes
 266   recorder->add_safepoint(pc_offset, _oop_map->deep_copy());
 267   _scope_debug_info->record_debug_info(recorder, pc_offset, true/*topmost*/, _is_method_handle_invoke);
 268   recorder->end_safepoint(pc_offset);
 269 }
 270 
 271 
 272 void CodeEmitInfo::add_register_oop(LIR_Opr opr) {
 273   assert(_oop_map != NULL, "oop map must already exist");
 274   assert(opr->is_single_cpu(), "should not call otherwise");
 275 
 276   int frame_size = frame_map()->framesize();
 277   int arg_count = frame_map()->oop_map_arg_count();
 278   VMReg name = frame_map()->regname(opr);
 279   _oop_map->set_oop(name);
 280 }
 281 
 282 
 283 
 284 
 285 // Implementation of IR
 286 
 287 IR::IR(Compilation* compilation, ciMethod* method, int osr_bci) :


src/share/vm/c1/c1_IR.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File