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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 | 311 |
312 // static | 312 // static |
313 Callable CodeFactory::Construct(Isolate* isolate) { | 313 Callable CodeFactory::Construct(Isolate* isolate) { |
314 return Callable(isolate->builtins()->Construct(), | 314 return Callable(isolate->builtins()->Construct(), |
315 ConstructTrampolineDescriptor(isolate)); | 315 ConstructTrampolineDescriptor(isolate)); |
316 } | 316 } |
317 | 317 |
318 | 318 |
319 // static | 319 // static |
| 320 Callable CodeFactory::ConstructFunction(Isolate* isolate) { |
| 321 return Callable(isolate->builtins()->ConstructFunction(), |
| 322 ConstructTrampolineDescriptor(isolate)); |
| 323 } |
| 324 |
| 325 |
| 326 // static |
320 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { | 327 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { |
321 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), | 328 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), |
322 InterpreterPushArgsAndCallDescriptor(isolate)); | 329 InterpreterPushArgsAndCallDescriptor(isolate)); |
323 } | 330 } |
324 | 331 |
325 | 332 |
326 // static | 333 // static |
327 Callable CodeFactory::InterpreterPushArgsAndConstruct(Isolate* isolate) { | 334 Callable CodeFactory::InterpreterPushArgsAndConstruct(Isolate* isolate) { |
328 return Callable(isolate->builtins()->InterpreterPushArgsAndConstruct(), | 335 return Callable(isolate->builtins()->InterpreterPushArgsAndConstruct(), |
329 InterpreterPushArgsAndConstructDescriptor(isolate)); | 336 InterpreterPushArgsAndConstructDescriptor(isolate)); |
330 } | 337 } |
331 | 338 |
332 | 339 |
333 // static | 340 // static |
334 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { | 341 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { |
335 // TODO(rmcilroy): Deal with runtime functions that return two values. | 342 // TODO(rmcilroy): Deal with runtime functions that return two values. |
336 // Note: If we ever use fpregs in the interpreter then we will need to | 343 // Note: If we ever use fpregs in the interpreter then we will need to |
337 // save fpregs too. | 344 // save fpregs too. |
338 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); | 345 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); |
339 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 346 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
340 } | 347 } |
341 | 348 |
342 } // namespace internal | 349 } // namespace internal |
343 } // namespace v8 | 350 } // namespace v8 |
OLD | NEW |