| 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" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 DeoptimizationInputData::cast(code->deoptimization_data()); | 40 DeoptimizationInputData::cast(code->deoptimization_data()); |
| 41 int osr_offset = data->OsrPcOffset()->value(); | 41 int osr_offset = data->OsrPcOffset()->value(); |
| 42 if (osr_offset > 0) { | 42 if (osr_offset > 0) { |
| 43 CodePatcher osr_patcher(code->instruction_start() + osr_offset, 1); | 43 CodePatcher osr_patcher(code->instruction_start() + osr_offset, 1); |
| 44 osr_patcher.masm()->break_(0xCC); | 44 osr_patcher.masm()->break_(0xCC); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 DeoptimizationInputData* deopt_data = | 48 DeoptimizationInputData* deopt_data = |
| 49 DeoptimizationInputData::cast(code->deoptimization_data()); | 49 DeoptimizationInputData::cast(code->deoptimization_data()); |
| 50 SharedFunctionInfo* shared = | |
| 51 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); | |
| 52 shared->EvictFromOptimizedCodeMap(code, "deoptimized code"); | |
| 53 #ifdef DEBUG | 50 #ifdef DEBUG |
| 54 Address prev_call_address = NULL; | 51 Address prev_call_address = NULL; |
| 55 #endif | 52 #endif |
| 56 // For each LLazyBailout instruction insert a call to the corresponding | 53 // For each LLazyBailout instruction insert a call to the corresponding |
| 57 // deoptimization entry. | 54 // deoptimization entry. |
| 58 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 55 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
| 59 if (deopt_data->Pc(i)->value() == -1) continue; | 56 if (deopt_data->Pc(i)->value() == -1) continue; |
| 60 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 57 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
| 61 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); | 58 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
| 62 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, | 59 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 370 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
| 374 // No out-of-line constant pool support. | 371 // No out-of-line constant pool support. |
| 375 UNREACHABLE(); | 372 UNREACHABLE(); |
| 376 } | 373 } |
| 377 | 374 |
| 378 | 375 |
| 379 #undef __ | 376 #undef __ |
| 380 | 377 |
| 381 | 378 |
| 382 } } // namespace v8::internal | 379 } } // namespace v8::internal |
| OLD | NEW |