Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index a5a312bd9cb16ba060e756404bbe103ce7de3f7a..5e7863674df7d0d7b30aa07e319fe4aec38209ee 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -42,8 +42,9 @@ |
// - JSArrayBufferView |
// - JSTypedArray |
// - JSDataView |
-// - JSSet |
-// - JSMap |
+// - JSCollection |
+// - JSSet |
+// - JSMap |
// - JSSetIterator |
// - JSMapIterator |
// - JSWeakCollection |
@@ -10064,41 +10065,42 @@ class JSFunctionProxy: public JSProxy { |
}; |
-// The JSSet describes EcmaScript Harmony sets |
-class JSSet: public JSObject { |
+class JSCollection : public JSObject { |
public: |
- // [set]: the backing hash set containing keys. |
+ // [table]: the backing hash table |
DECL_ACCESSORS(table, Object) |
+ static const int kTableOffset = JSObject::kHeaderSize; |
+ static const int kSize = kTableOffset + kPointerSize; |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSCollection); |
+}; |
+ |
+ |
+// The JSSet describes EcmaScript Harmony sets |
+class JSSet : public JSCollection { |
+ public: |
DECLARE_CAST(JSSet) |
// Dispatched behavior. |
DECLARE_PRINTER(JSSet) |
DECLARE_VERIFIER(JSSet) |
- static const int kTableOffset = JSObject::kHeaderSize; |
- static const int kSize = kTableOffset + kPointerSize; |
- |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); |
}; |
// The JSMap describes EcmaScript Harmony maps |
-class JSMap: public JSObject { |
+class JSMap : public JSCollection { |
public: |
- // [table]: the backing hash table mapping keys to values. |
- DECL_ACCESSORS(table, Object) |
- |
DECLARE_CAST(JSMap) |
// Dispatched behavior. |
DECLARE_PRINTER(JSMap) |
DECLARE_VERIFIER(JSMap) |
- static const int kTableOffset = JSObject::kHeaderSize; |
- static const int kSize = kTableOffset + kPointerSize; |
- |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap); |
}; |