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

Side by Side Diff: src/property-details.h

Issue 888623002: Property reconfiguring implemented. Tests added. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Prototype transitions printing removed Created 5 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/property.cc ('k') | test/cctest/cctest.gyp » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_PROPERTY_DETAILS_H_ 5 #ifndef V8_PROPERTY_DETAILS_H_
6 #define V8_PROPERTY_DETAILS_H_ 6 #define V8_PROPERTY_DETAILS_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 PropertyDetails(PropertyAttributes attributes, 205 PropertyDetails(PropertyAttributes attributes,
206 PropertyType type, 206 PropertyType type,
207 Representation representation, 207 Representation representation,
208 int field_index = 0) { 208 int field_index = 0) {
209 value_ = TypeField::encode(type) 209 value_ = TypeField::encode(type)
210 | AttributesField::encode(attributes) 210 | AttributesField::encode(attributes)
211 | RepresentationField::encode(EncodeRepresentation(representation)) 211 | RepresentationField::encode(EncodeRepresentation(representation))
212 | FieldIndexField::encode(field_index); 212 | FieldIndexField::encode(field_index);
213 } 213 }
214 214
215 PropertyDetails(PropertyAttributes attributes, PropertyKind kind,
216 PropertyLocation location, Representation representation,
217 int field_index = 0) {
218 value_ = KindField::encode(kind) | LocationField::encode(location) |
219 AttributesField::encode(attributes) |
220 RepresentationField::encode(EncodeRepresentation(representation)) |
221 FieldIndexField::encode(field_index);
222 }
223
215 int pointer() const { return DescriptorPointer::decode(value_); } 224 int pointer() const { return DescriptorPointer::decode(value_); }
216 225
217 PropertyDetails set_pointer(int i) { return PropertyDetails(value_, i); } 226 PropertyDetails set_pointer(int i) { return PropertyDetails(value_, i); }
218 227
219 PropertyDetails CopyWithRepresentation(Representation representation) const { 228 PropertyDetails CopyWithRepresentation(Representation representation) const {
220 return PropertyDetails(value_, representation); 229 return PropertyDetails(value_, representation);
221 } 230 }
222 PropertyDetails CopyAddAttributes(PropertyAttributes new_attributes) { 231 PropertyDetails CopyAddAttributes(PropertyAttributes new_attributes) {
223 new_attributes = 232 new_attributes =
224 static_cast<PropertyAttributes>(attributes() | new_attributes); 233 static_cast<PropertyAttributes>(attributes() | new_attributes);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 uint32_t value_; 328 uint32_t value_;
320 }; 329 };
321 330
322 331
323 std::ostream& operator<<(std::ostream& os, 332 std::ostream& operator<<(std::ostream& os,
324 const PropertyAttributes& attributes); 333 const PropertyAttributes& attributes);
325 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details); 334 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details);
326 } } // namespace v8::internal 335 } } // namespace v8::internal
327 336
328 #endif // V8_PROPERTY_DETAILS_H_ 337 #endif // V8_PROPERTY_DETAILS_H_
OLDNEW
« no previous file with comments | « src/property.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698