| Index: src/ast/ast.cc
|
| diff --git a/src/ast/ast.cc b/src/ast/ast.cc
|
| index 068b36c7438cb3430d1d90d25e2b7183f294f7b6..3307bff78958f04e31d1c1b286210f7e1c756798 100644
|
| --- a/src/ast/ast.cc
|
| +++ b/src/ast/ast.cc
|
| @@ -497,10 +497,11 @@ void ObjectLiteral::BuildConstantProperties(Isolate* isolate) {
|
|
|
|
|
| void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
|
| + DCHECK_LT(first_spread_index_, 0);
|
| +
|
| if (!constant_elements_.is_null()) return;
|
|
|
| - int constants_length =
|
| - first_spread_index_ >= 0 ? first_spread_index_ : values()->length();
|
| + int constants_length = values()->length();
|
|
|
| // Allocate a fixed array to hold all the object literals.
|
| Handle<JSArray> array = isolate->factory()->NewJSArray(
|
|
|