mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
deps: use std::map in MSVC STL for EphemeronRememberedSet
PR-URL: https://github.com/nodejs/node/pull/58070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
parent
2b802d0e16
commit
14202a4423
2 changed files with 10 additions and 1 deletions
|
@ -38,7 +38,7 @@
|
|||
|
||||
# Reset this number to 0 on major V8 upgrades.
|
||||
# Increment by one for each non-official patch applied to deps/v8.
|
||||
'v8_embedder_string': '-node.4',
|
||||
'v8_embedder_string': '-node.5',
|
||||
|
||||
##### V8 defaults for Node.js #####
|
||||
|
||||
|
|
9
deps/v8/src/heap/ephemeron-remembered-set.h
vendored
9
deps/v8/src/heap/ephemeron-remembered-set.h
vendored
|
@ -5,7 +5,11 @@
|
|||
#ifndef V8_HEAP_EPHEMERON_REMEMBERED_SET_H_
|
||||
#define V8_HEAP_EPHEMERON_REMEMBERED_SET_H_
|
||||
|
||||
#if defined(_MSVC_STL_VERSION)
|
||||
#include <map>
|
||||
#else
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
#include <unordered_set>
|
||||
|
||||
#include "src/base/platform/mutex.h"
|
||||
|
@ -26,8 +30,13 @@ class EphemeronRememberedSet final {
|
|||
kEphemeronTableListSegmentSize>;
|
||||
|
||||
using IndicesSet = std::unordered_set<int>;
|
||||
#if defined(_MSVC_STL_VERSION)
|
||||
using TableMap = std::map<Tagged<EphemeronHashTable>, IndicesSet,
|
||||
Object::Comparer>;
|
||||
#else
|
||||
using TableMap = std::unordered_map<Tagged<EphemeronHashTable>, IndicesSet,
|
||||
Object::Hasher>;
|
||||
#endif
|
||||
|
||||
void RecordEphemeronKeyWrite(Tagged<EphemeronHashTable> table,
|
||||
Address key_slot);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue