| 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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) { | 472 Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) { |
| 473 return Load(rep, PointerConstant(address), Int32Constant(offset)); | 473 return Load(rep, PointerConstant(address), Int32Constant(offset)); |
| 474 } | 474 } |
| 475 Node* StoreToPointer(void* address, MachineType rep, Node* node) { | 475 Node* StoreToPointer(void* address, MachineType rep, Node* node) { |
| 476 return Store(rep, PointerConstant(address), node); | 476 return Store(rep, PointerConstant(address), node); |
| 477 } | 477 } |
| 478 Node* StringConstant(const char* string) { | 478 Node* StringConstant(const char* string) { |
| 479 return HeapConstant(isolate()->factory()->InternalizeUtf8String(string)); | 479 return HeapConstant(isolate()->factory()->InternalizeUtf8String(string)); |
| 480 } | 480 } |
| 481 | 481 |
| 482 // Call a given call descriptor and the given arguments. | |
| 483 Node* CallN(CallDescriptor* desc, Node* function, Node** args); | |
| 484 | |
| 485 // Call through CallFunctionStub with lazy deopt and frame-state. | 482 // Call through CallFunctionStub with lazy deopt and frame-state. |
| 486 Node* CallFunctionStub0(Node* function, Node* receiver, Node* context, | 483 Node* CallFunctionStub0(Node* function, Node* receiver, Node* context, |
| 487 Node* frame_state, CallFunctionFlags flags); | 484 Node* frame_state, CallFunctionFlags flags); |
| 488 // Call to a JS function with zero arguments. | 485 // Call to a JS function with zero parameters. |
| 489 Node* CallJS0(Node* function, Node* receiver, Node* context, | 486 Node* CallJS0(Node* function, Node* receiver, Node* context, |
| 490 Node* frame_state); | 487 Node* frame_state); |
| 491 // Call to a runtime function with zero arguments. | 488 // Call to a runtime function with zero parameters. |
| 492 Node* CallRuntime1(Runtime::FunctionId function, Node* arg0, Node* context, | 489 Node* CallRuntime1(Runtime::FunctionId function, Node* arg0, Node* context, |
| 493 Node* frame_state); | 490 Node* frame_state); |
| 494 // Call to a C function with zero arguments. | 491 // Call to a C function with zero parameters. |
| 495 Node* CallCFunction0(MachineType return_type, Node* function); | 492 Node* CallCFunction0(MachineType return_type, Node* function); |
| 496 // Call to a C function with one parameter. | 493 // Call to a C function with one parameter. |
| 497 Node* CallCFunction1(MachineType return_type, MachineType arg0_type, | 494 Node* CallCFunction1(MachineType return_type, MachineType arg0_type, |
| 498 Node* function, Node* arg0); | 495 Node* function, Node* arg0); |
| 499 // Call to a C function with two arguments. | 496 // Call to a C function with two parameters. |
| 500 Node* CallCFunction2(MachineType return_type, MachineType arg0_type, | 497 Node* CallCFunction2(MachineType return_type, MachineType arg0_type, |
| 501 MachineType arg1_type, Node* function, Node* arg0, | 498 MachineType arg1_type, Node* function, Node* arg0, |
| 502 Node* arg1); | 499 Node* arg1); |
| 503 // Call to a C function with eight arguments. | 500 // Call to a C function with eight parameters. |
| 504 Node* CallCFunction8(MachineType return_type, MachineType arg0_type, | 501 Node* CallCFunction8(MachineType return_type, MachineType arg0_type, |
| 505 MachineType arg1_type, MachineType arg2_type, | 502 MachineType arg1_type, MachineType arg2_type, |
| 506 MachineType arg3_type, MachineType arg4_type, | 503 MachineType arg3_type, MachineType arg4_type, |
| 507 MachineType arg5_type, MachineType arg6_type, | 504 MachineType arg5_type, MachineType arg6_type, |
| 508 MachineType arg7_type, Node* function, Node* arg0, | 505 MachineType arg7_type, Node* function, Node* arg0, |
| 509 Node* arg1, Node* arg2, Node* arg3, Node* arg4, | 506 Node* arg1, Node* arg2, Node* arg3, Node* arg4, |
| 510 Node* arg5, Node* arg6, Node* arg7); | 507 Node* arg5, Node* arg6, Node* arg7); |
| 511 | 508 |
| 512 // =========================================================================== | 509 // =========================================================================== |
| 513 // The following utility methods deal with control flow, hence might switch | 510 // The following utility methods deal with control flow, hence might switch |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 BasicBlock* current_block_; | 588 BasicBlock* current_block_; |
| 592 | 589 |
| 593 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); | 590 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |
| 594 }; | 591 }; |
| 595 | 592 |
| 596 } // namespace compiler | 593 } // namespace compiler |
| 597 } // namespace internal | 594 } // namespace internal |
| 598 } // namespace v8 | 595 } // namespace v8 |
| 599 | 596 |
| 600 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 597 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| OLD | NEW |