| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 | 15 |
| 16 int Deoptimizer::patch_size() { | 16 int Deoptimizer::patch_size() { |
| 17 const int kCallInstructionSizeInWords = 6; | 17 const int kCallInstructionSizeInWords = 6; |
| 18 return kCallInstructionSizeInWords * Assembler::kInstrSize; | 18 return kCallInstructionSizeInWords * Assembler::kInstrSize; |
| 19 } | 19 } |
| 20 | 20 |
| 21 | 21 |
| 22 void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) { |
| 23 // Empty because there is no need for relocation information for the code |
| 24 // patching in Deoptimizer::PatchCodeForDeoptimization below. |
| 25 } |
| 26 |
| 27 |
| 22 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 28 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
| 23 Address code_start_address = code->instruction_start(); | 29 Address code_start_address = code->instruction_start(); |
| 24 // Invalidate the relocation information, as it will become invalid by the | 30 // Invalidate the relocation information, as it will become invalid by the |
| 25 // code patching below, and is not needed any more. | 31 // code patching below, and is not needed any more. |
| 26 code->InvalidateRelocation(); | 32 code->InvalidateRelocation(); |
| 27 | 33 |
| 28 if (FLAG_zap_code_space) { | 34 if (FLAG_zap_code_space) { |
| 29 // Fail hard and early if we enter this code object again. | 35 // Fail hard and early if we enter this code object again. |
| 30 byte* pointer = code->FindCodeAgeSequence(); | 36 byte* pointer = code->FindCodeAgeSequence(); |
| 31 if (pointer != NULL) { | 37 if (pointer != NULL) { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 375 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
| 370 // No out-of-line constant pool support. | 376 // No out-of-line constant pool support. |
| 371 UNREACHABLE(); | 377 UNREACHABLE(); |
| 372 } | 378 } |
| 373 | 379 |
| 374 | 380 |
| 375 #undef __ | 381 #undef __ |
| 376 | 382 |
| 377 | 383 |
| 378 } } // namespace v8::internal | 384 } } // namespace v8::internal |
| OLD | NEW |