MIPS: Do not cache CodeStubInterfaceDescriptor on the isolate.

Port r23744 (998c3e4)

BUG=
R=paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/540403002

Patch from Balazs Kilvady <balazs.kilvady@imgtec.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
paul.lind@imgtec.com 2014-09-05 19:13:32 +00:00
parent fc90c556a2
commit 50f287000d
4 changed files with 20 additions and 19 deletions

View File

@ -122,22 +122,22 @@ void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
// Update the static counter each time a new code stub is generated.
isolate()->counters()->code_stubs()->Increment();
CodeStubInterfaceDescriptor descriptor = GetInterfaceDescriptor();
int param_count = descriptor->GetEnvironmentParameterCount();
CodeStubInterfaceDescriptor descriptor;
InitializeInterfaceDescriptor(&descriptor);
int param_count = descriptor.GetEnvironmentParameterCount();
{
// Call the runtime system in a fresh internal frame.
FrameScope scope(masm, StackFrame::INTERNAL);
DCHECK(param_count == 0 ||
a0.is(descriptor->GetEnvironmentParameterRegister(
param_count - 1)));
a0.is(descriptor.GetEnvironmentParameterRegister(param_count - 1)));
// Push arguments, adjust sp.
__ Subu(sp, sp, Operand(param_count * kPointerSize));
for (int i = 0; i < param_count; ++i) {
// Store argument to stack.
__ sw(descriptor->GetEnvironmentParameterRegister(i),
MemOperand(sp, (param_count-1-i) * kPointerSize));
__ sw(descriptor.GetEnvironmentParameterRegister(i),
MemOperand(sp, (param_count - 1 - i) * kPointerSize));
}
ExternalReference miss = descriptor->miss_handler();
ExternalReference miss = descriptor.miss_handler();
__ CallExternalReference(miss, param_count);
}

View File

@ -2392,10 +2392,10 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
return DefineAsSpilled(result, spill_index);
} else {
DCHECK(info()->IsStub());
CodeStubInterfaceDescriptor* descriptor =
info()->code_stub()->GetInterfaceDescriptor();
CodeStubInterfaceDescriptor descriptor;
info()->code_stub()->InitializeInterfaceDescriptor(&descriptor);
int index = static_cast<int>(instr->index());
Register reg = descriptor->GetEnvironmentParameterRegister(index);
Register reg = descriptor.GetEnvironmentParameterRegister(index);
return DefineFixed(result, reg);
}
}

View File

@ -121,21 +121,22 @@ void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
// Update the static counter each time a new code stub is generated.
isolate()->counters()->code_stubs()->Increment();
CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor();
int param_count = descriptor->GetEnvironmentParameterCount();
CodeStubInterfaceDescriptor descriptor;
InitializeInterfaceDescriptor(&descriptor);
int param_count = descriptor.GetEnvironmentParameterCount();
{
// Call the runtime system in a fresh internal frame.
FrameScope scope(masm, StackFrame::INTERNAL);
DCHECK((param_count == 0) ||
a0.is(descriptor->GetEnvironmentParameterRegister(param_count - 1)));
a0.is(descriptor.GetEnvironmentParameterRegister(param_count - 1)));
// Push arguments, adjust sp.
__ Dsubu(sp, sp, Operand(param_count * kPointerSize));
for (int i = 0; i < param_count; ++i) {
// Store argument to stack.
__ sd(descriptor->GetEnvironmentParameterRegister(i),
MemOperand(sp, (param_count-1-i) * kPointerSize));
__ sd(descriptor.GetEnvironmentParameterRegister(i),
MemOperand(sp, (param_count - 1 - i) * kPointerSize));
}
ExternalReference miss = descriptor->miss_handler();
ExternalReference miss = descriptor.miss_handler();
__ CallExternalReference(miss, param_count);
}

View File

@ -2392,10 +2392,10 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
return DefineAsSpilled(result, spill_index);
} else {
DCHECK(info()->IsStub());
CodeStubInterfaceDescriptor* descriptor =
info()->code_stub()->GetInterfaceDescriptor();
CodeStubInterfaceDescriptor descriptor;
info()->code_stub()->InitializeInterfaceDescriptor(&descriptor);
int index = static_cast<int>(instr->index());
Register reg = descriptor->GetEnvironmentParameterRegister(index);
Register reg = descriptor.GetEnvironmentParameterRegister(index);
return DefineFixed(result, reg);
}
}