Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
|
Jakob Kummerow
2012/01/16 11:41:25
nit: 2012
fschneider
2012/01/19 10:26:11
Done.
| |
| 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 data->deoptimizing_code_list_ = node; | 190 data->deoptimizing_code_list_ = node; |
| 191 | 191 |
| 192 // We might be in the middle of incremental marking with compaction. | 192 // We might be in the middle of incremental marking with compaction. |
| 193 // Tell collector to treat this code object in a special way and | 193 // Tell collector to treat this code object in a special way and |
| 194 // ignore all slots that might have been recorded on it. | 194 // ignore all slots that might have been recorded on it. |
| 195 isolate->heap()->mark_compact_collector()->InvalidateCode(code); | 195 isolate->heap()->mark_compact_collector()->InvalidateCode(code); |
| 196 | 196 |
| 197 // Set the code for the function to non-optimized version. | 197 // Set the code for the function to non-optimized version. |
| 198 function->ReplaceCode(function->shared()->code()); | 198 function->ReplaceCode(function->shared()->code()); |
| 199 | 199 |
| 200 function->shared()->IncrementAndCheckDeoptCount(); | |
| 201 | |
| 200 if (FLAG_trace_deopt) { | 202 if (FLAG_trace_deopt) { |
| 201 PrintF("[forced deoptimization: "); | 203 PrintF("[forced deoptimization: "); |
| 202 function->PrintName(); | 204 function->PrintName(); |
| 203 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); | 205 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); |
| 204 } | 206 } |
| 205 } | 207 } |
| 206 | 208 |
| 207 | 209 |
| 208 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code, | 210 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code, |
| 209 Address pc_after, | 211 Address pc_after, |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 821 } | 823 } |
| 822 __ bind(&done); | 824 __ bind(&done); |
| 823 } | 825 } |
| 824 | 826 |
| 825 #undef __ | 827 #undef __ |
| 826 | 828 |
| 827 | 829 |
| 828 } } // namespace v8::internal | 830 } } // namespace v8::internal |
| 829 | 831 |
| 830 #endif // V8_TARGET_ARCH_IA32 | 832 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |