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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 DeoptimizationInputData* deopt_data = | 150 DeoptimizationInputData* deopt_data = |
151 DeoptimizationInputData::cast(code->deoptimization_data()); | 151 DeoptimizationInputData::cast(code->deoptimization_data()); |
152 #ifdef DEBUG | 152 #ifdef DEBUG |
153 Address prev_call_address = NULL; | 153 Address prev_call_address = NULL; |
154 #endif | 154 #endif |
155 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 155 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
156 if (deopt_data->Pc(i)->value() == -1) continue; | 156 if (deopt_data->Pc(i)->value() == -1) continue; |
157 // Patch lazy deoptimization entry. | 157 // Patch lazy deoptimization entry. |
158 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 158 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
159 CodePatcher patcher(call_address, patch_size()); | 159 CodePatcher patcher(call_address, patch_size()); |
160 Address deopt_entry = GetDeoptimizationEntry(i, LAZY); | 160 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
161 patcher.masm()->call(deopt_entry, RelocInfo::NONE32); | 161 patcher.masm()->call(deopt_entry, RelocInfo::NONE32); |
162 // We use RUNTIME_ENTRY for deoptimization bailouts. | 162 // We use RUNTIME_ENTRY for deoptimization bailouts. |
163 RelocInfo rinfo(call_address + 1, // 1 after the call opcode. | 163 RelocInfo rinfo(call_address + 1, // 1 after the call opcode. |
164 RelocInfo::RUNTIME_ENTRY, | 164 RelocInfo::RUNTIME_ENTRY, |
165 reinterpret_cast<intptr_t>(deopt_entry), | 165 reinterpret_cast<intptr_t>(deopt_entry), |
166 NULL); | 166 NULL); |
167 reloc_info_writer.Write(&rinfo); | 167 reloc_info_writer.Write(&rinfo); |
168 ASSERT_GE(reloc_info_writer.pos(), | 168 ASSERT_GE(reloc_info_writer.pos(), |
169 reloc_info->address() + ByteArray::kHeaderSize); | 169 reloc_info->address() + ByteArray::kHeaderSize); |
170 ASSERT(prev_call_address == NULL || | 170 ASSERT(prev_call_address == NULL || |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 } | 1390 } |
1391 __ bind(&done); | 1391 __ bind(&done); |
1392 } | 1392 } |
1393 | 1393 |
1394 #undef __ | 1394 #undef __ |
1395 | 1395 |
1396 | 1396 |
1397 } } // namespace v8::internal | 1397 } } // namespace v8::internal |
1398 | 1398 |
1399 #endif // V8_TARGET_ARCH_IA32 | 1399 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |