OLD | NEW |
1 | 1 |
2 // Copyright 2011 the V8 project authors. All rights reserved. | 2 // Copyright 2011 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "src/v8.h" | 6 #include "src/v8.h" |
7 | 7 |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
11 #include "src/safepoint-table.h" | 11 #include "src/safepoint-table.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 | 16 |
17 int Deoptimizer::patch_size() { | 17 int Deoptimizer::patch_size() { |
18 const int kCallInstructionSizeInWords = 4; | 18 const int kCallInstructionSizeInWords = 4; |
19 return kCallInstructionSizeInWords * Assembler::kInstrSize; | 19 return kCallInstructionSizeInWords * Assembler::kInstrSize; |
20 } | 20 } |
21 | 21 |
22 | 22 |
| 23 void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) { |
| 24 // Empty because there is no need for relocation information for the code |
| 25 // patching in Deoptimizer::PatchCodeForDeoptimization below. |
| 26 } |
| 27 |
| 28 |
23 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 29 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
24 Address code_start_address = code->instruction_start(); | 30 Address code_start_address = code->instruction_start(); |
25 // Invalidate the relocation information, as it will become invalid by the | 31 // Invalidate the relocation information, as it will become invalid by the |
26 // code patching below, and is not needed any more. | 32 // code patching below, and is not needed any more. |
27 code->InvalidateRelocation(); | 33 code->InvalidateRelocation(); |
28 | 34 |
29 if (FLAG_zap_code_space) { | 35 if (FLAG_zap_code_space) { |
30 // Fail hard and early if we enter this code object again. | 36 // Fail hard and early if we enter this code object again. |
31 byte* pointer = code->FindCodeAgeSequence(); | 37 byte* pointer = code->FindCodeAgeSequence(); |
32 if (pointer != NULL) { | 38 if (pointer != NULL) { |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 398 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
393 // No out-of-line constant pool support. | 399 // No out-of-line constant pool support. |
394 UNREACHABLE(); | 400 UNREACHABLE(); |
395 } | 401 } |
396 | 402 |
397 | 403 |
398 #undef __ | 404 #undef __ |
399 | 405 |
400 | 406 |
401 } } // namespace v8::internal | 407 } } // namespace v8::internal |
OLD | NEW |