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

Side by Side Diff: src/x64/code-stubs-x64.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/type-info.cc ('k') | src/x64/ic-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 // ----------- S t a t e ------------- 2038 // ----------- S t a t e -------------
2039 // -- rax : receiver 2039 // -- rax : receiver
2040 // -- rcx : name 2040 // -- rcx : name
2041 // -- rsp[0] : return address 2041 // -- rsp[0] : return address
2042 // ----------------------------------- 2042 // -----------------------------------
2043 receiver = rax; 2043 receiver = rax;
2044 } 2044 }
2045 2045
2046 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); 2046 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss);
2047 __ bind(&miss); 2047 __ bind(&miss);
2048 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2048 StubCompiler::TailCallBuiltin(
2049 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2049 } 2050 }
2050 2051
2051 2052
2052 void StringLengthStub::Generate(MacroAssembler* masm) { 2053 void StringLengthStub::Generate(MacroAssembler* masm) {
2053 Label miss; 2054 Label miss;
2054 Register receiver; 2055 Register receiver;
2055 if (kind() == Code::KEYED_LOAD_IC) { 2056 if (kind() == Code::KEYED_LOAD_IC) {
2056 // ----------- S t a t e ------------- 2057 // ----------- S t a t e -------------
2057 // -- rax : key 2058 // -- rax : key
2058 // -- rdx : receiver 2059 // -- rdx : receiver
2059 // -- rsp[0] : return address 2060 // -- rsp[0] : return address
2060 // ----------------------------------- 2061 // -----------------------------------
2061 __ Cmp(rax, masm->isolate()->factory()->length_string()); 2062 __ Cmp(rax, masm->isolate()->factory()->length_string());
2062 __ j(not_equal, &miss); 2063 __ j(not_equal, &miss);
2063 receiver = rdx; 2064 receiver = rdx;
2064 } else { 2065 } else {
2065 ASSERT(kind() == Code::LOAD_IC); 2066 ASSERT(kind() == Code::LOAD_IC);
2066 // ----------- S t a t e ------------- 2067 // ----------- S t a t e -------------
2067 // -- rax : receiver 2068 // -- rax : receiver
2068 // -- rcx : name 2069 // -- rcx : name
2069 // -- rsp[0] : return address 2070 // -- rsp[0] : return address
2070 // ----------------------------------- 2071 // -----------------------------------
2071 receiver = rax; 2072 receiver = rax;
2072 } 2073 }
2073 2074
2074 StubCompiler::GenerateLoadStringLength(masm, receiver, r8, r9, &miss, 2075 StubCompiler::GenerateLoadStringLength(masm, receiver, r8, r9, &miss,
2075 support_wrapper_); 2076 support_wrapper_);
2076 __ bind(&miss); 2077 __ bind(&miss);
2077 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2078 StubCompiler::TailCallBuiltin(
2079 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2078 } 2080 }
2079 2081
2080 2082
2081 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { 2083 void StoreArrayLengthStub::Generate(MacroAssembler* masm) {
2082 // ----------- S t a t e ------------- 2084 // ----------- S t a t e -------------
2083 // -- rax : value 2085 // -- rax : value
2084 // -- rcx : key 2086 // -- rcx : key
2085 // -- rdx : receiver 2087 // -- rdx : receiver
2086 // -- rsp[0] : return address 2088 // -- rsp[0] : return address
2087 // ----------------------------------- 2089 // -----------------------------------
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 __ push(receiver); 2132 __ push(receiver);
2131 __ push(value); 2133 __ push(value);
2132 __ push(scratch); // return address 2134 __ push(scratch); // return address
2133 2135
2134 ExternalReference ref = 2136 ExternalReference ref =
2135 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 2137 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
2136 __ TailCallExternalReference(ref, 2, 1); 2138 __ TailCallExternalReference(ref, 2, 1);
2137 2139
2138 __ bind(&miss); 2140 __ bind(&miss);
2139 2141
2140 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2142 StubCompiler::TailCallBuiltin(
2143 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2141 } 2144 }
2142 2145
2143 2146
2144 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 2147 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
2145 // The key is in rdx and the parameter count is in rax. 2148 // The key is in rdx and the parameter count is in rax.
2146 2149
2147 // The displacement is used for skipping the frame pointer on the 2150 // The displacement is used for skipping the frame pointer on the
2148 // stack. It is the offset of the last parameter (if any) relative 2151 // stack. It is the offset of the last parameter (if any) relative
2149 // to the frame pointer. 2152 // to the frame pointer.
2150 static const int kDisplacement = 1 * kPointerSize; 2153 static const int kDisplacement = 1 * kPointerSize;
(...skipping 4646 matching lines...) Expand 10 before | Expand all | Expand 10 after
6797 __ bind(&fast_elements_case); 6800 __ bind(&fast_elements_case);
6798 GenerateCase(masm, FAST_ELEMENTS); 6801 GenerateCase(masm, FAST_ELEMENTS);
6799 } 6802 }
6800 6803
6801 6804
6802 #undef __ 6805 #undef __
6803 6806
6804 } } // namespace v8::internal 6807 } } // namespace v8::internal
6805 6808
6806 #endif // V8_TARGET_ARCH_X64 6809 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698