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 "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" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 const int Deoptimizer::table_entry_size_ = 8; | 15 const int Deoptimizer::table_entry_size_ = 8; |
16 | 16 |
17 | 17 |
18 int Deoptimizer::patch_size() { | 18 int Deoptimizer::patch_size() { |
19 const int kCallInstructionSizeInWords = 3; | 19 const int kCallInstructionSizeInWords = 3; |
20 return kCallInstructionSizeInWords * Assembler::kInstrSize; | 20 return kCallInstructionSizeInWords * Assembler::kInstrSize; |
21 } | 21 } |
22 | 22 |
23 | 23 |
| 24 void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) { |
| 25 // Empty because there is no need for relocation information for the code |
| 26 // patching in Deoptimizer::PatchCodeForDeoptimization below. |
| 27 } |
| 28 |
| 29 |
24 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 30 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
25 Address code_start_address = code->instruction_start(); | 31 Address code_start_address = code->instruction_start(); |
26 // Invalidate the relocation information, as it will become invalid by the | 32 // Invalidate the relocation information, as it will become invalid by the |
27 // code patching below, and is not needed any more. | 33 // code patching below, and is not needed any more. |
28 code->InvalidateRelocation(); | 34 code->InvalidateRelocation(); |
29 | 35 |
30 if (FLAG_zap_code_space) { | 36 if (FLAG_zap_code_space) { |
31 // Fail hard and early if we enter this code object again. | 37 // Fail hard and early if we enter this code object again. |
32 byte* pointer = code->FindCodeAgeSequence(); | 38 byte* pointer = code->FindCodeAgeSequence(); |
33 if (pointer != NULL) { | 39 if (pointer != NULL) { |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 351 |
346 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 352 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
347 DCHECK(FLAG_enable_ool_constant_pool); | 353 DCHECK(FLAG_enable_ool_constant_pool); |
348 SetFrameSlot(offset, value); | 354 SetFrameSlot(offset, value); |
349 } | 355 } |
350 | 356 |
351 | 357 |
352 #undef __ | 358 #undef __ |
353 | 359 |
354 } } // namespace v8::internal | 360 } } // namespace v8::internal |
OLD | NEW |