OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "codegen.h" | 7 #include "codegen.h" |
8 #include "deoptimizer.h" | 8 #include "deoptimizer.h" |
9 #include "full-codegen.h" | 9 #include "full-codegen.h" |
10 #include "safepoint-table.h" | 10 #include "safepoint-table.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #endif | 57 #endif |
58 // For each LLazyBailout instruction insert a call to the corresponding | 58 // For each LLazyBailout instruction insert a call to the corresponding |
59 // deoptimization entry. | 59 // deoptimization entry. |
60 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 60 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
61 if (deopt_data->Pc(i)->value() == -1) continue; | 61 if (deopt_data->Pc(i)->value() == -1) continue; |
62 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 62 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
63 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); | 63 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
64 // We need calls to have a predictable size in the unoptimized code, but | 64 // We need calls to have a predictable size in the unoptimized code, but |
65 // this is optimized code, so we don't have to have a predictable size. | 65 // this is optimized code, so we don't have to have a predictable size. |
66 int call_size_in_bytes = | 66 int call_size_in_bytes = |
67 MacroAssembler::CallSizeNotPredictableCodeSize(deopt_entry, | 67 MacroAssembler::CallSizeNotPredictableCodeSize(isolate, |
| 68 deopt_entry, |
68 RelocInfo::NONE32); | 69 RelocInfo::NONE32); |
69 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; | 70 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; |
70 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); | 71 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); |
71 ASSERT(call_size_in_bytes <= patch_size()); | 72 ASSERT(call_size_in_bytes <= patch_size()); |
72 CodePatcher patcher(call_address, call_size_in_words); | 73 CodePatcher patcher(call_address, call_size_in_words); |
73 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); | 74 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); |
74 ASSERT(prev_call_address == NULL || | 75 ASSERT(prev_call_address == NULL || |
75 call_address >= prev_call_address + patch_size()); | 76 call_address >= prev_call_address + patch_size()); |
76 ASSERT(call_address + patch_size() <= code->instruction_end()); | 77 ASSERT(call_address + patch_size() <= code->instruction_end()); |
77 #ifdef DEBUG | 78 #ifdef DEBUG |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 353 |
353 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 354 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
354 ASSERT(FLAG_enable_ool_constant_pool); | 355 ASSERT(FLAG_enable_ool_constant_pool); |
355 SetFrameSlot(offset, value); | 356 SetFrameSlot(offset, value); |
356 } | 357 } |
357 | 358 |
358 | 359 |
359 #undef __ | 360 #undef __ |
360 | 361 |
361 } } // namespace v8::internal | 362 } } // namespace v8::internal |
OLD | NEW |