deopt array unpack optimisation on member expressions - fixes #1241

This commit is contained in:
Sebastian McKenzie
2015-04-12 20:59:17 -07:00
parent 61b57ea055
commit 8a0317132e
4 changed files with 15 additions and 4 deletions

View File

@@ -8,3 +8,4 @@ var [[a, b, ...c]] = [[1, 2, 3, 4]];
var [a, b] = [1, 2, 3];
var [[a, b]] = [[1, 2, 3]];
var [a, b] = [a, b];
[a[0], a[1]] = [a[1], a[0]];

View File

@@ -22,3 +22,7 @@ var b = _ref2[1];
var _ref3 = [a, b];
var a = _ref3[0];
var b = _ref3[1];
var _temp = [a[1], a[0]];
a[0] = _temp[0];
a[1] = _temp[1];
_temp;

View File

@@ -1,6 +1,7 @@
"use strict";
foo.foo = 1;
foo.bar = 2;
var _ref = [1, 2];
foo.foo = _ref[0];
foo.bar = _ref[1];
;