| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 ASSERT(junk_address <= reloc_end_address); | 199 ASSERT(junk_address <= reloc_end_address); |
| 200 isolate->heap()->CreateFillerObjectAt(junk_address, | 200 isolate->heap()->CreateFillerObjectAt(junk_address, |
| 201 reloc_end_address - junk_address); | 201 reloc_end_address - junk_address); |
| 202 | 202 |
| 203 // Add the deoptimizing code to the list. | 203 // Add the deoptimizing code to the list. |
| 204 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); | 204 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); |
| 205 DeoptimizerData* data = isolate->deoptimizer_data(); | 205 DeoptimizerData* data = isolate->deoptimizer_data(); |
| 206 node->set_next(data->deoptimizing_code_list_); | 206 node->set_next(data->deoptimizing_code_list_); |
| 207 data->deoptimizing_code_list_ = node; | 207 data->deoptimizing_code_list_ = node; |
| 208 | 208 |
| 209 // We might be in the middle of incremental marking with compaction. |
| 210 // Tell collector to treat this code object in a special way and |
| 211 // ignore all slots that might have been recorded on it. |
| 212 isolate->heap()->mark_compact_collector()->InvalidateCode(code); |
| 213 |
| 209 // Set the code for the function to non-optimized version. | 214 // Set the code for the function to non-optimized version. |
| 210 function->ReplaceCode(function->shared()->code()); | 215 function->ReplaceCode(function->shared()->code()); |
| 211 | 216 |
| 212 if (FLAG_trace_deopt) { | 217 if (FLAG_trace_deopt) { |
| 213 PrintF("[forced deoptimization: "); | 218 PrintF("[forced deoptimization: "); |
| 214 function->PrintName(); | 219 function->PrintName(); |
| 215 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); | 220 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); |
| 216 #ifdef DEBUG | 221 #ifdef DEBUG |
| 217 if (FLAG_print_code) { | 222 if (FLAG_print_code) { |
| 218 code->PrintLn(); | 223 code->PrintLn(); |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 } | 813 } |
| 809 __ bind(&done); | 814 __ bind(&done); |
| 810 } | 815 } |
| 811 | 816 |
| 812 #undef __ | 817 #undef __ |
| 813 | 818 |
| 814 | 819 |
| 815 } } // namespace v8::internal | 820 } } // namespace v8::internal |
| 816 | 821 |
| 817 #endif // V8_TARGET_ARCH_IA32 | 822 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |