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

Side by Side Diff: src/objects.cc

Issue 1900743003: [compiler] Remove obsolete guard in MarkForOptimization. (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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 11956 matching lines...) Expand 10 before | Expand all | Expand 10 after
11967 if (SharedFunctionInfo::cast(literals->get(i)) == candidate) { 11967 if (SharedFunctionInfo::cast(literals->get(i)) == candidate) {
11968 return true; 11968 return true;
11969 } 11969 }
11970 } 11970 }
11971 return false; 11971 return false;
11972 } 11972 }
11973 11973
11974 11974
11975 void JSFunction::MarkForOptimization() { 11975 void JSFunction::MarkForOptimization() {
11976 Isolate* isolate = GetIsolate(); 11976 Isolate* isolate = GetIsolate();
11977 // Do not optimize if function contains break points.
11978 if (shared()->HasDebugInfo()) return;
11979 DCHECK(!IsOptimized()); 11977 DCHECK(!IsOptimized());
11980 DCHECK(shared()->allows_lazy_compilation() || 11978 DCHECK(shared()->allows_lazy_compilation() ||
11981 !shared()->optimization_disabled()); 11979 !shared()->optimization_disabled());
11982 DCHECK(!shared()->HasDebugInfo());
11983 set_code_no_write_barrier( 11980 set_code_no_write_barrier(
11984 isolate->builtins()->builtin(Builtins::kCompileOptimized)); 11981 isolate->builtins()->builtin(Builtins::kCompileOptimized));
11985 // No write barrier required, since the builtin is part of the root set. 11982 // No write barrier required, since the builtin is part of the root set.
11986 } 11983 }
11987 11984
11988 11985
11989 void JSFunction::AttemptConcurrentOptimization() { 11986 void JSFunction::AttemptConcurrentOptimization() {
11990 Isolate* isolate = GetIsolate(); 11987 Isolate* isolate = GetIsolate();
11991 if (!isolate->concurrent_recompilation_enabled() || 11988 if (!isolate->concurrent_recompilation_enabled() ||
11992 isolate->bootstrapper()->IsActive()) { 11989 isolate->bootstrapper()->IsActive()) {
(...skipping 7413 matching lines...) Expand 10 before | Expand all | Expand 10 after
19406 if (cell->value() != *new_value) { 19403 if (cell->value() != *new_value) {
19407 cell->set_value(*new_value); 19404 cell->set_value(*new_value);
19408 Isolate* isolate = cell->GetIsolate(); 19405 Isolate* isolate = cell->GetIsolate();
19409 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19406 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19410 isolate, DependentCode::kPropertyCellChangedGroup); 19407 isolate, DependentCode::kPropertyCellChangedGroup);
19411 } 19408 }
19412 } 19409 }
19413 19410
19414 } // namespace internal 19411 } // namespace internal
19415 } // namespace v8 19412 } // namespace v8
OLDNEW
« 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