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

Side by Side Diff: src/mips/stub-cache-mips.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 | « src/ic.cc ('k') | src/objects.h » ('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 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 GenerateLoadCallback(object, holder, a0, a2, a3, a1, t0, callback, name, 2832 GenerateLoadCallback(object, holder, a0, a2, a3, a1, t0, callback, name,
2833 &miss); 2833 &miss);
2834 __ bind(&miss); 2834 __ bind(&miss);
2835 GenerateLoadMiss(masm(), Code::LOAD_IC); 2835 GenerateLoadMiss(masm(), Code::LOAD_IC);
2836 2836
2837 // Return the generated code. 2837 // Return the generated code.
2838 return GetCode(CALLBACKS, name); 2838 return GetCode(CALLBACKS, name);
2839 } 2839 }
2840 2840
2841 2841
2842 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
2843 Handle<String> name,
2844 Handle<JSObject> receiver,
2845 Handle<JSObject> holder,
2846 Handle<JSFunction> getter) {
2847 // ----------- S t a t e -------------
2848 // -- a0 : receiver
2849 // -- a2 : name
2850 // -- ra : return address
2851 // -----------------------------------
2852 Label miss;
2853
2854 // Check that the maps haven't changed.
2855 __ JumpIfSmi(a0, &miss);
2856 CheckPrototypes(receiver, a0, holder, a3, t0, a1, name, &miss);
2857
2858 {
2859 FrameScope scope(masm(), StackFrame::INTERNAL);
2860
2861 // Call the JavaScript getter with the receiver on the stack.
2862 __ push(a0);
2863 __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION,
2864 NullCallWrapper(), CALL_AS_METHOD);
2865
2866 // Restore context register.
2867 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2868 }
2869 __ Ret();
2870
2871 __ bind(&miss);
2872 GenerateLoadMiss(masm(), Code::LOAD_IC);
2873
2874 // Return the generated code.
2875 return GetCode(CALLBACKS, name);
2876 }
2877
2878
2842 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, 2879 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
2843 Handle<JSObject> holder, 2880 Handle<JSObject> holder,
2844 Handle<JSFunction> value, 2881 Handle<JSFunction> value,
2845 Handle<String> name) { 2882 Handle<String> name) {
2846 // ----------- S t a t e ------------- 2883 // ----------- S t a t e -------------
2847 // -- a0 : receiver 2884 // -- a0 : receiver
2848 // -- a2 : name 2885 // -- a2 : name
2849 // -- ra : return address 2886 // -- ra : return address
2850 // ----------------------------------- 2887 // -----------------------------------
2851 Label miss; 2888 Label miss;
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
4653 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4690 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4654 } 4691 }
4655 } 4692 }
4656 4693
4657 4694
4658 #undef __ 4695 #undef __
4659 4696
4660 } } // namespace v8::internal 4697 } } // namespace v8::internal
4661 4698
4662 #endif // V8_TARGET_ARCH_MIPS 4699 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698