Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index f463dddd3f9e419b45ab1938d2b00ffbcc7049ba..c56cfba8c7e2db77f7a99b0e9c34842f2a56804a 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2517,19 +2517,10 @@ void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag, |
// You can't call a builtin without a valid frame. |
DCHECK(flag == JUMP_FUNCTION || has_frame()); |
- // Always initialize new target. |
- LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
- |
+ // Fake a parameter count to avoid emitting code to do the check. |
+ ParameterCount expected(0); |
LoadNativeContextSlot(native_context_index, r1); |
- ldr(r2, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); |
- if (flag == CALL_FUNCTION) { |
- call_wrapper.BeforeCall(CallSize(r2)); |
- Call(r2); |
- call_wrapper.AfterCall(); |
- } else { |
- DCHECK(flag == JUMP_FUNCTION); |
- Jump(r2); |
- } |
+ InvokeFunctionCode(r1, no_reg, expected, expected, flag, call_wrapper); |
} |