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; |