hotspot/src/share/vm/c1/c1_Compilation.cpp
changeset 4752 67a506670cd0
parent 4749 f26b30116e3a
child 5334 b2d040a8d375
equal deleted inserted replaced
4751:9418f690831d 4752:67a506670cd0
     1 /*
     1 /*
     2  * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1999-2010 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   203 
   203 
   204 
   204 
   205 void Compilation::emit_code_epilog(LIR_Assembler* assembler) {
   205 void Compilation::emit_code_epilog(LIR_Assembler* assembler) {
   206   CHECK_BAILOUT();
   206   CHECK_BAILOUT();
   207 
   207 
       
   208   CodeOffsets* code_offsets = assembler->offsets();
       
   209 
   208   // generate code or slow cases
   210   // generate code or slow cases
   209   assembler->emit_slow_case_stubs();
   211   assembler->emit_slow_case_stubs();
   210   CHECK_BAILOUT();
   212   CHECK_BAILOUT();
   211 
   213 
   212   // generate exception adapters
   214   // generate exception adapters
   213   assembler->emit_exception_entries(exception_info_list());
   215   assembler->emit_exception_entries(exception_info_list());
   214   CHECK_BAILOUT();
   216   CHECK_BAILOUT();
   215 
   217 
   216   // generate code for exception handler
   218   // Generate code for exception handler.
   217   assembler->emit_exception_handler();
   219   code_offsets->set_value(CodeOffsets::Exceptions, assembler->emit_exception_handler());
   218   CHECK_BAILOUT();
   220   CHECK_BAILOUT();
   219   assembler->emit_deopt_handler();
   221 
       
   222   // Generate code for deopt handler.
       
   223   code_offsets->set_value(CodeOffsets::Deopt, assembler->emit_deopt_handler());
       
   224   CHECK_BAILOUT();
       
   225 
       
   226   // Generate code for MethodHandle deopt handler.  We can use the
       
   227   // same code as for the normal deopt handler, we just need a
       
   228   // different entry point address.
       
   229   code_offsets->set_value(CodeOffsets::DeoptMH, assembler->emit_deopt_handler());
   220   CHECK_BAILOUT();
   230   CHECK_BAILOUT();
   221 
   231 
   222   // done
   232   // done
   223   masm()->flush();
   233   masm()->flush();
   224 }
   234 }