Commit 55050383 authored by ager@chromium.org's avatar ager@chromium.org

Port the function prototype load stub to ARM.

Review URL: http://codereview.chromium.org/155373

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 00cdc3f1
......@@ -192,11 +192,14 @@ void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
// -- [sp] : receiver
// -----------------------------------
// NOTE: Right now, this code always misses on ARM which is
// sub-optimal. We should port the fast case code from IA-32.
Label miss;
// Load receiver.
__ ldr(r0, MemOperand(sp, 0));
Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Miss));
__ Jump(ic, RelocInfo::CODE_TARGET);
StubCompiler::GenerateLoadFunctionPrototype(masm, r0, r1, r3, &miss);
__ bind(&miss);
StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
}
......
......@@ -247,6 +247,17 @@ void StubCompiler::GenerateLoadStringLength2(MacroAssembler* masm,
}
void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
Register receiver,
Register scratch1,
Register scratch2,
Label* miss_label) {
__ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label);
__ mov(r0, scratch1);
__ Ret();
}
// Generate StoreField code, value is passed in r0 register.
// After executing generated code, the receiver_reg and name_reg
// may be clobbered.
......
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