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

Side by Side Diff: src/hydrogen.cc

Issue 359733004: Remove kDontInline and simplify compiler hints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler.cc ('k') | src/objects.h » ('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 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 7548 matching lines...) Expand 10 before | Expand all | Expand 10 after
7559 Min(FLAG_max_inlined_source_size, kUnlimitedMaxInlinedSourceSize)) { 7559 Min(FLAG_max_inlined_source_size, kUnlimitedMaxInlinedSourceSize)) {
7560 TraceInline(target, caller, "target text too big"); 7560 TraceInline(target, caller, "target text too big");
7561 return kNotInlinable; 7561 return kNotInlinable;
7562 } 7562 }
7563 7563
7564 // Target must be inlineable. 7564 // Target must be inlineable.
7565 if (!target_shared->IsInlineable()) { 7565 if (!target_shared->IsInlineable()) {
7566 TraceInline(target, caller, "target not inlineable"); 7566 TraceInline(target, caller, "target not inlineable");
7567 return kNotInlinable; 7567 return kNotInlinable;
7568 } 7568 }
7569 if (target_shared->dont_inline()) { 7569 if (target_shared->DisableOptimizationReason() != kNoReason) {
7570 TraceInline(target, caller, "target contains unsupported syntax [early]"); 7570 TraceInline(target, caller, "target contains unsupported syntax [early]");
7571 return kNotInlinable; 7571 return kNotInlinable;
7572 } 7572 }
7573 7573
7574 int nodes_added = target_shared->ast_node_count(); 7574 int nodes_added = target_shared->ast_node_count();
7575 return nodes_added; 7575 return nodes_added;
7576 } 7576 }
7577 7577
7578 7578
7579 bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, 7579 bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
7646 } 7646 }
7647 FunctionLiteral* function = target_info.function(); 7647 FunctionLiteral* function = target_info.function();
7648 7648
7649 // The following conditions must be checked again after re-parsing, because 7649 // The following conditions must be checked again after re-parsing, because
7650 // earlier the information might not have been complete due to lazy parsing. 7650 // earlier the information might not have been complete due to lazy parsing.
7651 nodes_added = function->ast_node_count(); 7651 nodes_added = function->ast_node_count();
7652 if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) { 7652 if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) {
7653 TraceInline(target, caller, "target AST is too large [late]"); 7653 TraceInline(target, caller, "target AST is too large [late]");
7654 return false; 7654 return false;
7655 } 7655 }
7656 AstProperties::Flags* flags(function->flags()); 7656 if (function->dont_optimize()) {
7657 if (flags->Contains(kDontInline) || function->dont_optimize()) {
7658 TraceInline(target, caller, "target contains unsupported syntax [late]"); 7657 TraceInline(target, caller, "target contains unsupported syntax [late]");
7659 return false; 7658 return false;
7660 } 7659 }
7661 7660
7662 // If the function uses the arguments object check that inlining of functions 7661 // If the function uses the arguments object check that inlining of functions
7663 // with arguments object is enabled and the arguments-variable is 7662 // with arguments object is enabled and the arguments-variable is
7664 // stack allocated. 7663 // stack allocated.
7665 if (function->scope()->arguments() != NULL) { 7664 if (function->scope()->arguments() != NULL) {
7666 if (!FLAG_inline_arguments) { 7665 if (!FLAG_inline_arguments) {
7667 TraceInline(target, caller, "target uses arguments object"); 7666 TraceInline(target, caller, "target uses arguments object");
(...skipping 4696 matching lines...) Expand 10 before | Expand all | Expand 10 after
12364 if (ShouldProduceTraceOutput()) { 12363 if (ShouldProduceTraceOutput()) {
12365 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12364 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12366 } 12365 }
12367 12366
12368 #ifdef DEBUG 12367 #ifdef DEBUG
12369 graph_->Verify(false); // No full verify. 12368 graph_->Verify(false); // No full verify.
12370 #endif 12369 #endif
12371 } 12370 }
12372 12371
12373 } } // namespace v8::internal 12372 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698