| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 25 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
| 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 // TODO(jkummerow): if (FLAG_zap_code_space), make the code object's | 30 // TODO(jkummerow): if (FLAG_zap_code_space), make the code object's |
| 31 // entry sequence unusable (see other architectures). | 31 // entry sequence unusable (see other architectures). |
| 32 | 32 |
| 33 DeoptimizationInputData* deopt_data = | 33 DeoptimizationInputData* deopt_data = |
| 34 DeoptimizationInputData::cast(code->deoptimization_data()); | 34 DeoptimizationInputData::cast(code->deoptimization_data()); |
| 35 SharedFunctionInfo* shared = | |
| 36 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); | |
| 37 shared->EvictFromOptimizedCodeMap(code, "deoptimized code"); | |
| 38 Address code_start_address = code->instruction_start(); | 35 Address code_start_address = code->instruction_start(); |
| 39 #ifdef DEBUG | 36 #ifdef DEBUG |
| 40 Address prev_call_address = NULL; | 37 Address prev_call_address = NULL; |
| 41 #endif | 38 #endif |
| 42 // For each LLazyBailout instruction insert a call to the corresponding | 39 // For each LLazyBailout instruction insert a call to the corresponding |
| 43 // deoptimization entry. | 40 // deoptimization entry. |
| 44 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 41 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
| 45 if (deopt_data->Pc(i)->value() == -1) continue; | 42 if (deopt_data->Pc(i)->value() == -1) continue; |
| 46 | 43 |
| 47 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 44 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 347 |
| 351 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 348 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
| 352 // No out-of-line constant pool support. | 349 // No out-of-line constant pool support. |
| 353 UNREACHABLE(); | 350 UNREACHABLE(); |
| 354 } | 351 } |
| 355 | 352 |
| 356 | 353 |
| 357 #undef __ | 354 #undef __ |
| 358 | 355 |
| 359 } } // namespace v8::internal | 356 } } // namespace v8::internal |
| OLD | NEW |