Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index a87e389883e5e59035095219e19f726810ea21cb..1e6c5324282c15baa357726f9988b854ff200168 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1495,7 +1495,8 @@ class Object : public MaybeObject { |
return Representation::Smi(); |
} else if (FLAG_track_double_fields && IsHeapNumber()) { |
return Representation::Double(); |
- } else if (FLAG_track_computed_fields && IsUninitialized()) { |
+ } else if ((FLAG_track_computed_fields || |
+ FLAG_track_heap_object_fields) && IsUninitialized()) { |
Toon Verwaest
2014/03/21 14:33:37
Why did you add this flag? Which piece of code pas
Benedikt Meurer
2014/04/11 11:12:00
This was a hack to work-around the "missing chokep
|
return Representation::None(); |
} else if (FLAG_track_heap_object_fields) { |
ASSERT(IsHeapObject()); |
@@ -2585,6 +2586,7 @@ class JSObject: public JSReceiver { |
static void GeneralizeFieldRepresentation(Handle<JSObject> object, |
int modify_index, |
Representation new_representation, |
+ Handle<HeapType> new_field_type, |
StoreMode store_mode); |
// Convert the object to use the canonical dictionary |
@@ -3391,12 +3393,14 @@ class DescriptorArray: public FixedArray { |
inline Name* GetKey(int descriptor_number); |
inline Object** GetKeySlot(int descriptor_number); |
inline Object* GetValue(int descriptor_number); |
+ inline void SetValue(int descriptor_number, Object* value); |
inline Object** GetValueSlot(int descriptor_number); |
inline Object** GetDescriptorStartSlot(int descriptor_number); |
inline Object** GetDescriptorEndSlot(int descriptor_number); |
inline PropertyDetails GetDetails(int descriptor_number); |
inline PropertyType GetType(int descriptor_number); |
inline int GetFieldIndex(int descriptor_number); |
+ HeapType* GetFieldType(int descriptor_number); |
inline Object* GetConstant(int descriptor_number); |
inline Object* GetCallbacksObject(int descriptor_number); |
inline AccessorDescriptor* GetCallbacks(int descriptor_number); |
@@ -3404,7 +3408,6 @@ class DescriptorArray: public FixedArray { |
inline Name* GetSortedKey(int descriptor_number); |
inline int GetSortedKeyIndex(int descriptor_number); |
inline void SetSortedKey(int pointer, int descriptor_number); |
- inline void InitializeRepresentations(Representation representation); |
inline void SetRepresentation(int descriptor_number, |
Representation representation); |
@@ -5736,6 +5739,9 @@ class DependentCode: public FixedArray { |
// Group of code that depends on global property values in property cells |
// not being changed. |
kPropertyCellChangedGroup, |
+ // Group of code that omit run-time type checks for the field(s) introduced |
+ // by this map. |
+ kFieldTypeGroup, |
// Group of code that depends on tenuring information in AllocationSites |
// not being changed. |
kAllocationSiteTenuringChangedGroup, |
@@ -6011,6 +6017,10 @@ class Map: public HeapObject { |
Map* FindRootMap(); |
Map* FindUpdatedMap(int verbatim, int length, DescriptorArray* descriptors); |
Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors); |
+ Map* FindFieldOwner(int descriptor); |
+ |
+ void UpdateDescriptor(int descriptor_number, Descriptor* desc); |
+ void UpdateFieldType(int descriptor, HeapType* field_type); |
inline int GetInObjectPropertyOffset(int index); |
@@ -6020,13 +6030,12 @@ class Map: public HeapObject { |
int target_number_of_fields, |
int target_inobject, |
int target_unused); |
- static Handle<Map> GeneralizeAllFieldRepresentations( |
- Handle<Map> map, |
- Representation new_representation); |
+ static Handle<Map> GeneralizeAllFieldRepresentations(Handle<Map> map); |
static Handle<Map> GeneralizeRepresentation( |
Handle<Map> map, |
int modify_index, |
Representation new_representation, |
+ Handle<HeapType> new_field_type, |
StoreMode store_mode); |
static Handle<Map> CopyGeneralizeAllRepresentations( |
Handle<Map> map, |