Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 86c525d7f63e034af66868d20a94b34338cf6d3a..180198b74d67d67b3ac7934721597c439e2f9c8c 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -1705,6 +1705,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(); |
@@ -1737,7 +1741,8 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
__ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); |
__ push(Immediate(Smi::FromInt(expr->literal_index()))); |
__ push(Immediate(constant_elements)); |
- __ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
+ __ push(Immediate(Smi::FromInt(flags))); |
+ __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
} else { |
ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
FLAG_smi_only_arrays); |