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

Side by Side Diff: src/deoptimizer.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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
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 <memory> 7 #include <memory>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) | 2723 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
2724 RelocInfo::ModeMask(RelocInfo::DEOPT_ID) | 2724 RelocInfo::ModeMask(RelocInfo::DEOPT_ID) |
2725 RelocInfo::ModeMask(RelocInfo::DEOPT_POSITION); 2725 RelocInfo::ModeMask(RelocInfo::DEOPT_POSITION);
2726 for (RelocIterator it(code, mask); !it.done(); it.next()) { 2726 for (RelocIterator it(code, mask); !it.done(); it.next()) {
2727 RelocInfo* info = it.rinfo(); 2727 RelocInfo* info = it.rinfo();
2728 if (info->pc() >= pc) { 2728 if (info->pc() >= pc) {
2729 return DeoptInfo(last_position, last_reason, last_deopt_id); 2729 return DeoptInfo(last_position, last_reason, last_deopt_id);
2730 } 2730 }
2731 if (info->rmode() == RelocInfo::DEOPT_POSITION) { 2731 if (info->rmode() == RelocInfo::DEOPT_POSITION) {
2732 int raw_position = static_cast<int>(info->data()); 2732 int raw_position = static_cast<int>(info->data());
2733 last_position = raw_position ? SourcePosition::FromRaw(raw_position) 2733 last_position.Decode(raw_position);
2734 : SourcePosition::Unknown();
2735 } else if (info->rmode() == RelocInfo::DEOPT_ID) { 2734 } else if (info->rmode() == RelocInfo::DEOPT_ID) {
2736 last_deopt_id = static_cast<int>(info->data()); 2735 last_deopt_id = static_cast<int>(info->data());
2737 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { 2736 } else if (info->rmode() == RelocInfo::DEOPT_REASON) {
2738 last_reason = static_cast<DeoptimizeReason>(info->data()); 2737 last_reason = static_cast<DeoptimizeReason>(info->data());
2739 } 2738 }
2740 } 2739 }
2741 return DeoptInfo(SourcePosition::Unknown(), DeoptimizeReason::kNoReason, -1); 2740 return DeoptInfo(SourcePosition::Unknown(), DeoptimizeReason::kNoReason, -1);
2742 } 2741 }
2743 2742
2744 2743
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
4012 CHECK(value_info->IsMaterializedObject()); 4011 CHECK(value_info->IsMaterializedObject());
4013 4012
4014 value_info->value_ = 4013 value_info->value_ =
4015 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4014 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4016 } 4015 }
4017 } 4016 }
4018 } 4017 }
4019 4018
4020 } // namespace internal 4019 } // namespace internal
4021 } // namespace v8 4020 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/factory.h » ('j') | src/source-position.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698