src/share/vm/opto/runtime.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6893081 Sdiff src/share/vm/opto

src/share/vm/opto/runtime.cpp

Print this page
rev 1024 : imported patch indy-cleanup-6893081.patch
   1 /*
   2  * Copyright 1998-2007 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  *


 839     } else {
 840 
 841       handler_address =
 842         force_unwind ? NULL : nm->handler_for_exception_and_pc(exception, pc);
 843 
 844       if (handler_address == NULL) {
 845         handler_address = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true);
 846         assert (handler_address != NULL, "must have compiled handler");
 847         // Update the exception cache only when the unwind was not forced.
 848         if (!force_unwind) {
 849           nm->add_handler_for_exception_and_pc(exception,pc,handler_address);
 850         }
 851       } else {
 852         assert(handler_address == SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true), "Must be the same");
 853       }
 854     }
 855 
 856     thread->set_exception_pc(pc);
 857     thread->set_exception_handler_pc(handler_address);
 858     thread->set_exception_stack_size(0);



 859   }
 860 
 861   // Restore correct return pc.  Was saved above.
 862   thread->set_exception_oop(exception());
 863   return handler_address;
 864 
 865 JRT_END
 866 
 867 // We are entering here from exception_blob
 868 // If there is a compiled exception handler in this method, we will continue there;
 869 // otherwise we will unwind the stack and continue at the caller of top frame method
 870 // Note we enter without the usual JRT wrapper. We will call a helper routine that
 871 // will do the normal VM entry. We do it this way so that we can see if the nmethod
 872 // we looked up the handler for has been deoptimized in the meantime. If it has been
 873 // we must not use the handler and instread return the deopt blob.
 874 address OptoRuntime::handle_exception_C(JavaThread* thread) {
 875 //
 876 // We are in Java not VM and in debug mode we have a NoHandleMark
 877 //
 878 #ifndef PRODUCT


   1 /*
   2  * Copyright 1998-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  *


 839     } else {
 840 
 841       handler_address =
 842         force_unwind ? NULL : nm->handler_for_exception_and_pc(exception, pc);
 843 
 844       if (handler_address == NULL) {
 845         handler_address = SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true);
 846         assert (handler_address != NULL, "must have compiled handler");
 847         // Update the exception cache only when the unwind was not forced.
 848         if (!force_unwind) {
 849           nm->add_handler_for_exception_and_pc(exception,pc,handler_address);
 850         }
 851       } else {
 852         assert(handler_address == SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true), "Must be the same");
 853       }
 854     }
 855 
 856     thread->set_exception_pc(pc);
 857     thread->set_exception_handler_pc(handler_address);
 858     thread->set_exception_stack_size(0);
 859 
 860     // Check if the exception PC is a MethodHandle call.
 861     thread->set_is_method_handle_exception(nm->is_method_handle_return(pc));
 862   }
 863 
 864   // Restore correct return pc.  Was saved above.
 865   thread->set_exception_oop(exception());
 866   return handler_address;
 867 
 868 JRT_END
 869 
 870 // We are entering here from exception_blob
 871 // If there is a compiled exception handler in this method, we will continue there;
 872 // otherwise we will unwind the stack and continue at the caller of top frame method
 873 // Note we enter without the usual JRT wrapper. We will call a helper routine that
 874 // will do the normal VM entry. We do it this way so that we can see if the nmethod
 875 // we looked up the handler for has been deoptimized in the meantime. If it has been
 876 // we must not use the handler and instread return the deopt blob.
 877 address OptoRuntime::handle_exception_C(JavaThread* thread) {
 878 //
 879 // We are in Java not VM and in debug mode we have a NoHandleMark
 880 //
 881 #ifndef PRODUCT


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