OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // static | 273 // static |
274 Callable CodeFactory::FastNewClosure(Isolate* isolate, | 274 Callable CodeFactory::FastNewClosure(Isolate* isolate, |
275 LanguageMode language_mode, | 275 LanguageMode language_mode, |
276 FunctionKind kind) { | 276 FunctionKind kind) { |
277 FastNewClosureStub stub(isolate, language_mode, kind); | 277 FastNewClosureStub stub(isolate, language_mode, kind); |
278 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 278 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
279 } | 279 } |
280 | 280 |
281 | 281 |
282 // static | 282 // static |
| 283 Callable CodeFactory::FastNewRestParameter(Isolate* isolate) { |
| 284 FastNewRestParameterStub stub(isolate); |
| 285 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 286 } |
| 287 |
| 288 |
| 289 // static |
283 Callable CodeFactory::ArgumentsAccess(Isolate* isolate, | 290 Callable CodeFactory::ArgumentsAccess(Isolate* isolate, |
284 bool is_unmapped_arguments, | 291 bool is_unmapped_arguments, |
285 bool has_duplicate_parameters) { | 292 bool has_duplicate_parameters) { |
286 ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType( | 293 ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType( |
287 is_unmapped_arguments, has_duplicate_parameters); | 294 is_unmapped_arguments, has_duplicate_parameters); |
288 ArgumentsAccessStub stub(isolate, type); | 295 ArgumentsAccessStub stub(isolate, type); |
289 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 296 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
290 } | 297 } |
291 | 298 |
292 | 299 |
293 // static | 300 // static |
294 Callable CodeFactory::RestArgumentsAccess(Isolate* isolate) { | |
295 RestParamAccessStub stub(isolate); | |
296 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | |
297 } | |
298 | |
299 | |
300 // static | |
301 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { | 301 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { |
302 AllocateHeapNumberStub stub(isolate); | 302 AllocateHeapNumberStub stub(isolate); |
303 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 303 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
304 } | 304 } |
305 | 305 |
306 | 306 |
307 // static | 307 // static |
308 Callable CodeFactory::AllocateMutableHeapNumber(Isolate* isolate) { | 308 Callable CodeFactory::AllocateMutableHeapNumber(Isolate* isolate) { |
309 AllocateMutableHeapNumberStub stub(isolate); | 309 AllocateMutableHeapNumberStub stub(isolate); |
310 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 310 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // static | 370 // static |
371 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { | 371 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { |
372 // Note: If we ever use fpregs in the interpreter then we will need to | 372 // Note: If we ever use fpregs in the interpreter then we will need to |
373 // save fpregs too. | 373 // save fpregs too. |
374 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); | 374 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); |
375 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 375 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
376 } | 376 } |
377 | 377 |
378 } // namespace internal | 378 } // namespace internal |
379 } // namespace v8 | 379 } // namespace v8 |
OLD | NEW |