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

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

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: Created 4 years, 1 month 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.cc ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-heuristic.h" 5 #include "src/compiler/js-inlining-heuristic.h"
6 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 return value_input_count; 40 return value_input_count;
41 } 41 }
42 return 0; 42 return 0;
43 } 43 }
44 44
45 bool CanInlineFunction(Handle<JSFunction> function) { 45 bool CanInlineFunction(Handle<JSFunction> function) {
46 // Built-in functions are handled by the JSBuiltinReducer. 46 // Built-in functions are handled by the JSBuiltinReducer.
47 if (function->shared()->HasBuiltinFunctionId()) return false; 47 if (function->shared()->HasBuiltinFunctionId()) return false;
48 48
49 // Only choose user code for inlining. 49 // Don't inline builtins.
50 if (!function->shared()->IsUserJavaScript()) return false; 50 if (function->shared()->IsBuiltin()) return false;
51 51
52 // Quick check on the size of the AST to avoid parsing large candidate. 52 // Quick check on the size of the AST to avoid parsing large candidate.
53 if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) { 53 if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) {
54 return false; 54 return false;
55 } 55 }
56 56
57 // Avoid inlining across the boundary of asm.js code. 57 // Avoid inlining across the boundary of asm.js code.
58 if (function->shared()->asm_function()) return false; 58 if (function->shared()->asm_function()) return false;
59 return true; 59 return true;
60 } 60 }
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return jsgraph()->common(); 294 return jsgraph()->common();
295 } 295 }
296 296
297 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const { 297 SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const {
298 return jsgraph()->simplified(); 298 return jsgraph()->simplified();
299 } 299 }
300 300
301 } // namespace compiler 301 } // namespace compiler
302 } // namespace internal 302 } // namespace internal
303 } // namespace v8 303 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698