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 498 matching lines...) Loading... |
509 #define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \ | 509 #define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \ |
510 Callable CodeFactory::Allocate##Type(Isolate* isolate) { \ | 510 Callable CodeFactory::Allocate##Type(Isolate* isolate) { \ |
511 Allocate##Type##Stub stub(isolate); \ | 511 Allocate##Type##Stub stub(isolate); \ |
512 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); \ | 512 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); \ |
513 } | 513 } |
514 SIMD128_TYPES(SIMD128_ALLOC) | 514 SIMD128_TYPES(SIMD128_ALLOC) |
515 #undef SIMD128_ALLOC | 515 #undef SIMD128_ALLOC |
516 | 516 |
517 // static | 517 // static |
518 Callable CodeFactory::Allocate(Isolate* isolate, PretenureFlag pretenure_flag) { | 518 Callable CodeFactory::Allocate(Isolate* isolate, PretenureFlag pretenure_flag) { |
519 AllocateStub stub(isolate, pretenure_flag); | 519 return Callable(pretenure_flag == NOT_TENURED |
520 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 520 ? isolate->builtins()->AllocateInNewSpace() |
| 521 : isolate->builtins()->AllocateInOldSpace(), |
| 522 AllocateDescriptor(isolate)); |
521 } | 523 } |
522 | 524 |
523 // static | 525 // static |
524 Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) { | 526 Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) { |
525 return Callable(isolate->builtins()->ArgumentsAdaptorTrampoline(), | 527 return Callable(isolate->builtins()->ArgumentsAdaptorTrampoline(), |
526 ArgumentAdaptorDescriptor(isolate)); | 528 ArgumentAdaptorDescriptor(isolate)); |
527 } | 529 } |
528 | 530 |
529 | 531 |
530 // static | 532 // static |
(...skipping 44 matching lines...) Loading... |
575 // static | 577 // static |
576 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { | 578 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { |
577 // Note: If we ever use fpregs in the interpreter then we will need to | 579 // Note: If we ever use fpregs in the interpreter then we will need to |
578 // save fpregs too. | 580 // save fpregs too. |
579 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); | 581 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); |
580 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 582 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
581 } | 583 } |
582 | 584 |
583 } // namespace internal | 585 } // namespace internal |
584 } // namespace v8 | 586 } // namespace v8 |
OLD | NEW |