Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 70f6e6150c6b94bc94c2b43b854bad4c7a1096a4..c8ea07da29b0e7293bafb9fff7fcef71a03dbe3c 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -696,10 +696,11 @@ HValue* CodeStubGraphBuilder<GrowArrayElementsStub>::BuildCodeStub() { |
HValue* object = GetParameter(GrowArrayElementsDescriptor::kObjectIndex); |
HValue* key = GetParameter(GrowArrayElementsDescriptor::kKeyIndex); |
- HValue* current_capacity = |
- GetParameter(GrowArrayElementsDescriptor::kCapacityIndex); |
HValue* elements = AddLoadElements(object); |
+ HValue* current_capacity = Add<HLoadNamedField>( |
+ elements, nullptr, HObjectAccess::ForFixedArrayLength()); |
+ |
HValue* length = |
casted_stub()->is_js_array() |
? Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), |