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

Unified Diff: src/property-details.h

Issue 15941016: Move field index into property details, freeing up the value slot of fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/property.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property-details.h
diff --git a/src/property-details.h b/src/property-details.h
index 3bb1f3368e9efdda6cdef3a6b95e9b003a5e4254..9f8b8431fd1570d46a2d4330ada0e6c4155cd87f 100644
--- a/src/property-details.h
+++ b/src/property-details.h
@@ -169,10 +169,12 @@ class PropertyDetails BASE_EMBEDDED {
PropertyDetails(PropertyAttributes attributes,
PropertyType type,
- Representation representation) {
+ Representation representation,
+ int field_index = 0) {
value_ = TypeField::encode(type)
| AttributesField::encode(attributes)
- | RepresentationField::encode(EncodeRepresentation(representation));
+ | RepresentationField::encode(EncodeRepresentation(representation))
+ | FieldIndexField::encode(field_index);
}
int pointer() { return DescriptorPointer::decode(value_); }
@@ -214,6 +216,10 @@ class PropertyDetails BASE_EMBEDDED {
return DecodeRepresentation(RepresentationField::decode(value_));
}
+ int field_index() {
+ return FieldIndexField::decode(value_);
+ }
+
inline PropertyDetails AsDeleted();
static bool IsValidIndex(int index) {
@@ -231,8 +237,9 @@ class PropertyDetails BASE_EMBEDDED {
class AttributesField: public BitField<PropertyAttributes, 3, 3> {};
class DeletedField: public BitField<uint32_t, 6, 1> {};
Jakob Kummerow 2013/05/31 16:44:14 How about separating the groups of BitFields that
class DictionaryStorageField: public BitField<uint32_t, 7, 24> {};
- class DescriptorPointer: public BitField<uint32_t, 7, 11> {};
- class RepresentationField: public BitField<uint32_t, 18, 3> {};
+ class DescriptorPointer: public BitField<uint32_t, 6, 11> {};
+ class RepresentationField: public BitField<uint32_t, 17, 3> {};
+ class FieldIndexField: public BitField<uint32_t, 20, 11> {};
static const int kInitialIndex = 1;
« no previous file with comments | « src/property.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698