Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 8c9507c9817a92311846c3b8624bfcf2b4175a19..904eecd2e10a0b2672249241dabf62b2d28ddc9a 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -9,6 +9,7 @@ |
#include "src/base/bits.h" |
#include "src/code-stubs.h" |
#include "src/hydrogen-osr.h" |
+#include "src/ic/stub-cache.h" |
namespace v8 { |
namespace internal { |
@@ -2037,6 +2038,34 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
} |
+void LCodeGen::DoTailCallThroughMegamorphicCache( |
+ LTailCallThroughMegamorphicCache* instr) { |
+ Register receiver = ToRegister(instr->receiver()); |
+ Register name = ToRegister(instr->name()); |
+ DCHECK(receiver.is(LoadDescriptor::ReceiverRegister())); |
+ DCHECK(name.is(LoadDescriptor::NameRegister())); |
+ DCHECK(receiver.is(x1)); |
+ DCHECK(name.is(x2)); |
+ |
+ Register scratch = x3; |
+ Register extra = x4; |
+ Register extra2 = x5; |
+ Register extra3 = x6; |
+ |
+ // Important for the tail-call. |
+ bool must_teardown_frame = NeedsEagerFrame(); |
+ |
+ // The probe will tail call to a handler if found. |
+ isolate()->stub_cache()->GenerateProbe(masm(), instr->hydrogen()->flags(), |
+ must_teardown_frame, receiver, name, |
+ scratch, extra, extra2, extra3); |
+ |
+ // Tail call to miss if we ended up here. |
+ if (must_teardown_frame) __ LeaveFrame(StackFrame::INTERNAL); |
+ LoadIC::GenerateMiss(masm()); |
+} |
+ |
+ |
void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { |
DCHECK(instr->IsMarkedAsCall()); |
DCHECK(ToRegister(instr->result()).Is(x0)); |