| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 | 177 |
| 178 // static | 178 // static |
| 179 Callable CodeFactory::ToString(Isolate* isolate) { | 179 Callable CodeFactory::ToString(Isolate* isolate) { |
| 180 ToStringStub stub(isolate); | 180 ToStringStub stub(isolate); |
| 181 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 181 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 | 184 |
| 185 // static | 185 // static |
| 186 Callable CodeFactory::ToLength(Isolate* isolate) { |
| 187 ToLengthStub stub(isolate); |
| 188 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 189 } |
| 190 |
| 191 |
| 192 // static |
| 186 Callable CodeFactory::ToObject(Isolate* isolate) { | 193 Callable CodeFactory::ToObject(Isolate* isolate) { |
| 187 ToObjectStub stub(isolate); | 194 ToObjectStub stub(isolate); |
| 188 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 195 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 189 } | 196 } |
| 190 | 197 |
| 191 | 198 |
| 192 // static | 199 // static |
| 193 Callable CodeFactory::StringAdd(Isolate* isolate, StringAddFlags flags, | 200 Callable CodeFactory::StringAdd(Isolate* isolate, StringAddFlags flags, |
| 194 PretenureFlag pretenure_flag) { | 201 PretenureFlag pretenure_flag) { |
| 195 StringAddStub stub(isolate, flags, pretenure_flag); | 202 StringAddStub stub(isolate, flags, pretenure_flag); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { | 300 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { |
| 294 // TODO(rmcilroy): Deal with runtime functions that return two values. | 301 // TODO(rmcilroy): Deal with runtime functions that return two values. |
| 295 // Note: If we ever use fpregs in the interpreter then we will need to | 302 // Note: If we ever use fpregs in the interpreter then we will need to |
| 296 // save fpregs too. | 303 // save fpregs too. |
| 297 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); | 304 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); |
| 298 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 305 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
| 299 } | 306 } |
| 300 | 307 |
| 301 } // namespace internal | 308 } // namespace internal |
| 302 } // namespace v8 | 309 } // namespace v8 |
| OLD | NEW |