| 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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| 11 #include "src/full-codegen.h" | 11 #include "src/full-codegen.h" |
| 12 #include "src/safepoint-table.h" | 12 #include "src/safepoint-table.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 | 17 |
| 18 const int Deoptimizer::table_entry_size_ = 10; | 18 const int Deoptimizer::table_entry_size_ = 10; |
| 19 | 19 |
| 20 | 20 |
| 21 int Deoptimizer::patch_size() { | 21 int Deoptimizer::patch_size() { |
| 22 return Assembler::kCallSequenceLength; | 22 return Assembler::kCallSequenceLength; |
| 23 } | 23 } |
| 24 | 24 |
| 25 | 25 |
| 26 void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) { |
| 27 // Empty because there is no need for relocation information for the code |
| 28 // patching in Deoptimizer::PatchCodeForDeoptimization below. |
| 29 } |
| 30 |
| 31 |
| 26 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 32 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
| 27 // Invalidate the relocation information, as it will become invalid by the | 33 // Invalidate the relocation information, as it will become invalid by the |
| 28 // code patching below, and is not needed any more. | 34 // code patching below, and is not needed any more. |
| 29 code->InvalidateRelocation(); | 35 code->InvalidateRelocation(); |
| 30 | 36 |
| 31 if (FLAG_zap_code_space) { | 37 if (FLAG_zap_code_space) { |
| 32 // Fail hard and early if we enter this code object again. | 38 // Fail hard and early if we enter this code object again. |
| 33 byte* pointer = code->FindCodeAgeSequence(); | 39 byte* pointer = code->FindCodeAgeSequence(); |
| 34 if (pointer != NULL) { | 40 if (pointer != NULL) { |
| 35 pointer += kNoCodeAgeSequenceLength; | 41 pointer += kNoCodeAgeSequenceLength; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 UNREACHABLE(); | 349 UNREACHABLE(); |
| 344 } | 350 } |
| 345 | 351 |
| 346 | 352 |
| 347 #undef __ | 353 #undef __ |
| 348 | 354 |
| 349 | 355 |
| 350 } } // namespace v8::internal | 356 } } // namespace v8::internal |
| 351 | 357 |
| 352 #endif // V8_TARGET_ARCH_X64 | 358 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |