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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 CallInterfaceDescriptor descriptor = initialization_state != MEGAMORPHIC | 113 CallInterfaceDescriptor descriptor = initialization_state != MEGAMORPHIC |
114 ? VectorStoreICDescriptor(isolate) | 114 ? VectorStoreICDescriptor(isolate) |
115 : StoreDescriptor(isolate); | 115 : StoreDescriptor(isolate); |
116 return Callable(KeyedStoreIC::initialize_stub_in_optimized_code( | 116 return Callable(KeyedStoreIC::initialize_stub_in_optimized_code( |
117 isolate, language_mode, initialization_state), | 117 isolate, language_mode, initialization_state), |
118 descriptor); | 118 descriptor); |
119 } | 119 } |
120 | 120 |
121 | 121 |
122 // static | 122 // static |
123 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op, | 123 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { |
124 Strength strength) { | 124 Handle<Code> code = CompareIC::GetUninitialized(isolate, op); |
125 Handle<Code> code = CompareIC::GetUninitialized(isolate, op, strength); | |
126 return Callable(code, CompareDescriptor(isolate)); | 125 return Callable(code, CompareDescriptor(isolate)); |
127 } | 126 } |
128 | 127 |
129 | 128 |
130 // static | 129 // static |
131 Callable CodeFactory::CompareNilIC(Isolate* isolate, NilValue nil_value) { | 130 Callable CodeFactory::CompareNilIC(Isolate* isolate, NilValue nil_value) { |
132 Handle<Code> code = CompareNilICStub::GetUninitialized(isolate, nil_value); | 131 Handle<Code> code = CompareNilICStub::GetUninitialized(isolate, nil_value); |
133 return Callable(code, CompareNilDescriptor(isolate)); | 132 return Callable(code, CompareNilDescriptor(isolate)); |
134 } | 133 } |
135 | 134 |
136 | 135 |
137 // static | 136 // static |
138 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op, | 137 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op) { |
139 Strength strength) { | 138 BinaryOpICStub stub(isolate, op); |
140 BinaryOpICStub stub(isolate, op, strength); | |
141 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 139 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
142 } | 140 } |
143 | 141 |
144 | 142 |
145 // static | 143 // static |
146 Callable CodeFactory::InstanceOf(Isolate* isolate) { | 144 Callable CodeFactory::InstanceOf(Isolate* isolate) { |
147 InstanceOfStub stub(isolate); | 145 InstanceOfStub stub(isolate); |
148 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 146 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
149 } | 147 } |
150 | 148 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 // static | 371 // static |
374 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { | 372 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { |
375 // Note: If we ever use fpregs in the interpreter then we will need to | 373 // Note: If we ever use fpregs in the interpreter then we will need to |
376 // save fpregs too. | 374 // save fpregs too. |
377 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); | 375 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); |
378 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 376 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
379 } | 377 } |
380 | 378 |
381 } // namespace internal | 379 } // namespace internal |
382 } // namespace v8 | 380 } // namespace v8 |
OLD | NEW |