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

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

Issue 6287030: Create specialized code stubs for PixelArray loads. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: review feedback Created 9 years, 10 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/ia32/macro-assembler-ia32.h ('k') | src/ic.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3148 __ ret(0); 3148 __ ret(0);
3149 3149
3150 __ bind(&miss); 3150 __ bind(&miss);
3151 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3151 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3152 3152
3153 // Return the generated code. 3153 // Return the generated code.
3154 return GetCode(NORMAL, NULL); 3154 return GetCode(NORMAL, NULL);
3155 } 3155 }
3156 3156
3157 3157
3158 MaybeObject* KeyedLoadStubCompiler::CompileLoadPixelArray(JSObject* receiver) {
3159 // ----------- S t a t e -------------
3160 // -- eax : key
3161 // -- edx : receiver
3162 // -- esp[0] : return address
3163 // -----------------------------------
3164 Label miss;
3165
3166 // Check that the map matches.
3167 __ CheckMap(edx, Handle<Map>(receiver->map()), &miss, false);
3168
3169 GenerateFastPixelArrayLoad(masm(),
3170 edx,
3171 eax,
3172 ecx,
3173 ebx,
3174 eax,
3175 &miss,
3176 &miss,
3177 &miss);
3178
3179 // Handle load cache miss.
3180 __ bind(&miss);
3181 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Miss));
3182 __ jmp(ic, RelocInfo::CODE_TARGET);
3183
3184 // Return the generated code.
3185 return GetCode(NORMAL, NULL);
3186 }
3187
3188
3158 // Specialized stub for constructing objects from functions which only have only 3189 // Specialized stub for constructing objects from functions which only have only
3159 // simple assignments of the form this.x = ...; in their body. 3190 // simple assignments of the form this.x = ...; in their body.
3160 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { 3191 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
3161 // ----------- S t a t e ------------- 3192 // ----------- S t a t e -------------
3162 // -- eax : argc 3193 // -- eax : argc
3163 // -- edi : constructor 3194 // -- edi : constructor
3164 // -- esp[0] : return address 3195 // -- esp[0] : return address
3165 // -- esp[4] : last argument 3196 // -- esp[4] : last argument
3166 // ----------------------------------- 3197 // -----------------------------------
3167 Label generic_stub_call; 3198 Label generic_stub_call;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
3649 3680
3650 return GetCode(flags); 3681 return GetCode(flags);
3651 } 3682 }
3652 3683
3653 3684
3654 #undef __ 3685 #undef __
3655 3686
3656 } } // namespace v8::internal 3687 } } // namespace v8::internal
3657 3688
3658 #endif // V8_TARGET_ARCH_IA32 3689 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698