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

Side by Side Diff: src/objects.cc

Issue 1846183002: Add assertions to FrameSummary and Code::SourcePosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 8 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/frames.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 14039 matching lines...) Expand 10 before | Expand all | Expand 10 after
14050 // same distance as the current candidate and the position is higher then 14050 // same distance as the current candidate and the position is higher then
14051 // this position is the new candidate. 14051 // this position is the new candidate.
14052 if ((dist < distance) || 14052 if ((dist < distance) ||
14053 (dist == distance && pos > position)) { 14053 (dist == distance && pos > position)) {
14054 position = pos; 14054 position = pos;
14055 distance = dist; 14055 distance = dist;
14056 } 14056 }
14057 } 14057 }
14058 it.next(); 14058 it.next();
14059 } 14059 }
14060 DCHECK(kind() == FUNCTION || is_optimized_code() && is_turbofanned() ||
14061 is_wasm_code() || position == RelocInfo::kNoPosition);
14060 return position; 14062 return position;
14061 } 14063 }
14062 14064
14063 14065
14064 // Same as Code::SourcePosition above except it only looks for statement 14066 // Same as Code::SourcePosition above except it only looks for statement
14065 // positions. 14067 // positions.
14066 int Code::SourceStatementPosition(int code_offset) { 14068 int Code::SourceStatementPosition(int code_offset) {
14067 // First find the position as close as possible using all position 14069 // First find the position as close as possible using all position
14068 // information. 14070 // information.
14069 int position = SourcePosition(code_offset); 14071 int position = SourcePosition(code_offset);
(...skipping 5684 matching lines...) Expand 10 before | Expand all | Expand 10 after
19754 if (cell->value() != *new_value) { 19756 if (cell->value() != *new_value) {
19755 cell->set_value(*new_value); 19757 cell->set_value(*new_value);
19756 Isolate* isolate = cell->GetIsolate(); 19758 Isolate* isolate = cell->GetIsolate();
19757 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19759 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19758 isolate, DependentCode::kPropertyCellChangedGroup); 19760 isolate, DependentCode::kPropertyCellChangedGroup);
19759 } 19761 }
19760 } 19762 }
19761 19763
19762 } // namespace internal 19764 } // namespace internal
19763 } // namespace v8 19765 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698