summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/hash-table.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-10-31 16:06:17 +0100
committerMichaël Zasso <targos@protonmail.com>2019-11-08 15:53:34 +0100
commit186f15771c7a83d32c9589b7ff8f055b318c9589 (patch)
tree278f870d00af0970298f1929887017c6c9e21383 /deps/v8/src/objects/hash-table.h
parenta9bed0b72b088b5ae8eef625a41b76225686c3f7 (diff)
downloadandroid-node-v8-186f15771c7a83d32c9589b7ff8f055b318c9589.tar.gz
android-node-v8-186f15771c7a83d32c9589b7ff8f055b318c9589.tar.bz2
android-node-v8-186f15771c7a83d32c9589b7ff8f055b318c9589.zip
deps: V8: backport 5e755c6ee6d3
Original commit message: [objects] Move functions to inline headers This moves a series of functions from dictionary.h and hash-table.h to resp. dictionary-inl.h and hash-table-inl.h. The functions that were moved all somehow use other functions that are defined in -inl.h files. This change fixes the Node.js Windows builds. Change-Id: I0bbf0222beb3619a5e6f1fb451bc78691025de65 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893346 Reviewed-by: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Michaël Zasso <mic.besace@gmail.com> Cr-Commit-Position: refs/heads/master@{#64709} Refs: https://github.com/v8/v8/commit/5e755c6ee6d3ab81b2f6daf2f0b04418f91fed9b PR-URL: https://github.com/nodejs/node/pull/30020 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/hash-table.h')
-rw-r--r--deps/v8/src/objects/hash-table.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/deps/v8/src/objects/hash-table.h b/deps/v8/src/objects/hash-table.h
index ed2c645f82..5cdeb0c0ec 100644
--- a/deps/v8/src/objects/hash-table.h
+++ b/deps/v8/src/objects/hash-table.h
@@ -164,13 +164,8 @@ class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) HashTable
inline bool ToKey(Isolate* isolate, int entry, Object* out_k);
// Returns the key at entry.
- Object KeyAt(int entry) {
- Isolate* isolate = GetIsolateForPtrCompr(*this);
- return KeyAt(isolate, entry);
- }
- Object KeyAt(Isolate* isolate, int entry) {
- return get(isolate, EntryToIndex(entry) + kEntryKeyIndex);
- }
+ inline Object KeyAt(int entry);
+ inline Object KeyAt(Isolate* isolate, int entry);
static const int kElementsStartIndex = kPrefixStartIndex + Shape::kPrefixSize;
static const int kEntrySize = Shape::kEntrySize;
@@ -239,14 +234,7 @@ class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) HashTable
kMaxRegularHeapObjectSize);
// Sets the capacity of the hash table.
- void SetCapacity(int capacity) {
- // To scale a computed hash code to fit within the hash table, we
- // use bit-wise AND with a mask, so the capacity must be positive
- // and non-zero.
- DCHECK_GT(capacity, 0);
- DCHECK_LE(capacity, kMaxCapacity);
- set(kCapacityIndex, Smi::FromInt(capacity));
- }
+ inline void SetCapacity(int capacity);
// Returns _expected_ if one of entries given by the first _probe_ probes is
// equal to _expected_. Otherwise, returns the entry given by the probe