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( ...@@ -1242,20 +1242,16 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
void StoreStubCompiler::GenerateStoreViaSetter( void StoreStubCompiler::GenerateStoreViaSetter(
MacroAssembler* masm, MacroAssembler* masm,
Handle<HeapType> type, Handle<HeapType> type,
Register receiver,
Handle<JSFunction> setter) { Handle<JSFunction> setter) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- a0 : value
// -- a1 : receiver
// -- a2 : name
// -- ra : return address // -- ra : return address
// ----------------------------------- // -----------------------------------
{ {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
Register receiver = a1;
Register value = a0;
// Save value register, so we can restore it later. // Save value register, so we can restore it later.
__ push(value); __ push(value());
if (!setter.is_null()) { if (!setter.is_null()) {
// Call the JavaScript setter with receiver and value on the stack. // Call the JavaScript setter with receiver and value on the stack.
...@@ -1265,7 +1261,7 @@ void StoreStubCompiler::GenerateStoreViaSetter( ...@@ -1265,7 +1261,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
FieldMemOperand( FieldMemOperand(
receiver, JSGlobalObject::kGlobalReceiverOffset)); receiver, JSGlobalObject::kGlobalReceiverOffset));
} }
__ Push(receiver, value); __ Push(receiver, value());
ParameterCount actual(1); ParameterCount actual(1);
ParameterCount expected(setter); ParameterCount expected(setter);
__ InvokeFunction(setter, expected, actual, __ InvokeFunction(setter, expected, actual,
...@@ -1333,16 +1329,21 @@ Register* KeyedLoadStubCompiler::registers() { ...@@ -1333,16 +1329,21 @@ Register* KeyedLoadStubCompiler::registers() {
} }
Register StoreStubCompiler::value() {
return a0;
}
Register* StoreStubCompiler::registers() { Register* StoreStubCompiler::registers() {
// receiver, name, value, scratch1, scratch2, scratch3. // receiver, name, scratch1, scratch2, scratch3.
static Register registers[] = { a1, a2, a0, a3, t0, t1 }; static Register registers[] = { a1, a2, a3, t0, t1 };
return registers; return registers;
} }
Register* KeyedStoreStubCompiler::registers() { Register* KeyedStoreStubCompiler::registers() {
// receiver, name, value, scratch1, scratch2, scratch3. // receiver, name, scratch1, scratch2, scratch3.
static Register registers[] = { a2, a1, a0, a3, t0, t1 }; static Register registers[] = { a2, a1, a3, t0, t1 };
return registers; 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