mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 03:07:54 +01:00
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: https://github.com/nodejs/node/pull/52465 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
parent
4728eb0f02
commit
0d6ac38b13
@ -37,7 +37,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.8',
|
||||
'v8_embedder_string': '-node.9',
|
||||
|
||||
##### V8 defaults for Node.js #####
|
||||
|
||||
|
5
deps/v8/src/compiler/js-heap-broker.cc
vendored
5
deps/v8/src/compiler/js-heap-broker.cc
vendored
@ -832,10 +832,7 @@ ElementAccessFeedback const& JSHeapBroker::ProcessFeedbackMapsForElementAccess(
|
||||
MapUpdaterGuardIfNeeded mumd_scope(this);
|
||||
|
||||
transition_target = map.object()->FindElementsKindTransitionedMap(
|
||||
isolate(),
|
||||
MapHandlesSpan(possible_transition_targets.begin(),
|
||||
possible_transition_targets.end()),
|
||||
ConcurrencyMode::kConcurrent);
|
||||
isolate(), possible_transition_targets, ConcurrencyMode::kConcurrent);
|
||||
}
|
||||
|
||||
if (transition_target.is_null()) {
|
||||
|
20
deps/v8/src/ic/ic.cc
vendored
20
deps/v8/src/ic/ic.cc
vendored
@ -374,7 +374,7 @@ void IC::ConfigureVectorState(Handle<Name> name, Handle<Map> map,
|
||||
OnFeedbackChanged(IsLoadGlobalIC() ? "LoadGlobal" : "Monomorphic");
|
||||
}
|
||||
|
||||
void IC::ConfigureVectorState(Handle<Name> name, MapHandlesSpan maps,
|
||||
void IC::ConfigureVectorState(Handle<Name> name, MapHandles const& maps,
|
||||
MaybeObjectHandles* handlers) {
|
||||
DCHECK(!IsGlobalIC());
|
||||
std::vector<MapAndHandler> maps_and_handlers;
|
||||
@ -740,9 +740,10 @@ bool IC::IsTransitionOfMonomorphicTarget(Tagged<Map> source_map,
|
||||
source_map->elements_kind(), target_elements_kind);
|
||||
Tagged<Map> transitioned_map;
|
||||
if (more_general_transition) {
|
||||
Handle<Map> single_map[1] = {handle(target_map, isolate_)};
|
||||
MapHandles map_list;
|
||||
map_list.push_back(handle(target_map, isolate_));
|
||||
transitioned_map = source_map->FindElementsKindTransitionedMap(
|
||||
isolate(), single_map, ConcurrencyMode::kSynchronous);
|
||||
isolate(), map_list, ConcurrencyMode::kSynchronous);
|
||||
}
|
||||
return transitioned_map == target_map;
|
||||
}
|
||||
@ -1241,10 +1242,7 @@ void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver,
|
||||
if (target_receiver_maps.size() == 1) {
|
||||
ConfigureVectorState(Handle<Name>(), target_receiver_maps[0], handlers[0]);
|
||||
} else {
|
||||
ConfigureVectorState(Handle<Name>(),
|
||||
MapHandlesSpan(target_receiver_maps.begin(),
|
||||
target_receiver_maps.end()),
|
||||
&handlers);
|
||||
ConfigureVectorState(Handle<Name>(), target_receiver_maps, &handlers);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1441,9 +1439,7 @@ void KeyedLoadIC::LoadElementPolymorphicHandlers(
|
||||
// generate an elements kind transition for this kind of receivers.
|
||||
if (receiver_map->is_stable()) {
|
||||
Tagged<Map> tmap = receiver_map->FindElementsKindTransitionedMap(
|
||||
isolate(),
|
||||
MapHandlesSpan(receiver_maps->begin(), receiver_maps->end()),
|
||||
ConcurrencyMode::kSynchronous);
|
||||
isolate(), *receiver_maps, ConcurrencyMode::kSynchronous);
|
||||
if (!tmap.is_null()) {
|
||||
receiver_map->NotifyLeafMapLayoutChange(isolate());
|
||||
}
|
||||
@ -2470,9 +2466,7 @@ void KeyedStoreIC::StoreElementPolymorphicHandlers(
|
||||
} else {
|
||||
{
|
||||
Tagged<Map> tmap = receiver_map->FindElementsKindTransitionedMap(
|
||||
isolate(),
|
||||
MapHandlesSpan(receiver_maps.begin(), receiver_maps.end()),
|
||||
ConcurrencyMode::kSynchronous);
|
||||
isolate(), receiver_maps, ConcurrencyMode::kSynchronous);
|
||||
if (!tmap.is_null()) {
|
||||
if (receiver_map->is_stable()) {
|
||||
receiver_map->NotifyLeafMapLayoutChange(isolate());
|
||||
|
2
deps/v8/src/ic/ic.h
vendored
2
deps/v8/src/ic/ic.h
vendored
@ -87,7 +87,7 @@ class IC {
|
||||
void ConfigureVectorState(Handle<Name> name, Handle<Map> map,
|
||||
const MaybeObjectHandle& handler);
|
||||
// Configure the vector for POLYMORPHIC.
|
||||
void ConfigureVectorState(Handle<Name> name, MapHandlesSpan maps,
|
||||
void ConfigureVectorState(Handle<Name> name, MapHandles const& maps,
|
||||
MaybeObjectHandles* handlers);
|
||||
void ConfigureVectorState(
|
||||
Handle<Name> name, std::vector<MapAndHandler> const& maps_and_handlers);
|
||||
|
7
deps/v8/src/objects/map.cc
vendored
7
deps/v8/src/objects/map.cc
vendored
@ -936,7 +936,7 @@ Handle<Map> Map::GetDerivedMap(Isolate* isolate, Handle<Map> from,
|
||||
prototype);
|
||||
}
|
||||
|
||||
static bool ContainsMap(MapHandlesSpan maps, Tagged<Map> map) {
|
||||
static bool ContainsMap(MapHandles const& maps, Tagged<Map> map) {
|
||||
DCHECK(!map.is_null());
|
||||
for (Handle<Map> current : maps) {
|
||||
if (!current.is_null() && *current == map) return true;
|
||||
@ -944,7 +944,8 @@ static bool ContainsMap(MapHandlesSpan maps, Tagged<Map> map) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool HasElementsKind(MapHandlesSpan maps, ElementsKind elements_kind) {
|
||||
static bool HasElementsKind(MapHandles const& maps,
|
||||
ElementsKind elements_kind) {
|
||||
for (Handle<Map> current : maps) {
|
||||
if (!current.is_null() && current->elements_kind() == elements_kind)
|
||||
return true;
|
||||
@ -953,7 +954,7 @@ static bool HasElementsKind(MapHandlesSpan maps, ElementsKind elements_kind) {
|
||||
}
|
||||
|
||||
Tagged<Map> Map::FindElementsKindTransitionedMap(Isolate* isolate,
|
||||
MapHandlesSpan candidates,
|
||||
MapHandles const& candidates,
|
||||
ConcurrencyMode cmode) {
|
||||
DisallowGarbageCollection no_gc;
|
||||
|
||||
|
4
deps/v8/src/objects/map.h
vendored
4
deps/v8/src/objects/map.h
vendored
@ -5,7 +5,6 @@
|
||||
#ifndef V8_OBJECTS_MAP_H_
|
||||
#define V8_OBJECTS_MAP_H_
|
||||
|
||||
#include "include/v8-memory-span.h"
|
||||
#include "src/base/bit-field.h"
|
||||
#include "src/common/globals.h"
|
||||
#include "src/objects/code.h"
|
||||
@ -136,7 +135,6 @@ enum class ObjectFields {
|
||||
};
|
||||
|
||||
using MapHandles = std::vector<Handle<Map>>;
|
||||
using MapHandlesSpan = v8::MemorySpan<Handle<Map>>;
|
||||
|
||||
#include "torque-generated/src/objects/map-tq.inc"
|
||||
|
||||
@ -846,7 +844,7 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
|
||||
// elements_kind that's found in |candidates|, or |nullptr| if no match is
|
||||
// found at all.
|
||||
V8_EXPORT_PRIVATE Tagged<Map> FindElementsKindTransitionedMap(
|
||||
Isolate* isolate, MapHandlesSpan candidates, ConcurrencyMode cmode);
|
||||
Isolate* isolate, MapHandles const& candidates, ConcurrencyMode cmode);
|
||||
|
||||
inline bool CanTransition() const;
|
||||
|
||||
|
@ -1837,7 +1837,8 @@ static void TestReconfigureElementsKind_GeneralizeFieldInPlace(
|
||||
// Ensure Map::FindElementsKindTransitionedMap() is able to find the
|
||||
// transitioned map.
|
||||
{
|
||||
Handle<Map> map_list[1]{updated_map};
|
||||
MapHandles map_list;
|
||||
map_list.push_back(updated_map);
|
||||
Tagged<Map> transitioned_map = map2->FindElementsKindTransitionedMap(
|
||||
isolate, map_list, ConcurrencyMode::kSynchronous);
|
||||
CHECK_EQ(*updated_map, transitioned_map);
|
||||
|
Loading…
Reference in New Issue
Block a user