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 "src/v8.h" | 6 #include "src/v8.h" |
7 | 7 |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
(...skipping 30 matching lines...) Expand all Loading... |
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) { |
44 CodePatcher osr_patcher(code->instruction_start() + osr_offset, 1); | 44 CodePatcher osr_patcher(code->instruction_start() + osr_offset, 1); |
45 osr_patcher.masm()->break_(0xCC); | 45 osr_patcher.masm()->break_(0xCC); |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 DeoptimizationInputData* deopt_data = | 49 DeoptimizationInputData* deopt_data = |
50 DeoptimizationInputData::cast(code->deoptimization_data()); | 50 DeoptimizationInputData::cast(code->deoptimization_data()); |
51 SharedFunctionInfo* shared = | |
52 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); | |
53 shared->EvictFromOptimizedCodeMap(code, "deoptimized code"); | |
54 #ifdef DEBUG | 51 #ifdef DEBUG |
55 Address prev_call_address = NULL; | 52 Address prev_call_address = NULL; |
56 #endif | 53 #endif |
57 // For each LLazyBailout instruction insert a call to the corresponding | 54 // For each LLazyBailout instruction insert a call to the corresponding |
58 // deoptimization entry. | 55 // deoptimization entry. |
59 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 56 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
60 if (deopt_data->Pc(i)->value() == -1) continue; | 57 if (deopt_data->Pc(i)->value() == -1) continue; |
61 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 58 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
62 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); | 59 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
63 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, | 60 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 356 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
360 // No out-of-line constant pool support. | 357 // No out-of-line constant pool support. |
361 UNREACHABLE(); | 358 UNREACHABLE(); |
362 } | 359 } |
363 | 360 |
364 | 361 |
365 #undef __ | 362 #undef __ |
366 | 363 |
367 | 364 |
368 } } // namespace v8::internal | 365 } } // namespace v8::internal |
OLD | NEW |