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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 last_pc_offset += gap_code_size; | 81 last_pc_offset += gap_code_size; |
82 CodePatcher patcher(code->instruction_start() + last_pc_offset, | 82 CodePatcher patcher(code->instruction_start() + last_pc_offset, |
83 patch_size()); | 83 patch_size()); |
84 patcher.masm()->Call(GetDeoptimizationEntry(deoptimization_index, LAZY), | 84 patcher.masm()->Call(GetDeoptimizationEntry(deoptimization_index, LAZY), |
85 RelocInfo::NONE); | 85 RelocInfo::NONE); |
86 last_pc_offset += patch_size(); | 86 last_pc_offset += patch_size(); |
87 } | 87 } |
88 } | 88 } |
89 #ifdef DEBUG | 89 #ifdef DEBUG |
90 // Destroy the code which is not supposed to run again. | 90 // Destroy the code which is not supposed to run again. |
91 CHECK(code->safepoint_table_start() >= last_pc_offset); | 91 CHECK(code->safepoint_table_offset() >= last_pc_offset); |
92 unsigned instructions = code->safepoint_table_start() - last_pc_offset; | 92 unsigned instructions = code->safepoint_table_offset() - last_pc_offset; |
93 CodePatcher destroyer(code->instruction_start() + last_pc_offset, | 93 CodePatcher destroyer(code->instruction_start() + last_pc_offset, |
94 instructions); | 94 instructions); |
95 for (unsigned i = 0; i < instructions; i++) { | 95 for (unsigned i = 0; i < instructions; i++) { |
96 destroyer.masm()->int3(); | 96 destroyer.masm()->int3(); |
97 } | 97 } |
98 #endif | 98 #endif |
99 | 99 |
100 // Add the deoptimizing code to the list. | 100 // Add the deoptimizing code to the list. |
101 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); | 101 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); |
102 node->set_next(deoptimizing_code_list_); | 102 node->set_next(deoptimizing_code_list_); |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 } | 506 } |
507 __ bind(&done); | 507 __ bind(&done); |
508 } | 508 } |
509 | 509 |
510 #undef __ | 510 #undef __ |
511 | 511 |
512 | 512 |
513 } } // namespace v8::internal | 513 } } // namespace v8::internal |
514 | 514 |
515 #endif // V8_TARGET_ARCH_X64 | 515 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |