Index: src/ic/arm64/stub-cache-arm64.cc |
diff --git a/src/ic/arm64/stub-cache-arm64.cc b/src/ic/arm64/stub-cache-arm64.cc |
index f16ffafc072fa65deb12aa75f0b0250922e72995..4d31d4988272ca0aac98ea4c4e2e7656ae400a83 100644 |
--- a/src/ic/arm64/stub-cache-arm64.cc |
+++ b/src/ic/arm64/stub-cache-arm64.cc |
@@ -23,9 +23,10 @@ namespace internal { |
// |
// 'receiver', 'name' and 'offset' registers are preserved on miss. |
static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
- Code::Flags flags, StubCache::Table table, |
- Register receiver, Register name, Register offset, |
- Register scratch, Register scratch2, Register scratch3) { |
+ Code::Flags flags, bool leave_frame, |
+ StubCache::Table table, Register receiver, Register name, |
+ Register offset, Register scratch, Register scratch2, |
+ Register scratch3) { |
// Some code below relies on the fact that the Entry struct contains |
// 3 pointers (name, code, map). |
STATIC_ASSERT(sizeof(StubCache::Entry) == (3 * kPointerSize)); |
@@ -78,6 +79,8 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
} |
#endif |
+ if (leave_frame) __ LeaveFrame(StackFrame::INTERNAL); |
+ |
// Jump to the first instruction in the code stub. |
__ Add(scratch, scratch, Code::kHeaderSize - kHeapObjectTag); |
__ Br(scratch); |
@@ -88,9 +91,9 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
void StubCache::GenerateProbe(MacroAssembler* masm, Code::Flags flags, |
- Register receiver, Register name, |
- Register scratch, Register extra, Register extra2, |
- Register extra3) { |
+ bool leave_frame, Register receiver, |
+ Register name, Register scratch, Register extra, |
+ Register extra2, Register extra3) { |
Isolate* isolate = masm->isolate(); |
Label miss; |
@@ -122,8 +125,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Flags flags, |
CountTrailingZeros(kPrimaryTableSize, 64)); |
// Probe the primary table. |
- ProbeTable(isolate, masm, flags, kPrimary, receiver, name, scratch, extra, |
- extra2, extra3); |
+ ProbeTable(isolate, masm, flags, leave_frame, kPrimary, receiver, name, |
+ scratch, extra, extra2, extra3); |
// Primary miss: Compute hash for secondary table. |
__ Sub(scratch, scratch, Operand(name, LSR, kCacheIndexShift)); |
@@ -131,8 +134,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Flags flags, |
__ And(scratch, scratch, kSecondaryTableSize - 1); |
// Probe the secondary table. |
- ProbeTable(isolate, masm, flags, kSecondary, receiver, name, scratch, extra, |
- extra2, extra3); |
+ ProbeTable(isolate, masm, flags, leave_frame, kSecondary, receiver, name, |
+ scratch, extra, extra2, extra3); |
// Cache miss: Fall-through and let caller handle the miss by |
// entering the runtime system. |