Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 417411d15524222bfb59708acd5b9a6f8589e24d..00748241d4e7cabd5f29f81aa710da969dd5c88a 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -5030,7 +5030,10 @@ class DependentCode: public FixedArray { |
// Group of code that depends on elements not being added to objects with |
// this map. |
kElementsCantBeAddedGroup, |
- kGroupCount = kElementsCantBeAddedGroup + 1 |
+ // Group of code that depends on global property values in property cells |
+ // not being changed. |
+ kPropertyCellChangedGroup, |
+ kGroupCount = kPropertyCellChangedGroup + 1 |
}; |
// Array for holding the index of the first code object of each group. |
@@ -5072,6 +5075,9 @@ class DependentCode: public FixedArray { |
inline void copy(int from, int to); |
static inline DependentCode* cast(Object* object); |
+ static DependentCode* ForObject(Handle<HeapObject> object, |
+ DependencyGroup group); |
+ |
private: |
// Make a room at the end of the given group by moving out the first |
// code objects of the subsequent groups. |
@@ -5569,7 +5575,7 @@ class Map: public HeapObject { |
inline bool CanOmitPrototypeChecks(); |
void AddDependentCompilationInfo(DependentCode::DependencyGroup group, |
- CompilationInfo* info); |
+ CompilationInfo* info); |
void AddDependentCode(DependentCode::DependencyGroup group, |
Handle<Code> code); |
@@ -8572,9 +8578,14 @@ class Cell: public HeapObject { |
class PropertyCell: public Cell { |
public: |
+ // [type]: type of the global property. |
Type* type(); |
void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
+ // [dependent_code]: dependent code that depends on the type of the global |
+ // property. |
+ DECL_ACCESSORS(dependent_code, DependentCode) |
+ |
// Casting. |
static inline PropertyCell* cast(Object* obj); |
@@ -8588,12 +8599,19 @@ class PropertyCell: public Cell { |
// Layout description. |
static const int kTypeOffset = kValueOffset + kPointerSize; |
- static const int kSize = kTypeOffset + kPointerSize; |
+ static const int kDependentCodeOffset = kTypeOffset + kPointerSize; |
+ static const int kSize = kDependentCodeOffset + kPointerSize; |
+ |
+ static const int kPointerFieldsBeginOffset = kValueOffset; |
+ static const int kPointerFieldsEndOffset = kDependentCodeOffset; |
+ |
+ typedef FixedBodyDescriptor<kValueOffset, |
+ kSize, |
+ kSize> BodyDescriptor; |
+ |
+ void AddDependentCompilationInfo(CompilationInfo* info); |
- typedef FixedBodyDescriptor< |
- kValueOffset, |
- kTypeOffset + kPointerSize, |
- PropertyCell::kSize> BodyDescriptor; |
+ void AddDependentCode(Handle<Code> code); |
private: |
DECL_ACCESSORS(type_raw, Object) |