Commit e19d2bd4 authored by plind44@gmail.com's avatar plind44@gmail.com

MIPS: Allowed keyed store callbacks ic generation.

Port r19744 (b05fa4a)

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d239fbfa
......@@ -1242,20 +1242,16 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
void StoreStubCompiler::GenerateStoreViaSetter(
MacroAssembler* masm,
Handle<HeapType> type,
Register receiver,
Handle<JSFunction> setter) {
// ----------- S t a t e -------------
// -- a0 : value
// -- a1 : receiver
// -- a2 : name
// -- ra : return address
// -----------------------------------
{
FrameScope scope(masm, StackFrame::INTERNAL);
Register receiver = a1;
Register value = a0;
// Save value register, so we can restore it later.
__ push(value);
__ push(value());
if (!setter.is_null()) {
// Call the JavaScript setter with receiver and value on the stack.
......@@ -1265,7 +1261,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
FieldMemOperand(
receiver, JSGlobalObject::kGlobalReceiverOffset));
}
__ Push(receiver, value);
__ Push(receiver, value());
ParameterCount actual(1);
ParameterCount expected(setter);
__ InvokeFunction(setter, expected, actual,
......@@ -1333,16 +1329,21 @@ Register* KeyedLoadStubCompiler::registers() {
}
Register StoreStubCompiler::value() {
return a0;
}
Register* StoreStubCompiler::registers() {
// receiver, name, value, scratch1, scratch2, scratch3.
static Register registers[] = { a1, a2, a0, a3, t0, t1 };
// receiver, name, scratch1, scratch2, scratch3.
static Register registers[] = { a1, a2, a3, t0, t1 };
return registers;
}
Register* KeyedStoreStubCompiler::registers() {
// receiver, name, value, scratch1, scratch2, scratch3.
static Register registers[] = { a2, a1, a0, a3, t0, t1 };
// receiver, name, scratch1, scratch2, scratch3.
static Register registers[] = { a2, a1, a3, t0, t1 };
return registers;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment