| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 | 132 |
| 133 // static | 133 // static |
| 134 Callable CodeFactory::InstanceOf(Isolate* isolate) { | 134 Callable CodeFactory::InstanceOf(Isolate* isolate) { |
| 135 InstanceOfStub stub(isolate); | 135 InstanceOfStub stub(isolate); |
| 136 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 136 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 137 } | 137 } |
| 138 | 138 |
| 139 | 139 |
| 140 // static | 140 // static |
| 141 Callable CodeFactory::GetProperty(Isolate* isolate) { |
| 142 GetPropertyStub stub(isolate); |
| 143 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 144 } |
| 145 |
| 146 // static |
| 141 Callable CodeFactory::ToBoolean(Isolate* isolate) { | 147 Callable CodeFactory::ToBoolean(Isolate* isolate) { |
| 142 ToBooleanStub stub(isolate); | 148 ToBooleanStub stub(isolate); |
| 143 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 149 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 144 } | 150 } |
| 145 | 151 |
| 146 | 152 |
| 147 // static | 153 // static |
| 148 Callable CodeFactory::ToNumber(Isolate* isolate) { | 154 Callable CodeFactory::ToNumber(Isolate* isolate) { |
| 149 return Callable(isolate->builtins()->ToNumber(), | 155 return Callable(isolate->builtins()->ToNumber(), |
| 150 TypeConversionDescriptor(isolate)); | 156 TypeConversionDescriptor(isolate)); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 195 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 190 } | 196 } |
| 191 | 197 |
| 192 | 198 |
| 193 // static | 199 // static |
| 194 Callable CodeFactory::ToObject(Isolate* isolate) { | 200 Callable CodeFactory::ToObject(Isolate* isolate) { |
| 195 ToObjectStub stub(isolate); | 201 ToObjectStub stub(isolate); |
| 196 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 202 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 197 } | 203 } |
| 198 | 204 |
| 205 // static |
| 206 Callable CodeFactory::NonPrimitiveToPrimitive(Isolate* isolate, |
| 207 ToPrimitiveHint hint) { |
| 208 return Callable(isolate->builtins()->NonPrimitiveToPrimitive(hint), |
| 209 TypeConversionDescriptor(isolate)); |
| 210 } |
| 211 |
| 212 // static |
| 213 Callable CodeFactory::OrdinaryToPrimitive(Isolate* isolate, |
| 214 OrdinaryToPrimitiveHint hint) { |
| 215 return Callable(isolate->builtins()->OrdinaryToPrimitive(hint), |
| 216 TypeConversionDescriptor(isolate)); |
| 217 } |
| 199 | 218 |
| 200 // static | 219 // static |
| 201 Callable CodeFactory::NumberToString(Isolate* isolate) { | 220 Callable CodeFactory::NumberToString(Isolate* isolate) { |
| 202 NumberToStringStub stub(isolate); | 221 NumberToStringStub stub(isolate); |
| 203 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 222 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 204 } | 223 } |
| 205 | 224 |
| 206 | |
| 207 // static | 225 // static |
| 208 Callable CodeFactory::RegExpConstructResult(Isolate* isolate) { | 226 Callable CodeFactory::RegExpConstructResult(Isolate* isolate) { |
| 209 RegExpConstructResultStub stub(isolate); | 227 RegExpConstructResultStub stub(isolate); |
| 210 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 228 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 211 } | 229 } |
| 212 | 230 |
| 213 | 231 |
| 214 // static | 232 // static |
| 215 Callable CodeFactory::RegExpExec(Isolate* isolate) { | 233 Callable CodeFactory::RegExpExec(Isolate* isolate) { |
| 216 RegExpExecStub stub(isolate); | 234 RegExpExecStub stub(isolate); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 // static | 590 // static |
| 573 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { | 591 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { |
| 574 // Note: If we ever use fpregs in the interpreter then we will need to | 592 // Note: If we ever use fpregs in the interpreter then we will need to |
| 575 // save fpregs too. | 593 // save fpregs too. |
| 576 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); | 594 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); |
| 577 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 595 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
| 578 } | 596 } |
| 579 | 597 |
| 580 } // namespace internal | 598 } // namespace internal |
| 581 } // namespace v8 | 599 } // namespace v8 |
| OLD | NEW |