From da9304607cb9853d57d14d391e9c9bb9ad48162d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 19 Jun 2017 11:18:55 +0200 Subject: [PATCH] deps: update V8 to 5.9.211.37 PR-URL: https://github.com/nodejs/node/pull/13790 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/compiler/escape-analysis.cc | 7 +++++ .../mjsunit/compiler/escape-analysis-17.js | 27 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-17.js diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 277f1d929f384d..0d920efac46d52 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 9 #define V8_BUILD_NUMBER 211 -#define V8_PATCH_LEVEL 35 +#define V8_PATCH_LEVEL 37 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/compiler/escape-analysis.cc b/deps/v8/src/compiler/escape-analysis.cc index 2e0adc6f85a0ea..75a73ffce9be8e 100644 --- a/deps/v8/src/compiler/escape-analysis.cc +++ b/deps/v8/src/compiler/escape-analysis.cc @@ -853,6 +853,13 @@ bool EscapeStatusAnalysis::CheckUsesForEscape(Node* uses, Node* rep, case IrOpcode::kObjectIsString: case IrOpcode::kObjectIsSymbol: case IrOpcode::kObjectIsUndetectable: + case IrOpcode::kNumberLessThan: + case IrOpcode::kNumberLessThanOrEqual: + case IrOpcode::kNumberEqual: +#define CASE(opcode) case IrOpcode::k##opcode: + SIMPLIFIED_NUMBER_BINOP_LIST(CASE) + SIMPLIFIED_NUMBER_UNOP_LIST(CASE) +#undef CASE if (SetEscaped(rep)) { TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", rep->id(), rep->op()->mnemonic(), use->id(), diff --git a/deps/v8/test/mjsunit/compiler/escape-analysis-17.js b/deps/v8/test/mjsunit/compiler/escape-analysis-17.js new file mode 100644 index 00000000000000..5709d47129ebd7 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/escape-analysis-17.js @@ -0,0 +1,27 @@ +// Copyright 2017 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 --turbo-escape + +function foo() { + var a = {x:1}; + var b = {x:1.5, y: 1}; + var x = 0; + for (var i = 0; i < 1; i = {}) { + // The second iteration of this loop is dead code, leading to a + // contradiction between dynamic and static information. + x += a.x + 0.5; + x += a.x % 0.5; + x += Math.abs(a.x); + x += a.x < 6; + x += a.x === 7; + x += a.x <= 8; + a = b; + } + return x; +} +foo(); +foo(); +%OptimizeFunctionOnNextCall(foo); +foo();