| 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 for (int i = 0; i < length; i++) { | 716 for (int i = 0; i < length; i++) { |
| 717 if (data->AstId(i) == id) { | 717 if (data->AstId(i) == id) { |
| 718 return data->PcAndState(i)->value(); | 718 return data->PcAndState(i)->value(); |
| 719 } | 719 } |
| 720 } | 720 } |
| 721 OFStream os(stderr); | 721 OFStream os(stderr); |
| 722 os << "[couldn't find pc offset for node=" << id.ToInt() << "]\n" | 722 os << "[couldn't find pc offset for node=" << id.ToInt() << "]\n" |
| 723 << "[method: " << shared->DebugName()->ToCString().get() << "]\n" | 723 << "[method: " << shared->DebugName()->ToCString().get() << "]\n" |
| 724 << "[source:\n" << SourceCodeOf(shared) << "\n]" << std::endl; | 724 << "[source:\n" << SourceCodeOf(shared) << "\n]" << std::endl; |
| 725 | 725 |
| 726 shared->GetHeap()->isolate()->PushStackTraceAndDie(0xfefefefe, data, shared, |
| 727 0xfefefeff); |
| 726 FATAL("unable to find pc offset during deoptimization"); | 728 FATAL("unable to find pc offset during deoptimization"); |
| 727 return -1; | 729 return -1; |
| 728 } | 730 } |
| 729 | 731 |
| 730 | 732 |
| 731 int Deoptimizer::GetDeoptimizedCodeCount(Isolate* isolate) { | 733 int Deoptimizer::GetDeoptimizedCodeCount(Isolate* isolate) { |
| 732 int length = 0; | 734 int length = 0; |
| 733 // Count all entries in the deoptimizing code list of every context. | 735 // Count all entries in the deoptimizing code list of every context. |
| 734 Object* context = isolate->heap()->native_contexts_list(); | 736 Object* context = isolate->heap()->native_contexts_list(); |
| 735 while (!context->IsUndefined()) { | 737 while (!context->IsUndefined()) { |
| (...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 int raw_position = static_cast<int>(info->data()); | 3807 int raw_position = static_cast<int>(info->data()); |
| 3806 last_position = raw_position ? SourcePosition::FromRaw(raw_position) | 3808 last_position = raw_position ? SourcePosition::FromRaw(raw_position) |
| 3807 : SourcePosition::Unknown(); | 3809 : SourcePosition::Unknown(); |
| 3808 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { | 3810 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { |
| 3809 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); | 3811 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); |
| 3810 } | 3812 } |
| 3811 } | 3813 } |
| 3812 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); | 3814 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); |
| 3813 } | 3815 } |
| 3814 } } // namespace v8::internal | 3816 } } // namespace v8::internal |
| OLD | NEW |