Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: upgrade to V8 5.0.71.34 #6320

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Expand Up @@ -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.)
Expand Down
6 changes: 5 additions & 1 deletion deps/v8/src/parsing/pattern-rewriter.cc
Expand Up @@ -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;
Expand Down
57 changes: 57 additions & 0 deletions deps/v8/test/mjsunit/harmony/destructuring.js
Expand Up @@ -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';"+
Expand Down