diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 7e869065a23992..e5641f118aeceb 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 7 #define V8_MINOR_VERSION 4 #define V8_BUILD_NUMBER 288 -#define V8_PATCH_LEVEL 17 +#define V8_PATCH_LEVEL 18 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/compiler/typed-optimization.cc b/deps/v8/src/compiler/typed-optimization.cc index 9b0df88da3bcdd..a555d7f63be606 100644 --- a/deps/v8/src/compiler/typed-optimization.cc +++ b/deps/v8/src/compiler/typed-optimization.cc @@ -727,7 +727,7 @@ Reduction TypedOptimization::ReduceSpeculativeNumberAdd(Node* node) { Node* const value = graph()->NewNode(simplified()->NumberAdd(), toNum_lhs, toNum_rhs); ReplaceWithValue(node, value); - return Replace(node); + return Replace(value); } return NoChange(); } @@ -796,7 +796,7 @@ Reduction TypedOptimization::ReduceSpeculativeNumberBinop(Node* node) { NumberOpFromSpeculativeNumberOp(simplified(), node->op()), toNum_lhs, toNum_rhs); ReplaceWithValue(node, value); - return Replace(node); + return Replace(value); } return NoChange(); } @@ -811,7 +811,7 @@ Reduction TypedOptimization::ReduceSpeculativeNumberComparison(Node* node) { Node* const value = graph()->NewNode( NumberOpFromSpeculativeNumberOp(simplified(), node->op()), lhs, rhs); ReplaceWithValue(node, value); - return Replace(node); + return Replace(value); } return NoChange(); } diff --git a/deps/v8/test/mjsunit/compiler/regress-945644.js b/deps/v8/test/mjsunit/compiler/regress-945644.js new file mode 100644 index 00000000000000..2cb8839d862549 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/regress-945644.js @@ -0,0 +1,23 @@ +// Copyright 2019 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 + +function f(v5,v6) { + const v16 = [1337,1337,-765470.5051836492]; + let v19 = 0; + do { + const v20 = v19 + 1; + const v22 = Math.fround(v20); + v19 = v22; + const v23 = [v20, v22]; + function v24() { v20; v22; } + const v33 = v16.indexOf(v19); + } while (v19 < 6); +} + +f(); +Array.prototype.push(8); +%OptimizeFunctionOnNextCall(f); +f();