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

Side by Side Diff: src/objects.cc

Issue 1150683002: Remove obsolete JSFunction::IsOptimizable predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-15
Patch Set: Created 5 years, 7 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 | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9789 matching lines...) Expand 10 before | Expand all | Expand 10 after
9800 // the code entry. 9800 // the code entry.
9801 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); 9801 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset);
9802 v->VisitCodeEntry(this->address() + kCodeEntryOffset); 9802 v->VisitCodeEntry(this->address() + kCodeEntryOffset);
9803 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); 9803 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size);
9804 } 9804 }
9805 9805
9806 9806
9807 void JSFunction::MarkForOptimization() { 9807 void JSFunction::MarkForOptimization() {
9808 Isolate* isolate = GetIsolate(); 9808 Isolate* isolate = GetIsolate();
9809 DCHECK(!IsOptimized()); 9809 DCHECK(!IsOptimized());
9810 DCHECK(shared()->allows_lazy_compilation() || IsOptimizable()); 9810 DCHECK(shared()->allows_lazy_compilation());
9811 set_code_no_write_barrier( 9811 set_code_no_write_barrier(
9812 isolate->builtins()->builtin(Builtins::kCompileOptimized)); 9812 isolate->builtins()->builtin(Builtins::kCompileOptimized));
9813 // No write barrier required, since the builtin is part of the root set. 9813 // No write barrier required, since the builtin is part of the root set.
9814 } 9814 }
9815 9815
9816 9816
9817 void JSFunction::AttemptConcurrentOptimization() { 9817 void JSFunction::AttemptConcurrentOptimization() {
9818 Isolate* isolate = GetIsolate(); 9818 Isolate* isolate = GetIsolate();
9819 if (!isolate->concurrent_recompilation_enabled() || 9819 if (!isolate->concurrent_recompilation_enabled() ||
9820 isolate->bootstrapper()->IsActive()) { 9820 isolate->bootstrapper()->IsActive()) {
9821 MarkForOptimization(); 9821 MarkForOptimization();
9822 return; 9822 return;
9823 } 9823 }
9824 if (isolate->concurrent_osr_enabled() && 9824 if (isolate->concurrent_osr_enabled() &&
9825 isolate->optimizing_compile_dispatcher()->IsQueuedForOSR(this)) { 9825 isolate->optimizing_compile_dispatcher()->IsQueuedForOSR(this)) {
9826 // Do not attempt regular recompilation if we already queued this for OSR. 9826 // Do not attempt regular recompilation if we already queued this for OSR.
9827 // TODO(yangguo): This is necessary so that we don't install optimized 9827 // TODO(yangguo): This is necessary so that we don't install optimized
9828 // code on a function that is already optimized, since OSR and regular 9828 // code on a function that is already optimized, since OSR and regular
9829 // recompilation race. This goes away as soon as OSR becomes one-shot. 9829 // recompilation race. This goes away as soon as OSR becomes one-shot.
9830 return; 9830 return;
9831 } 9831 }
9832 DCHECK(!IsInOptimizationQueue()); 9832 DCHECK(!IsInOptimizationQueue());
9833 DCHECK(!IsOptimized()); 9833 DCHECK(!IsOptimized());
9834 DCHECK(shared()->allows_lazy_compilation() || IsOptimizable()); 9834 DCHECK(shared()->allows_lazy_compilation());
9835 DCHECK(isolate->concurrent_recompilation_enabled()); 9835 DCHECK(isolate->concurrent_recompilation_enabled());
9836 if (FLAG_trace_concurrent_recompilation) { 9836 if (FLAG_trace_concurrent_recompilation) {
9837 PrintF(" ** Marking "); 9837 PrintF(" ** Marking ");
9838 ShortPrint(); 9838 ShortPrint();
9839 PrintF(" for concurrent recompilation.\n"); 9839 PrintF(" for concurrent recompilation.\n");
9840 } 9840 }
9841 set_code_no_write_barrier( 9841 set_code_no_write_barrier(
9842 GetIsolate()->builtins()->builtin(Builtins::kCompileOptimizedConcurrent)); 9842 isolate->builtins()->builtin(Builtins::kCompileOptimizedConcurrent));
9843 // No write barrier required, since the builtin is part of the root set. 9843 // No write barrier required, since the builtin is part of the root set.
9844 } 9844 }
9845 9845
9846 9846
9847 Handle<JSFunction> JSFunction::CloneClosure(Handle<JSFunction> function) { 9847 Handle<JSFunction> JSFunction::CloneClosure(Handle<JSFunction> function) {
9848 Isolate* isolate = function->GetIsolate(); 9848 Isolate* isolate = function->GetIsolate();
9849 Handle<Map> map(function->map()); 9849 Handle<Map> map(function->map());
9850 Handle<SharedFunctionInfo> shared(function->shared()); 9850 Handle<SharedFunctionInfo> shared(function->shared());
9851 Handle<Context> context(function->context()); 9851 Handle<Context> context(function->context());
9852 Handle<JSFunction> clone = 9852 Handle<JSFunction> clone =
(...skipping 7399 matching lines...) Expand 10 before | Expand all | Expand 10 after
17252 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17252 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17253 Handle<Object> new_value) { 17253 Handle<Object> new_value) {
17254 if (cell->value() != *new_value) { 17254 if (cell->value() != *new_value) {
17255 cell->set_value(*new_value); 17255 cell->set_value(*new_value);
17256 Isolate* isolate = cell->GetIsolate(); 17256 Isolate* isolate = cell->GetIsolate();
17257 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17257 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17258 isolate, DependentCode::kPropertyCellChangedGroup); 17258 isolate, DependentCode::kPropertyCellChangedGroup);
17259 } 17259 }
17260 } 17260 }
17261 } } // namespace v8::internal 17261 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698