Index: src/builtins/builtins-internal.cc |
diff --git a/src/builtins/builtins-internal.cc b/src/builtins/builtins-internal.cc |
index 87c5dd549c3655f9de133b14660d65af9a68f01b..b5858c64927e9849809cad4ff77fe0b3407d7ca7 100644 |
--- a/src/builtins/builtins-internal.cc |
+++ b/src/builtins/builtins-internal.cc |
@@ -64,12 +64,9 @@ void Builtins::Generate_CopyFastSmiOrObjectElements( |
// Load the {object}s elements. |
Node* source = assembler->LoadObjectField(object, JSObject::kElementsOffset); |
- CodeStubAssembler::ParameterMode mode = |
- assembler->Is64() ? CodeStubAssembler::INTEGER_PARAMETERS |
- : CodeStubAssembler::SMI_PARAMETERS; |
- Node* length = (mode == CodeStubAssembler::INTEGER_PARAMETERS) |
- ? assembler->LoadAndUntagFixedArrayBaseLength(source) |
- : assembler->LoadFixedArrayBaseLength(source); |
+ CodeStubAssembler::ParameterMode mode = assembler->OptimalParameterMode(); |
+ Node* length = assembler->UntagParameter( |
+ assembler->LoadFixedArrayBaseLength(source), mode); |
// Check if we can allocate in new space. |
ElementsKind kind = FAST_ELEMENTS; |