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

src/share/vm/c1/c1_IR.cpp

Print this page


   1 /*
   2  * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


 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) {
 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*/);
 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) :


   1 /*
   2  * Copyright 1999-2010 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


 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) :


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