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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 data->deoptimizing_code_list_ = node; | 93 data->deoptimizing_code_list_ = node; |
| 94 | 94 |
| 95 // We might be in the middle of incremental marking with compaction. | 95 // We might be in the middle of incremental marking with compaction. |
| 96 // Tell collector to treat this code object in a special way and | 96 // Tell collector to treat this code object in a special way and |
| 97 // ignore all slots that might have been recorded on it. | 97 // ignore all slots that might have been recorded on it. |
| 98 isolate->heap()->mark_compact_collector()->InvalidateCode(code); | 98 isolate->heap()->mark_compact_collector()->InvalidateCode(code); |
| 99 | 99 |
| 100 // Set the code for the function to non-optimized version. | 100 // Set the code for the function to non-optimized version. |
| 101 function->ReplaceCode(function->shared()->code()); | 101 function->ReplaceCode(function->shared()->code()); |
| 102 | 102 |
| 103 function->shared()->IncrementAndCheckDeoptCount(); | |
| 104 | |
| 103 if (FLAG_trace_deopt) { | 105 if (FLAG_trace_deopt) { |
| 104 PrintF("[forced deoptimization: "); | 106 PrintF("[forced deoptimization: "); |
| 105 function->PrintName(); | 107 function->PrintName(); |
| 106 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); | 108 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); |
| 107 } | 109 } |
| 108 } | 110 } |
| 109 | 111 |
| 110 | 112 |
| 111 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code, | 113 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code, |
| 112 Address pc_after, | 114 Address pc_after, |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 750 __ push(ip); | 752 __ push(ip); |
| 751 __ b(&done); | 753 __ b(&done); |
| 752 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 754 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
| 753 } | 755 } |
| 754 __ bind(&done); | 756 __ bind(&done); |
| 755 } | 757 } |
| 756 | 758 |
| 757 #undef __ | 759 #undef __ |
| 758 | 760 |
| 759 } } // namespace v8::internal | 761 } } // namespace v8::internal |
| OLD | NEW |