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

Side by Side Diff: src/compiler.cc

Issue 1970193002: [compiler] Avoid passing CompilationInfo to profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-sidechannel-2
Patch Set: Created 4 years, 7 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 | src/compiler/ast-graph-builder.h » ('j') | src/compiler/ast-graph-builder.h » ('J')
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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 return; 393 return;
394 } 394 }
395 int line_num = Script::GetLineNumber(script, shared->start_position()) + 1; 395 int line_num = Script::GetLineNumber(script, shared->start_position()) + 1;
396 int column_num = 396 int column_num =
397 Script::GetColumnNumber(script, shared->start_position()) + 1; 397 Script::GetColumnNumber(script, shared->start_position()) + 1;
398 String* script_name = script->name()->IsString() 398 String* script_name = script->name()->IsString()
399 ? String::cast(script->name()) 399 ? String::cast(script->name())
400 : info->isolate()->heap()->empty_string(); 400 : info->isolate()->heap()->empty_string();
401 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script); 401 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script);
402 PROFILE(info->isolate(), 402 PROFILE(info->isolate(),
403 CodeCreateEvent(log_tag, *abstract_code, *shared, info, script_name, 403 CodeCreateEvent(log_tag, *abstract_code, *shared, script_name,
404 line_num, column_num)); 404 line_num, column_num));
405 } 405 }
406 } 406 }
407 407
408 void EnsureFeedbackVector(CompilationInfo* info) { 408 void EnsureFeedbackVector(CompilationInfo* info) {
409 DCHECK(info->has_shared_info()); 409 DCHECK(info->has_shared_info());
410 410
411 // If no type feedback vector exists, we create one now. At this point the 411 // If no type feedback vector exists, we create one now. At this point the
412 // AstNumbering pass has already run. Note the snapshot can contain outdated 412 // AstNumbering pass has already run. Note the snapshot can contain outdated
413 // vectors for a different configuration, hence we also recreate a new vector 413 // vectors for a different configuration, hence we also recreate a new vector
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 MaybeHandle<Code> code; 1736 MaybeHandle<Code> code;
1737 if (cached.code != nullptr) code = handle(cached.code); 1737 if (cached.code != nullptr) code = handle(cached.code);
1738 Handle<Context> native_context(function->context()->native_context()); 1738 Handle<Context> native_context(function->context()->native_context());
1739 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, 1739 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
1740 literals, BailoutId::None()); 1740 literals, BailoutId::None());
1741 } 1741 }
1742 } 1742 }
1743 1743
1744 } // namespace internal 1744 } // namespace internal
1745 } // namespace v8 1745 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.h » ('j') | src/compiler/ast-graph-builder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698