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

Unified Diff: src/objects.h

Issue 17308: Allocate as many object-literal properties as possible inobject.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 11 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 1049)
+++ src/objects.h (working copy)
@@ -166,9 +166,20 @@
uint32_t value_;
};
+
// Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER.
enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER };
+
+// PropertyNormalizationMode is used to specify wheter or not to
+// keep inobject properties when normalizing properties of a
+// JSObject.
+enum PropertyNormalizationMode {
+ CLEAR_INOBJECT_PROPERTIES,
+ KEEP_INOBJECT_PROPERTIES
+};
+
+
// All Maps have a field instance_type containing a InstanceType.
// It describes the type of the instances.
//
@@ -560,9 +571,9 @@
inline void set_##name(bool value); \
-#define DECL_ACCESSORS(name, type) \
- inline type* name(); \
- inline void set_##name(type* value, \
+#define DECL_ACCESSORS(name, type) \
+ inline type* name(); \
+ inline void set_##name(type* value, \
WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
@@ -1357,7 +1368,7 @@
// Convert the object to use the canonical dictionary
// representation.
- Object* NormalizeProperties();
+ Object* NormalizeProperties(PropertyNormalizationMode mode);
Object* NormalizeElements();
// Transform slow named properties to fast variants.
@@ -2293,7 +2304,7 @@
// - How to iterate over an object (for garbage collection)
class Map: public HeapObject {
public:
- // instance size.
+ // Instance size.
inline int instance_size();
inline void set_instance_size(int value);
@@ -2301,16 +2312,16 @@
inline int inobject_properties();
inline void set_inobject_properties(int value);
- // instance type.
+ // Instance type.
inline InstanceType instance_type();
inline void set_instance_type(InstanceType value);
- // tells how many unused property fields are available in the instance.
- // (only used for JSObject in fast mode).
+ // Tells how many unused property fields are available in the
+ // instance (only used for JSObject in fast mode).
inline int unused_property_fields();
inline void set_unused_property_fields(int value);
- // bit field.
+ // Bit field.
inline byte bit_field();
inline void set_bit_field(byte value);
@@ -2463,7 +2474,6 @@
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 kInstanceTypeOffset = kInstanceAttributesOffset + 0;
static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1;
« 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