Reviewers: iposva, Description: Port the function prototype load stub to ARM.
Please review this at http://codereview.chromium.org/155373 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/arm/ic-arm.cc M src/arm/stub-cache-arm.cc Index: src/arm/stub-cache-arm.cc =================================================================== --- src/arm/stub-cache-arm.cc (revision 2427) +++ src/arm/stub-cache-arm.cc (working copy) @@ -247,6 +247,17 @@ } +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. Index: src/arm/ic-arm.cc =================================================================== --- src/arm/ic-arm.cc (revision 2427) +++ src/arm/ic-arm.cc (working copy) @@ -192,11 +192,14 @@ // -- [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; - Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Miss)); - __ Jump(ic, RelocInfo::CODE_TARGET); + // Load receiver. + __ ldr(r0, MemOperand(sp, 0)); + + StubCompiler::GenerateLoadFunctionPrototype(masm, r0, r1, r3, &miss); + __ bind(&miss); + StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC); } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
