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

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

Issue 1432223002: [turbofan] Don't try to inline our builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « 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 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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 30 matching lines...) Expand all
41 break; 41 break;
42 } 42 }
43 43
44 // --------------------------------------------------------------------------- 44 // ---------------------------------------------------------------------------
45 // Everything below this line is part of the inlining heuristic. 45 // Everything below this line is part of the inlining heuristic.
46 // --------------------------------------------------------------------------- 46 // ---------------------------------------------------------------------------
47 47
48 // Built-in functions are handled by the JSBuiltinReducer. 48 // Built-in functions are handled by the JSBuiltinReducer.
49 if (function->shared()->HasBuiltinFunctionId()) return NoChange(); 49 if (function->shared()->HasBuiltinFunctionId()) return NoChange();
50 50
51 // Don't inline builtins.
52 if (function->shared()->IsBuiltin()) return NoChange();
53
51 // Quick check on source code length to avoid parsing large candidate. 54 // Quick check on source code length to avoid parsing large candidate.
52 if (function->shared()->SourceSize() > FLAG_max_inlined_source_size) { 55 if (function->shared()->SourceSize() > FLAG_max_inlined_source_size) {
53 return NoChange(); 56 return NoChange();
54 } 57 }
55 58
56 // Quick check on the size of the AST to avoid parsing large candidate. 59 // Quick check on the size of the AST to avoid parsing large candidate.
57 if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) { 60 if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) {
58 return NoChange(); 61 return NoChange();
59 } 62 }
60 63
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 candidate.node->id(), candidate.calls, 119 candidate.node->id(), candidate.calls,
117 candidate.function->shared()->SourceSize(), 120 candidate.function->shared()->SourceSize(),
118 candidate.function->shared()->ast_node_count(), 121 candidate.function->shared()->ast_node_count(),
119 candidate.function->shared()->DebugName()->ToCString().get()); 122 candidate.function->shared()->DebugName()->ToCString().get());
120 } 123 }
121 } 124 }
122 125
123 } // namespace compiler 126 } // namespace compiler
124 } // namespace internal 127 } // namespace internal
125 } // namespace v8 128 } // namespace v8
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