| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index f7eab6ec710dd438fbe3d9095e90f5e00e086d85..5d76efd6be2c4f090af6e38e92fe25022d634ce3 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -548,6 +548,9 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
|
| }
|
| JSObject::ValidateElements(array);
|
| Handle<FixedArrayBase> element_values(array->elements());
|
| + if (array_index != values()->length()) {
|
| + element_values->set_length(array_index);
|
| + }
|
|
|
| // Simple and shallow arrays can be lazily copied, we transform the
|
| // elements array to a copy-on-write array.
|
|
|