| 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/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 SharedFunctionInfo* shared = function->shared(); | 317 SharedFunctionInfo* shared = function->shared(); |
| 318 function->set_code(shared->code()); | 318 function->set_code(shared->code()); |
| 319 | 319 |
| 320 if (FLAG_trace_deopt) { | 320 if (FLAG_trace_deopt) { |
| 321 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); | 321 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); |
| 322 PrintF(scope.file(), "[deoptimizer unlinked: "); | 322 PrintF(scope.file(), "[deoptimizer unlinked: "); |
| 323 function->PrintName(scope.file()); | 323 function->PrintName(scope.file()); |
| 324 PrintF(scope.file(), | 324 PrintF(scope.file(), |
| 325 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); | 325 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); |
| 326 } | 326 } |
| 327 if (FLAG_asm && function->shared()->asm_mode() != ASM_NO) { |
| 328 PrintF("asm: deoptimizing %s %s\n", |
| 329 function->shared()->asm_mode() == ASM_MODULE |
| 330 ? "module" : "function", |
| 331 function->shared()->DebugName()->ToCString().get()); |
| 332 } |
| 327 } | 333 } |
| 328 }; | 334 }; |
| 329 | 335 |
| 330 // Unlink all functions that refer to marked code. | 336 // Unlink all functions that refer to marked code. |
| 331 SelectedCodeUnlinker unlinker; | 337 SelectedCodeUnlinker unlinker; |
| 332 VisitAllOptimizedFunctionsForContext(context, &unlinker); | 338 VisitAllOptimizedFunctionsForContext(context, &unlinker); |
| 333 | 339 |
| 334 Isolate* isolate = context->GetHeap()->isolate(); | 340 Isolate* isolate = context->GetHeap()->isolate(); |
| 335 #ifdef DEBUG | 341 #ifdef DEBUG |
| 336 Code* topmost_optimized_code = NULL; | 342 Code* topmost_optimized_code = NULL; |
| (...skipping 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3842 last_position = raw_position ? SourcePosition::FromRaw(raw_position) | 3848 last_position = raw_position ? SourcePosition::FromRaw(raw_position) |
| 3843 : SourcePosition::Unknown(); | 3849 : SourcePosition::Unknown(); |
| 3844 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { | 3850 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { |
| 3845 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); | 3851 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); |
| 3846 } | 3852 } |
| 3847 } | 3853 } |
| 3848 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); | 3854 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); |
| 3849 } | 3855 } |
| 3850 } // namespace internal | 3856 } // namespace internal |
| 3851 } // namespace v8 | 3857 } // namespace v8 |
| OLD | NEW |