| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index 06846ffb8f5c431c938beb5ced8bb0f2ad55d0b2..c9e4c0f21974a8983024e4bc0b4f1415cccc87e1 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -541,17 +541,19 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
|
| }
|
| }
|
| Handle<Object> boilerplate_value = GetBoilerplateValue(element, isolate);
|
| +
|
| if (boilerplate_value->IsTheHole()) {
|
| is_holey = true;
|
| - } else if (boilerplate_value->IsUninitialized()) {
|
| + continue;
|
| + }
|
| +
|
| + if (boilerplate_value->IsUninitialized()) {
|
| + boilerplate_value = handle(Smi::FromInt(0), isolate);
|
| is_simple = false;
|
| - JSObject::SetOwnElement(array, array_index,
|
| - handle(Smi::FromInt(0), isolate),
|
| - SLOPPY).Assert();
|
| - } else {
|
| - JSObject::SetOwnElement(array, array_index, boilerplate_value, SLOPPY)
|
| - .Assert();
|
| }
|
| +
|
| + JSObject::AddDataElement(array, array_index, boilerplate_value, NONE)
|
| + .Assert();
|
| }
|
|
|
| if (array_index != values()->length()) {
|
|
|