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

Side by Side Diff: src/compiler.cc

Issue 822823003: Allow nested compile-script histogram scopes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | 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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/ast-this-access-visitor.h" 10 #include "src/ast-this-access-visitor.h"
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 shared_info, context, NOT_TENURED); 1256 shared_info, context, NOT_TENURED);
1257 } 1257 }
1258 1258
1259 1259
1260 Handle<SharedFunctionInfo> Compiler::CompileScript( 1260 Handle<SharedFunctionInfo> Compiler::CompileScript(
1261 Handle<String> source, Handle<Object> script_name, int line_offset, 1261 Handle<String> source, Handle<Object> script_name, int line_offset,
1262 int column_offset, bool is_shared_cross_origin, Handle<Context> context, 1262 int column_offset, bool is_shared_cross_origin, Handle<Context> context,
1263 v8::Extension* extension, ScriptData** cached_data, 1263 v8::Extension* extension, ScriptData** cached_data,
1264 ScriptCompiler::CompileOptions compile_options, NativesFlag natives) { 1264 ScriptCompiler::CompileOptions compile_options, NativesFlag natives) {
1265 Isolate* isolate = source->GetIsolate(); 1265 Isolate* isolate = source->GetIsolate();
1266 HistogramTimerScope total(isolate->counters()->compile_script()); 1266 HistogramTimerScope total(isolate->counters()->compile_script(), true);
1267 1267
1268 if (compile_options == ScriptCompiler::kNoCompileOptions) { 1268 if (compile_options == ScriptCompiler::kNoCompileOptions) {
1269 cached_data = NULL; 1269 cached_data = NULL;
1270 } else if (compile_options == ScriptCompiler::kProduceParserCache || 1270 } else if (compile_options == ScriptCompiler::kProduceParserCache ||
1271 compile_options == ScriptCompiler::kProduceCodeCache) { 1271 compile_options == ScriptCompiler::kProduceCodeCache) {
1272 DCHECK(cached_data && !*cached_data); 1272 DCHECK(cached_data && !*cached_data);
1273 DCHECK(extension == NULL); 1273 DCHECK(extension == NULL);
1274 DCHECK(!isolate->debug()->is_loaded()); 1274 DCHECK(!isolate->debug()->is_loaded());
1275 } else { 1275 } else {
1276 DCHECK(compile_options == ScriptCompiler::kConsumeParserCache || 1276 DCHECK(compile_options == ScriptCompiler::kConsumeParserCache ||
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 AllowHandleDereference allow_deref; 1579 AllowHandleDereference allow_deref;
1580 bool tracing_on = info()->IsStub() 1580 bool tracing_on = info()->IsStub()
1581 ? FLAG_trace_hydrogen_stubs 1581 ? FLAG_trace_hydrogen_stubs
1582 : (FLAG_trace_hydrogen && 1582 : (FLAG_trace_hydrogen &&
1583 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1583 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1584 return (tracing_on && 1584 return (tracing_on &&
1585 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1585 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1586 } 1586 }
1587 1587
1588 } } // namespace v8::internal 1588 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698