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

Side by Side Diff: src/compiler.cc

Issue 2146573004: [turbofan] Remove fallback to TurboFan when Crankshaft bails out. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/compiler.h ('k') | no next file » | 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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/asmjs/asm-js.h" 9 #include "src/asmjs/asm-js.h"
10 #include "src/asmjs/typing-asm.h" 10 #include "src/asmjs/typing-asm.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bailout_reason_(kNoReason), 136 bailout_reason_(kNoReason),
137 prologue_offset_(Code::kPrologueOffsetNotSet), 137 prologue_offset_(Code::kPrologueOffsetNotSet),
138 track_positions_(FLAG_hydrogen_track_positions || 138 track_positions_(FLAG_hydrogen_track_positions ||
139 isolate->is_profiling()), 139 isolate->is_profiling()),
140 parameter_count_(0), 140 parameter_count_(0),
141 optimization_id_(-1), 141 optimization_id_(-1),
142 osr_expr_stack_height_(0), 142 osr_expr_stack_height_(0),
143 debug_name_(debug_name) {} 143 debug_name_(debug_name) {}
144 144
145 CompilationInfo::~CompilationInfo() { 145 CompilationInfo::~CompilationInfo() {
146 DisableFutureOptimization(); 146 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
147 shared_info()->DisableOptimization(bailout_reason());
148 }
147 dependencies()->Rollback(); 149 dependencies()->Rollback();
148 delete deferred_handles_; 150 delete deferred_handles_;
149 } 151 }
150 152
151 153
152 int CompilationInfo::num_parameters() const { 154 int CompilationInfo::num_parameters() const {
153 return !IsStub() ? scope()->num_parameters() : parameter_count_; 155 return !IsStub() ? scope()->num_parameters() : parameter_count_;
154 } 156 }
155 157
156 158
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 parse_info->literal())) { 622 parse_info->literal())) {
621 return false; 623 return false;
622 } 624 }
623 Handle<SharedFunctionInfo> shared_info = parse_info->shared_info(); 625 Handle<SharedFunctionInfo> shared_info = parse_info->shared_info();
624 if (!shared_info.is_null()) { 626 if (!shared_info.is_null()) {
625 FunctionLiteral* lit = parse_info->literal(); 627 FunctionLiteral* lit = parse_info->literal();
626 shared_info->set_ast_node_count(lit->ast_node_count()); 628 shared_info->set_ast_node_count(lit->ast_node_count());
627 if (lit->dont_optimize_reason() != kNoReason) { 629 if (lit->dont_optimize_reason() != kNoReason) {
628 shared_info->DisableOptimization(lit->dont_optimize_reason()); 630 shared_info->DisableOptimization(lit->dont_optimize_reason());
629 } 631 }
630 shared_info->set_dont_crankshaft( 632 if (lit->flags() & AstProperties::kDontCrankshaft) {
631 shared_info->dont_crankshaft() || 633 shared_info->set_dont_crankshaft(true);
632 (lit->flags() & AstProperties::kDontCrankshaft)); 634 }
633 } 635 }
634 return true; 636 return true;
635 } 637 }
636 638
637 bool UseTurboFan(Handle<SharedFunctionInfo> shared) { 639 bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
638 bool optimization_disabled = shared->optimization_disabled(); 640 bool optimization_disabled = shared->optimization_disabled();
639 bool dont_crankshaft = shared->dont_crankshaft(); 641 bool dont_crankshaft = shared->dont_crankshaft();
640 642
641 // Check the enabling conditions for Turbofan. 643 // Check the enabling conditions for Turbofan.
642 // 1. "use asm" code. 644 // 1. "use asm" code.
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 DCHECK(shared->is_compiled()); 1840 DCHECK(shared->is_compiled());
1839 function->set_literals(cached.literals); 1841 function->set_literals(cached.literals);
1840 } else if (shared->is_compiled()) { 1842 } else if (shared->is_compiled()) {
1841 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1843 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1842 JSFunction::EnsureLiterals(function); 1844 JSFunction::EnsureLiterals(function);
1843 } 1845 }
1844 } 1846 }
1845 1847
1846 } // namespace internal 1848 } // namespace internal
1847 } // namespace v8 1849 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698