Index: src/ast/ast.cc |
diff --git a/src/ast/ast.cc b/src/ast/ast.cc |
index fbc70c2abfaacf171fcea5b67b7c40beb7fa71b7..4ec0a9f8f95e344f595b3e02aa7e1fbd20546006 100644 |
--- a/src/ast/ast.cc |
+++ b/src/ast/ast.cc |
@@ -645,11 +645,9 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) { |
accessor->CopyElements(fixed_array, from_kind, elements, constants_length); |
} |
- // Remember both the literal's constant values as well as the ElementsKind |
- // in a 2-element FixedArray. |
- Handle<FixedArray> literals = isolate->factory()->NewFixedArray(2, TENURED); |
- literals->set(0, Smi::FromInt(kind)); |
- literals->set(1, *elements); |
+ // Remember both the literal's constant values as well as the ElementsKind. |
+ Handle<ConstantElementsPair> literals = |
+ isolate->factory()->NewConstantElementsPair(kind, elements); |
constant_elements_ = literals; |
set_is_simple(is_simple); |