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

Side by Side Diff: src/objects.cc

Issue 2882973002: [coverage] Block coverage with support for IfStatements (Closed)
Patch Set: Address comments Created 3 years, 6 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/objects.h ('k') | src/objects-inl.h » ('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 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 <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 13367 matching lines...) Expand 10 before | Expand all | Expand 10 after
13378 } 13378 }
13379 13379
13380 bool SharedFunctionInfo::HasBreakInfo() const { 13380 bool SharedFunctionInfo::HasBreakInfo() const {
13381 if (!HasDebugInfo()) return false; 13381 if (!HasDebugInfo()) return false;
13382 DebugInfo* info = DebugInfo::cast(debug_info()); 13382 DebugInfo* info = DebugInfo::cast(debug_info());
13383 bool has_break_info = info->HasBreakInfo(); 13383 bool has_break_info = info->HasBreakInfo();
13384 DCHECK_IMPLIES(has_break_info, HasDebugCode()); 13384 DCHECK_IMPLIES(has_break_info, HasDebugCode());
13385 return has_break_info; 13385 return has_break_info;
13386 } 13386 }
13387 13387
13388 bool SharedFunctionInfo::HasCoverageInfo() const {
13389 if (!HasDebugInfo()) return false;
13390 DebugInfo* info = DebugInfo::cast(debug_info());
13391 bool has_coverage_info = info->HasCoverageInfo();
13392 DCHECK_IMPLIES(has_coverage_info, FLAG_block_coverage);
13393 return has_coverage_info;
13394 }
13395
13388 DebugInfo* SharedFunctionInfo::GetDebugInfo() const { 13396 DebugInfo* SharedFunctionInfo::GetDebugInfo() const {
13389 DCHECK(HasDebugInfo()); 13397 DCHECK(HasDebugInfo());
13390 return DebugInfo::cast(debug_info()); 13398 return DebugInfo::cast(debug_info());
13391 } 13399 }
13392 13400
13393 int SharedFunctionInfo::debugger_hints() const { 13401 int SharedFunctionInfo::debugger_hints() const {
13394 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints(); 13402 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints();
13395 return Smi::cast(debug_info())->value(); 13403 return Smi::cast(debug_info())->value();
13396 } 13404 }
13397 13405
(...skipping 7125 matching lines...) Expand 10 before | Expand all | Expand 10 after
20523 // not 20531 // not
20524 // depend on this. 20532 // depend on this.
20525 return DICTIONARY_ELEMENTS; 20533 return DICTIONARY_ELEMENTS;
20526 } 20534 }
20527 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20535 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20528 return kind; 20536 return kind;
20529 } 20537 }
20530 } 20538 }
20531 } // namespace internal 20539 } // namespace internal
20532 } // namespace v8 20540 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698