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

Side by Side Diff: src/compiler.cc

Issue 668143003: Move BailoutReason and flags computation to post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix extraneous Renumber() call that crept back in 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/ast-numbering.cc ('k') | src/parser.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 Handle<Context> native_context(function->context()->native_context()); 734 Handle<Context> native_context(function->context()->native_context());
735 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, 735 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
736 literals, info->osr_ast_id()); 736 literals, info->osr_ast_id());
737 } 737 }
738 } 738 }
739 739
740 740
741 static bool Renumber(CompilationInfo* info) { 741 static bool Renumber(CompilationInfo* info) {
742 if (!AstNumbering::Renumber(info->function(), info->zone())) return false; 742 if (!AstNumbering::Renumber(info->function(), info->zone())) return false;
743 if (!info->shared_info().is_null()) { 743 if (!info->shared_info().is_null()) {
744 info->shared_info()->set_ast_node_count(info->function()->ast_node_count()); 744 FunctionLiteral* lit = info->function();
745 info->shared_info()->set_ast_node_count(lit->ast_node_count());
746 info->shared_info()->set_bailout_reason(lit->dont_optimize_reason());
wingo 2014/10/27 15:08:20 As mstarzinger points out, this should probably be
747 info->shared_info()->set_dont_cache(lit->flags()->Contains(kDontCache));
745 } 748 }
746 return true; 749 return true;
747 } 750 }
748 751
749 752
750 bool Compiler::Analyze(CompilationInfo* info) { 753 bool Compiler::Analyze(CompilationInfo* info) {
751 DCHECK(info->function() != NULL); 754 DCHECK(info->function() != NULL);
752 if (!Rewriter::Rewrite(info)) return false; 755 if (!Rewriter::Rewrite(info)) return false;
753 if (!Scope::Analyze(info)) return false; 756 if (!Scope::Analyze(info)) return false;
754 if (!Renumber(info)) return false; 757 if (!Renumber(info)) return false;
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 AllowHandleDereference allow_deref; 1470 AllowHandleDereference allow_deref;
1468 bool tracing_on = info()->IsStub() 1471 bool tracing_on = info()->IsStub()
1469 ? FLAG_trace_hydrogen_stubs 1472 ? FLAG_trace_hydrogen_stubs
1470 : (FLAG_trace_hydrogen && 1473 : (FLAG_trace_hydrogen &&
1471 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1474 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1472 return (tracing_on && 1475 return (tracing_on &&
1473 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1476 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1474 } 1477 }
1475 1478
1476 } } // namespace v8::internal 1479 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast-numbering.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698