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

Unified Diff: src/property-details.h

Issue 1062163005: track global accesses to constant types (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property-details.h
diff --git a/src/property-details.h b/src/property-details.h
index 517e7a9641fb7615f59beb6242868a9df4aa38da..791eb524c77c40e9f1230657c2d9d84cfadcb7df 100644
--- a/src/property-details.h
+++ b/src/property-details.h
@@ -186,12 +186,24 @@ static const int kInvalidEnumCacheSentinel =
enum class PropertyCellType {
- kUninitialized, // Cell is deleted or not yet defined.
- kUndefined, // The PREMONOMORPHIC of property cells.
- kConstant, // Cell has been assigned only once.
- kMutable, // Cell will no longer be tracked as constant.
- kDeleted = kConstant, // like kUninitialized, but for cells already deleted.
- kInvalid = kMutable, // For dictionaries not holding cells.
+ // Meaningful when a property cell does not contain the hole.
+ kUndefined, // The PREMONOMORPHIC of property cells.
+ kConstant, // Cell has been assigned only once.
+ kConstantType, // Cell has been assigned only one type.
+ kMutable, // Cell will no longer be tracked as constant.
+
+ // Meaningful when a property cell contains the hole.
+ kUninitialized = kUndefined, // Cell has never been initialized.
+ kInvalidated = kConstant, // Cell has been deleted or invalidated.
+
+ // For dictionaries not holding cells.
+ kNoCell = kMutable,
+};
+
+
+enum class PropertyCellConstantType {
+ kSmi,
+ kStableMap,
};
@@ -229,7 +241,7 @@ class PropertyDetails BASE_EMBEDDED {
}
static PropertyDetails Empty() {
- return PropertyDetails(NONE, DATA, 0, PropertyCellType::kInvalid);
+ return PropertyDetails(NONE, DATA, 0, PropertyCellType::kNoCell);
}
int pointer() const { return DescriptorPointer::decode(value_); }
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698