| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // static | 42 // static |
| 43 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate, | 43 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate, |
| 44 TypeofMode typeof_mode) { | 44 TypeofMode typeof_mode) { |
| 45 auto code = LoadGlobalIC::initialize_stub_in_optimized_code( | 45 auto code = LoadGlobalIC::initialize_stub_in_optimized_code( |
| 46 isolate, LoadGlobalICState(typeof_mode).GetExtraICState()); | 46 isolate, LoadGlobalICState(typeof_mode).GetExtraICState()); |
| 47 return Callable(code, LoadGlobalWithVectorDescriptor(isolate)); | 47 return Callable(code, LoadGlobalWithVectorDescriptor(isolate)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // static | 50 // static |
| 51 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { | 51 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { |
| 52 if (FLAG_tf_load_ic_stub) { |
| 53 KeyedLoadICTrampolineTFStub stub(isolate); |
| 54 return Callable(stub.GetCode(), LoadDescriptor(isolate)); |
| 55 } |
| 52 KeyedLoadICTrampolineStub stub(isolate); | 56 KeyedLoadICTrampolineStub stub(isolate); |
| 53 return Callable(stub.GetCode(), LoadDescriptor(isolate)); | 57 return Callable(stub.GetCode(), LoadDescriptor(isolate)); |
| 54 } | 58 } |
| 55 | 59 |
| 56 | 60 |
| 57 // static | 61 // static |
| 58 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { | 62 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { |
| 59 auto code = | 63 auto code = KeyedLoadIC::initialize_stub_in_optimized_code(isolate); |
| 60 KeyedLoadIC::initialize_stub_in_optimized_code(isolate, kNoExtraICState); | |
| 61 return Callable(code, LoadWithVectorDescriptor(isolate)); | 64 return Callable(code, LoadWithVectorDescriptor(isolate)); |
| 62 } | 65 } |
| 63 | 66 |
| 67 // static |
| 68 Callable CodeFactory::KeyedLoadIC_Megamorphic(Isolate* isolate) { |
| 69 return Callable(isolate->builtins()->KeyedLoadIC_Megamorphic(), |
| 70 LoadWithVectorDescriptor(isolate)); |
| 71 } |
| 64 | 72 |
| 65 // static | 73 // static |
| 66 Callable CodeFactory::CallIC(Isolate* isolate, int argc, | 74 Callable CodeFactory::CallIC(Isolate* isolate, int argc, |
| 67 ConvertReceiverMode mode, | 75 ConvertReceiverMode mode, |
| 68 TailCallMode tail_call_mode) { | 76 TailCallMode tail_call_mode) { |
| 69 CallICTrampolineStub stub(isolate, CallICState(argc, mode, tail_call_mode)); | 77 CallICTrampolineStub stub(isolate, CallICState(argc, mode, tail_call_mode)); |
| 70 return Callable(stub.GetCode(), CallFunctionWithFeedbackDescriptor(isolate)); | 78 return Callable(stub.GetCode(), CallFunctionWithFeedbackDescriptor(isolate)); |
| 71 } | 79 } |
| 72 | 80 |
| 73 | 81 |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 } | 610 } |
| 603 | 611 |
| 604 // static | 612 // static |
| 605 Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) { | 613 Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) { |
| 606 return Callable(isolate->builtins()->InterpreterOnStackReplacement(), | 614 return Callable(isolate->builtins()->InterpreterOnStackReplacement(), |
| 607 ContextOnlyDescriptor(isolate)); | 615 ContextOnlyDescriptor(isolate)); |
| 608 } | 616 } |
| 609 | 617 |
| 610 } // namespace internal | 618 } // namespace internal |
| 611 } // namespace v8 | 619 } // namespace v8 |
| OLD | NEW |