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

Side by Side Diff: src/isolate.cc

Issue 2765813002: [debug] refactor code coverage to use enum for mode. (Closed)
Patch Set: fix d8 Created 3 years, 9 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/isolate.h ('k') | src/runtime/runtime-debug.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after
2983 context()->native_context()->get(Context::ArrayMapIndex(kind)); 2983 context()->native_context()->get(Context::ArrayMapIndex(kind));
2984 if (!initial_js_array_map->IsUndefined(this)) { 2984 if (!initial_js_array_map->IsUndefined(this)) {
2985 return Map::cast(initial_js_array_map); 2985 return Map::cast(initial_js_array_map);
2986 } 2986 }
2987 } 2987 }
2988 return nullptr; 2988 return nullptr;
2989 } 2989 }
2990 2990
2991 bool Isolate::use_crankshaft() { 2991 bool Isolate::use_crankshaft() {
2992 return FLAG_opt && FLAG_crankshaft && !serializer_enabled_ && 2992 return FLAG_opt && FLAG_crankshaft && !serializer_enabled_ &&
2993 CpuFeatures::SupportsCrankshaft() && !IsCodeCoverageEnabled(); 2993 CpuFeatures::SupportsCrankshaft() && !is_precise_count_code_coverage();
2994 } 2994 }
2995 2995
2996 bool Isolate::NeedsSourcePositionsForProfiling() const { 2996 bool Isolate::NeedsSourcePositionsForProfiling() const {
2997 return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph || 2997 return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph ||
2998 FLAG_turbo_profiling || FLAG_perf_prof || is_profiling() || 2998 FLAG_turbo_profiling || FLAG_perf_prof || is_profiling() ||
2999 debug_->is_active() || logger_->is_logging(); 2999 debug_->is_active() || logger_->is_logging();
3000 } 3000 }
3001 3001
3002 bool Isolate::IsCodeCoverageEnabled() {
3003 return heap()->code_coverage_list()->IsArrayList();
3004 }
3005
3006 void Isolate::SetCodeCoverageList(Object* value) { 3002 void Isolate::SetCodeCoverageList(Object* value) {
3007 DCHECK(value->IsUndefined(this) || value->IsArrayList()); 3003 DCHECK(value->IsUndefined(this) || value->IsArrayList());
3008 heap()->set_code_coverage_list(value); 3004 heap()->set_code_coverage_list(value);
3009 } 3005 }
3010 3006
3011 bool Isolate::IsArrayOrObjectPrototype(Object* object) { 3007 bool Isolate::IsArrayOrObjectPrototype(Object* object) {
3012 Object* context = heap()->native_contexts_list(); 3008 Object* context = heap()->native_contexts_list();
3013 while (!context->IsUndefined(this)) { 3009 while (!context->IsUndefined(this)) {
3014 Context* current_context = Context::cast(context); 3010 Context* current_context = Context::cast(context);
3015 if (current_context->initial_object_prototype() == object || 3011 if (current_context->initial_object_prototype() == object ||
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3735 // Then check whether this scope intercepts. 3731 // Then check whether this scope intercepts.
3736 if ((flag & intercept_mask_)) { 3732 if ((flag & intercept_mask_)) {
3737 intercepted_flags_ |= flag; 3733 intercepted_flags_ |= flag;
3738 return true; 3734 return true;
3739 } 3735 }
3740 return false; 3736 return false;
3741 } 3737 }
3742 3738
3743 } // namespace internal 3739 } // namespace internal
3744 } // namespace v8 3740 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698