summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2016-04-20 17:29:08 -0700
committerAli Ijaz Sheikh <ofrobots@google.com>2016-04-21 10:04:02 -0700
commit49e42c530ba4ef2a0b580b8a64ba93511a378b75 (patch)
tree50337b1f74571554e29ed66eac1eb557b007ce2d /deps
parenta770a163abea062a7322e11ed2989c4c26844ce8 (diff)
downloadandroid-node-v8-49e42c530ba4ef2a0b580b8a64ba93511a378b75.tar.gz
android-node-v8-49e42c530ba4ef2a0b580b8a64ba93511a378b75.tar.bz2
android-node-v8-49e42c530ba4ef2a0b580b8a64ba93511a378b75.zip
deps: upgrade to V8 5.0.71.34
Pick up the latest bug fix from the V8 5.0 branch. Original commit message: V8-Commit: https://github.com/v8/v8/commit/c36773f Version 5.0.71.34 (cherry-pick) Merged 9acbca1 [es6] Fix bug in pattern re-writing BUG=v8:4891 LOG=N R=littledan@chromium.org Review URL: https://codereview.chromium.org/1906633002 . PR-URL: https://github.com/nodejs/node/pull/6320 Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: targos - Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/include/v8-version.h2
-rw-r--r--deps/v8/src/parsing/pattern-rewriter.cc6
-rw-r--r--deps/v8/test/mjsunit/harmony/destructuring.js57
3 files changed, 63 insertions, 2 deletions
diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h
index 1c3e60f95e..764cbc55ec 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 0
#define V8_BUILD_NUMBER 71
-#define V8_PATCH_LEVEL 33
+#define V8_PATCH_LEVEL 34
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/deps/v8/src/parsing/pattern-rewriter.cc b/deps/v8/src/parsing/pattern-rewriter.cc
index 04b517ebba..768a948863 100644
--- a/deps/v8/src/parsing/pattern-rewriter.cc
+++ b/deps/v8/src/parsing/pattern-rewriter.cc
@@ -77,7 +77,11 @@ bool Parser::PatternRewriter::IsBindingContext(PatternContext c) const {
Parser::PatternRewriter::PatternContext
Parser::PatternRewriter::SetAssignmentContextIfNeeded(Expression* node) {
PatternContext old_context = context();
- if (node->IsAssignment() && node->AsAssignment()->op() == Token::ASSIGN) {
+ // AssignmentExpressions may occur in the Initializer position of a
+ // SingleNameBinding. Such expressions should not prompt a change in the
+ // pattern's context.
+ if (node->IsAssignment() && node->AsAssignment()->op() == Token::ASSIGN &&
+ !IsInitializerContext()) {
set_context(ASSIGNMENT);
}
return old_context;
diff --git a/deps/v8/test/mjsunit/harmony/destructuring.js b/deps/v8/test/mjsunit/harmony/destructuring.js
index b6eb6eab09..e84abd112f 100644
--- a/deps/v8/test/mjsunit/harmony/destructuring.js
+++ b/deps/v8/test/mjsunit/harmony/destructuring.js
@@ -263,6 +263,63 @@
}());
+(function TestAssignmentExprInInitializers() {
+ {
+ let x, y;
+ {
+ let { x = y = 1 } = {};
+ assertSame(x, 1);
+ assertSame(y, 1);
+ }
+ assertSame(undefined, x);
+ assertSame(1, y);
+ }
+
+ {
+ let x, y;
+ {
+ let { x: x = y = 1 } = {};
+ assertSame(1, x);
+ assertSame(1, y);
+ }
+ assertSame(undefined, x);
+ assertSame(1, y);
+ }
+
+ {
+ let x, y;
+ {
+ let [ x = y = 1 ] = [];
+ assertSame(1, x);
+ assertSame(1, y);
+ }
+ assertSame(undefined, x);
+ assertSame(1, y);
+ }
+
+ {
+ let x, y;
+ (function({ x = y = 1 }) {}({}));
+ assertSame(undefined, x);
+ assertSame(1, y);
+ }
+
+ {
+ let x, y;
+ (function({ x: x = y = 1 }) {}({}));
+ assertSame(undefined, x);
+ assertSame(1, y);
+ }
+
+ {
+ let x, y;
+ (function([ x = y = 1 ]) {}([]));
+ assertSame(undefined, x);
+ assertSame(1, y);
+ }
+}());
+
+
(function TestMultipleAccesses() {
assertThrows(
"'use strict';"+