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

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: Incorporated review comments. 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') | no next file with comments »
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 2817 matching lines...) Expand 10 before | Expand all | Expand 10 after
2828 GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4, callback, name, 2828 GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4, callback, name,
2829 &miss); 2829 &miss);
2830 __ bind(&miss); 2830 __ bind(&miss);
2831 GenerateLoadMiss(masm(), Code::LOAD_IC); 2831 GenerateLoadMiss(masm(), Code::LOAD_IC);
2832 2832
2833 // Return the generated code. 2833 // Return the generated code.
2834 return GetCode(CALLBACKS, name); 2834 return GetCode(CALLBACKS, name);
2835 } 2835 }
2836 2836
2837 2837
2838 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
2839 Handle<String> name,
2840 Handle<JSObject> receiver,
2841 Handle<JSObject> holder,
2842 Handle<JSFunction> getter) {
2843 // ----------- S t a t e -------------
2844 // -- r0 : receiver
2845 // -- r2 : name
2846 // -- lr : return address
2847 // -----------------------------------
2848 Label miss;
2849
2850 // Check that the maps haven't changed.
2851 __ JumpIfSmi(r0, &miss);
2852 CheckPrototypes(receiver, r0, holder, r3, r4, r1, name, &miss);
2853
2854 {
2855 FrameScope scope(masm(), StackFrame::INTERNAL);
2856
2857 // Call the JavaScript getter with the receiver on the stack.
2858 __ push(r0);
2859 __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION,
2860 NullCallWrapper(), CALL_AS_METHOD);
2861
2862 // Restore context register.
2863 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2864 }
2865 __ Ret();
2866
2867 __ bind(&miss);
2868 GenerateLoadMiss(masm(), Code::LOAD_IC);
2869
2870 // Return the generated code.
2871 return GetCode(CALLBACKS, name);
2872 }
2873
2874
2838 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, 2875 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
2839 Handle<JSObject> holder, 2876 Handle<JSObject> holder,
2840 Handle<JSFunction> value, 2877 Handle<JSFunction> value,
2841 Handle<String> name) { 2878 Handle<String> name) {
2842 // ----------- S t a t e ------------- 2879 // ----------- S t a t e -------------
2843 // -- r0 : receiver 2880 // -- r0 : receiver
2844 // -- r2 : name 2881 // -- r2 : name
2845 // -- lr : return address 2882 // -- lr : return address
2846 // ----------------------------------- 2883 // -----------------------------------
2847 Label miss; 2884 Label miss;
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
4592 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4629 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4593 } 4630 }
4594 } 4631 }
4595 4632
4596 4633
4597 #undef __ 4634 #undef __
4598 4635
4599 } } // namespace v8::internal 4636 } } // namespace v8::internal
4600 4637
4601 #endif // V8_TARGET_ARCH_ARM 4638 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698