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

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

Issue 1140743004: Generalize builtins inlining flag to allow forced inlining of any function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment Created 5 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 | « 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/all-nodes.h" 9 #include "src/compiler/all-nodes.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 Reduction JSInliner::Reduce(Node* node) { 289 Reduction JSInliner::Reduce(Node* node) {
290 if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange(); 290 if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange();
291 291
292 JSCallFunctionAccessor call(node); 292 JSCallFunctionAccessor call(node);
293 HeapObjectMatcher<JSFunction> match(call.jsfunction()); 293 HeapObjectMatcher<JSFunction> match(call.jsfunction());
294 if (!match.HasValue()) return NoChange(); 294 if (!match.HasValue()) return NoChange();
295 295
296 Handle<JSFunction> function = match.Value().handle(); 296 Handle<JSFunction> function = match.Value().handle();
297 if (!function->IsJSFunction()) return NoChange(); 297 if (!function->IsJSFunction()) return NoChange();
298 if (mode_ == kBuiltinsInlining && !function->shared()->inline_builtin()) { 298 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) {
299 return NoChange(); 299 return NoChange();
300 } 300 }
301 301
302 Zone zone; 302 Zone zone;
303 ParseInfo parse_info(&zone, function); 303 ParseInfo parse_info(&zone, function);
304 CompilationInfo info(&parse_info); 304 CompilationInfo info(&parse_info);
305 305
306 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); 306 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange();
307 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); 307 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange();
308 308
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state); 357 NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state);
358 } 358 }
359 } 359 }
360 360
361 return InlineCall(node, inlinee); 361 return InlineCall(node, inlinee);
362 } 362 }
363 363
364 } // namespace compiler 364 } // namespace compiler
365 } // namespace internal 365 } // namespace internal
366 } // namespace v8 366 } // 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