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

Unified Diff: src/objects.h

Issue 16925008: Generate StoreGlobal stubs with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Finish code dependencies 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/ic.cc ('k') | src/objects.cc » ('j') | src/types.cc » ('J')
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 1d02ed7c2c495ec1f064a8403be584083c0d83ae..b7bf504f3d7b48b4418c3966f8f4c02f1f130661 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4680,6 +4680,10 @@ class Code: public HeapObject {
// Get the safepoint entry for the given pc.
SafepointEntry GetSafepointEntry(Address pc);
+ // Find an object in a stub with a specified map
+ Object* FindNthObject(int n, Map* match_map);
+ void ReplaceNthObject(int n, Map* match_map, Object* replace_with);
+
// Find the first map in an IC stub.
Map* FindFirstMap();
void FindAllMaps(MapHandleList* maps);
@@ -4692,6 +4696,8 @@ class Code: public HeapObject {
// Find the first name in an IC stub.
Name* FindFirstName();
+ void ReplaceNthCell(int n, Cell* replace_with);
+
class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {};
class ExtraICStateKeyedAccessStoreMode:
public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT
@@ -5019,7 +5025,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.
@@ -5061,6 +5070,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.
@@ -5565,7 +5577,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);
@@ -8580,9 +8592,21 @@ 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)
+
+ // Sets the value of the cell and updates the type field to be the union
+ // of the cell's current type and the value's type.
+ void set_value_infer_type(Object* value,
+ WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
+
+ Type* union_type(Object* value);
+
// Casting.
static inline PropertyCell* cast(Object* obj);
@@ -8596,13 +8620,18 @@ 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;
typedef FixedBodyDescriptor<
kValueOffset,
- kTypeOffset + kPointerSize,
+ PropertyCell::kSize,
PropertyCell::kSize> BodyDescriptor;
+ void AddDependentCompilationInfo(CompilationInfo* info);
+
+ void AddDependentCode(Handle<Code> code);
+
private:
DECL_ACCESSORS(type_raw, Object)
DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell);
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | src/types.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698