OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |