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

Side by Side Diff: src/objects.cc

Issue 892843007: Revert of Externalize deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/mips64/lithium-codegen-mips64.cc ('k') | src/ppc/lithium-codegen-ppc.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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 10989 matching lines...) Expand 10 before | Expand all | Expand 10 after
11000 } 11000 }
11001 default: 11001 default:
11002 UNREACHABLE(); 11002 UNREACHABLE();
11003 break; 11003 break;
11004 } 11004 }
11005 return NULL; 11005 return NULL;
11006 } 11006 }
11007 11007
11008 11008
11009 void Code::PrintDeoptLocation(FILE* out, int bailout_id) { 11009 void Code::PrintDeoptLocation(FILE* out, int bailout_id) {
11010 int last_position = 0; 11010 const char* last_comment = NULL;
11011 Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason; 11011 int mask = RelocInfo::ModeMask(RelocInfo::COMMENT)
11012 int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) | 11012 | RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
11013 RelocInfo::ModeMask(RelocInfo::POSITION) |
11014 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
11015 for (RelocIterator it(this, mask); !it.done(); it.next()) { 11013 for (RelocIterator it(this, mask); !it.done(); it.next()) {
11016 RelocInfo* info = it.rinfo(); 11014 RelocInfo* info = it.rinfo();
11017 if (info->rmode() == RelocInfo::POSITION) { 11015 if (info->rmode() == RelocInfo::COMMENT) {
11018 last_position = static_cast<int>(info->data()); 11016 last_comment = reinterpret_cast<const char*>(info->data());
11019 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { 11017 } else if (last_comment != NULL) {
11020 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data());
11021 } else if (last_reason != Deoptimizer::kNoReason) {
11022 if ((bailout_id == Deoptimizer::GetDeoptimizationId( 11018 if ((bailout_id == Deoptimizer::GetDeoptimizationId(
11023 GetIsolate(), info->target_address(), Deoptimizer::EAGER)) || 11019 GetIsolate(), info->target_address(), Deoptimizer::EAGER)) ||
11024 (bailout_id == Deoptimizer::GetDeoptimizationId( 11020 (bailout_id == Deoptimizer::GetDeoptimizationId(
11025 GetIsolate(), info->target_address(), Deoptimizer::SOFT)) || 11021 GetIsolate(), info->target_address(), Deoptimizer::SOFT)) ||
11026 (bailout_id == Deoptimizer::GetDeoptimizationId( 11022 (bailout_id == Deoptimizer::GetDeoptimizationId(
11027 GetIsolate(), info->target_address(), Deoptimizer::LAZY))) { 11023 GetIsolate(), info->target_address(), Deoptimizer::LAZY))) {
11028 CHECK(RelocInfo::IsRuntimeEntry(info->rmode())); 11024 CHECK(RelocInfo::IsRuntimeEntry(info->rmode()));
11029 PrintF(out, " ;;; deoptimize at %d: %s\n", last_position, 11025 PrintF(out, " %s\n", last_comment);
11030 Deoptimizer::GetDeoptReason(last_reason));
11031 return; 11026 return;
11032 } 11027 }
11033 } 11028 }
11034 } 11029 }
11035 } 11030 }
11036 11031
11037 11032
11038 bool Code::CanDeoptAt(Address pc) { 11033 bool Code::CanDeoptAt(Address pc) {
11039 DeoptimizationInputData* deopt_data = 11034 DeoptimizationInputData* deopt_data =
11040 DeoptimizationInputData::cast(deoptimization_data()); 11035 DeoptimizationInputData::cast(deoptimization_data());
(...skipping 5837 matching lines...) Expand 10 before | Expand all | Expand 10 after
16878 Handle<DependentCode> codes = 16873 Handle<DependentCode> codes =
16879 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16874 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16880 DependentCode::kPropertyCellChangedGroup, 16875 DependentCode::kPropertyCellChangedGroup,
16881 info->object_wrapper()); 16876 info->object_wrapper());
16882 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16877 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16883 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16878 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16884 cell, info->zone()); 16879 cell, info->zone());
16885 } 16880 }
16886 16881
16887 } } // namespace v8::internal 16882 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698