comparison src/share/vm/c1/c1_Compilation.cpp @ 1200:ba263cfb7611

6917766: JSR 292 needs its own deopt handler Summary: We need to introduce a new MH deopt handler so we can easily determine if the deopt happened at a MH call site or not. Reviewed-by: never, jrose
author twisti
date Fri, 29 Jan 2010 12:13:05 +0100
parents bd02caa94611
children 24128c2ffa87
comparison
equal deleted inserted replaced
1199:0e14bd797dad 1200:ba263cfb7611
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 }