| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 isolate, initialization_state, state); | 52 isolate, initialization_state, state); |
| 53 if (initialization_state != MEGAMORPHIC) { | 53 if (initialization_state != MEGAMORPHIC) { |
| 54 return Callable(code, LoadWithVectorDescriptor(isolate)); | 54 return Callable(code, LoadWithVectorDescriptor(isolate)); |
| 55 } | 55 } |
| 56 return Callable(code, LoadDescriptor(isolate)); | 56 return Callable(code, LoadDescriptor(isolate)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 // static | 60 // static |
| 61 Callable CodeFactory::CallIC(Isolate* isolate, int argc, | 61 Callable CodeFactory::CallIC(Isolate* isolate, int argc, |
| 62 ConvertReceiverMode mode) { | 62 ConvertReceiverMode mode, |
| 63 return Callable(CallIC::initialize_stub(isolate, argc, mode), | 63 TailCallMode tail_call_mode) { |
| 64 return Callable(CallIC::initialize_stub(isolate, argc, mode, tail_call_mode), |
| 64 CallFunctionWithFeedbackDescriptor(isolate)); | 65 CallFunctionWithFeedbackDescriptor(isolate)); |
| 65 } | 66 } |
| 66 | 67 |
| 67 | 68 |
| 68 // static | 69 // static |
| 69 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, | 70 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, |
| 70 ConvertReceiverMode mode) { | 71 ConvertReceiverMode mode, |
| 71 return Callable( | 72 TailCallMode tail_call_mode) { |
| 72 CallIC::initialize_stub_in_optimized_code(isolate, argc, mode), | 73 return Callable(CallIC::initialize_stub_in_optimized_code(isolate, argc, mode, |
| 73 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); | 74 tail_call_mode), |
| 75 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); |
| 74 } | 76 } |
| 75 | 77 |
| 76 | 78 |
| 77 // static | 79 // static |
| 78 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { | 80 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { |
| 79 return Callable( | 81 return Callable( |
| 80 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), | 82 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), |
| 81 VectorStoreICTrampolineDescriptor(isolate)); | 83 VectorStoreICTrampolineDescriptor(isolate)); |
| 82 } | 84 } |
| 83 | 85 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // static | 370 // static |
| 369 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { | 371 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { |
| 370 // 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 |
| 371 // save fpregs too. | 373 // save fpregs too. |
| 372 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); | 374 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); |
| 373 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 375 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
| 374 } | 376 } |
| 375 | 377 |
| 376 } // namespace internal | 378 } // namespace internal |
| 377 } // namespace v8 | 379 } // namespace v8 |
| OLD | NEW |