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

Unified Diff: src/objects.h

Issue 2632503003: [runtime] Allocate space for computed property names (Closed)
Patch Set: Comments and reorder. Created 3 years, 11 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/factory.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 1f2a24813bae99b8d2bfcaa130783aeeb41aae47..b72d4475b3394dd32f253aec93658be8db93d950 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1051,6 +1051,7 @@ template <class C> inline bool Is(Object* obj);
V(DependentCode) \
V(HandlerTable) \
V(FixedArray) \
+ V(BoilerplateDescription) \
V(FixedDoubleArray) \
V(WeakFixedArray) \
V(ArrayList) \
@@ -2908,6 +2909,29 @@ class FixedArray: public FixedArrayBase {
DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray);
};
+// BoilerplateDescription is a list of properties consisting of name value
+// pairs. In addition to the properties, it provides the projected number
+// of properties in the backing store. This number includes properties with
+// computed names that are not
+// in the list.
+class BoilerplateDescription : public FixedArray {
+ public:
+ Object* name(int index) const;
+ Object* value(int index) const;
+
+ // The number of boilerplate properties.
+ int size() const;
+
+ // Number of boilerplate properties and properties with computed names.
+ int backing_store_size() const;
+
+ void set_backing_store_size(Isolate* isolate, int backing_store_size);
+
+ DECLARE_CAST(BoilerplateDescription)
+
+ private:
+ bool has_number_of_properties() const;
+};
// FixedDoubleArray describes fixed-sized arrays with element type double.
class FixedDoubleArray: public FixedArrayBase {
@@ -6392,7 +6416,6 @@ class Map: public HeapObject {
static const int kInstanceTypeAndBitFieldOffset =
kInstanceAttributesOffset + 0;
static const int kBitField2Offset = kInstanceAttributesOffset + 2;
- static const int kUnusedPropertyFieldsByte = 3;
static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3;
STATIC_ASSERT(kInstanceTypeAndBitFieldOffset ==
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698