| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // static | 94 // static |
| 95 Callable CodeFactory::StoreICInOptimizedCode(Isolate* isolate, | 95 Callable CodeFactory::StoreICInOptimizedCode(Isolate* isolate, |
| 96 LanguageMode language_mode) { | 96 LanguageMode language_mode) { |
| 97 StoreICStub stub(isolate, StoreICState(language_mode)); | 97 StoreICStub stub(isolate, StoreICState(language_mode)); |
| 98 return make_callable(stub); | 98 return make_callable(stub); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // static | 101 // static |
| 102 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, | 102 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, |
| 103 LanguageMode language_mode) { | 103 LanguageMode language_mode) { |
| 104 if (FLAG_tf_store_ic_stub) { |
| 105 KeyedStoreICTrampolineTFStub stub(isolate, StoreICState(language_mode)); |
| 106 return make_callable(stub); |
| 107 } |
| 104 KeyedStoreICTrampolineStub stub(isolate, StoreICState(language_mode)); | 108 KeyedStoreICTrampolineStub stub(isolate, StoreICState(language_mode)); |
| 105 return make_callable(stub); | 109 return make_callable(stub); |
| 106 } | 110 } |
| 107 | 111 |
| 108 // static | 112 // static |
| 109 Callable CodeFactory::KeyedStoreICInOptimizedCode(Isolate* isolate, | 113 Callable CodeFactory::KeyedStoreICInOptimizedCode(Isolate* isolate, |
| 110 LanguageMode language_mode) { | 114 LanguageMode language_mode) { |
| 115 if (FLAG_tf_store_ic_stub) { |
| 116 KeyedStoreICTFStub stub(isolate, StoreICState(language_mode)); |
| 117 return make_callable(stub); |
| 118 } |
| 111 KeyedStoreICStub stub(isolate, StoreICState(language_mode)); | 119 KeyedStoreICStub stub(isolate, StoreICState(language_mode)); |
| 112 return make_callable(stub); | 120 return make_callable(stub); |
| 113 } | 121 } |
| 114 | 122 |
| 115 // static | 123 // static |
| 124 Callable CodeFactory::KeyedStoreIC_Megamorphic(Isolate* isolate, |
| 125 LanguageMode language_mode) { |
| 126 return Callable(language_mode == STRICT |
| 127 ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict() |
| 128 : isolate->builtins()->KeyedStoreIC_Megamorphic(), |
| 129 StoreWithVectorDescriptor(isolate)); |
| 130 } |
| 131 |
| 132 // static |
| 116 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { | 133 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { |
| 117 CompareICStub stub(isolate, op); | 134 CompareICStub stub(isolate, op); |
| 118 return make_callable(stub); | 135 return make_callable(stub); |
| 119 } | 136 } |
| 120 | 137 |
| 121 // static | 138 // static |
| 122 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op) { | 139 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op) { |
| 123 BinaryOpICStub stub(isolate, op); | 140 BinaryOpICStub stub(isolate, op); |
| 124 return make_callable(stub); | 141 return make_callable(stub); |
| 125 } | 142 } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 494 } |
| 478 | 495 |
| 479 // static | 496 // static |
| 480 Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) { | 497 Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) { |
| 481 return Callable(isolate->builtins()->InterpreterOnStackReplacement(), | 498 return Callable(isolate->builtins()->InterpreterOnStackReplacement(), |
| 482 ContextOnlyDescriptor(isolate)); | 499 ContextOnlyDescriptor(isolate)); |
| 483 } | 500 } |
| 484 | 501 |
| 485 } // namespace internal | 502 } // namespace internal |
| 486 } // namespace v8 | 503 } // namespace v8 |
| OLD | NEW |