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

Unified Diff: src/compiler.cc

Issue 1891753002: [compiler] Remove obsolete MaybeDisableOptimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 35cb918085a449ef416b99a156b06a72029aec7f..3292368c35ab23391564218d618d3a388749d987 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -483,13 +483,6 @@ void OptimizedCompileJob::RecordOptimizationStats() {
namespace {
-void MaybeDisableOptimization(Handle<SharedFunctionInfo> shared_info,
- BailoutReason bailout_reason) {
- if (bailout_reason != kNoReason) {
- shared_info->DisableOptimization(bailout_reason);
- }
-}
-
void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
CompilationInfo* info,
Handle<SharedFunctionInfo> shared) {
@@ -635,9 +628,7 @@ MUST_USE_RESULT MaybeHandle<Code> GetUnoptimizedCode(CompilationInfo* info) {
// Parse and update CompilationInfo with the results.
if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>();
Handle<SharedFunctionInfo> shared = info->shared_info();
- FunctionLiteral* lit = info->literal();
- DCHECK_EQ(shared->language_mode(), lit->language_mode());
- MaybeDisableOptimization(shared, lit->dont_optimize_reason());
+ DCHECK_EQ(shared->language_mode(), info->literal()->language_mode());
// Compile either unoptimized code or bytecode for the interpreter.
if (!CompileBaselineCode(info)) return MaybeHandle<Code>();
@@ -710,7 +701,9 @@ bool Renumber(ParseInfo* parse_info) {
if (!shared_info.is_null()) {
FunctionLiteral* lit = parse_info->literal();
shared_info->set_ast_node_count(lit->ast_node_count());
- MaybeDisableOptimization(shared_info, lit->dont_optimize_reason());
+ if (lit->dont_optimize_reason() != kNoReason) {
+ shared_info->DisableOptimization(lit->dont_optimize_reason());
+ }
shared_info->set_dont_crankshaft(
shared_info->dont_crankshaft() ||
(lit->flags() & AstProperties::kDontCrankshaft));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698