| 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 "v8.h" | 6 #include "v8.h" |
| 7 | 7 |
| 8 #include "codegen.h" | 8 #include "codegen.h" |
| 9 #include "deoptimizer.h" | 9 #include "deoptimizer.h" |
| 10 #include "full-codegen.h" | 10 #include "full-codegen.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 23 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
| 24 Address code_start_address = code->instruction_start(); | 24 Address code_start_address = code->instruction_start(); |
| 25 // Invalidate the relocation information, as it will become invalid by the | 25 // Invalidate the relocation information, as it will become invalid by the |
| 26 // code patching below, and is not needed any more. | 26 // code patching below, and is not needed any more. |
| 27 code->InvalidateRelocation(); | 27 code->InvalidateRelocation(); |
| 28 | 28 |
| 29 if (FLAG_zap_code_space) { | 29 if (FLAG_zap_code_space) { |
| 30 // Fail hard and early if we enter this code object again. | 30 // Fail hard and early if we enter this code object again. |
| 31 byte* pointer = code->FindCodeAgeSequence(); | 31 byte* pointer = code->FindCodeAgeSequence(); |
| 32 if (pointer != NULL) { | 32 if (pointer != NULL) { |
| 33 pointer += kNoCodeAgeSequenceLength * Assembler::kInstrSize; | 33 pointer += kNoCodeAgeSequenceLength; |
| 34 } else { | 34 } else { |
| 35 pointer = code->instruction_start(); | 35 pointer = code->instruction_start(); |
| 36 } | 36 } |
| 37 CodePatcher patcher(pointer, 1); | 37 CodePatcher patcher(pointer, 1); |
| 38 patcher.masm()->break_(0xCC); | 38 patcher.masm()->break_(0xCC); |
| 39 | 39 |
| 40 DeoptimizationInputData* data = | 40 DeoptimizationInputData* data = |
| 41 DeoptimizationInputData::cast(code->deoptimization_data()); | 41 DeoptimizationInputData::cast(code->deoptimization_data()); |
| 42 int osr_offset = data->OsrPcOffset()->value(); | 42 int osr_offset = data->OsrPcOffset()->value(); |
| 43 if (osr_offset > 0) { | 43 if (osr_offset > 0) { |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 374 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
| 375 // No out-of-line constant pool support. | 375 // No out-of-line constant pool support. |
| 376 UNREACHABLE(); | 376 UNREACHABLE(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 | 379 |
| 380 #undef __ | 380 #undef __ |
| 381 | 381 |
| 382 | 382 |
| 383 } } // namespace v8::internal | 383 } } // namespace v8::internal |
| OLD | NEW |