Skip to content

Commit 0e3b631

Browse files
committed
deps: patch V8 to 11.8.172.16
Refs: v8/v8@11.8.172.15...11.8.172.16
1 parent dbd0ffa commit 0e3b631

File tree

7 files changed

+21
-76
lines changed

7 files changed

+21
-76
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 11
1212
#define V8_MINOR_VERSION 8
1313
#define V8_BUILD_NUMBER 172
14-
#define V8_PATCH_LEVEL 15
14+
#define V8_PATCH_LEVEL 16
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/objects/js-function.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,13 +1083,13 @@ MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate,
10831083
isolate);
10841084
prototype = handle(realm_constructor->prototype(), isolate);
10851085
}
1086-
CHECK(IsJSReceiver(*prototype));
1087-
DCHECK_EQ(constructor_initial_map->constructor_or_back_pointer(),
1088-
*constructor);
10891086

1090-
Handle<Map> map = Map::TransitionToDerivedMap(
1091-
isolate, constructor_initial_map, Handle<HeapObject>::cast(prototype));
1092-
DCHECK_EQ(map->constructor_or_back_pointer(), *constructor);
1087+
Handle<Map> map = Map::CopyInitialMap(isolate, constructor_initial_map);
1088+
map->set_new_target_is_base(false);
1089+
CHECK(IsJSReceiver(*prototype));
1090+
if (map->prototype() != *prototype)
1091+
Map::SetPrototype(isolate, map, Handle<HeapObject>::cast(prototype));
1092+
map->SetConstructor(*constructor);
10931093
return map;
10941094
}
10951095

deps/v8/src/objects/map.cc

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,31 +2344,13 @@ void Map::StartInobjectSlackTracking() {
23442344

23452345
Handle<Map> Map::TransitionToPrototype(Isolate* isolate, Handle<Map> map,
23462346
Handle<HeapObject> prototype) {
2347-
Handle<Map> new_map = TransitionsAccessor::GetPrototypeTransition(
2348-
isolate, map, prototype, map->new_target_is_base());
2347+
Handle<Map> new_map =
2348+
TransitionsAccessor::GetPrototypeTransition(isolate, map, prototype);
23492349
if (new_map.is_null()) {
23502350
new_map = Copy(isolate, map, "TransitionToPrototype");
23512351
TransitionsAccessor::PutPrototypeTransition(isolate, map, prototype,
23522352
new_map);
2353-
if (*prototype != map->prototype()) {
2354-
Map::SetPrototype(isolate, new_map, prototype);
2355-
}
2356-
}
2357-
return new_map;
2358-
}
2359-
2360-
Handle<Map> Map::TransitionToDerivedMap(Isolate* isolate, Handle<Map> map,
2361-
Handle<HeapObject> prototype) {
2362-
Handle<Map> new_map = TransitionsAccessor::GetPrototypeTransition(
2363-
isolate, map, prototype, /* new_target_is_base */ false);
2364-
if (new_map.is_null()) {
2365-
new_map = CopyInitialMap(isolate, map);
2366-
TransitionsAccessor::PutPrototypeTransition(isolate, map, prototype,
2367-
new_map);
2368-
if (*prototype != map->prototype()) {
2369-
Map::SetPrototype(isolate, new_map, prototype);
2370-
}
2371-
new_map->set_new_target_is_base(false);
2353+
Map::SetPrototype(isolate, new_map, prototype);
23722354
}
23732355
return new_map;
23742356
}

deps/v8/src/objects/map.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,6 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
863863
V8_EXPORT_PRIVATE static Handle<Map> TransitionToPrototype(
864864
Isolate* isolate, Handle<Map> map, Handle<HeapObject> prototype);
865865

866-
V8_EXPORT_PRIVATE static Handle<Map> TransitionToDerivedMap(
867-
Isolate* isolate, Handle<Map> map, Handle<HeapObject> prototype);
868-
869866
static Handle<Map> TransitionToImmutableProto(Isolate* isolate,
870867
Handle<Map> map);
871868

deps/v8/src/objects/transitions.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ void TransitionsAccessor::PutPrototypeTransition(Isolate* isolate,
443443

444444
// static
445445
Handle<Map> TransitionsAccessor::GetPrototypeTransition(
446-
Isolate* isolate, Handle<Map> map, Handle<Object> prototype_handle,
447-
bool new_target_is_base) {
446+
Isolate* isolate, Handle<Map> map, Handle<Object> prototype_handle) {
448447
DisallowGarbageCollection no_gc;
449448
Object prototype = *prototype_handle;
450449
Tagged<WeakFixedArray> cache = GetPrototypeTransitions(isolate, map);
@@ -456,8 +455,7 @@ Handle<Map> TransitionsAccessor::GetPrototypeTransition(
456455
Tagged<HeapObject> heap_object;
457456
if (target.GetHeapObjectIfWeak(&heap_object)) {
458457
Tagged<Map> target_map = Map::cast(heap_object);
459-
if (target_map->prototype() == prototype &&
460-
target_map->new_target_is_base() == new_target_is_base) {
458+
if (target_map->prototype() == prototype) {
461459
return handle(target_map, isolate);
462460
}
463461
}

deps/v8/src/objects/transitions.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,19 @@ class V8_EXPORT_PRIVATE TransitionsAccessor {
124124
}
125125

126126
// ===== PROTOTYPE TRANSITIONS =====
127-
// When you set the prototype of an object using the __proto__ accessor, or if
128-
// an unrelated new.target is passed to a constructor you need a new map for
129-
// the object (the prototype is stored in the map). In order not to multiply
130-
// maps unnecessarily we store these as transitions in the original map. That
131-
// way we can transition to the same map if the same prototype is set, rather
132-
// than creating a new map every time. The transitions are in the form of a
133-
// map where the keys are prototype objects and the values are the maps they
134-
// transition to. PutPrototypeTransition can trigger GC.
127+
// When you set the prototype of an object using the __proto__ accessor you
128+
// need a new map for the object (the prototype is stored in the map). In
129+
// order not to multiply maps unnecessarily we store these as transitions in
130+
// the original map. That way we can transition to the same map if the same
131+
// prototype is set, rather than creating a new map every time. The
132+
// transitions are in the form of a map where the keys are prototype objects
133+
// and the values are the maps they transition to.
134+
// PutPrototypeTransition can trigger GC.
135135
static void PutPrototypeTransition(Isolate* isolate, Handle<Map>,
136136
Handle<Object> prototype,
137137
Handle<Map> target_map);
138138
static Handle<Map> GetPrototypeTransition(Isolate* isolate, Handle<Map> map,
139-
Handle<Object> prototype,
140-
bool new_target_is_base);
139+
Handle<Object> prototype);
141140

142141
// During the first-time Map::Update and Map::TryUpdate, the migration target
143142
// map could be cached in the raw_transitions slot of the old map that is

deps/v8/test/mjsunit/regress/regress-reflect-construct.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)