OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 #endif | 41 #endif |
42 // For each LLazyBailout instruction insert a call to the corresponding | 42 // For each LLazyBailout instruction insert a call to the corresponding |
43 // deoptimization entry. | 43 // deoptimization entry. |
44 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 44 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
45 if (deopt_data->Pc(i)->value() == -1) continue; | 45 if (deopt_data->Pc(i)->value() == -1) continue; |
46 | 46 |
47 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 47 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
48 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); | 48 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
49 | 49 |
50 PatchingAssembler patcher(call_address, patch_size() / kInstructionSize); | 50 PatchingAssembler patcher(call_address, patch_size() / kInstructionSize); |
51 patcher.LoadLiteral(ip0, 2 * kInstructionSize); | 51 patcher.ldr_pcrel(ip0, (2 * kInstructionSize) >> kLoadLiteralScaleLog2); |
52 patcher.blr(ip0); | 52 patcher.blr(ip0); |
53 patcher.dc64(reinterpret_cast<intptr_t>(deopt_entry)); | 53 patcher.dc64(reinterpret_cast<intptr_t>(deopt_entry)); |
54 | 54 |
55 ASSERT((prev_call_address == NULL) || | 55 ASSERT((prev_call_address == NULL) || |
56 (call_address >= prev_call_address + patch_size())); | 56 (call_address >= prev_call_address + patch_size())); |
57 ASSERT(call_address + patch_size() <= code->instruction_end()); | 57 ASSERT(call_address + patch_size() <= code->instruction_end()); |
58 #ifdef DEBUG | 58 #ifdef DEBUG |
59 prev_call_address = call_address; | 59 prev_call_address = call_address; |
60 #endif | 60 #endif |
61 } | 61 } |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 377 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
378 // No out-of-line constant pool support. | 378 // No out-of-line constant pool support. |
379 UNREACHABLE(); | 379 UNREACHABLE(); |
380 } | 380 } |
381 | 381 |
382 | 382 |
383 #undef __ | 383 #undef __ |
384 | 384 |
385 } } // namespace v8::internal | 385 } } // namespace v8::internal |
OLD | NEW |