Skip to content

Commit ceaa3fc

Browse files
joyeecheungnodejs-github-bot
authored andcommitted
deps: use std::map in MSVC STL for EphemeronRememberedSet
PR-URL: nodejs/node#58070 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 40e08ee commit ceaa3fc

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.3',
41+
'v8_embedder_string': '-node.4',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/src/heap/ephemeron-remembered-set.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#ifndef V8_HEAP_EPHEMERON_REMEMBERED_SET_H_
66
#define V8_HEAP_EPHEMERON_REMEMBERED_SET_H_
77

8+
#if defined(_MSVC_STL_VERSION)
9+
#include <map>
10+
#else
811
#include <unordered_map>
12+
#endif
913
#include <unordered_set>
1014

1115
#include "src/base/platform/mutex.h"
@@ -32,8 +36,13 @@ class EphemeronRememberedSet final {
3236
kEphemeronTableListSegmentSize>;
3337

3438
using IndicesSet = std::unordered_set<int>;
39+
#if defined(_MSVC_STL_VERSION)
40+
using TableMap = std::map<Tagged<EphemeronHashTable>, IndicesSet,
41+
Object::Comparer>;
42+
#else
3543
using TableMap = std::unordered_map<Tagged<EphemeronHashTable>, IndicesSet,
3644
Object::Hasher>;
45+
#endif
3746

3847
void RecordEphemeronKeyWrite(Tagged<EphemeronHashTable> table,
3948
Address key_slot);

0 commit comments

Comments
 (0)