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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 CodeStubInterfaceDescriptor* descriptor, | 174 CodeStubInterfaceDescriptor* descriptor, |
175 int constant_stack_parameter_count) { | 175 int constant_stack_parameter_count) { |
176 // register state | 176 // register state |
177 // a0 -- number of arguments | 177 // a0 -- number of arguments |
178 // a1 -- function | 178 // a1 -- function |
179 // a2 -- type info cell with elements kind | 179 // a2 -- type info cell with elements kind |
180 static Register registers[] = { a1, a2 }; | 180 static Register registers[] = { a1, a2 }; |
181 descriptor->register_param_count_ = 2; | 181 descriptor->register_param_count_ = 2; |
182 if (constant_stack_parameter_count != 0) { | 182 if (constant_stack_parameter_count != 0) { |
183 // stack param count needs (constructor pointer, and single argument) | 183 // stack param count needs (constructor pointer, and single argument) |
184 descriptor->stack_parameter_count_ = &a0; | 184 descriptor->stack_parameter_count_ = a0; |
185 } | 185 } |
186 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 186 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
187 descriptor->register_params_ = registers; | 187 descriptor->register_params_ = registers; |
188 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 188 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
189 descriptor->deoptimization_handler_ = | 189 descriptor->deoptimization_handler_ = |
190 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; | 190 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; |
191 } | 191 } |
192 | 192 |
193 | 193 |
194 static void InitializeInternalArrayConstructorDescriptor( | 194 static void InitializeInternalArrayConstructorDescriptor( |
195 Isolate* isolate, | 195 Isolate* isolate, |
196 CodeStubInterfaceDescriptor* descriptor, | 196 CodeStubInterfaceDescriptor* descriptor, |
197 int constant_stack_parameter_count) { | 197 int constant_stack_parameter_count) { |
198 // register state | 198 // register state |
199 // a0 -- number of arguments | 199 // a0 -- number of arguments |
200 // a1 -- constructor function | 200 // a1 -- constructor function |
201 static Register registers[] = { a1 }; | 201 static Register registers[] = { a1 }; |
202 descriptor->register_param_count_ = 1; | 202 descriptor->register_param_count_ = 1; |
203 | 203 |
204 if (constant_stack_parameter_count != 0) { | 204 if (constant_stack_parameter_count != 0) { |
205 // Stack param count needs (constructor pointer, and single argument). | 205 // Stack param count needs (constructor pointer, and single argument). |
206 descriptor->stack_parameter_count_ = &a0; | 206 descriptor->stack_parameter_count_ = a0; |
207 } | 207 } |
208 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 208 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
209 descriptor->register_params_ = registers; | 209 descriptor->register_params_ = registers; |
210 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 210 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
211 descriptor->deoptimization_handler_ = | 211 descriptor->deoptimization_handler_ = |
212 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; | 212 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; |
213 } | 213 } |
214 | 214 |
215 | 215 |
216 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 216 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
(...skipping 6014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6231 __ bind(&fast_elements_case); | 6231 __ bind(&fast_elements_case); |
6232 GenerateCase(masm, FAST_ELEMENTS); | 6232 GenerateCase(masm, FAST_ELEMENTS); |
6233 } | 6233 } |
6234 | 6234 |
6235 | 6235 |
6236 #undef __ | 6236 #undef __ |
6237 | 6237 |
6238 } } // namespace v8::internal | 6238 } } // namespace v8::internal |
6239 | 6239 |
6240 #endif // V8_TARGET_ARCH_MIPS | 6240 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |