Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_Compilation.cpp @ 1204:18a389214829
6921352: 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 | Mon, 01 Feb 2010 19:29:46 +0100 |
parents | 24128c2ffa87 |
children | 9f5b60a14736 |
comparison
equal
deleted
inserted
replaced
1203:844a9d73ec22 | 1204:18a389214829 |
---|---|
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 } |