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

Unified Diff: src/objects.h

Issue 7341: Allocate room for expected number of properties based on the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 500)
+++ src/objects.h (working copy)
@@ -1349,6 +1349,11 @@
// Returns failure if allocation failed.
Object* TransformToFastProperties(int unused_property_fields);
+ // Access fast-case object properties at index.
+ inline Object* FastPropertyAt(int index);
+ inline Object* FastPropertyAtPut(int index, Object* value);
+
+
// initializes the body after properties slot, properties slot is
// initialized by set_properties
// Note: this call does not update write barrier, it is caller's
@@ -2254,6 +2259,10 @@
inline int instance_size();
inline void set_instance_size(int value);
+ // Count of properties allocated in the object.
+ inline int inobject_properties();
+ inline void set_inobject_properties(int value);
+
// instance type.
inline InstanceType instance_type();
inline void set_instance_type(InstanceType value);
@@ -2396,7 +2405,8 @@
#endif
// Layout description.
- static const int kInstanceAttributesOffset = HeapObject::kHeaderSize;
+ static const int kInstanceSizesOffset = HeapObject::kHeaderSize;
+ static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize;
static const int kPrototypeOffset = kInstanceAttributesOffset + kIntSize;
static const int kConstructorOffset = kPrototypeOffset + kPointerSize;
static const int kInstanceDescriptorsOffset =
@@ -2404,11 +2414,17 @@
static const int kCodeCacheOffset = kInstanceDescriptorsOffset + kPointerSize;
static const int kSize = kCodeCacheOffset + kIntSize;
+ // Byte offsets within kInstanceSizesOffset.
+ static const int kInstanceSizeOffset = kInstanceSizesOffset + 0;
+ static const int kInObjectPropertiesOffset = kInstanceSizesOffset + 1;
+ // The bytes at positions 2 and 3 are not in use at the moment.
+
+
// Byte offsets within kInstanceAttributesOffset attributes.
- static const int kInstanceSizeOffset = kInstanceAttributesOffset + 0;
- static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1;
- static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 2;
- static const int kBitFieldOffset = kInstanceAttributesOffset + 3;
+ static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0;
+ static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1;
+ static const int kBitFieldOffset = kInstanceAttributesOffset + 2;
+ // The byte at position 3 is not in use at the moment.
// Bit positions for bit field.
static const int kUnused = 0; // To be used for marking recently used maps.
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698