OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <iomanip> | 5 #include <iomanip> |
6 #include <sstream> | 6 #include <sstream> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 9688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9699 | 9699 |
9700 | 9700 |
9701 void JSFunction::AttemptConcurrentOptimization() { | 9701 void JSFunction::AttemptConcurrentOptimization() { |
9702 Isolate* isolate = GetIsolate(); | 9702 Isolate* isolate = GetIsolate(); |
9703 if (!isolate->concurrent_recompilation_enabled() || | 9703 if (!isolate->concurrent_recompilation_enabled() || |
9704 isolate->bootstrapper()->IsActive()) { | 9704 isolate->bootstrapper()->IsActive()) { |
9705 MarkForOptimization(); | 9705 MarkForOptimization(); |
9706 return; | 9706 return; |
9707 } | 9707 } |
9708 if (isolate->concurrent_osr_enabled() && | 9708 if (isolate->concurrent_osr_enabled() && |
9709 isolate->optimizing_compile_dispatcher()->IsQueuedForOSR(this)) { | 9709 isolate->optimizing_compiler_thread()->IsQueuedForOSR(this)) { |
9710 // Do not attempt regular recompilation if we already queued this for OSR. | 9710 // Do not attempt regular recompilation if we already queued this for OSR. |
9711 // TODO(yangguo): This is necessary so that we don't install optimized | 9711 // TODO(yangguo): This is necessary so that we don't install optimized |
9712 // code on a function that is already optimized, since OSR and regular | 9712 // code on a function that is already optimized, since OSR and regular |
9713 // recompilation race. This goes away as soon as OSR becomes one-shot. | 9713 // recompilation race. This goes away as soon as OSR becomes one-shot. |
9714 return; | 9714 return; |
9715 } | 9715 } |
9716 DCHECK(!IsInOptimizationQueue()); | 9716 DCHECK(!IsInOptimizationQueue()); |
9717 DCHECK(!IsOptimized()); | 9717 DCHECK(!IsOptimized()); |
9718 DCHECK(shared()->allows_lazy_compilation() || code()->optimizable()); | 9718 DCHECK(shared()->allows_lazy_compilation() || code()->optimizable()); |
9719 DCHECK(isolate->concurrent_recompilation_enabled()); | 9719 DCHECK(isolate->concurrent_recompilation_enabled()); |
(...skipping 7326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17046 CompilationInfo* info) { | 17046 CompilationInfo* info) { |
17047 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17047 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
17048 handle(cell->dependent_code(), info->isolate()), | 17048 handle(cell->dependent_code(), info->isolate()), |
17049 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17049 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
17050 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17050 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
17051 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17051 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
17052 cell, info->zone()); | 17052 cell, info->zone()); |
17053 } | 17053 } |
17054 | 17054 |
17055 } } // namespace v8::internal | 17055 } } // namespace v8::internal |
OLD | NEW |