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

Side by Side Diff: src/objects.cc

Issue 2446673002: [compiler] Put shared function marking behind a flag (Closed)
Patch Set: Created 4 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
« src/flag-definitions.h ('K') | « src/flag-definitions.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 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 <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 12193 matching lines...) Expand 10 before | Expand all | Expand 10 after
12204 DCHECK(!IsOptimized()); 12204 DCHECK(!IsOptimized());
12205 DCHECK(shared()->allows_lazy_compilation() || 12205 DCHECK(shared()->allows_lazy_compilation() ||
12206 !shared()->optimization_disabled()); 12206 !shared()->optimization_disabled());
12207 set_code_no_write_barrier( 12207 set_code_no_write_barrier(
12208 isolate->builtins()->builtin(Builtins::kCompileOptimized)); 12208 isolate->builtins()->builtin(Builtins::kCompileOptimized));
12209 // No write barrier required, since the builtin is part of the root set. 12209 // No write barrier required, since the builtin is part of the root set.
12210 } 12210 }
12211 12211
12212 12212
12213 void JSFunction::AttemptConcurrentOptimization() { 12213 void JSFunction::AttemptConcurrentOptimization() {
12214 // Mark the shared function for optimization regardless of whether the 12214 if (FLAG_mark_shared_functions) {
12215 // optimization is concurrent or not. 12215 // Mark the shared function for optimization regardless of whether the
12216 shared()->set_was_marked_for_optimization(true); 12216 // optimization is concurrent or not.
12217 shared()->set_was_marked_for_optimization(true);
12218 }
12217 12219
12218 Isolate* isolate = GetIsolate(); 12220 Isolate* isolate = GetIsolate();
12219 if (!isolate->concurrent_recompilation_enabled() || 12221 if (!isolate->concurrent_recompilation_enabled() ||
12220 isolate->bootstrapper()->IsActive()) { 12222 isolate->bootstrapper()->IsActive()) {
12221 MarkForOptimization(); 12223 MarkForOptimization();
12222 return; 12224 return;
12223 } 12225 }
12224 DCHECK(!IsInOptimizationQueue()); 12226 DCHECK(!IsInOptimizationQueue());
12225 DCHECK(!IsOptimized()); 12227 DCHECK(!IsOptimized());
12226 DCHECK(shared()->allows_lazy_compilation() || 12228 DCHECK(shared()->allows_lazy_compilation() ||
(...skipping 7991 matching lines...) Expand 10 before | Expand all | Expand 10 after
20218 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) 20220 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr))
20219 .Check(); 20221 .Check();
20220 } 20222 }
20221 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); 20223 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked();
20222 20224
20223 return ns; 20225 return ns;
20224 } 20226 }
20225 20227
20226 } // namespace internal 20228 } // namespace internal
20227 } // namespace v8 20229 } // namespace v8
OLDNEW
« src/flag-definitions.h ('K') | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698