OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ |
6 #define V8_COMPILER_CODE_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, | 319 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, |
320 Node* arg1, Node* arg2); | 320 Node* arg1, Node* arg2); |
321 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, | 321 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, |
322 Node* arg1, Node* arg2, Node* arg3); | 322 Node* arg1, Node* arg2, Node* arg3); |
323 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, | 323 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, |
324 Node* arg1, Node* arg2, Node* arg3, Node* arg4); | 324 Node* arg1, Node* arg2, Node* arg3, Node* arg4); |
325 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, | 325 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, |
326 Node* arg1, Node* arg2, Node* arg3, Node* arg4, | 326 Node* arg1, Node* arg2, Node* arg3, Node* arg4, |
327 Node* arg5); | 327 Node* arg5); |
328 | 328 |
| 329 // A pair of a zero-based argument index and a value. |
| 330 // It helps writing arguments order independent code. |
| 331 struct Arg { |
| 332 Arg(int index, Node* value) : index(index), value(value) {} |
| 333 |
| 334 int const index; |
| 335 Node* const value; |
| 336 }; |
| 337 |
329 Node* CallStub(Callable const& callable, Node* context, Node* arg1, | 338 Node* CallStub(Callable const& callable, Node* context, Node* arg1, |
330 size_t result_size = 1); | 339 size_t result_size = 1); |
331 Node* CallStub(Callable const& callable, Node* context, Node* arg1, | 340 Node* CallStub(Callable const& callable, Node* context, Node* arg1, |
332 Node* arg2, size_t result_size = 1); | 341 Node* arg2, size_t result_size = 1); |
333 Node* CallStub(Callable const& callable, Node* context, Node* arg1, | 342 Node* CallStub(Callable const& callable, Node* context, Node* arg1, |
334 Node* arg2, Node* arg3, size_t result_size = 1); | 343 Node* arg2, Node* arg3, size_t result_size = 1); |
335 Node* CallStubN(Callable const& callable, Node** args, | 344 Node* CallStubN(Callable const& callable, Node** args, |
336 size_t result_size = 1); | 345 size_t result_size = 1); |
337 | 346 |
338 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 347 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
339 Node* context, Node* arg1, size_t result_size = 1); | 348 Node* context, Node* arg1, size_t result_size = 1); |
340 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 349 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
341 Node* context, Node* arg1, Node* arg2, size_t result_size = 1); | 350 Node* context, Node* arg1, Node* arg2, size_t result_size = 1); |
342 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 351 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
343 Node* context, Node* arg1, Node* arg2, Node* arg3, | 352 Node* context, Node* arg1, Node* arg2, Node* arg3, |
344 size_t result_size = 1); | 353 size_t result_size = 1); |
345 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 354 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
346 Node* context, Node* arg1, Node* arg2, Node* arg3, Node* arg4, | 355 Node* context, Node* arg1, Node* arg2, Node* arg3, Node* arg4, |
347 size_t result_size = 1); | 356 size_t result_size = 1); |
348 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 357 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
349 Node* context, Node* arg1, Node* arg2, Node* arg3, Node* arg4, | 358 Node* context, Node* arg1, Node* arg2, Node* arg3, Node* arg4, |
350 Node* arg5, size_t result_size = 1); | 359 Node* arg5, size_t result_size = 1); |
| 360 |
| 361 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
| 362 Node* context, const Arg& arg1, const Arg& arg2, |
| 363 size_t result_size = 1); |
| 364 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
| 365 Node* context, const Arg& arg1, const Arg& arg2, |
| 366 const Arg& arg3, size_t result_size = 1); |
| 367 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
| 368 Node* context, const Arg& arg1, const Arg& arg2, |
| 369 const Arg& arg3, const Arg& arg4, size_t result_size = 1); |
| 370 Node* CallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
| 371 Node* context, const Arg& arg1, const Arg& arg2, |
| 372 const Arg& arg3, const Arg& arg4, const Arg& arg5, |
| 373 size_t result_size = 1); |
| 374 |
351 Node* CallStubN(const CallInterfaceDescriptor& descriptor, Node* target, | 375 Node* CallStubN(const CallInterfaceDescriptor& descriptor, Node* target, |
352 Node** args, size_t result_size = 1); | 376 Node** args, size_t result_size = 1); |
353 | 377 |
354 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, | 378 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, |
355 size_t result_size = 1); | 379 size_t result_size = 1); |
356 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, | 380 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, |
357 Node* arg2, size_t result_size = 1); | 381 Node* arg2, size_t result_size = 1); |
358 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, | 382 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, |
359 Node* arg2, Node* arg3, size_t result_size = 1); | 383 Node* arg2, Node* arg3, size_t result_size = 1); |
360 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 384 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
361 Node* context, Node* arg1, size_t result_size = 1); | 385 Node* context, Node* arg1, size_t result_size = 1); |
362 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 386 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
363 Node* context, Node* arg1, Node* arg2, | 387 Node* context, Node* arg1, Node* arg2, |
364 size_t result_size = 1); | 388 size_t result_size = 1); |
365 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 389 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
366 Node* context, Node* arg1, Node* arg2, Node* arg3, | 390 Node* context, Node* arg1, Node* arg2, Node* arg3, |
367 size_t result_size = 1); | 391 size_t result_size = 1); |
368 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, | 392 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
369 Node* context, Node* arg1, Node* arg2, Node* arg3, | 393 Node* context, Node* arg1, Node* arg2, Node* arg3, |
370 Node* arg4, size_t result_size = 1); | 394 Node* arg4, size_t result_size = 1); |
371 | 395 |
| 396 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
| 397 Node* context, const Arg& arg1, const Arg& arg2, |
| 398 const Arg& arg3, const Arg& arg4, size_t result_size = 1); |
| 399 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, |
| 400 Node* context, const Arg& arg1, const Arg& arg2, |
| 401 const Arg& arg3, const Arg& arg4, const Arg& arg5, |
| 402 size_t result_size = 1); |
| 403 |
372 Node* TailCallBytecodeDispatch(const CallInterfaceDescriptor& descriptor, | 404 Node* TailCallBytecodeDispatch(const CallInterfaceDescriptor& descriptor, |
373 Node* code_target_address, Node** args); | 405 Node* code_target_address, Node** args); |
374 | 406 |
375 Node* CallJS(Callable const& callable, Node* context, Node* function, | 407 Node* CallJS(Callable const& callable, Node* context, Node* function, |
376 Node* receiver, size_t result_size = 1); | 408 Node* receiver, size_t result_size = 1); |
377 Node* CallJS(Callable const& callable, Node* context, Node* function, | 409 Node* CallJS(Callable const& callable, Node* context, Node* function, |
378 Node* receiver, Node* arg1, size_t result_size = 1); | 410 Node* receiver, Node* arg1, size_t result_size = 1); |
379 Node* CallJS(Callable const& callable, Node* context, Node* function, | 411 Node* CallJS(Callable const& callable, Node* context, Node* function, |
380 Node* receiver, Node* arg1, Node* arg2, size_t result_size = 1); | 412 Node* receiver, Node* arg1, Node* arg2, size_t result_size = 1); |
381 | 413 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 // Map of variables to the list of value nodes that have been added from each | 486 // Map of variables to the list of value nodes that have been added from each |
455 // merge path in their order of merging. | 487 // merge path in their order of merging. |
456 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 488 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
457 }; | 489 }; |
458 | 490 |
459 } // namespace compiler | 491 } // namespace compiler |
460 } // namespace internal | 492 } // namespace internal |
461 } // namespace v8 | 493 } // namespace v8 |
462 | 494 |
463 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 495 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
OLD | NEW |