| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // static | 59 // static |
| 60 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, | 60 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, |
| 61 CallICState::CallType call_type) { | 61 CallICState::CallType call_type) { |
| 62 return Callable( | 62 return Callable( |
| 63 CallIC::initialize_stub_in_optimized_code(isolate, argc, call_type), | 63 CallIC::initialize_stub_in_optimized_code(isolate, argc, call_type), |
| 64 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); | 64 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 | 67 |
| 68 // static | 68 // static |
| 69 Callable CodeFactory::StoreIC(Isolate* isolate, StrictMode mode) { | 69 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { |
| 70 return Callable(StoreIC::initialize_stub(isolate, mode), | 70 return Callable(StoreIC::initialize_stub(isolate, language_mode), |
| 71 StoreDescriptor(isolate)); | 71 StoreDescriptor(isolate)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 | 74 |
| 75 // static | 75 // static |
| 76 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, StrictMode mode) { | 76 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, |
| 77 Handle<Code> ic = mode == SLOPPY | 77 LanguageMode language_mode) { |
| 78 ? isolate->builtins()->KeyedStoreIC_Initialize() | 78 Handle<Code> ic = is_strict(language_mode) |
| 79 : isolate->builtins()->KeyedStoreIC_Initialize_Strict(); | 79 ? isolate->builtins()->KeyedStoreIC_Initialize_Strict() |
| 80 : isolate->builtins()->KeyedStoreIC_Initialize(); |
| 80 return Callable(ic, StoreDescriptor(isolate)); | 81 return Callable(ic, StoreDescriptor(isolate)); |
| 81 } | 82 } |
| 82 | 83 |
| 83 | 84 |
| 84 // static | 85 // static |
| 85 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { | 86 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { |
| 86 Handle<Code> code = CompareIC::GetUninitialized(isolate, op); | 87 Handle<Code> code = CompareIC::GetUninitialized(isolate, op); |
| 87 return Callable(code, BinaryOpDescriptor(isolate)); | 88 return Callable(code, BinaryOpDescriptor(isolate)); |
| 88 } | 89 } |
| 89 | 90 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 130 |
| 130 // static | 131 // static |
| 131 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 132 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
| 132 CallFunctionFlags flags) { | 133 CallFunctionFlags flags) { |
| 133 CallFunctionStub stub(isolate, argc, flags); | 134 CallFunctionStub stub(isolate, argc, flags); |
| 134 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 135 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 135 } | 136 } |
| 136 | 137 |
| 137 } // namespace internal | 138 } // namespace internal |
| 138 } // namespace v8 | 139 } // namespace v8 |
| OLD | NEW |