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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(i, LAZY); |
161 patcher.masm()->call(deopt_entry, RelocInfo::NONE); | 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 || |
171 call_address >= prev_call_address + patch_size()); | 171 call_address >= prev_call_address + patch_size()); |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 } | 1272 } |
1273 __ bind(&done); | 1273 __ bind(&done); |
1274 } | 1274 } |
1275 | 1275 |
1276 #undef __ | 1276 #undef __ |
1277 | 1277 |
1278 | 1278 |
1279 } } // namespace v8::internal | 1279 } } // namespace v8::internal |
1280 | 1280 |
1281 #endif // V8_TARGET_ARCH_IA32 | 1281 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |