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

Side by Side Diff: src/objects.cc

Issue 1213123003: Version 4.3.61.33 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.3
Patch Set: Created 5 years, 5 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 | « include/v8-version.h ('k') | src/objects-printer.cc » ('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 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 if (modify_index >= 0) { 2632 if (modify_index >= 0) {
2633 PropertyDetails details = target_descriptors->GetDetails(modify_index); 2633 PropertyDetails details = target_descriptors->GetDetails(modify_index);
2634 DCHECK_EQ(new_kind, details.kind()); 2634 DCHECK_EQ(new_kind, details.kind());
2635 DCHECK_EQ(new_attributes, details.attributes()); 2635 DCHECK_EQ(new_attributes, details.attributes());
2636 DCHECK(new_representation.fits_into(details.representation())); 2636 DCHECK(new_representation.fits_into(details.representation()));
2637 DCHECK(details.location() != kField || 2637 DCHECK(details.location() != kField ||
2638 new_field_type->NowIs( 2638 new_field_type->NowIs(
2639 target_descriptors->GetFieldType(modify_index))); 2639 target_descriptors->GetFieldType(modify_index)));
2640 } 2640 }
2641 #endif 2641 #endif
2642 if (*target_map != *old_map) {
2643 old_map->NotifyLeafMapLayoutChange();
2644 }
2642 return target_map; 2645 return target_map;
2643 } 2646 }
2644 2647
2645 // Find the last compatible target map in the transition tree. 2648 // Find the last compatible target map in the transition tree.
2646 for (int i = target_nof; i < old_nof; ++i) { 2649 for (int i = target_nof; i < old_nof; ++i) {
2647 PropertyDetails old_details = old_descriptors->GetDetails(i); 2650 PropertyDetails old_details = old_descriptors->GetDetails(i);
2648 PropertyKind next_kind; 2651 PropertyKind next_kind;
2649 PropertyAttributes next_attributes; 2652 PropertyAttributes next_attributes;
2650 if (modify_index == i) { 2653 if (modify_index == i) {
2651 next_kind = new_kind; 2654 next_kind = new_kind;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 split_attributes = new_attributes; 2888 split_attributes = new_attributes;
2886 } else { 2889 } else {
2887 PropertyDetails split_prop_details = old_descriptors->GetDetails(split_nof); 2890 PropertyDetails split_prop_details = old_descriptors->GetDetails(split_nof);
2888 split_kind = split_prop_details.kind(); 2891 split_kind = split_prop_details.kind();
2889 split_attributes = split_prop_details.attributes(); 2892 split_attributes = split_prop_details.attributes();
2890 } 2893 }
2891 bool transition_target_deprecated = split_map->DeprecateTarget( 2894 bool transition_target_deprecated = split_map->DeprecateTarget(
2892 split_kind, old_descriptors->GetKey(split_nof), split_attributes, 2895 split_kind, old_descriptors->GetKey(split_nof), split_attributes,
2893 *new_descriptors, *new_layout_descriptor); 2896 *new_descriptors, *new_layout_descriptor);
2894 2897
2895 if (from_kind != to_kind) {
2896 // There was an elements kind change in the middle of transition tree and
2897 // we reconstructed the tree so that all elements kind transitions are
2898 // done at the beginning, therefore the |old_map| is no longer stable.
2899 old_map->NotifyLeafMapLayoutChange();
2900 }
2901
2902 // If |transition_target_deprecated| is true then the transition array 2898 // If |transition_target_deprecated| is true then the transition array
2903 // already contains entry for given descriptor. This means that the transition 2899 // already contains entry for given descriptor. This means that the transition
2904 // could be inserted regardless of whether transitions array is full or not. 2900 // could be inserted regardless of whether transitions array is full or not.
2905 if (!transition_target_deprecated && 2901 if (!transition_target_deprecated &&
2906 !TransitionArray::CanHaveMoreTransitions(split_map)) { 2902 !TransitionArray::CanHaveMoreTransitions(split_map)) {
2907 return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode, 2903 return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode,
2908 new_kind, new_attributes, 2904 new_kind, new_attributes,
2909 "GenAll_CantHaveMoreTransitions"); 2905 "GenAll_CantHaveMoreTransitions");
2910 } 2906 }
2911 2907
2908 old_map->NotifyLeafMapLayoutChange();
2909
2912 if (FLAG_trace_generalization && modify_index >= 0) { 2910 if (FLAG_trace_generalization && modify_index >= 0) {
2913 PropertyDetails old_details = old_descriptors->GetDetails(modify_index); 2911 PropertyDetails old_details = old_descriptors->GetDetails(modify_index);
2914 PropertyDetails new_details = new_descriptors->GetDetails(modify_index); 2912 PropertyDetails new_details = new_descriptors->GetDetails(modify_index);
2915 Handle<HeapType> old_field_type = 2913 Handle<HeapType> old_field_type =
2916 (old_details.type() == DATA) 2914 (old_details.type() == DATA)
2917 ? handle(old_descriptors->GetFieldType(modify_index), isolate) 2915 ? handle(old_descriptors->GetFieldType(modify_index), isolate)
2918 : HeapType::Constant( 2916 : HeapType::Constant(
2919 handle(old_descriptors->GetValue(modify_index), isolate), 2917 handle(old_descriptors->GetValue(modify_index), isolate),
2920 isolate); 2918 isolate);
2921 Handle<HeapType> new_field_type = 2919 Handle<HeapType> new_field_type =
(...skipping 14272 matching lines...) Expand 10 before | Expand all | Expand 10 after
17194 CompilationInfo* info) { 17192 CompilationInfo* info) {
17195 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( 17193 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo(
17196 handle(cell->dependent_code(), info->isolate()), 17194 handle(cell->dependent_code(), info->isolate()),
17197 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); 17195 DependentCode::kPropertyCellChangedGroup, info->object_wrapper());
17198 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 17196 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
17199 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 17197 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
17200 cell, info->zone()); 17198 cell, info->zone());
17201 } 17199 }
17202 17200
17203 } } // namespace v8::internal 17201 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698