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

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: Created 6 years, 2 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
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 7829 matching lines...) Expand 10 before | Expand all | Expand 10 after
7840 TraceInline(target, caller, "cumulative AST node limit reached"); 7840 TraceInline(target, caller, "cumulative AST node limit reached");
7841 return false; 7841 return false;
7842 } 7842 }
7843 7843
7844 // Parse and allocate variables. 7844 // Parse and allocate variables.
7845 CompilationInfo target_info(target, zone()); 7845 CompilationInfo target_info(target, zone());
7846 // Use the same AstValueFactory for creating strings in the sub-compilation 7846 // Use the same AstValueFactory for creating strings in the sub-compilation
7847 // step, but don't transfer ownership to target_info. 7847 // step, but don't transfer ownership to target_info.
7848 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); 7848 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false);
7849 Handle<SharedFunctionInfo> target_shared(target->shared()); 7849 Handle<SharedFunctionInfo> target_shared(target->shared());
7850 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info) || 7850 if (!Compiler::ParseAndAnalyze(&target_info)) {
7851 !AstNumbering::Renumber(target_info.function(), target_info.zone())) {
7852 if (target_info.isolate()->has_pending_exception()) { 7851 if (target_info.isolate()->has_pending_exception()) {
7853 // Parse or scope error, never optimize this function. 7852 // Parse or scope error, never optimize this function.
7854 SetStackOverflow(); 7853 SetStackOverflow();
7855 target_shared->DisableOptimization(kParseScopeError); 7854 target_shared->DisableOptimization(kParseScopeError);
7856 } 7855 }
7857 TraceInline(target, caller, "parse failure"); 7856 TraceInline(target, caller, "parse failure");
7858 return false; 7857 return false;
7859 } 7858 }
7860 7859
7861 if (target_info.scope()->num_heap_slots() > 0) { 7860 if (target_info.scope()->num_heap_slots() > 0) {
(...skipping 4809 matching lines...) Expand 10 before | Expand all | Expand 10 after
12671 if (ShouldProduceTraceOutput()) { 12670 if (ShouldProduceTraceOutput()) {
12672 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12671 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12673 } 12672 }
12674 12673
12675 #ifdef DEBUG 12674 #ifdef DEBUG
12676 graph_->Verify(false); // No full verify. 12675 graph_->Verify(false); // No full verify.
12677 #endif 12676 #endif
12678 } 12677 }
12679 12678
12680 } } // namespace v8::internal 12679 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698