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

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

Powered by Google App Engine
This is Rietveld 408576698