| 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 10324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10335 Isolate* isolate = GetIsolate(); | 10335 Isolate* isolate = GetIsolate(); |
| 10336 if (isolate->serializer_enabled()) return; | 10336 if (isolate->serializer_enabled()) return; |
| 10337 | 10337 |
| 10338 if (map->unused_property_fields() == 0) return; | 10338 if (map->unused_property_fields() == 0) return; |
| 10339 | 10339 |
| 10340 map->set_counter(Map::kSlackTrackingCounterStart); | 10340 map->set_counter(Map::kSlackTrackingCounterStart); |
| 10341 } | 10341 } |
| 10342 | 10342 |
| 10343 | 10343 |
| 10344 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { | 10344 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { |
| 10345 code()->ClearInlineCaches(); | |
| 10346 // If we clear ICs, we need to clear the type feedback vector too, since | |
| 10347 // CallICs are synced with a feedback vector slot. | |
| 10348 ClearTypeFeedbackInfo(); | |
| 10349 set_ic_age(new_ic_age); | 10345 set_ic_age(new_ic_age); |
| 10350 if (code()->kind() == Code::FUNCTION) { | 10346 if (code()->kind() == Code::FUNCTION) { |
| 10351 code()->set_profiler_ticks(0); | 10347 code()->set_profiler_ticks(0); |
| 10352 if (optimization_disabled() && | 10348 if (optimization_disabled() && |
| 10353 opt_count() >= FLAG_max_opt_count) { | 10349 opt_count() >= FLAG_max_opt_count) { |
| 10354 // Re-enable optimizations if they were disabled due to opt_count limit. | 10350 // Re-enable optimizations if they were disabled due to opt_count limit. |
| 10355 set_optimization_disabled(false); | 10351 set_optimization_disabled(false); |
| 10356 code()->set_optimizable(true); | 10352 code()->set_optimizable(true); |
| 10357 } | 10353 } |
| 10358 set_opt_count(0); | 10354 set_opt_count(0); |
| (...skipping 6522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16881 Handle<DependentCode> codes = | 16877 Handle<DependentCode> codes = |
| 16882 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16878 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
| 16883 DependentCode::kPropertyCellChangedGroup, | 16879 DependentCode::kPropertyCellChangedGroup, |
| 16884 info->object_wrapper()); | 16880 info->object_wrapper()); |
| 16885 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16881 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
| 16886 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16882 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
| 16887 cell, info->zone()); | 16883 cell, info->zone()); |
| 16888 } | 16884 } |
| 16889 | 16885 |
| 16890 } } // namespace v8::internal | 16886 } } // namespace v8::internal |
| OLD | NEW |