Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1186)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 10515008: Added LoadIC stub for getters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed useless fallback Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | src/stub-cache.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4, callback, name, 2827 GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4, callback, name,
2828 &miss); 2828 &miss);
2829 __ bind(&miss); 2829 __ bind(&miss);
2830 GenerateLoadMiss(masm(), Code::LOAD_IC); 2830 GenerateLoadMiss(masm(), Code::LOAD_IC);
2831 2831
2832 // Return the generated code. 2832 // Return the generated code.
2833 return GetCode(CALLBACKS, name); 2833 return GetCode(CALLBACKS, name);
2834 } 2834 }
2835 2835
2836 2836
2837 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
2838 Handle<String> name,
2839 Handle<JSObject> receiver,
2840 Handle<JSObject> holder,
2841 Handle<JSFunction> getter) {
2842 // ----------- S t a t e -------------
2843 // -- r0 : receiver
2844 // -- r2 : name
2845 // -- lr : return address
2846 // -----------------------------------
2847 Label miss;
2848
2849 // Check that the maps haven't changed.
2850 __ JumpIfSmi(r0, &miss);
2851 CheckPrototypes(receiver, r0, holder, r3, r4, r1, name, &miss);
2852
2853 {
2854 FrameScope scope(masm(), StackFrame::INTERNAL);
2855
2856 // Call the JavaScript getter with the receiver on the stack.
2857 __ push(r0);
2858 __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION,
2859 NullCallWrapper(), CALL_AS_METHOD);
2860
2861 // Restore context register.
2862 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2863 }
2864 __ Ret();
2865
2866 __ bind(&miss);
2867 GenerateLoadMiss(masm(), Code::LOAD_IC);
2868
2869 // Return the generated code.
2870 return GetCode(CALLBACKS, name);
2871 }
2872
2873
2837 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, 2874 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
2838 Handle<JSObject> holder, 2875 Handle<JSObject> holder,
2839 Handle<JSFunction> value, 2876 Handle<JSFunction> value,
2840 Handle<String> name) { 2877 Handle<String> name) {
2841 // ----------- S t a t e ------------- 2878 // ----------- S t a t e -------------
2842 // -- r0 : receiver 2879 // -- r0 : receiver
2843 // -- r2 : name 2880 // -- r2 : name
2844 // -- lr : return address 2881 // -- lr : return address
2845 // ----------------------------------- 2882 // -----------------------------------
2846 Label miss; 2883 Label miss;
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4628 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4592 } 4629 }
4593 } 4630 }
4594 4631
4595 4632
4596 #undef __ 4633 #undef __
4597 4634
4598 } } // namespace v8::internal 4635 } } // namespace v8::internal
4599 4636
4600 #endif // V8_TARGET_ARCH_ARM 4637 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | src/stub-cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698