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

Side by Side Diff: src/compiler/js-inlining.cc

Issue 993473002: [turbofan] Add support for inlining of builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/compiler/js-inlining.h ('k') | src/compiler/pipeline.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/js-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/all-nodes.h" 10 #include "src/compiler/all-nodes.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 322
323 Reduction JSInliner::Reduce(Node* node) { 323 Reduction JSInliner::Reduce(Node* node) {
324 if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange(); 324 if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange();
325 325
326 JSCallFunctionAccessor call(node); 326 JSCallFunctionAccessor call(node);
327 HeapObjectMatcher<JSFunction> match(call.jsfunction()); 327 HeapObjectMatcher<JSFunction> match(call.jsfunction());
328 if (!match.HasValue()) return NoChange(); 328 if (!match.HasValue()) return NoChange();
329 329
330 Handle<JSFunction> function = match.Value().handle(); 330 Handle<JSFunction> function = match.Value().handle();
331 if (!function->IsJSFunction()) return NoChange();
332 if (mode_ == kBuiltinsInlining && !function->shared()->inline_builtin()) {
333 return NoChange();
334 }
331 335
332 CompilationInfoWithZone info(function); 336 CompilationInfoWithZone info(function);
333 337
334 if (!Compiler::ParseAndAnalyze(&info)) return NoChange(); 338 if (!Compiler::ParseAndAnalyze(&info)) return NoChange();
335 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); 339 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange();
336 340
337 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) { 341 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) {
338 // For now do not inline functions that use their arguments array. 342 // For now do not inline functions that use their arguments array.
339 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); 343 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString();
340 if (FLAG_trace_turbo_inlining) { 344 if (FLAG_trace_turbo_inlining) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 384 }
381 } 385 }
382 } 386 }
383 387
384 return inlinee.InlineAtCall(jsgraph_, node); 388 return inlinee.InlineAtCall(jsgraph_, node);
385 } 389 }
386 390
387 } // namespace compiler 391 } // namespace compiler
388 } // namespace internal 392 } // namespace internal
389 } // namespace v8 393 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698