Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index b5288801edbaccefac4d7679939429afc2b40906..904072897cfeda499460f4631ae603c32e7fa1e9 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -2342,19 +2342,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(r6, Heap::kUndefinedValueRootIndex); |
- |
+ // Fake a parameter count to avoid emitting code to do the check. |
+ ParameterCount expected(0); |
LoadNativeContextSlot(native_context_index, r4); |
- LoadP(ip, FieldMemOperand(r4, JSFunction::kCodeEntryOffset)); |
- if (flag == CALL_FUNCTION) { |
- call_wrapper.BeforeCall(CallSize(ip)); |
- CallJSEntry(ip); |
- call_wrapper.AfterCall(); |
- } else { |
- DCHECK(flag == JUMP_FUNCTION); |
- JumpToJSEntry(ip); |
- } |
+ InvokeFunctionCode(r4, no_reg, expected, expected, flag, call_wrapper); |
} |