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

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: 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
« no previous file with comments | « src/ast.cc ('k') | src/ia32/ic-ia32.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 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 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 // ----------------------------------- 2903 // -----------------------------------
2904 Label miss; 2904 Label miss;
2905 2905
2906 if (kind() == Code::KEYED_LOAD_IC) { 2906 if (kind() == Code::KEYED_LOAD_IC) {
2907 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); 2907 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string()));
2908 __ j(not_equal, &miss); 2908 __ j(not_equal, &miss);
2909 } 2909 }
2910 2910
2911 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); 2911 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss);
2912 __ bind(&miss); 2912 __ bind(&miss);
2913 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2913 StubCompiler::TailCallBuiltin(
2914 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2914 } 2915 }
2915 2916
2916 2917
2917 void StringLengthStub::Generate(MacroAssembler* masm) { 2918 void StringLengthStub::Generate(MacroAssembler* masm) {
2918 // ----------- S t a t e ------------- 2919 // ----------- S t a t e -------------
2919 // -- ecx : name 2920 // -- ecx : name
2920 // -- edx : receiver 2921 // -- edx : receiver
2921 // -- esp[0] : return address 2922 // -- esp[0] : return address
2922 // ----------------------------------- 2923 // -----------------------------------
2923 Label miss; 2924 Label miss;
2924 2925
2925 if (kind() == Code::KEYED_LOAD_IC) { 2926 if (kind() == Code::KEYED_LOAD_IC) {
2926 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); 2927 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string()));
2927 __ j(not_equal, &miss); 2928 __ j(not_equal, &miss);
2928 } 2929 }
2929 2930
2930 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, 2931 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss,
2931 support_wrapper_); 2932 support_wrapper_);
2932 __ bind(&miss); 2933 __ bind(&miss);
2933 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2934 StubCompiler::TailCallBuiltin(
2935 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2934 } 2936 }
2935 2937
2936 2938
2937 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { 2939 void StoreArrayLengthStub::Generate(MacroAssembler* masm) {
2938 // ----------- S t a t e ------------- 2940 // ----------- S t a t e -------------
2939 // -- eax : value 2941 // -- eax : value
2940 // -- ecx : name 2942 // -- ecx : name
2941 // -- edx : receiver 2943 // -- edx : receiver
2942 // -- esp[0] : return address 2944 // -- esp[0] : return address
2943 // ----------------------------------- 2945 // -----------------------------------
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 __ push(receiver); 2989 __ push(receiver);
2988 __ push(value); 2990 __ push(value);
2989 __ push(scratch); // return address 2991 __ push(scratch); // return address
2990 2992
2991 ExternalReference ref = 2993 ExternalReference ref =
2992 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 2994 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
2993 __ TailCallExternalReference(ref, 2, 1); 2995 __ TailCallExternalReference(ref, 2, 1);
2994 2996
2995 __ bind(&miss); 2997 __ bind(&miss);
2996 2998
2997 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2999 StubCompiler::TailCallBuiltin(
3000 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2998 } 3001 }
2999 3002
3000 3003
3001 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 3004 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
3002 // The key is in edx and the parameter count is in eax. 3005 // The key is in edx and the parameter count is in eax.
3003 3006
3004 // The displacement is used for skipping the frame pointer on the 3007 // The displacement is used for skipping the frame pointer on the
3005 // stack. It is the offset of the last parameter (if any) relative 3008 // stack. It is the offset of the last parameter (if any) relative
3006 // to the frame pointer. 3009 // to the frame pointer.
3007 static const int kDisplacement = 1 * kPointerSize; 3010 static const int kDisplacement = 1 * kPointerSize;
(...skipping 4743 matching lines...) Expand 10 before | Expand all | Expand 10 after
7751 __ bind(&fast_elements_case); 7754 __ bind(&fast_elements_case);
7752 GenerateCase(masm, FAST_ELEMENTS); 7755 GenerateCase(masm, FAST_ELEMENTS);
7753 } 7756 }
7754 7757
7755 7758
7756 #undef __ 7759 #undef __
7757 7760
7758 } } // namespace v8::internal 7761 } } // namespace v8::internal
7759 7762
7760 #endif // V8_TARGET_ARCH_IA32 7763 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698