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

Side by Side Diff: src/isolate.cc

Issue 2686063002: [debugger] add precise mode for code coverage. (Closed)
Patch Set: fix flag Created 3 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/isolate.h ('k') | src/objects.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 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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 DisallowHeapAllocation no_gc; 2894 DisallowHeapAllocation no_gc;
2895 Object* const initial_js_array_map = 2895 Object* const initial_js_array_map =
2896 context()->native_context()->get(Context::ArrayMapIndex(kind)); 2896 context()->native_context()->get(Context::ArrayMapIndex(kind));
2897 if (!initial_js_array_map->IsUndefined(this)) { 2897 if (!initial_js_array_map->IsUndefined(this)) {
2898 return Map::cast(initial_js_array_map); 2898 return Map::cast(initial_js_array_map);
2899 } 2899 }
2900 } 2900 }
2901 return nullptr; 2901 return nullptr;
2902 } 2902 }
2903 2903
2904 2904 bool Isolate::use_crankshaft() {
2905 bool Isolate::use_crankshaft() const {
2906 return FLAG_opt && FLAG_crankshaft && !serializer_enabled_ && 2905 return FLAG_opt && FLAG_crankshaft && !serializer_enabled_ &&
2907 CpuFeatures::SupportsCrankshaft(); 2906 CpuFeatures::SupportsCrankshaft() && !IsCodeCoverageEnabled();
2908 } 2907 }
2909 2908
2910 bool Isolate::NeedsSourcePositionsForProfiling() const { 2909 bool Isolate::NeedsSourcePositionsForProfiling() const {
2911 return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph || 2910 return FLAG_trace_deopt || FLAG_trace_turbo || FLAG_trace_turbo_graph ||
2912 FLAG_turbo_profiling || FLAG_perf_prof || is_profiling() || 2911 FLAG_turbo_profiling || FLAG_perf_prof || is_profiling() ||
2913 debug_->is_active() || logger_->is_logging(); 2912 debug_->is_active() || logger_->is_logging();
2914 } 2913 }
2915 2914
2915 bool Isolate::IsCodeCoverageEnabled() {
2916 return heap()->code_coverage_list()->IsArrayList();
2917 }
2918
2919 void Isolate::SetCodeCoverageList(Object* value) {
2920 DCHECK(value->IsUndefined(this) || value->IsArrayList());
2921 heap()->set_code_coverage_list(value);
2922 }
2923
2916 bool Isolate::IsArrayOrObjectPrototype(Object* object) { 2924 bool Isolate::IsArrayOrObjectPrototype(Object* object) {
2917 Object* context = heap()->native_contexts_list(); 2925 Object* context = heap()->native_contexts_list();
2918 while (!context->IsUndefined(this)) { 2926 while (!context->IsUndefined(this)) {
2919 Context* current_context = Context::cast(context); 2927 Context* current_context = Context::cast(context);
2920 if (current_context->initial_object_prototype() == object || 2928 if (current_context->initial_object_prototype() == object ||
2921 current_context->initial_array_prototype() == object) { 2929 current_context->initial_array_prototype() == object) {
2922 return true; 2930 return true;
2923 } 2931 }
2924 context = current_context->next_context_link(); 2932 context = current_context->next_context_link();
2925 } 2933 }
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
3649 // Then check whether this scope intercepts. 3657 // Then check whether this scope intercepts.
3650 if ((flag & intercept_mask_)) { 3658 if ((flag & intercept_mask_)) {
3651 intercepted_flags_ |= flag; 3659 intercepted_flags_ |= flag;
3652 return true; 3660 return true;
3653 } 3661 }
3654 return false; 3662 return false;
3655 } 3663 }
3656 3664
3657 } // namespace internal 3665 } // namespace internal
3658 } // namespace v8 3666 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698