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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 10641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10652 Isolate* isolate = GetIsolate(); | 10652 Isolate* isolate = GetIsolate(); |
10653 if (isolate->serializer_enabled()) return; | 10653 if (isolate->serializer_enabled()) return; |
10654 | 10654 |
10655 if (map->unused_property_fields() == 0) return; | 10655 if (map->unused_property_fields() == 0) return; |
10656 | 10656 |
10657 map->set_counter(Map::kSlackTrackingCounterStart); | 10657 map->set_counter(Map::kSlackTrackingCounterStart); |
10658 } | 10658 } |
10659 | 10659 |
10660 | 10660 |
10661 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { | 10661 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { |
| 10662 code()->ClearInlineCaches(); |
| 10663 // If we clear ICs, we need to clear the type feedback vector too, since |
| 10664 // CallICs are synced with a feedback vector slot. |
| 10665 ClearTypeFeedbackInfo(); |
10662 set_ic_age(new_ic_age); | 10666 set_ic_age(new_ic_age); |
10663 if (code()->kind() == Code::FUNCTION) { | 10667 if (code()->kind() == Code::FUNCTION) { |
10664 code()->set_profiler_ticks(0); | 10668 code()->set_profiler_ticks(0); |
10665 if (optimization_disabled() && | 10669 if (optimization_disabled() && |
10666 opt_count() >= FLAG_max_opt_count) { | 10670 opt_count() >= FLAG_max_opt_count) { |
10667 // Re-enable optimizations if they were disabled due to opt_count limit. | 10671 // Re-enable optimizations if they were disabled due to opt_count limit. |
10668 set_optimization_disabled(false); | 10672 set_optimization_disabled(false); |
10669 code()->set_optimizable(true); | 10673 code()->set_optimizable(true); |
10670 } | 10674 } |
10671 set_opt_count(0); | 10675 set_opt_count(0); |
(...skipping 6540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17212 CompilationInfo* info) { | 17216 CompilationInfo* info) { |
17213 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17217 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
17214 handle(cell->dependent_code(), info->isolate()), | 17218 handle(cell->dependent_code(), info->isolate()), |
17215 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17219 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
17216 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17220 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
17217 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17221 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
17218 cell, info->zone()); | 17222 cell, info->zone()); |
17219 } | 17223 } |
17220 | 17224 |
17221 } } // namespace v8::internal | 17225 } } // namespace v8::internal |
OLD | NEW |