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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 14142005: Implement Polymorphic Store ICs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 5 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 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2893 // ----------------------------------- 2893 // -----------------------------------
2894 Label miss; 2894 Label miss;
2895 2895
2896 if (kind() == Code::KEYED_LOAD_IC) { 2896 if (kind() == Code::KEYED_LOAD_IC) {
2897 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); 2897 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string()));
2898 __ j(not_equal, &miss); 2898 __ j(not_equal, &miss);
2899 } 2899 }
2900 2900
2901 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); 2901 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss);
2902 __ bind(&miss); 2902 __ bind(&miss);
2903 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2903 StubCompiler::TailCallBuiltin(
2904 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2904 } 2905 }
2905 2906
2906 2907
2907 void StringLengthStub::Generate(MacroAssembler* masm) { 2908 void StringLengthStub::Generate(MacroAssembler* masm) {
2908 // ----------- S t a t e ------------- 2909 // ----------- S t a t e -------------
2909 // -- ecx : name 2910 // -- ecx : name
2910 // -- edx : receiver 2911 // -- edx : receiver
2911 // -- esp[0] : return address 2912 // -- esp[0] : return address
2912 // ----------------------------------- 2913 // -----------------------------------
2913 Label miss; 2914 Label miss;
2914 2915
2915 if (kind() == Code::KEYED_LOAD_IC) { 2916 if (kind() == Code::KEYED_LOAD_IC) {
2916 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); 2917 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string()));
2917 __ j(not_equal, &miss); 2918 __ j(not_equal, &miss);
2918 } 2919 }
2919 2920
2920 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, 2921 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss,
2921 support_wrapper_); 2922 support_wrapper_);
2922 __ bind(&miss); 2923 __ bind(&miss);
2923 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2924 StubCompiler::TailCallBuiltin(
2925 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2924 } 2926 }
2925 2927
2926 2928
2927 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { 2929 void StoreArrayLengthStub::Generate(MacroAssembler* masm) {
2928 // ----------- S t a t e ------------- 2930 // ----------- S t a t e -------------
2929 // -- eax : value 2931 // -- eax : value
2930 // -- ecx : name 2932 // -- ecx : name
2931 // -- edx : receiver 2933 // -- edx : receiver
2932 // -- esp[0] : return address 2934 // -- esp[0] : return address
2933 // ----------------------------------- 2935 // -----------------------------------
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 __ push(receiver); 2979 __ push(receiver);
2978 __ push(value); 2980 __ push(value);
2979 __ push(scratch); // return address 2981 __ push(scratch); // return address
2980 2982
2981 ExternalReference ref = 2983 ExternalReference ref =
2982 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 2984 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
2983 __ TailCallExternalReference(ref, 2, 1); 2985 __ TailCallExternalReference(ref, 2, 1);
2984 2986
2985 __ bind(&miss); 2987 __ bind(&miss);
2986 2988
2987 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2989 StubCompiler::TailCallBuiltin(
2990 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2988 } 2991 }
2989 2992
2990 2993
2991 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 2994 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
2992 // The key is in edx and the parameter count is in eax. 2995 // The key is in edx and the parameter count is in eax.
2993 2996
2994 // The displacement is used for skipping the frame pointer on the 2997 // The displacement is used for skipping the frame pointer on the
2995 // stack. It is the offset of the last parameter (if any) relative 2998 // stack. It is the offset of the last parameter (if any) relative
2996 // to the frame pointer. 2999 // to the frame pointer.
2997 static const int kDisplacement = 1 * kPointerSize; 3000 static const int kDisplacement = 1 * kPointerSize;
(...skipping 4724 matching lines...) Expand 10 before | Expand all | Expand 10 after
7722 __ bind(&fast_elements_case); 7725 __ bind(&fast_elements_case);
7723 GenerateCase(masm, FAST_ELEMENTS); 7726 GenerateCase(masm, FAST_ELEMENTS);
7724 } 7727 }
7725 7728
7726 7729
7727 #undef __ 7730 #undef __
7728 7731
7729 } } // namespace v8::internal 7732 } } // namespace v8::internal
7730 7733
7731 #endif // V8_TARGET_ARCH_IA32 7734 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm/stub-cache-arm.cc ('K') | « src/ast.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698