X87: Move "slow handler" compiler code to handler-compiler

port r23347.

original commit message:

 Move "slow handler" compiler code to handler-compiler

BUG=
R=weiliang.lin@intel.com

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8681a110
......@@ -326,6 +326,41 @@ static void CompileCallLoadPropertyWithInterceptor(
}
static void StoreIC_PushArgs(MacroAssembler* masm) {
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
Register value = StoreIC::ValueRegister();
DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
__ pop(ebx);
__ push(receiver);
__ push(name);
__ push(value);
__ push(ebx);
}
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Return address is on the stack.
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
ExternalReference ref(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
__ TailCallExternalReference(ref, 3, 1);
}
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Return address is on the stack.
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
ExternalReference ref(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
__ TailCallExternalReference(ref, 3, 1);
}
#undef __
#define __ ACCESS_MASM(masm())
......
......@@ -1019,26 +1019,6 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
}
void StoreIC::GenerateSlow(MacroAssembler* masm) {
// Return address is on the stack.
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
ExternalReference ref(IC_Utility(kStoreIC_Slow), masm->isolate());
__ TailCallExternalReference(ref, 3, 1);
}
void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) {
// Return address is on the stack.
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate());
__ TailCallExternalReference(ref, 3, 1);
}
#undef __
......
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