| Index: src/compiler/js-inlining-heuristic.cc
|
| diff --git a/src/compiler/js-inlining-heuristic.cc b/src/compiler/js-inlining-heuristic.cc
|
| index 5c626d15c6efcb3f87baaa53bbcd258474385274..e237af3e9f0db1c8f6f2bd95ee4878e3baae5f23 100644
|
| --- a/src/compiler/js-inlining-heuristic.cc
|
| +++ b/src/compiler/js-inlining-heuristic.cc
|
| @@ -48,6 +48,11 @@
|
|
|
| // Don't inline builtins.
|
| if (function->shared()->IsBuiltin()) return false;
|
| +
|
| + // Quick check on source code length to avoid parsing large candidate.
|
| + if (function->shared()->SourceSize() > FLAG_max_inlined_source_size) {
|
| + return false;
|
| + }
|
|
|
| // Quick check on the size of the AST to avoid parsing large candidate.
|
| if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) {
|
| @@ -282,7 +287,9 @@
|
| candidate.node->op()->mnemonic(), candidate.frequency);
|
| for (int i = 0; i < candidate.num_functions; ++i) {
|
| Handle<JSFunction> function = candidate.functions[i];
|
| - PrintF(" - size:%d, name: %s\n", function->shared()->ast_node_count(),
|
| + PrintF(" - size[source]:%d, size[ast]:%d, name: %s\n",
|
| + function->shared()->SourceSize(),
|
| + function->shared()->ast_node_count(),
|
| function->shared()->DebugName()->ToCString().get());
|
| }
|
| }
|
|
|