Chromium Code Reviews| 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 <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 13506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 13517 set_ic_age(new_ic_age); | 13517 set_ic_age(new_ic_age); |
| 13518 if (code()->kind() == Code::FUNCTION) { | 13518 if (code()->kind() == Code::FUNCTION) { |
| 13519 code()->set_profiler_ticks(0); | 13519 code()->set_profiler_ticks(0); |
| 13520 if (optimization_disabled() && | 13520 if (optimization_disabled() && |
| 13521 opt_count() >= FLAG_max_opt_count) { | 13521 opt_count() >= FLAG_max_opt_count) { |
| 13522 // Re-enable optimizations if they were disabled due to opt_count limit. | 13522 // Re-enable optimizations if they were disabled due to opt_count limit. |
| 13523 set_optimization_disabled(false); | 13523 set_optimization_disabled(false); |
| 13524 } | 13524 } |
| 13525 set_opt_count(0); | 13525 set_opt_count(0); |
| 13526 set_deopt_count(0); | 13526 set_deopt_count(0); |
| 13527 } else if (code()->is_interpreter_entry_trampoline()) { | |
| 13528 // TODO(4280): We might want to consider resetting profiler ticks on the | |
| 13529 // bytecode as well as re-enabling optimization similar to the above case. | |
|
rmcilroy
2016/04/15 10:11:17
Could we do this TODO as well? I think it makes se
Michael Starzinger
2016/04/15 10:40:44
Done.
| |
| 13530 set_opt_count(0); | |
| 13531 set_deopt_count(0); | |
| 13527 } | 13532 } |
| 13528 } | 13533 } |
| 13529 | 13534 |
| 13530 | 13535 |
| 13531 int SharedFunctionInfo::SearchOptimizedCodeMapEntry(Context* native_context, | 13536 int SharedFunctionInfo::SearchOptimizedCodeMapEntry(Context* native_context, |
| 13532 BailoutId osr_ast_id) { | 13537 BailoutId osr_ast_id) { |
| 13533 DisallowHeapAllocation no_gc; | 13538 DisallowHeapAllocation no_gc; |
| 13534 DCHECK(native_context->IsNativeContext()); | 13539 DCHECK(native_context->IsNativeContext()); |
| 13535 if (!OptimizedCodeMapIsCleared()) { | 13540 if (!OptimizedCodeMapIsCleared()) { |
| 13536 FixedArray* optimized_code_map = this->optimized_code_map(); | 13541 FixedArray* optimized_code_map = this->optimized_code_map(); |
| (...skipping 5842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 19379 if (cell->value() != *new_value) { | 19384 if (cell->value() != *new_value) { |
| 19380 cell->set_value(*new_value); | 19385 cell->set_value(*new_value); |
| 19381 Isolate* isolate = cell->GetIsolate(); | 19386 Isolate* isolate = cell->GetIsolate(); |
| 19382 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19387 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19383 isolate, DependentCode::kPropertyCellChangedGroup); | 19388 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19384 } | 19389 } |
| 19385 } | 19390 } |
| 19386 | 19391 |
| 19387 } // namespace internal | 19392 } // namespace internal |
| 19388 } // namespace v8 | 19393 } // namespace v8 |
| OLD | NEW |