Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 7832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7843 if (target_info.scope()->num_heap_slots() > 0) { | 7843 if (target_info.scope()->num_heap_slots() > 0) { |
| 7844 TraceInline(target, caller, "target has context-allocated variables"); | 7844 TraceInline(target, caller, "target has context-allocated variables"); |
| 7845 return false; | 7845 return false; |
| 7846 } | 7846 } |
| 7847 FunctionLiteral* function = target_info.function(); | 7847 FunctionLiteral* function = target_info.function(); |
| 7848 | 7848 |
| 7849 // The following conditions must be checked again after re-parsing, because | 7849 // The following conditions must be checked again after re-parsing, because |
| 7850 // earlier the information might not have been complete due to lazy parsing. | 7850 // earlier the information might not have been complete due to lazy parsing. |
| 7851 nodes_added = function->ast_node_count(); | 7851 nodes_added = function->ast_node_count(); |
| 7852 if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) { | 7852 if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) { |
| 7853 target_shared->set_ast_node_count(nodes_added); | |
|
Michael Starzinger
2014/10/27 13:27:48
This should now be superseded by https://coderevie
wingo
2014/10/27 15:06:51
Yes indeed.
| |
| 7853 TraceInline(target, caller, "target AST is too large [late]"); | 7854 TraceInline(target, caller, "target AST is too large [late]"); |
| 7854 return false; | 7855 return false; |
| 7855 } | 7856 } |
| 7856 if (function->dont_optimize()) { | 7857 if (function->dont_optimize()) { |
| 7858 target_shared->set_dont_optimize_reason(function->dont_optimize_reason()); | |
|
Michael Starzinger
2014/10/27 13:27:48
This scares me, could we instead make it go throug
wingo
2014/10/27 15:06:51
So this part of the CL is superseded by https://co
| |
| 7857 TraceInline(target, caller, "target contains unsupported syntax [late]"); | 7859 TraceInline(target, caller, "target contains unsupported syntax [late]"); |
| 7858 return false; | 7860 return false; |
| 7859 } | 7861 } |
| 7860 | 7862 |
| 7861 // If the function uses the arguments object check that inlining of functions | 7863 // If the function uses the arguments object check that inlining of functions |
| 7862 // with arguments object is enabled and the arguments-variable is | 7864 // with arguments object is enabled and the arguments-variable is |
| 7863 // stack allocated. | 7865 // stack allocated. |
| 7864 if (function->scope()->arguments() != NULL) { | 7866 if (function->scope()->arguments() != NULL) { |
| 7865 if (!FLAG_inline_arguments) { | 7867 if (!FLAG_inline_arguments) { |
| 7866 TraceInline(target, caller, "target uses arguments object"); | 7868 TraceInline(target, caller, "target uses arguments object"); |
| (...skipping 4786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12653 if (ShouldProduceTraceOutput()) { | 12655 if (ShouldProduceTraceOutput()) { |
| 12654 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12656 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12655 } | 12657 } |
| 12656 | 12658 |
| 12657 #ifdef DEBUG | 12659 #ifdef DEBUG |
| 12658 graph_->Verify(false); // No full verify. | 12660 graph_->Verify(false); // No full verify. |
| 12659 #endif | 12661 #endif |
| 12660 } | 12662 } |
| 12661 | 12663 |
| 12662 } } // namespace v8::internal | 12664 } } // namespace v8::internal |
| OLD | NEW |