Skip to content

Commit 46419f7

Browse files
targosnodejs-github-bot
authored andcommitted
deps: V8: revert CL 5331688
On Windows debug builds, it is not allowed to dereference empty iterators. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5331688 PR-URL: #52465 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 052961c commit 46419f7

File tree

7 files changed

+17
-26
lines changed

7 files changed

+17
-26
lines changed

common.gypi

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

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.7',
39+
'v8_embedder_string': '-node.8',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/compiler/js-heap-broker.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -855,10 +855,7 @@ ElementAccessFeedback const& JSHeapBroker::ProcessFeedbackMapsForElementAccess(
855855
MapUpdaterGuardIfNeeded mumd_scope(this);
856856

857857
transition_target = map.object()->FindElementsKindTransitionedMap(
858-
isolate(),
859-
MapHandlesSpan(possible_transition_targets.begin(),
860-
possible_transition_targets.end()),
861-
ConcurrencyMode::kConcurrent);
858+
isolate(), possible_transition_targets, ConcurrencyMode::kConcurrent);
862859
}
863860

864861
if (transition_target.is_null()) {

deps/v8/src/ic/ic.cc

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ void IC::ConfigureVectorState(Handle<Name> name, Handle<Map> map,
374374
OnFeedbackChanged(IsLoadGlobalIC() ? "LoadGlobal" : "Monomorphic");
375375
}
376376

377-
void IC::ConfigureVectorState(Handle<Name> name, MapHandlesSpan maps,
377+
void IC::ConfigureVectorState(Handle<Name> name, MapHandles const& maps,
378378
MaybeObjectHandles* handlers) {
379379
DCHECK(!IsGlobalIC());
380380
std::vector<MapAndHandler> maps_and_handlers;
@@ -740,9 +740,10 @@ bool IC::IsTransitionOfMonomorphicTarget(Tagged<Map> source_map,
740740
source_map->elements_kind(), target_elements_kind);
741741
Tagged<Map> transitioned_map;
742742
if (more_general_transition) {
743-
Handle<Map> single_map[1] = {handle(target_map, isolate_)};
743+
MapHandles map_list;
744+
map_list.push_back(handle(target_map, isolate_));
744745
transitioned_map = source_map->FindElementsKindTransitionedMap(
745-
isolate(), single_map, ConcurrencyMode::kSynchronous);
746+
isolate(), map_list, ConcurrencyMode::kSynchronous);
746747
}
747748
return transitioned_map == target_map;
748749
}
@@ -1244,10 +1245,7 @@ void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver,
12441245
if (target_receiver_maps.size() == 1) {
12451246
ConfigureVectorState(Handle<Name>(), target_receiver_maps[0], handlers[0]);
12461247
} else {
1247-
ConfigureVectorState(Handle<Name>(),
1248-
MapHandlesSpan(target_receiver_maps.begin(),
1249-
target_receiver_maps.end()),
1250-
&handlers);
1248+
ConfigureVectorState(Handle<Name>(), target_receiver_maps, &handlers);
12511249
}
12521250
}
12531251

@@ -1444,9 +1442,7 @@ void KeyedLoadIC::LoadElementPolymorphicHandlers(
14441442
// generate an elements kind transition for this kind of receivers.
14451443
if (receiver_map->is_stable()) {
14461444
Tagged<Map> tmap = receiver_map->FindElementsKindTransitionedMap(
1447-
isolate(),
1448-
MapHandlesSpan(receiver_maps->begin(), receiver_maps->end()),
1449-
ConcurrencyMode::kSynchronous);
1445+
isolate(), *receiver_maps, ConcurrencyMode::kSynchronous);
14501446
if (!tmap.is_null()) {
14511447
receiver_map->NotifyLeafMapLayoutChange(isolate());
14521448
}
@@ -2478,9 +2474,7 @@ void KeyedStoreIC::StoreElementPolymorphicHandlers(
24782474
} else {
24792475
{
24802476
Tagged<Map> tmap = receiver_map->FindElementsKindTransitionedMap(
2481-
isolate(),
2482-
MapHandlesSpan(receiver_maps.begin(), receiver_maps.end()),
2483-
ConcurrencyMode::kSynchronous);
2477+
isolate(), receiver_maps, ConcurrencyMode::kSynchronous);
24842478
if (!tmap.is_null()) {
24852479
if (receiver_map->is_stable()) {
24862480
receiver_map->NotifyLeafMapLayoutChange(isolate());

deps/v8/src/ic/ic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class IC {
8787
void ConfigureVectorState(Handle<Name> name, Handle<Map> map,
8888
const MaybeObjectHandle& handler);
8989
// Configure the vector for POLYMORPHIC.
90-
void ConfigureVectorState(Handle<Name> name, MapHandlesSpan maps,
90+
void ConfigureVectorState(Handle<Name> name, MapHandles const& maps,
9191
MaybeObjectHandles* handlers);
9292
void ConfigureVectorState(
9393
Handle<Name> name, std::vector<MapAndHandler> const& maps_and_handlers);

deps/v8/src/objects/map.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,15 +930,16 @@ Handle<Map> Map::GetDerivedMap(Isolate* isolate, Handle<Map> from,
930930
prototype);
931931
}
932932

933-
static bool ContainsMap(MapHandlesSpan maps, Tagged<Map> map) {
933+
static bool ContainsMap(MapHandles const& maps, Tagged<Map> map) {
934934
DCHECK(!map.is_null());
935935
for (Handle<Map> current : maps) {
936936
if (!current.is_null() && *current == map) return true;
937937
}
938938
return false;
939939
}
940940

941-
static bool HasElementsKind(MapHandlesSpan maps, ElementsKind elements_kind) {
941+
static bool HasElementsKind(MapHandles const& maps,
942+
ElementsKind elements_kind) {
942943
for (Handle<Map> current : maps) {
943944
if (!current.is_null() && current->elements_kind() == elements_kind)
944945
return true;
@@ -947,7 +948,7 @@ static bool HasElementsKind(MapHandlesSpan maps, ElementsKind elements_kind) {
947948
}
948949

949950
Tagged<Map> Map::FindElementsKindTransitionedMap(Isolate* isolate,
950-
MapHandlesSpan candidates,
951+
MapHandles const& candidates,
951952
ConcurrencyMode cmode) {
952953
DisallowGarbageCollection no_gc;
953954

deps/v8/src/objects/map.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#ifndef V8_OBJECTS_MAP_H_
66
#define V8_OBJECTS_MAP_H_
77

8-
#include "include/v8-memory-span.h"
98
#include "src/base/bit-field.h"
109
#include "src/common/globals.h"
1110
#include "src/objects/code.h"
@@ -133,7 +132,6 @@ enum class ObjectFields {
133132
};
134133

135134
using MapHandles = std::vector<Handle<Map>>;
136-
using MapHandlesSpan = v8::MemorySpan<Handle<Map>>;
137135

138136
#include "torque-generated/src/objects/map-tq.inc"
139137

@@ -847,7 +845,7 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
847845
// elements_kind that's found in |candidates|, or |nullptr| if no match is
848846
// found at all.
849847
V8_EXPORT_PRIVATE Tagged<Map> FindElementsKindTransitionedMap(
850-
Isolate* isolate, MapHandlesSpan candidates, ConcurrencyMode cmode);
848+
Isolate* isolate, MapHandles const& candidates, ConcurrencyMode cmode);
851849

852850
inline bool CanTransition() const;
853851

deps/v8/test/cctest/test-field-type-tracking.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,8 @@ static void TestReconfigureElementsKind_GeneralizeFieldInPlace(
18401840
// Ensure Map::FindElementsKindTransitionedMap() is able to find the
18411841
// transitioned map.
18421842
{
1843-
Handle<Map> map_list[1]{updated_map};
1843+
MapHandles map_list;
1844+
map_list.push_back(updated_map);
18441845
Tagged<Map> transitioned_map = map2->FindElementsKindTransitionedMap(
18451846
isolate, map_list, ConcurrencyMode::kSynchronous);
18461847
CHECK_EQ(*updated_map, transitioned_map);

0 commit comments

Comments
 (0)