OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 Comment cmnt(masm, "[ Store to named Property"); | 2155 Comment cmnt(masm, "[ Store to named Property"); |
2156 cgen_->frame()->Push(GetName()); | 2156 cgen_->frame()->Push(GetName()); |
2157 Result answer = cgen_->frame()->CallStoreIC(); | 2157 Result answer = cgen_->frame()->CallStoreIC(); |
2158 cgen_->frame()->Push(&answer); | 2158 cgen_->frame()->Push(&answer); |
2159 break; | 2159 break; |
2160 } | 2160 } |
2161 | 2161 |
2162 case KEYED: { | 2162 case KEYED: { |
2163 Comment cmnt(masm, "[ Store to keyed Property"); | 2163 Comment cmnt(masm, "[ Store to keyed Property"); |
2164 | 2164 |
2165 // Generate inlined version of the keyed store if the code is in | 2165 // TODO(x64): Implement inlined version of keyed stores. |
2166 // a loop and the key is likely to be a smi. | |
2167 Property* property = expression()->AsProperty(); | |
2168 ASSERT(property != NULL); | |
2169 | 2166 |
2170 // TODO(x64): Implement inlined version of keyed stores. | |
2171 | |
2172 Result answer = cgen_->frame()->CallKeyedStoreIC(); | 2167 Result answer = cgen_->frame()->CallKeyedStoreIC(); |
2173 // Make sure that we do not have a test instruction after the | 2168 // Make sure that we do not have a test instruction after the |
2174 // call. A test instruction after the call is used to | 2169 // call. A test instruction after the call is used to |
2175 // indicate that we have generated an inline version of the | 2170 // indicate that we have generated an inline version of the |
2176 // keyed store. | 2171 // keyed store. |
2177 __ nop(); | 2172 __ nop(); |
2178 cgen_->frame()->Push(&answer); | 2173 cgen_->frame()->Push(&answer); |
2179 break; | 2174 break; |
2180 } | 2175 } |
2181 | 2176 |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3034 __ addq(rsp, Immediate(2 * kPointerSize)); // remove markers | 3029 __ addq(rsp, Immediate(2 * kPointerSize)); // remove markers |
3035 | 3030 |
3036 // Restore frame pointer and return. | 3031 // Restore frame pointer and return. |
3037 __ pop(rbp); | 3032 __ pop(rbp); |
3038 __ ret(0); | 3033 __ ret(0); |
3039 } | 3034 } |
3040 | 3035 |
3041 #undef __ | 3036 #undef __ |
3042 | 3037 |
3043 } } // namespace v8::internal | 3038 } } // namespace v8::internal |
OLD | NEW |