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

Side by Side Diff: src/hydrogen.cc

Issue 675493002: Move AST node counting to post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/full-codegen.cc ('k') | test/cctest/compiler/function-tester.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 <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 7827 matching lines...) Expand 10 before | Expand all | Expand 10 after
7838 TraceInline(target, caller, "cumulative AST node limit reached"); 7838 TraceInline(target, caller, "cumulative AST node limit reached");
7839 return false; 7839 return false;
7840 } 7840 }
7841 7841
7842 // Parse and allocate variables. 7842 // Parse and allocate variables.
7843 CompilationInfo target_info(target, zone()); 7843 CompilationInfo target_info(target, zone());
7844 // Use the same AstValueFactory for creating strings in the sub-compilation 7844 // Use the same AstValueFactory for creating strings in the sub-compilation
7845 // step, but don't transfer ownership to target_info. 7845 // step, but don't transfer ownership to target_info.
7846 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); 7846 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false);
7847 Handle<SharedFunctionInfo> target_shared(target->shared()); 7847 Handle<SharedFunctionInfo> target_shared(target->shared());
7848 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info) || 7848 if (!Compiler::ParseAndAnalyze(&target_info)) {
7849 !AstNumbering::Renumber(target_info.function(), target_info.zone())) {
7850 if (target_info.isolate()->has_pending_exception()) { 7849 if (target_info.isolate()->has_pending_exception()) {
7851 // Parse or scope error, never optimize this function. 7850 // Parse or scope error, never optimize this function.
7852 SetStackOverflow(); 7851 SetStackOverflow();
7853 target_shared->DisableOptimization(kParseScopeError); 7852 target_shared->DisableOptimization(kParseScopeError);
7854 } 7853 }
7855 TraceInline(target, caller, "parse failure"); 7854 TraceInline(target, caller, "parse failure");
7856 return false; 7855 return false;
7857 } 7856 }
7858 7857
7859 if (target_info.scope()->num_heap_slots() > 0) { 7858 if (target_info.scope()->num_heap_slots() > 0) {
(...skipping 4808 matching lines...) Expand 10 before | Expand all | Expand 10 after
12668 if (ShouldProduceTraceOutput()) { 12667 if (ShouldProduceTraceOutput()) {
12669 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12668 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12670 } 12669 }
12671 12670
12672 #ifdef DEBUG 12671 #ifdef DEBUG
12673 graph_->Verify(false); // No full verify. 12672 graph_->Verify(false); // No full verify.
12674 #endif 12673 #endif
12675 } 12674 }
12676 12675
12677 } } // namespace v8::internal 12676 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698