| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "codegen.h" | 7 #include "codegen.h" |
| 8 #include "deoptimizer.h" | 8 #include "deoptimizer.h" |
| 9 #include "full-codegen.h" | 9 #include "full-codegen.h" |
| 10 #include "safepoint-table.h" | 10 #include "safepoint-table.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 24 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
| 25 Address code_start_address = code->instruction_start(); | 25 Address code_start_address = code->instruction_start(); |
| 26 // Invalidate the relocation information, as it will become invalid by the | 26 // Invalidate the relocation information, as it will become invalid by the |
| 27 // code patching below, and is not needed any more. | 27 // code patching below, and is not needed any more. |
| 28 code->InvalidateRelocation(); | 28 code->InvalidateRelocation(); |
| 29 | 29 |
| 30 if (FLAG_zap_code_space) { | 30 if (FLAG_zap_code_space) { |
| 31 // Fail hard and early if we enter this code object again. | 31 // Fail hard and early if we enter this code object again. |
| 32 byte* pointer = code->FindCodeAgeSequence(); | 32 byte* pointer = code->FindCodeAgeSequence(); |
| 33 if (pointer != NULL) { | 33 if (pointer != NULL) { |
| 34 pointer += kNoCodeAgeSequenceLength * Assembler::kInstrSize; | 34 pointer += kNoCodeAgeSequenceLength; |
| 35 } else { | 35 } else { |
| 36 pointer = code->instruction_start(); | 36 pointer = code->instruction_start(); |
| 37 } | 37 } |
| 38 CodePatcher patcher(pointer, 1); | 38 CodePatcher patcher(pointer, 1); |
| 39 patcher.masm()->bkpt(0); | 39 patcher.masm()->bkpt(0); |
| 40 | 40 |
| 41 DeoptimizationInputData* data = | 41 DeoptimizationInputData* data = |
| 42 DeoptimizationInputData::cast(code->deoptimization_data()); | 42 DeoptimizationInputData::cast(code->deoptimization_data()); |
| 43 int osr_offset = data->OsrPcOffset()->value(); | 43 int osr_offset = data->OsrPcOffset()->value(); |
| 44 if (osr_offset > 0) { | 44 if (osr_offset > 0) { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 354 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
| 355 ASSERT(FLAG_enable_ool_constant_pool); | 355 ASSERT(FLAG_enable_ool_constant_pool); |
| 356 SetFrameSlot(offset, value); | 356 SetFrameSlot(offset, value); |
| 357 } | 357 } |
| 358 | 358 |
| 359 | 359 |
| 360 #undef __ | 360 #undef __ |
| 361 | 361 |
| 362 } } // namespace v8::internal | 362 } } // namespace v8::internal |
| OLD | NEW |