OLD | NEW |
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( | 158 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( |
159 Isolate* isolate, | 159 Isolate* isolate, |
160 CodeStubInterfaceDescriptor* descriptor) { | 160 CodeStubInterfaceDescriptor* descriptor) { |
161 static Register registers[] = { r1 }; | 161 static Register registers[] = { r1 }; |
162 descriptor->register_param_count_ = 1; | 162 descriptor->register_param_count_ = 1; |
163 descriptor->register_params_ = registers; | 163 descriptor->register_params_ = registers; |
164 descriptor->deoptimization_handler_ = NULL; | 164 descriptor->deoptimization_handler_ = NULL; |
165 } | 165 } |
166 | 166 |
167 | 167 |
| 168 void StringLengthStub::InitializeInterfaceDescriptor( |
| 169 Isolate* isolate, |
| 170 CodeStubInterfaceDescriptor* descriptor) { |
| 171 static Register registers[] = { r0, r2 }; |
| 172 descriptor->register_param_count_ = 2; |
| 173 descriptor->register_params_ = registers; |
| 174 descriptor->deoptimization_handler_ = NULL; |
| 175 } |
| 176 |
| 177 |
| 178 void KeyedStringLengthStub::InitializeInterfaceDescriptor( |
| 179 Isolate* isolate, |
| 180 CodeStubInterfaceDescriptor* descriptor) { |
| 181 static Register registers[] = { r1, r0 }; |
| 182 descriptor->register_param_count_ = 2; |
| 183 descriptor->register_params_ = registers; |
| 184 descriptor->deoptimization_handler_ = NULL; |
| 185 } |
| 186 |
| 187 |
168 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( | 188 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( |
169 Isolate* isolate, | 189 Isolate* isolate, |
170 CodeStubInterfaceDescriptor* descriptor) { | 190 CodeStubInterfaceDescriptor* descriptor) { |
171 static Register registers[] = { r2, r1, r0 }; | 191 static Register registers[] = { r2, r1, r0 }; |
172 descriptor->register_param_count_ = 3; | 192 descriptor->register_param_count_ = 3; |
173 descriptor->register_params_ = registers; | 193 descriptor->register_params_ = registers; |
174 descriptor->deoptimization_handler_ = | 194 descriptor->deoptimization_handler_ = |
175 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); | 195 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); |
176 } | 196 } |
177 | 197 |
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 receiver = r0; | 2112 receiver = r0; |
2093 } | 2113 } |
2094 | 2114 |
2095 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, r4, &miss); | 2115 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, r4, &miss); |
2096 __ bind(&miss); | 2116 __ bind(&miss); |
2097 StubCompiler::TailCallBuiltin( | 2117 StubCompiler::TailCallBuiltin( |
2098 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); | 2118 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); |
2099 } | 2119 } |
2100 | 2120 |
2101 | 2121 |
2102 void StringLengthStub::Generate(MacroAssembler* masm) { | |
2103 Label miss; | |
2104 Register receiver; | |
2105 if (kind() == Code::KEYED_LOAD_IC) { | |
2106 // ----------- S t a t e ------------- | |
2107 // -- lr : return address | |
2108 // -- r0 : key | |
2109 // -- r1 : receiver | |
2110 // ----------------------------------- | |
2111 __ cmp(r0, Operand(masm->isolate()->factory()->length_string())); | |
2112 __ b(ne, &miss); | |
2113 receiver = r1; | |
2114 } else { | |
2115 ASSERT(kind() == Code::LOAD_IC); | |
2116 // ----------- S t a t e ------------- | |
2117 // -- r2 : name | |
2118 // -- lr : return address | |
2119 // -- r0 : receiver | |
2120 // -- sp[0] : receiver | |
2121 // ----------------------------------- | |
2122 receiver = r0; | |
2123 } | |
2124 | |
2125 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss); | |
2126 | |
2127 __ bind(&miss); | |
2128 StubCompiler::TailCallBuiltin( | |
2129 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); | |
2130 } | |
2131 | |
2132 | |
2133 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { | 2122 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { |
2134 // This accepts as a receiver anything JSArray::SetElementsLength accepts | 2123 // This accepts as a receiver anything JSArray::SetElementsLength accepts |
2135 // (currently anything except for external arrays which means anything with | 2124 // (currently anything except for external arrays which means anything with |
2136 // elements of FixedArray type). Value must be a number, but only smis are | 2125 // elements of FixedArray type). Value must be a number, but only smis are |
2137 // accepted as the most common case. | 2126 // accepted as the most common case. |
2138 Label miss; | 2127 Label miss; |
2139 | 2128 |
2140 Register receiver; | 2129 Register receiver; |
2141 Register value; | 2130 Register value; |
2142 if (kind() == Code::KEYED_STORE_IC) { | 2131 if (kind() == Code::KEYED_STORE_IC) { |
(...skipping 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5578 MemOperand(fp, 6 * kPointerSize), | 5567 MemOperand(fp, 6 * kPointerSize), |
5579 NULL); | 5568 NULL); |
5580 } | 5569 } |
5581 | 5570 |
5582 | 5571 |
5583 #undef __ | 5572 #undef __ |
5584 | 5573 |
5585 } } // namespace v8::internal | 5574 } } // namespace v8::internal |
5586 | 5575 |
5587 #endif // V8_TARGET_ARCH_ARM | 5576 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |