Add rest deoptimization fixtures.
(Failing.) Commit message edited by @jmm.
This commit is contained in:
parent
a5ed818a55
commit
a82bf11e2a
@ -44,3 +44,33 @@ var b = function (foo, baz, ...bar) {
|
||||
function x (...rest) {
|
||||
rest[0] = 0;
|
||||
}
|
||||
|
||||
function swap (...rest) {
|
||||
[rest[0], rest[1]] = [rest[1], rest[0]];
|
||||
}
|
||||
|
||||
function forIn (...rest) {
|
||||
for (rest[0] in this) {
|
||||
foo(rest[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function inc (...rest) {
|
||||
++rest[0];
|
||||
}
|
||||
|
||||
function dec (...rest) {
|
||||
--rest[0];
|
||||
}
|
||||
|
||||
function del (...rest) {
|
||||
delete rest[0];
|
||||
}
|
||||
|
||||
function method (...rest) {
|
||||
rest[0]();
|
||||
}
|
||||
|
||||
function newExp (...rest) {
|
||||
new rest[0]();
|
||||
}
|
||||
|
||||
@ -77,3 +77,21 @@ function x() {
|
||||
|
||||
rest[0] = 0;
|
||||
}
|
||||
|
||||
function swap() {
|
||||
for (var _len9 = arguments.length, rest = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
||||
rest[_key9] = arguments[_key9];
|
||||
}
|
||||
|
||||
[rest[0], rest[1]] = [rest[1], rest[0]];
|
||||
}
|
||||
|
||||
function x() {
|
||||
for (var _len10 = arguments.length, rest = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
||||
rest[_key10] = arguments[_key10];
|
||||
}
|
||||
|
||||
for (rest[0] in this) {
|
||||
foo(rest[0]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user