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/map-updater.h

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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 | « src/lookup.cc ('k') | src/map-updater.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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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 #ifndef V8_MAP_RECONFIGURER_H_ 5 #ifndef V8_MAP_RECONFIGURER_H_
6 #define V8_MAP_RECONFIGURER_H_ 6 #define V8_MAP_RECONFIGURER_H_
7 7
8 #include "src/elements-kind.h" 8 #include "src/elements-kind.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 old_map_(old_map), 48 old_map_(old_map),
49 old_descriptors_(old_map->instance_descriptors(), isolate_), 49 old_descriptors_(old_map->instance_descriptors(), isolate_),
50 old_nof_(old_map_->NumberOfOwnDescriptors()), 50 old_nof_(old_map_->NumberOfOwnDescriptors()),
51 new_elements_kind_(old_map_->elements_kind()) {} 51 new_elements_kind_(old_map_->elements_kind()) {}
52 52
53 // Prepares for reconfiguring of a property at |descriptor| to data field 53 // Prepares for reconfiguring of a property at |descriptor| to data field
54 // with given |attributes| and |representation|/|field_type| and 54 // with given |attributes| and |representation|/|field_type| and
55 // performs the steps 1-5. 55 // performs the steps 1-5.
56 Handle<Map> ReconfigureToDataField(int descriptor, 56 Handle<Map> ReconfigureToDataField(int descriptor,
57 PropertyAttributes attributes, 57 PropertyAttributes attributes,
58 PropertyConstness constness,
58 Representation representation, 59 Representation representation,
59 Handle<FieldType> field_type); 60 Handle<FieldType> field_type);
60 61
61 // Prepares for reconfiguring elements kind and performs the steps 1-5. 62 // Prepares for reconfiguring elements kind and performs the steps 1-5.
62 Handle<Map> ReconfigureElementsKind(ElementsKind elements_kind); 63 Handle<Map> ReconfigureElementsKind(ElementsKind elements_kind);
63 64
64 // Prepares for updating deprecated map to most up-to-date non-deprecated 65 // Prepares for updating deprecated map to most up-to-date non-deprecated
65 // version and performs the steps 1-5. 66 // version and performs the steps 1-5.
66 Handle<Map> Update(); 67 Handle<Map> Update();
67 68
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 Representation representation) const; 135 Representation representation) const;
135 136
136 // If a |descriptor| property in given |descriptors| array has kField 137 // If a |descriptor| property in given |descriptors| array has kField
137 // location then returns it's field type otherwise computes optimal field 138 // location then returns it's field type otherwise computes optimal field
138 // type for the descriptor's value and |representation|. 139 // type for the descriptor's value and |representation|.
139 // The |location| value must be a pre-fetched location for |descriptor|. 140 // The |location| value must be a pre-fetched location for |descriptor|.
140 inline Handle<FieldType> GetOrComputeFieldType( 141 inline Handle<FieldType> GetOrComputeFieldType(
141 Handle<DescriptorArray> descriptors, int descriptor, 142 Handle<DescriptorArray> descriptors, int descriptor,
142 PropertyLocation location, Representation representation); 143 PropertyLocation location, Representation representation);
143 144
145 void GeneralizeField(Handle<Map> map, int modify_index,
146 PropertyConstness new_constness,
147 Representation new_representation,
148 Handle<FieldType> new_field_type);
149
144 Isolate* isolate_; 150 Isolate* isolate_;
145 Handle<Map> old_map_; 151 Handle<Map> old_map_;
146 Handle<DescriptorArray> old_descriptors_; 152 Handle<DescriptorArray> old_descriptors_;
147 Handle<Map> root_map_; 153 Handle<Map> root_map_;
148 Handle<Map> target_map_; 154 Handle<Map> target_map_;
149 Handle<Map> result_map_; 155 Handle<Map> result_map_;
150 int old_nof_; 156 int old_nof_;
151 157
152 State state_ = kInitialized; 158 State state_ = kInitialized;
153 ElementsKind new_elements_kind_; 159 ElementsKind new_elements_kind_;
(...skipping 11 matching lines...) Expand all
165 Handle<FieldType> new_field_type_; 171 Handle<FieldType> new_field_type_;
166 172
167 // Data specific to kDescriptor location. 173 // Data specific to kDescriptor location.
168 Handle<Object> new_value_; 174 Handle<Object> new_value_;
169 }; 175 };
170 176
171 } // namespace internal 177 } // namespace internal
172 } // namespace v8 178 } // namespace v8
173 179
174 #endif // V8_MAP_RECONFIGURER_H_ 180 #endif // V8_MAP_RECONFIGURER_H_
OLDNEW
« no previous file with comments | « src/lookup.cc ('k') | src/map-updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698