aboutsummaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorMichaël Zasso <mic.besace@gmail.com>2015-11-06 21:12:49 +0100
committerMichaël Zasso <mic.besace@gmail.com>2015-11-11 08:17:17 +0100
commit2930867a2be64a1b2ae2337bd564d73abc07e65b (patch)
tree2011b4e5c07b465622afae5589b4cb730f2e313b /deps
parent25cd455407e78a77eaf96f4057e480451f84bd46 (diff)
downloadandroid-node-v8-2930867a2be64a1b2ae2337bd564d73abc07e65b.tar.gz
android-node-v8-2930867a2be64a1b2ae2337bd564d73abc07e65b.tar.bz2
android-node-v8-2930867a2be64a1b2ae2337bd564d73abc07e65b.zip
deps: update V8 to 4.6.85.31
This update contains the patch floated in https://github.com/nodejs/node/issues/3390 and a fix for Intl.NumberFormat. Diff: https://chromium.googlesource.com/v8/v8.git/+/4.6.85.28..4.6.85.31 PR-URL: https://github.com/nodejs/node/pull/3698 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/include/v8-version.h2
-rw-r--r--deps/v8/src/arm64/lithium-codegen-arm64.cc2
-rw-r--r--deps/v8/src/i18n.js7
-rwxr-xr-xdeps/v8/test/intl/number-format/check-minimum-fraction-digits.js52
-rw-r--r--deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js34
5 files changed, 91 insertions, 6 deletions
diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h
index 3cbc65c53a..7744c089f6 100644
--- a/deps/v8/include/v8-version.h
+++ b/deps/v8/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 6
#define V8_BUILD_NUMBER 85
-#define V8_PATCH_LEVEL 28
+#define V8_PATCH_LEVEL 31
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/deps/v8/src/arm64/lithium-codegen-arm64.cc b/deps/v8/src/arm64/lithium-codegen-arm64.cc
index 3dff64cbe8..32650e7ab0 100644
--- a/deps/v8/src/arm64/lithium-codegen-arm64.cc
+++ b/deps/v8/src/arm64/lithium-codegen-arm64.cc
@@ -2819,6 +2819,8 @@ void LCodeGen::DoDoubleToIntOrSmi(LDoubleToIntOrSmi* instr) {
void LCodeGen::DoDrop(LDrop* instr) {
__ Drop(instr->count());
+
+ RecordPushedArgumentsDelta(instr->hydrogen_value()->argument_delta());
}
diff --git a/deps/v8/src/i18n.js b/deps/v8/src/i18n.js
index 5fd32c8b40..b825ece6bc 100644
--- a/deps/v8/src/i18n.js
+++ b/deps/v8/src/i18n.js
@@ -1103,14 +1103,15 @@ function initializeNumberFormat(numberFormat, locales, options) {
var mnfd = options['minimumFractionDigits'];
var mxfd = options['maximumFractionDigits'];
- if (!IS_UNDEFINED(mnfd) || !internalOptions.style === 'currency') {
+ if (!IS_UNDEFINED(mnfd) || internalOptions.style !== 'currency') {
mnfd = getNumberOption(options, 'minimumFractionDigits', 0, 20, 0);
defineWEProperty(internalOptions, 'minimumFractionDigits', mnfd);
}
- if (!IS_UNDEFINED(mxfd) || !internalOptions.style === 'currency') {
+ if (!IS_UNDEFINED(mxfd) || internalOptions.style !== 'currency') {
+ var min_mxfd = internalOptions.style === 'percent' ? 0 : 3;
mnfd = IS_UNDEFINED(mnfd) ? 0 : mnfd;
- fallback_limit = (mnfd > 3) ? mnfd : 3;
+ fallback_limit = (mnfd > min_mxfd) ? mnfd : min_mxfd;
mxfd = getNumberOption(options, 'maximumFractionDigits', mnfd, 20, fallback_limit);
defineWEProperty(internalOptions, 'maximumFractionDigits', mxfd);
}
diff --git a/deps/v8/test/intl/number-format/check-minimum-fraction-digits.js b/deps/v8/test/intl/number-format/check-minimum-fraction-digits.js
index 57e65be55e..b7d41dfca1 100755
--- a/deps/v8/test/intl/number-format/check-minimum-fraction-digits.js
+++ b/deps/v8/test/intl/number-format/check-minimum-fraction-digits.js
@@ -2,8 +2,56 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Make sure minimumFractionDigits is honored
+// Make sure minimumFractionDigits and maximumFractionDigits are honored
-var nf = new Intl.NumberFormat("en-us",{ useGrouping: false, minimumFractionDigits: 4});
+var nf = new Intl.NumberFormat("en-us", { useGrouping: false, minimumFractionDigits: 4, maximumFractionDigits: 8});
assertEquals("12345.6789", nf.format(12345.6789));
+assertEquals("12345.678912", nf.format(12345.678912));
+assertEquals("12345.6700", nf.format(12345.67));
+assertEquals("12345.67891234", nf.format(12345.6789123421));
+
+nf = new Intl.NumberFormat("en-us", { useGrouping: false, minimumFractionDigits: 4, maximumFractionDigits: 8, style: 'percent'});
+
+assertEquals("12345.6789%", nf.format(123.456789));
+assertEquals("12345.678912%", nf.format(123.45678912));
+assertEquals("12345.6700%", nf.format(123.4567));
+assertEquals("12345.67891234%", nf.format(123.456789123421));
+
+nf = new Intl.NumberFormat('en', {minimumFractionDigits: 4, maximumFractionDigits: 8, style: 'currency', currency: 'USD'});
+
+assertEquals("$54,306.404797", nf.format(54306.4047970));
+assertEquals("$54,306.4000", nf.format(54306.4));
+assertEquals("$54,306.40000001", nf.format(54306.400000011));
+
+// Ensure that appropriate defaults exist when minimum and maximum are not specified
+
+nf = new Intl.NumberFormat("en-us", { useGrouping: false });
+
+assertEquals("12345.679", nf.format(12345.6789));
+assertEquals("12345.679", nf.format(12345.678912));
+assertEquals("12345.67", nf.format(12345.6700));
+assertEquals("12345", nf.format(12345));
+assertEquals("12345.679", nf.format(12345.6789123421));
+
+nf = new Intl.NumberFormat("en-us", { useGrouping: false, style: 'percent'});
+
+assertEquals("12346%", nf.format(123.456789));
+assertEquals("12346%", nf.format(123.45678912));
+assertEquals("12346%", nf.format(123.456700));
+assertEquals("12346%", nf.format(123.456789123421));
+assertEquals("12345%", nf.format(123.45));
+
+// For currency, the minimum or the maximum can be overwritten individually
+
+nf = new Intl.NumberFormat('en', {minimumFractionDigits: 0, style: 'currency', currency: 'USD'});
+
+assertEquals("$54,306.4", nf.format(54306.4047970));
+assertEquals("$54,306.4", nf.format(54306.4));
+assertEquals("$54,306", nf.format(54306));
+
+nf = new Intl.NumberFormat('en', {maximumFractionDigits: 3, style: 'currency', currency: 'USD'});
+
+assertEquals("$54,306.405", nf.format(54306.4047970));
+assertEquals("$54,306.40", nf.format(54306.4));
+assertEquals("$54,306.00", nf.format(54306));
diff --git a/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js b/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js
new file mode 100644
index 0000000000..1791b24843
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js
@@ -0,0 +1,34 @@
+// Copyright 2015 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
+
+"use strict";
+
+function Message(message) {
+ this.message = message;
+}
+
+function Inlined(input) {
+ var dummy = arguments[1] === undefined;
+ if (input instanceof Message) {
+ return input;
+ }
+ print("unreachable, but we must create register allocation complexity");
+ return [];
+}
+
+function Process(input) {
+ var ret = [];
+ ret.push(Inlined(input[0], 1, 2));
+ return ret;
+}
+
+var input = [new Message("TEST PASS")];
+
+Process(input);
+Process(input);
+%OptimizeFunctionOnNextCall(Process);
+var result = Process(input);
+assertEquals("TEST PASS", result[0].message);