| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index a081a53d539a60d87cc637e671f26334f868fd93..ac43d55ae3719d0a2ac5a82fedc91e8e1abd3206 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.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"
|
| #include "src/x64/lithium-codegen-x64.h"
|
|
|
| namespace v8 {
|
| @@ -3227,11 +3228,9 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
|
| }
|
|
|
| __ Load(result,
|
| - BuildFastArrayOperand(instr->elements(),
|
| - key,
|
| + BuildFastArrayOperand(instr->elements(), key,
|
| instr->hydrogen()->key()->representation(),
|
| - FAST_ELEMENTS,
|
| - offset),
|
| + FAST_ELEMENTS, offset),
|
| representation);
|
|
|
| // Check for the hole value.
|
| @@ -3531,6 +3530,30 @@ 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()));
|
| +
|
| + Register scratch = rbx;
|
| + DCHECK(!scratch.is(receiver) && !scratch.is(name));
|
| +
|
| + // 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, no_reg);
|
| +
|
| + // Tail call to miss if we ended up here.
|
| + if (must_teardown_frame) __ leave();
|
| + LoadIC::GenerateMiss(masm());
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) {
|
| DCHECK(ToRegister(instr->result()).is(rax));
|
|
|
|
|