Skip to content

Commit

Permalink
deps: patch V8 to 9.0.257.16
Browse files Browse the repository at this point in the history
Refs: v8/v8@9.0.257.13...9.0.257.16

PR-URL: #38218
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
  • Loading branch information
targos authored and BethGriggs committed Apr 15, 2021
1 parent ba20adf commit d255bff
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 17 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 9
#define V8_MINOR_VERSION 0
#define V8_BUILD_NUMBER 257
#define V8_PATCH_LEVEL 13
#define V8_PATCH_LEVEL 16

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
8 changes: 8 additions & 0 deletions deps/v8/src/compiler/js-call-reducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4907,6 +4907,14 @@ Reduction JSCallReducer::ReduceStringPrototypeIndexOf(Node* node) {
Node* position = n.Argument(1);
new_position = effect = graph()->NewNode(
simplified()->CheckSmi(p.feedback()), position, effect, control);

Node* receiver_length =
graph()->NewNode(simplified()->StringLength(), new_receiver);
new_position = graph()->NewNode(
simplified()->NumberMin(),
graph()->NewNode(simplified()->NumberMax(), new_position,
jsgraph()->ZeroConstant()),
receiver_length);
}

NodeProperties::ReplaceEffectInput(node, effect);
Expand Down
11 changes: 9 additions & 2 deletions deps/v8/src/debug/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1641,8 +1641,15 @@ Handle<Object> Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
UnoptimizedCompileFlags::ForScriptCompile(isolate_, *script);
ParseInfo parse_info(isolate_, flags, &compile_state);
IsCompiledScope is_compiled_scope;
Compiler::CompileToplevel(&parse_info, script, isolate_,
&is_compiled_scope);
const MaybeHandle<SharedFunctionInfo> maybe_result =
Compiler::CompileToplevel(&parse_info, script, isolate_,
&is_compiled_scope);
if (maybe_result.is_null()) {
if (isolate_->has_pending_exception()) {
isolate_->clear_pending_exception();
}
break;
}
continue;
}
// We found it if it's already compiled.
Expand Down
9 changes: 2 additions & 7 deletions deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h
Original file line number Diff line number Diff line change
Expand Up @@ -4027,13 +4027,8 @@ void LiftoffAssembler::emit_i64x2_mul(LiftoffRegister dst, LiftoffRegister lhs,
Pmuludq(tmp2.fp(), tmp2.fp(), lhs.fp());
Paddq(tmp2.fp(), tmp2.fp(), tmp1.fp());
Psllq(tmp2.fp(), tmp2.fp(), 32);
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
vpmuludq(dst.fp(), lhs.fp(), rhs.fp());
} else {
if (dst.fp() != lhs.fp()) movaps(dst.fp(), lhs.fp());
pmuludq(dst.fp(), rhs.fp());
}
liftoff::EmitSimdCommutativeBinOp<&Assembler::vpmuludq, &Assembler::pmuludq>(
this, dst, lhs, rhs);
Paddq(dst.fp(), dst.fp(), tmp2.fp());
}

Expand Down
9 changes: 2 additions & 7 deletions deps/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3559,13 +3559,8 @@ void LiftoffAssembler::emit_i64x2_mul(LiftoffRegister dst, LiftoffRegister lhs,
Pmuludq(tmp2.fp(), lhs.fp());
Paddq(tmp2.fp(), tmp1.fp());
Psllq(tmp2.fp(), 32);
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
vpmuludq(dst.fp(), lhs.fp(), rhs.fp());
} else {
if (dst.fp() != lhs.fp()) movaps(dst.fp(), lhs.fp());
pmuludq(dst.fp(), rhs.fp());
}
liftoff::EmitSimdCommutativeBinOp<&Assembler::vpmuludq, &Assembler::pmuludq>(
this, dst, lhs, rhs);
Paddq(dst.fp(), tmp2.fp());
}

Expand Down
25 changes: 25 additions & 0 deletions deps/v8/test/mjsunit/regress/regress-1194869.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --allow-natives-syntax --no-lazy-feedback-allocation
// Flags: --interrupt-budget=100

function f() {
return "".indexOf("", 2);
}

%PrepareFunctionForOptimization(f)
assertEquals(f(), 0);
assertEquals(f(), 0);
%OptimizeFunctionOnNextCall(f)
assertEquals(f(), 0);
assertEquals(f(), 0);

function g() {
return "".indexOf("", 2);
}
for (let i = 0; i < 191; i++) {
// Expect a natural optimization here due to low interrupt budget.
assertEquals(g(), 0);
}

0 comments on commit d255bff

Please sign in to comment.