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

Unified Diff: src/objects.h

Issue 17895004: Add DependentCode to PropertyCells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moar review feedback Created 7 years, 6 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/mips/lithium-codegen-mips.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
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)
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698