Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: src/deoptimizer.cc

Issue 2109613004: Remove position info from relocation info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@turbosourcepos
Patch Set: fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/disassembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/deoptimizer.h" 5 #include "src/deoptimizer.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/ast/prettyprinter.h" 8 #include "src/ast/prettyprinter.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 return deopt_messages_[deopt_reason]; 2753 return deopt_messages_[deopt_reason];
2754 } 2754 }
2755 2755
2756 2756
2757 Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) { 2757 Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) {
2758 SourcePosition last_position = SourcePosition::Unknown(); 2758 SourcePosition last_position = SourcePosition::Unknown();
2759 Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason; 2759 Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason;
2760 int last_deopt_id = Deoptimizer::DeoptInfo::kNoDeoptId; 2760 int last_deopt_id = Deoptimizer::DeoptInfo::kNoDeoptId;
2761 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) | 2761 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
2762 RelocInfo::ModeMask(RelocInfo::DEOPT_ID) | 2762 RelocInfo::ModeMask(RelocInfo::DEOPT_ID) |
2763 RelocInfo::ModeMask(RelocInfo::POSITION); 2763 RelocInfo::ModeMask(RelocInfo::DEOPT_POSITION);
2764 for (RelocIterator it(code, mask); !it.done(); it.next()) { 2764 for (RelocIterator it(code, mask); !it.done(); it.next()) {
2765 RelocInfo* info = it.rinfo(); 2765 RelocInfo* info = it.rinfo();
2766 if (info->pc() >= pc) { 2766 if (info->pc() >= pc) {
2767 return DeoptInfo(last_position, last_reason, last_deopt_id); 2767 return DeoptInfo(last_position, last_reason, last_deopt_id);
2768 } 2768 }
2769 if (info->rmode() == RelocInfo::POSITION) { 2769 if (info->rmode() == RelocInfo::DEOPT_POSITION) {
2770 int raw_position = static_cast<int>(info->data()); 2770 int raw_position = static_cast<int>(info->data());
2771 last_position = raw_position ? SourcePosition::FromRaw(raw_position) 2771 last_position = raw_position ? SourcePosition::FromRaw(raw_position)
2772 : SourcePosition::Unknown(); 2772 : SourcePosition::Unknown();
2773 } else if (info->rmode() == RelocInfo::DEOPT_ID) { 2773 } else if (info->rmode() == RelocInfo::DEOPT_ID) {
2774 last_deopt_id = static_cast<int>(info->data()); 2774 last_deopt_id = static_cast<int>(info->data());
2775 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { 2775 } else if (info->rmode() == RelocInfo::DEOPT_REASON) {
2776 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); 2776 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data());
2777 } 2777 }
2778 } 2778 }
2779 return DeoptInfo(SourcePosition::Unknown(), Deoptimizer::kNoReason, -1); 2779 return DeoptInfo(SourcePosition::Unknown(), Deoptimizer::kNoReason, -1);
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
4021 CHECK(value_info->IsMaterializedObject()); 4021 CHECK(value_info->IsMaterializedObject());
4022 4022
4023 value_info->value_ = 4023 value_info->value_ =
4024 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4024 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4025 } 4025 }
4026 } 4026 }
4027 } 4027 }
4028 4028
4029 } // namespace internal 4029 } // namespace internal
4030 } // namespace v8 4030 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698