Skip to content

Commit b470354

Browse files
MylesBorinsaddaleax
authored andcommitted
deps: patch V8 to 7.9.317.25
Refs: v8/v8@7.9.317.23...7.9.317.25 PR-URL: #30679 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 80ada94 commit b470354

File tree

7 files changed

+69
-17
lines changed

7 files changed

+69
-17
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
#defineV8_MAJOR_VERSION 7
1212
#defineV8_MINOR_VERSION 9
1313
#defineV8_BUILD_NUMBER 317
14-
#defineV8_PATCH_LEVEL23
14+
#defineV8_PATCH_LEVEL25
1515

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

‎deps/v8/src/builtins/builtins-wasm-gen.cc‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,19 @@ TF_BUILTIN(WasmAtomicNotify, WasmBuiltinsAssembler){
121121
TNode<Code> centry = LoadCEntryFromInstance(instance);
122122

123123
TNode<Code> target = LoadBuiltinFromFrame(Builtins::kAllocateHeapNumber);
124+
TNode<Object> context = LoadContextFromInstance(instance);
124125

125126
// TODO(aseemgarg): Use SMIs if possible for address and count
126127
TNode<HeapNumber> address_heap = UncheckedCast<HeapNumber>(
127-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
128+
CallStub(AllocateHeapNumberDescriptor(), target, context));
128129
StoreHeapNumberValue(address_heap, ChangeUint32ToFloat64(address));
129130

130131
TNode<HeapNumber> count_heap = UncheckedCast<HeapNumber>(
131-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
132+
CallStub(AllocateHeapNumberDescriptor(), target, context));
132133
StoreHeapNumberValue(count_heap, ChangeUint32ToFloat64(count));
133134

134135
TNode<Smi> result_smi = UncheckedCast<Smi>(CallRuntimeWithCEntry(
135-
Runtime::kWasmAtomicNotify, centry, NoContextConstant(), instance,
136+
Runtime::kWasmAtomicNotify, centry, context, instance,
136137
address_heap, count_heap));
137138
ReturnRaw(SmiToInt32(result_smi));
138139
}
@@ -149,23 +150,24 @@ TF_BUILTIN(WasmI32AtomicWait, WasmBuiltinsAssembler){
149150
TNode<Code> centry = LoadCEntryFromInstance(instance);
150151

151152
TNode<Code> target = LoadBuiltinFromFrame(Builtins::kAllocateHeapNumber);
153+
TNode<Object> context = LoadContextFromInstance(instance);
152154

153155
// TODO(aseemgarg): Use SMIs if possible for address and expected_value
154156
TNode<HeapNumber> address_heap = UncheckedCast<HeapNumber>(
155-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
157+
CallStub(AllocateHeapNumberDescriptor(), target, context));
156158
StoreHeapNumberValue(address_heap, ChangeUint32ToFloat64(address));
157159

158160
TNode<HeapNumber> expected_value_heap = UncheckedCast<HeapNumber>(
159-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
161+
CallStub(AllocateHeapNumberDescriptor(), target, context));
160162
StoreHeapNumberValue(expected_value_heap,
161163
ChangeInt32ToFloat64(expected_value));
162164

163165
TNode<HeapNumber> timeout_heap = UncheckedCast<HeapNumber>(
164-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
166+
CallStub(AllocateHeapNumberDescriptor(), target, context));
165167
StoreHeapNumberValue(timeout_heap, timeout);
166168

167169
TNode<Smi> result_smi = UncheckedCast<Smi>(CallRuntimeWithCEntry(
168-
Runtime::kWasmI32AtomicWait, centry, NoContextConstant(), instance,
170+
Runtime::kWasmI32AtomicWait, centry, context, instance,
169171
address_heap, expected_value_heap, timeout_heap));
170172
ReturnRaw(SmiToInt32(result_smi));
171173
}
@@ -184,28 +186,29 @@ TF_BUILTIN(WasmI64AtomicWait, WasmBuiltinsAssembler){
184186
TNode<Code> centry = LoadCEntryFromInstance(instance);
185187

186188
TNode<Code> target = LoadBuiltinFromFrame(Builtins::kAllocateHeapNumber);
189+
TNode<Object> context = LoadContextFromInstance(instance);
187190

188191
// TODO(aseemgarg): Use SMIs if possible for address and expected_value
189192
TNode<HeapNumber> address_heap = UncheckedCast<HeapNumber>(
190-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
193+
CallStub(AllocateHeapNumberDescriptor(), target, context));
191194
StoreHeapNumberValue(address_heap, ChangeUint32ToFloat64(address));
192195

193196
TNode<HeapNumber> expected_value_high_heap = UncheckedCast<HeapNumber>(
194-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
197+
CallStub(AllocateHeapNumberDescriptor(), target, context));
195198
StoreHeapNumberValue(expected_value_high_heap,
196199
ChangeUint32ToFloat64(expected_value_high));
197200

198201
TNode<HeapNumber> expected_value_low_heap = UncheckedCast<HeapNumber>(
199-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
202+
CallStub(AllocateHeapNumberDescriptor(), target, context));
200203
StoreHeapNumberValue(expected_value_low_heap,
201204
ChangeUint32ToFloat64(expected_value_low));
202205

203206
TNode<HeapNumber> timeout_heap = UncheckedCast<HeapNumber>(
204-
CallStub(AllocateHeapNumberDescriptor(), target, NoContextConstant()));
207+
CallStub(AllocateHeapNumberDescriptor(), target, context));
205208
StoreHeapNumberValue(timeout_heap, timeout);
206209

207210
TNode<Smi> result_smi = UncheckedCast<Smi>(CallRuntimeWithCEntry(
208-
Runtime::kWasmI64AtomicWait, centry, NoContextConstant(), instance,
211+
Runtime::kWasmI64AtomicWait, centry, context, instance,
209212
address_heap, expected_value_high_heap, expected_value_low_heap,
210213
timeout_heap));
211214
ReturnRaw(SmiToInt32(result_smi));

‎deps/v8/src/compiler/heap-refs.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ class ContextRef : public HeapObjectRef{
389389
V(JSFunction, object_function) \
390390
V(JSFunction, promise_function) \
391391
V(JSFunction, promise_then) \
392+
V(JSFunction, regexp_function) \
392393
V(JSFunction, string_function) \
393394
V(JSFunction, symbol_function) \
394395
V(JSGlobalObject, global_object) \

‎deps/v8/src/compiler/js-call-reducer.cc‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7098,11 +7098,14 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node){
70987098
Node* control = NodeProperties::GetControlInput(node);
70997099
Node* regexp = NodeProperties::GetValueInput(node, 1);
71007100

7101+
// Only the initial JSRegExp map is valid here, since the following lastIndex
7102+
// check as well as the lowered builtin call rely on a known location of the
7103+
// lastIndex field.
7104+
Handle<Map> regexp_initial_map =
7105+
native_context().regexp_function().initial_map().object();
7106+
71017107
MapInference inference(broker(), regexp, effect);
7102-
if (!inference.HaveMaps() ||
7103-
!inference.AllOfInstanceTypes(InstanceTypeChecker::IsJSRegExp)){
7104-
return inference.NoChange();
7105-
}
7108+
if (!inference.Is(regexp_initial_map)) return inference.NoChange();
71067109
MapHandles const& regexp_maps = inference.GetMaps();
71077110

71087111
ZoneVector<PropertyAccessInfo> access_infos(graph()->zone());

‎deps/v8/src/compiler/map-inference.cc‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ MapHandles const& MapInference::GetMaps(){
9191
return maps_;
9292
}
9393

94+
boolMapInference::Is(Handle<Map> expected_map){
95+
if (!HaveMaps()) returnfalse;
96+
const MapHandles& maps = GetMaps();
97+
if (maps.size() != 1) returnfalse;
98+
return maps[0].equals(expected_map);
99+
}
100+
94101
voidMapInference::InsertMapChecks(JSGraph* jsgraph, Node** effect,
95102
Node* control,
96103
const FeedbackSource& feedback){

‎deps/v8/src/compiler/map-inference.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class MapInference{
5555
V8_WARN_UNUSED_RESULT MapHandles const& GetMaps();
5656
V8_WARN_UNUSED_RESULT boolAllOfInstanceTypes(
5757
std::function<bool(InstanceType)> f);
58+
V8_WARN_UNUSED_RESULT boolIs(Handle<Map> expected_map);
5859

5960
// These methods provide a guard.
6061
//
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2019 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
//
5+
// Flags: --allow-natives-syntax
6+
7+
functionf(){
8+
returnr.test("abc");
9+
}
10+
11+
functionto_dict(o){
12+
r.a=42;
13+
r.b=42;
14+
deleter.a;
15+
}
16+
17+
functionto_fast(o){
18+
constobj={};
19+
constobj2={};
20+
deleteo.a;
21+
obj.__proto__=o;
22+
obj[0]=1;
23+
obj.__proto__=obj2;
24+
deleteobj[0];
25+
returno;
26+
}
27+
28+
// Shrink the instance size by first transitioning to dictionary properties,
29+
// then back to fast properties.
30+
constr=/./;
31+
to_dict(r);
32+
to_fast(r);
33+
34+
%PrepareFunctionForOptimization(f);
35+
assertTrue(f());
36+
%OptimizeFunctionOnNextCall(f);
37+
assertTrue(f());

0 commit comments

Comments
(0)