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

Side by Side Diff: src/deoptimizer.cc

Issue 1956693002: [compiler] Pass inlining_id via relocation info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 7 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/deoptimizer.h ('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 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2745 static const char* deopt_messages_[] = { 2745 static const char* deopt_messages_[] = {
2746 DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_TEXTS)}; 2746 DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_TEXTS)};
2747 #undef DEOPT_MESSAGES_TEXTS 2747 #undef DEOPT_MESSAGES_TEXTS
2748 return deopt_messages_[deopt_reason]; 2748 return deopt_messages_[deopt_reason];
2749 } 2749 }
2750 2750
2751 2751
2752 Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) { 2752 Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) {
2753 SourcePosition last_position = SourcePosition::Unknown(); 2753 SourcePosition last_position = SourcePosition::Unknown();
2754 Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason; 2754 Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason;
2755 int last_inlining_id = InlinedFunctionInfo::kNoParentId;
2755 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) | 2756 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
2757 RelocInfo::ModeMask(RelocInfo::DEOPT_ID) |
2756 RelocInfo::ModeMask(RelocInfo::POSITION); 2758 RelocInfo::ModeMask(RelocInfo::POSITION);
2757 for (RelocIterator it(code, mask); !it.done(); it.next()) { 2759 for (RelocIterator it(code, mask); !it.done(); it.next()) {
2758 RelocInfo* info = it.rinfo(); 2760 RelocInfo* info = it.rinfo();
2759 if (info->pc() >= pc) return DeoptInfo(last_position, last_reason); 2761 if (info->pc() >= pc) {
2762 return DeoptInfo(last_position, last_reason, last_inlining_id);
2763 }
2760 if (info->rmode() == RelocInfo::POSITION) { 2764 if (info->rmode() == RelocInfo::POSITION) {
2761 int raw_position = static_cast<int>(info->data()); 2765 int raw_position = static_cast<int>(info->data());
2762 last_position = raw_position ? SourcePosition::FromRaw(raw_position) 2766 last_position = raw_position ? SourcePosition::FromRaw(raw_position)
2763 : SourcePosition::Unknown(); 2767 : SourcePosition::Unknown();
2768 } else if (info->rmode() == RelocInfo::DEOPT_ID) {
2769 last_inlining_id = static_cast<int>(info->data());
2764 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { 2770 } else if (info->rmode() == RelocInfo::DEOPT_REASON) {
2765 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); 2771 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data());
2766 } 2772 }
2767 } 2773 }
2768 return DeoptInfo(SourcePosition::Unknown(), Deoptimizer::kNoReason); 2774 return DeoptInfo(SourcePosition::Unknown(), Deoptimizer::kNoReason, -1);
2769 } 2775 }
2770 2776
2771 2777
2772 // static 2778 // static
2773 TranslatedValue TranslatedValue::NewArgumentsObject(TranslatedState* container, 2779 TranslatedValue TranslatedValue::NewArgumentsObject(TranslatedState* container,
2774 int length, 2780 int length,
2775 int object_index) { 2781 int object_index) {
2776 TranslatedValue slot(container, kArgumentsObject); 2782 TranslatedValue slot(container, kArgumentsObject);
2777 slot.materialization_info_ = {object_index, length}; 2783 slot.materialization_info_ = {object_index, length};
2778 return slot; 2784 return slot;
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3916 CHECK(value_info->IsMaterializedObject()); 3922 CHECK(value_info->IsMaterializedObject());
3917 3923
3918 value_info->value_ = 3924 value_info->value_ =
3919 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3925 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3920 } 3926 }
3921 } 3927 }
3922 } 3928 }
3923 3929
3924 } // namespace internal 3930 } // namespace internal
3925 } // namespace v8 3931 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698