| 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 2798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2809 | 2809 |
| 2810 if (next_location == kField) { | 2810 if (next_location == kField) { |
| 2811 if (next_kind == kData) { | 2811 if (next_kind == kData) { |
| 2812 Handle<HeapType> next_field_type; | 2812 Handle<HeapType> next_field_type; |
| 2813 if (modify_index == i) { | 2813 if (modify_index == i) { |
| 2814 next_field_type = new_field_type; | 2814 next_field_type = new_field_type; |
| 2815 if (!property_kind_reconfiguration) { | 2815 if (!property_kind_reconfiguration) { |
| 2816 Handle<HeapType> old_field_type = | 2816 Handle<HeapType> old_field_type = |
| 2817 GetFieldType(isolate, old_descriptors, i, | 2817 GetFieldType(isolate, old_descriptors, i, |
| 2818 old_details.location(), next_representation); | 2818 old_details.location(), next_representation); |
| 2819 old_field_type = | 2819 next_field_type = |
| 2820 GeneralizeFieldType(old_field_type, next_field_type, isolate); | 2820 GeneralizeFieldType(next_field_type, old_field_type, isolate); |
| 2821 } | 2821 } |
| 2822 } else { | 2822 } else { |
| 2823 Handle<HeapType> old_field_type = | 2823 Handle<HeapType> old_field_type = |
| 2824 GetFieldType(isolate, old_descriptors, i, old_details.location(), | 2824 GetFieldType(isolate, old_descriptors, i, old_details.location(), |
| 2825 next_representation); | 2825 next_representation); |
| 2826 next_field_type = old_field_type; | 2826 next_field_type = old_field_type; |
| 2827 } | 2827 } |
| 2828 | 2828 |
| 2829 DataDescriptor d(old_key, current_offset, next_field_type, | 2829 DataDescriptor d(old_key, current_offset, next_field_type, |
| 2830 next_attributes, next_representation); | 2830 next_attributes, next_representation); |
| (...skipping 7822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10653 Isolate* isolate = GetIsolate(); | 10653 Isolate* isolate = GetIsolate(); |
| 10654 if (isolate->serializer_enabled()) return; | 10654 if (isolate->serializer_enabled()) return; |
| 10655 | 10655 |
| 10656 if (map->unused_property_fields() == 0) return; | 10656 if (map->unused_property_fields() == 0) return; |
| 10657 | 10657 |
| 10658 map->set_counter(Map::kSlackTrackingCounterStart); | 10658 map->set_counter(Map::kSlackTrackingCounterStart); |
| 10659 } | 10659 } |
| 10660 | 10660 |
| 10661 | 10661 |
| 10662 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { | 10662 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { |
| 10663 code()->ClearInlineCaches(); |
| 10664 // If we clear ICs, we need to clear the type feedback vector too, since |
| 10665 // CallICs are synced with a feedback vector slot. |
| 10666 ClearTypeFeedbackInfo(); |
| 10663 set_ic_age(new_ic_age); | 10667 set_ic_age(new_ic_age); |
| 10664 if (code()->kind() == Code::FUNCTION) { | 10668 if (code()->kind() == Code::FUNCTION) { |
| 10665 code()->set_profiler_ticks(0); | 10669 code()->set_profiler_ticks(0); |
| 10666 if (optimization_disabled() && | 10670 if (optimization_disabled() && |
| 10667 opt_count() >= FLAG_max_opt_count) { | 10671 opt_count() >= FLAG_max_opt_count) { |
| 10668 // Re-enable optimizations if they were disabled due to opt_count limit. | 10672 // Re-enable optimizations if they were disabled due to opt_count limit. |
| 10669 set_optimization_disabled(false); | 10673 set_optimization_disabled(false); |
| 10670 code()->set_optimizable(true); | 10674 code()->set_optimizable(true); |
| 10671 } | 10675 } |
| 10672 set_opt_count(0); | 10676 set_opt_count(0); |
| (...skipping 6540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17213 CompilationInfo* info) { | 17217 CompilationInfo* info) { |
| 17214 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17218 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
| 17215 handle(cell->dependent_code(), info->isolate()), | 17219 handle(cell->dependent_code(), info->isolate()), |
| 17216 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17220 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
| 17217 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17221 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
| 17218 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17222 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
| 17219 cell, info->zone()); | 17223 cell, info->zone()); |
| 17220 } | 17224 } |
| 17221 | 17225 |
| 17222 } } // namespace v8::internal | 17226 } } // namespace v8::internal |
| OLD | NEW |