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

Side by Side Diff: src/hydrogen.cc

Issue 755333003: Do not try to inline if the function has an illegal redeclaration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix license Created 6 years 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 | test/mjsunit/regress/regress-436896.js » ('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 <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 7913 matching lines...) Expand 10 before | Expand all | Expand 10 after
7924 if (!Compiler::ParseAndAnalyze(&target_info)) { 7924 if (!Compiler::ParseAndAnalyze(&target_info)) {
7925 if (target_info.isolate()->has_pending_exception()) { 7925 if (target_info.isolate()->has_pending_exception()) {
7926 // Parse or scope error, never optimize this function. 7926 // Parse or scope error, never optimize this function.
7927 SetStackOverflow(); 7927 SetStackOverflow();
7928 target_shared->DisableOptimization(kParseScopeError); 7928 target_shared->DisableOptimization(kParseScopeError);
7929 } 7929 }
7930 TraceInline(target, caller, "parse failure"); 7930 TraceInline(target, caller, "parse failure");
7931 return false; 7931 return false;
7932 } 7932 }
7933 7933
7934 if (target_info.scope()->HasIllegalRedeclaration()) {
7935 TraceInline(target, caller, "target has illegal redeclaration");
7936 return false;
7937 }
7938
7934 if (target_info.scope()->num_heap_slots() > 0) { 7939 if (target_info.scope()->num_heap_slots() > 0) {
7935 TraceInline(target, caller, "target has context-allocated variables"); 7940 TraceInline(target, caller, "target has context-allocated variables");
7936 return false; 7941 return false;
7937 } 7942 }
7938 FunctionLiteral* function = target_info.function(); 7943 FunctionLiteral* function = target_info.function();
7939 7944
7940 // The following conditions must be checked again after re-parsing, because 7945 // The following conditions must be checked again after re-parsing, because
7941 // earlier the information might not have been complete due to lazy parsing. 7946 // earlier the information might not have been complete due to lazy parsing.
7942 nodes_added = function->ast_node_count(); 7947 nodes_added = function->ast_node_count();
7943 if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) { 7948 if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) {
(...skipping 4836 matching lines...) Expand 10 before | Expand all | Expand 10 after
12780 if (ShouldProduceTraceOutput()) { 12785 if (ShouldProduceTraceOutput()) {
12781 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12786 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12782 } 12787 }
12783 12788
12784 #ifdef DEBUG 12789 #ifdef DEBUG
12785 graph_->Verify(false); // No full verify. 12790 graph_->Verify(false); // No full verify.
12786 #endif 12791 #endif
12787 } 12792 }
12788 12793
12789 } } // namespace v8::internal 12794 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-436896.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698