Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 71b54680f2035d352122fe631018cdd09b8590cc..3414b7b7452466352e6d4ac304aeda56fe95891e 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1726,6 +1726,10 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
Comment cmnt(masm_, "[ ArrayLiteral"); |
expr->BuildConstantElements(isolate()); |
+ int flags = expr->depth() == 1 |
+ ? ArrayLiteral::kShallowElements |
+ : ArrayLiteral::kNoFlags; |
+ |
ZoneList<Expression*>* subexprs = expr->values(); |
int length = subexprs->length(); |
Handle<FixedArray> constant_elements = expr->constant_elements(); |
@@ -1758,7 +1762,8 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
__ Push(Smi::FromInt(expr->literal_index())); |
__ Push(constant_elements); |
- __ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
+ __ Push(Smi::FromInt(flags)); |
+ __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
} else { |
ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
FLAG_smi_only_arrays); |