OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 #endif | 78 #endif |
79 DeoptimizationInputData* deopt_data = | 79 DeoptimizationInputData* deopt_data = |
80 DeoptimizationInputData::cast(code->deoptimization_data()); | 80 DeoptimizationInputData::cast(code->deoptimization_data()); |
81 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 81 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
82 if (deopt_data->Pc(i)->value() == -1) continue; | 82 if (deopt_data->Pc(i)->value() == -1) continue; |
83 // Position where Call will be patched in. | 83 // Position where Call will be patched in. |
84 Address call_address = instruction_start + deopt_data->Pc(i)->value(); | 84 Address call_address = instruction_start + deopt_data->Pc(i)->value(); |
85 // There is room enough to write a long call instruction because we pad | 85 // There is room enough to write a long call instruction because we pad |
86 // LLazyBailout instructions with nops if necessary. | 86 // LLazyBailout instructions with nops if necessary. |
87 CodePatcher patcher(call_address, Assembler::kCallInstructionLength); | 87 CodePatcher patcher(call_address, Assembler::kCallInstructionLength); |
88 patcher.masm()->Call(GetDeoptimizationEntry(i, LAZY), RelocInfo::NONE); | 88 patcher.masm()->Call(GetDeoptimizationEntry(i, LAZY), RelocInfo::NONE64); |
89 ASSERT(prev_call_address == NULL || | 89 ASSERT(prev_call_address == NULL || |
90 call_address >= prev_call_address + patch_size()); | 90 call_address >= prev_call_address + patch_size()); |
91 ASSERT(call_address + patch_size() <= code->instruction_end()); | 91 ASSERT(call_address + patch_size() <= code->instruction_end()); |
92 #ifdef DEBUG | 92 #ifdef DEBUG |
93 prev_call_address = call_address; | 93 prev_call_address = call_address; |
94 #endif | 94 #endif |
95 } | 95 } |
96 | 96 |
97 // Add the deoptimizing code to the list. | 97 // Add the deoptimizing code to the list. |
98 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); | 98 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); |
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 } | 1166 } |
1167 __ bind(&done); | 1167 __ bind(&done); |
1168 } | 1168 } |
1169 | 1169 |
1170 #undef __ | 1170 #undef __ |
1171 | 1171 |
1172 | 1172 |
1173 } } // namespace v8::internal | 1173 } } // namespace v8::internal |
1174 | 1174 |
1175 #endif // V8_TARGET_ARCH_X64 | 1175 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |