| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 deoptimization_index, Deoptimizer::LAZY); | 90 deoptimization_index, Deoptimizer::LAZY); |
| 91 patcher.masm()->Call(deoptimization_entry, RelocInfo::NONE); | 91 patcher.masm()->Call(deoptimization_entry, RelocInfo::NONE); |
| 92 last_pc_offset += patch_size(); | 92 last_pc_offset += patch_size(); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 | 96 |
| 97 #ifdef DEBUG | 97 #ifdef DEBUG |
| 98 // Destroy the code which is not supposed to be run again. | 98 // Destroy the code which is not supposed to be run again. |
| 99 int instructions = | 99 int instructions = |
| 100 (code->safepoint_table_start() - last_pc_offset) / Assembler::kInstrSize; | 100 (code->safepoint_table_offset() - last_pc_offset) / Assembler::kInstrSize; |
| 101 CodePatcher destroyer(code->instruction_start() + last_pc_offset, | 101 CodePatcher destroyer(code->instruction_start() + last_pc_offset, |
| 102 instructions); | 102 instructions); |
| 103 for (int x = 0; x < instructions; x++) { | 103 for (int x = 0; x < instructions; x++) { |
| 104 destroyer.masm()->bkpt(0); | 104 destroyer.masm()->bkpt(0); |
| 105 } | 105 } |
| 106 #endif | 106 #endif |
| 107 | 107 |
| 108 // Add the deoptimizing code to the list. | 108 // Add the deoptimizing code to the list. |
| 109 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); | 109 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); |
| 110 node->set_next(deoptimizing_code_list_); | 110 node->set_next(deoptimizing_code_list_); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 __ push(ip); | 507 __ push(ip); |
| 508 __ b(&done); | 508 __ b(&done); |
| 509 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 509 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
| 510 } | 510 } |
| 511 __ bind(&done); | 511 __ bind(&done); |
| 512 } | 512 } |
| 513 | 513 |
| 514 #undef __ | 514 #undef __ |
| 515 | 515 |
| 516 } } // namespace v8::internal | 516 } } // namespace v8::internal |
| OLD | NEW |