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

Side by Side Diff: src/ia32/stub-cache-ia32.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
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 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 GenerateLoadCallback(object, holder, edx, ecx, ebx, eax, edi, callback, 2852 GenerateLoadCallback(object, holder, edx, ecx, ebx, eax, edi, callback,
2853 name, &miss); 2853 name, &miss);
2854 __ bind(&miss); 2854 __ bind(&miss);
2855 GenerateLoadMiss(masm(), Code::LOAD_IC); 2855 GenerateLoadMiss(masm(), Code::LOAD_IC);
2856 2856
2857 // Return the generated code. 2857 // Return the generated code.
2858 return GetCode(CALLBACKS, name); 2858 return GetCode(CALLBACKS, name);
2859 } 2859 }
2860 2860
2861 2861
2862 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
2863 Handle<String> name,
2864 Handle<JSObject> receiver,
2865 Handle<JSObject> holder,
2866 Handle<JSFunction> getter) {
2867 // ----------- S t a t e -------------
2868 // -- ecx : name
2869 // -- edx : receiver
2870 // -- esp[0] : return address
2871 // -----------------------------------
2872 Label miss;
2873
2874 // Check that the maps haven't changed.
2875 __ JumpIfSmi(edx, &miss);
2876 CheckPrototypes(receiver, edx, holder, ebx, eax, edi, name, &miss);
2877
2878 {
2879 FrameScope scope(masm(), StackFrame::INTERNAL);
2880
2881 // Call the JavaScript getter with the receiver on the stack.
2882 __ push(edx);
2883 __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION,
2884 NullCallWrapper(), CALL_AS_METHOD);
2885
2886 // Restore context register.
2887 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2888 }
2889 __ ret(0);
2890
2891 __ bind(&miss);
2892 GenerateLoadMiss(masm(), Code::LOAD_IC);
2893
2894 // Return the generated code.
2895 return GetCode(CALLBACKS, name);
2896 }
2897
2898
2862 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, 2899 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
2863 Handle<JSObject> holder, 2900 Handle<JSObject> holder,
2864 Handle<JSFunction> value, 2901 Handle<JSFunction> value,
2865 Handle<String> name) { 2902 Handle<String> name) {
2866 // ----------- S t a t e ------------- 2903 // ----------- S t a t e -------------
2867 // -- ecx : name 2904 // -- ecx : name
2868 // -- edx : receiver 2905 // -- edx : receiver
2869 // -- esp[0] : return address 2906 // -- esp[0] : return address
2870 // ----------------------------------- 2907 // -----------------------------------
2871 Label miss; 2908 Label miss;
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4190 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4154 } 4191 }
4155 } 4192 }
4156 4193
4157 4194
4158 #undef __ 4195 #undef __
4159 4196
4160 } } // namespace v8::internal 4197 } } // namespace v8::internal
4161 4198
4162 #endif // V8_TARGET_ARCH_IA32 4199 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | src/stub-cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698