| Index: src/full-codegen/x87/full-codegen-x87.cc
|
| diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
|
| index c38230ad1e5d2c409536285dce91e0fa7dfc5c9c..3cdfe0cf2e303849a3ef43a4502cb5a679fc4a3f 100644
|
| --- a/src/full-codegen/x87/full-codegen-x87.cc
|
| +++ b/src/full-codegen/x87/full-codegen-x87.cc
|
| @@ -1628,7 +1628,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| int array_index = 0;
|
| for (; array_index < length; array_index++) {
|
| Expression* subexpr = subexprs->at(array_index);
|
| - if (subexpr->IsSpread()) break;
|
| + DCHECK(!subexpr->IsSpread());
|
|
|
| // If the subexpression is a literal or a simple materialized literal it
|
| // is already set in the cloned array.
|
| @@ -1663,14 +1663,9 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| Expression* subexpr = subexprs->at(array_index);
|
|
|
| __ Push(eax);
|
| - if (subexpr->IsSpread()) {
|
| - VisitForStackValue(subexpr->AsSpread()->expression());
|
| - __ InvokeBuiltin(Context::CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX,
|
| - CALL_FUNCTION);
|
| - } else {
|
| - VisitForStackValue(subexpr);
|
| - __ CallRuntime(Runtime::kAppendElement);
|
| - }
|
| + DCHECK(!subexpr->IsSpread());
|
| + VisitForStackValue(subexpr);
|
| + __ CallRuntime(Runtime::kAppendElement);
|
|
|
| PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
|
| }
|
|
|