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

Side by Side Diff: src/compilation-info.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/compilation-info.h ('k') | src/compiler.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/compilation-info.h" 5 #include "src/compilation-info.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 if (FLAG_function_context_specialization) MarkAsFunctionContextSpecializing(); 70 if (FLAG_function_context_specialization) MarkAsFunctionContextSpecializing();
71 if (FLAG_turbo_splitting) MarkAsSplittingEnabled(); 71 if (FLAG_turbo_splitting) MarkAsSplittingEnabled();
72 72
73 // Collect source positions for optimized code when profiling or if debugger 73 // Collect source positions for optimized code when profiling or if debugger
74 // is active, to be able to get more precise source positions at the price of 74 // is active, to be able to get more precise source positions at the price of
75 // more memory consumption. 75 // more memory consumption.
76 if (isolate_->NeedsSourcePositionsForProfiling()) { 76 if (isolate_->NeedsSourcePositionsForProfiling()) {
77 MarkAsSourcePositionsEnabled(); 77 MarkAsSourcePositionsEnabled();
78 } 78 }
79
80 if (FLAG_block_coverage && isolate->is_block_count_code_coverage() &&
81 parse_info->script()->IsUserJavaScript()) {
82 MarkAsBlockCoverageEnabled();
83 }
79 } 84 }
80 85
81 CompilationInfo::CompilationInfo(Vector<const char> debug_name, 86 CompilationInfo::CompilationInfo(Vector<const char> debug_name,
82 Isolate* isolate, Zone* zone, 87 Isolate* isolate, Zone* zone,
83 Code::Flags code_flags) 88 Code::Flags code_flags)
84 : CompilationInfo(nullptr, debug_name, code_flags, STUB, isolate, zone) {} 89 : CompilationInfo(nullptr, debug_name, code_flags, STUB, isolate, zone) {}
85 90
86 CompilationInfo::CompilationInfo(ParseInfo* parse_info, 91 CompilationInfo::CompilationInfo(ParseInfo* parse_info,
87 Vector<const char> debug_name, 92 Vector<const char> debug_name,
88 Code::Flags code_flags, Mode mode, 93 Code::Flags code_flags, Mode mode,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 inlined_functions_.push_back(InlinedFunctionHolder(inlined_function, pos)); 247 inlined_functions_.push_back(InlinedFunctionHolder(inlined_function, pos));
243 return id; 248 return id;
244 } 249 }
245 250
246 Code::Kind CompilationInfo::output_code_kind() const { 251 Code::Kind CompilationInfo::output_code_kind() const {
247 return Code::ExtractKindFromFlags(code_flags_); 252 return Code::ExtractKindFromFlags(code_flags_);
248 } 253 }
249 254
250 } // namespace internal 255 } // namespace internal
251 } // namespace v8 256 } // namespace v8
OLDNEW
« no previous file with comments | « src/compilation-info.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698