summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/dictionary.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/dictionary.h')
-rw-r--r--deps/v8/src/objects/dictionary.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/deps/v8/src/objects/dictionary.h b/deps/v8/src/objects/dictionary.h
index 78837ea296..ca709679b1 100644
--- a/deps/v8/src/objects/dictionary.h
+++ b/deps/v8/src/objects/dictionary.h
@@ -5,7 +5,10 @@
#ifndef V8_OBJECTS_DICTIONARY_H_
#define V8_OBJECTS_DICTIONARY_H_
-#include "src/objects.h"
+#include "src/objects/hash-table.h"
+
+#include "src/base/export-template.h"
+#include "src/globals.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
@@ -274,6 +277,12 @@ class UnseededNumberDictionaryShape : public NumberDictionaryShape {
static inline Map* GetMap(Isolate* isolate);
};
+extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
+ HashTable<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>;
+
+extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
+ Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>;
+
class SeededNumberDictionary
: public Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape,
uint32_t> {
@@ -325,6 +334,10 @@ class SeededNumberDictionary
static const int kRequiresSlowElementsMask = 1;
static const int kRequiresSlowElementsTagSize = 1;
static const uint32_t kRequiresSlowElementsLimit = (1 << 29) - 1;
+
+ // JSObjects prefer dictionary elements if the dictionary saves this much
+ // memory compared to a fast elements backing store.
+ static const uint32_t kPreferFastElementsSizeFactor = 3;
};
class UnseededNumberDictionary