Index: src/arm64/builtins-arm64.cc |
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc |
index 2c7aaaef0dfa5edc5920b4b75e9bfbf2c86644ac..b7be9743292ee3e1d1331d9e7fa7d4bd8addec8c 100644 |
--- a/src/arm64/builtins-arm64.cc |
+++ b/src/arm64/builtins-arm64.cc |
@@ -1677,8 +1677,14 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) { |
__ Cmp(x5, JS_PROXY_TYPE); |
__ B(ne, &non_function); |
- // 1. Call to proxy. |
- // TODO(neis): This doesn't match the ES6 spec for [[Call]] on proxies. |
+ // 1. Runtime fallback for Proxy [[Call]]. |
+ __ Push(x1); |
+ // Increase the arguments size to include the pushed function and the |
+ // existing receiver on the stack. |
+ __ Add(x0, x0, Operand(2)); |
+ // Tail-call to the runtime. |
+ __ JumpToExternalReference( |
+ ExternalReference(Runtime::kJSProxyCall, masm->isolate())); |
// 2. Call to something else, which might have a [[Call]] internal method (if |
// not we raise an exception). |