| 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/compiler/machine-operator.h" | 5 #include "src/compiler/machine-operator.h" |
| 6 | 6 |
| 7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
| 8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
| 9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
| 10 | 10 |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 struct Name##Operator final : public Operator { \ | 476 struct Name##Operator final : public Operator { \ |
| 477 Name##Operator() \ | 477 Name##Operator() \ |
| 478 : Operator(IrOpcode::k##Name, \ | 478 : Operator(IrOpcode::k##Name, \ |
| 479 Operator::kEliminatable | Operator::kNoRead | properties, \ | 479 Operator::kEliminatable | Operator::kNoRead | properties, \ |
| 480 #Name, 2, 0, 1, 2, 0, 0) {} \ | 480 #Name, 2, 0, 1, 2, 0, 0) {} \ |
| 481 }; \ | 481 }; \ |
| 482 Name##Operator k##Name; | 482 Name##Operator k##Name; |
| 483 OVERFLOW_OP_LIST(OVERFLOW_OP) | 483 OVERFLOW_OP_LIST(OVERFLOW_OP) |
| 484 #undef OVERFLOW_OP | 484 #undef OVERFLOW_OP |
| 485 | 485 |
| 486 #define LOAD(Type) \ | 486 #define LOAD(Type) \ |
| 487 struct Load##Type##Operator final : public Operator1<LoadRepresentation> { \ | 487 struct Load##Type##Operator final : public Operator1<LoadRepresentation> { \ |
| 488 Load##Type##Operator() \ | 488 Load##Type##Operator() \ |
| 489 : Operator1<LoadRepresentation>( \ | 489 : Operator1<LoadRepresentation>( \ |
| 490 IrOpcode::kLoad, \ | 490 IrOpcode::kLoad, \ |
| 491 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ | 491 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ |
| 492 "Load", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \ | 492 "Load", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \ |
| 493 }; \ | 493 }; \ |
| 494 struct UnalignedLoad##Type##Operator final \ | 494 struct UnalignedLoad##Type##Operator final \ |
| 495 : public Operator1<UnalignedLoadRepresentation> { \ | 495 : public Operator1<UnalignedLoadRepresentation> { \ |
| 496 UnalignedLoad##Type##Operator() \ | 496 UnalignedLoad##Type##Operator() \ |
| 497 : Operator1<UnalignedLoadRepresentation>( \ | 497 : Operator1<UnalignedLoadRepresentation>( \ |
| 498 IrOpcode::kUnalignedLoad, \ | 498 IrOpcode::kUnalignedLoad, \ |
| 499 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ | 499 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ |
| 500 "UnalignedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \ | 500 "UnalignedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \ |
| 501 }; \ | 501 }; \ |
| 502 struct CheckedLoad##Type##Operator final \ | 502 struct CheckedLoad##Type##Operator final \ |
| 503 : public Operator1<CheckedLoadRepresentation> { \ | 503 : public Operator1<CheckedLoadRepresentation> { \ |
| 504 CheckedLoad##Type##Operator() \ | 504 CheckedLoad##Type##Operator() \ |
| 505 : Operator1<CheckedLoadRepresentation>( \ | 505 : Operator1<CheckedLoadRepresentation>( \ |
| 506 IrOpcode::kCheckedLoad, \ | 506 IrOpcode::kCheckedLoad, \ |
| 507 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ | 507 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ |
| 508 "CheckedLoad", 3, 1, 1, 1, 1, 0, MachineType::Type()) {} \ | 508 "CheckedLoad", 3, 1, 1, 1, 1, 0, MachineType::Type()) {} \ |
| 509 }; \ | 509 }; \ |
| 510 struct ProtectedLoad##Type##Operator final \ | 510 struct ProtectedLoad##Type##Operator final \ |
| 511 : public Operator1<LoadRepresentation> { \ | 511 : public Operator1<LoadRepresentation> { \ |
| 512 ProtectedLoad##Type##Operator() \ | 512 ProtectedLoad##Type##Operator() \ |
| 513 : Operator1<LoadRepresentation>( \ | 513 : Operator1<LoadRepresentation>( \ |
| 514 IrOpcode::kProtectedLoad, \ | 514 IrOpcode::kProtectedLoad, \ |
| 515 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ | 515 Operator::kNoDeopt | Operator::kNoThrow, "ProtectedLoad", 3, 1, \ |
| 516 "ProtectedLoad", 4, 1, 1, 1, 1, 0, MachineType::Type()) {} \ | 516 1, 1, 1, 0, MachineType::Type()) {} \ |
| 517 }; \ | 517 }; \ |
| 518 Load##Type##Operator kLoad##Type; \ | 518 Load##Type##Operator kLoad##Type; \ |
| 519 UnalignedLoad##Type##Operator kUnalignedLoad##Type; \ | 519 UnalignedLoad##Type##Operator kUnalignedLoad##Type; \ |
| 520 CheckedLoad##Type##Operator kCheckedLoad##Type; \ | 520 CheckedLoad##Type##Operator kCheckedLoad##Type; \ |
| 521 ProtectedLoad##Type##Operator kProtectedLoad##Type; | 521 ProtectedLoad##Type##Operator kProtectedLoad##Type; |
| 522 MACHINE_TYPE_LIST(LOAD) | 522 MACHINE_TYPE_LIST(LOAD) |
| 523 #undef LOAD | 523 #undef LOAD |
| 524 | 524 |
| 525 #define STACKSLOT(Type) \ | 525 #define STACKSLOT(Type) \ |
| 526 struct StackSlot##Type##Operator final \ | 526 struct StackSlot##Type##Operator final \ |
| 527 : public Operator1<MachineRepresentation> { \ | 527 : public Operator1<MachineRepresentation> { \ |
| 528 StackSlot##Type##Operator() \ | 528 StackSlot##Type##Operator() \ |
| 529 : Operator1<MachineRepresentation>( \ | 529 : Operator1<MachineRepresentation>( \ |
| 530 IrOpcode::kStackSlot, Operator::kNoDeopt | Operator::kNoThrow, \ | 530 IrOpcode::kStackSlot, Operator::kNoDeopt | Operator::kNoThrow, \ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \ | 582 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \ |
| 583 "CheckedStore", 4, 1, 1, 0, 1, 0, MachineRepresentation::Type) { \ | 583 "CheckedStore", 4, 1, 1, 0, 1, 0, MachineRepresentation::Type) { \ |
| 584 } \ | 584 } \ |
| 585 }; \ | 585 }; \ |
| 586 struct ProtectedStore##Type##Operator \ | 586 struct ProtectedStore##Type##Operator \ |
| 587 : public Operator1<StoreRepresentation> { \ | 587 : public Operator1<StoreRepresentation> { \ |
| 588 explicit ProtectedStore##Type##Operator() \ | 588 explicit ProtectedStore##Type##Operator() \ |
| 589 : Operator1<StoreRepresentation>( \ | 589 : Operator1<StoreRepresentation>( \ |
| 590 IrOpcode::kProtectedStore, \ | 590 IrOpcode::kProtectedStore, \ |
| 591 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \ | 591 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \ |
| 592 "Store", 5, 1, 1, 0, 1, 0, \ | 592 "Store", 4, 1, 1, 0, 1, 0, \ |
| 593 StoreRepresentation(MachineRepresentation::Type, \ | 593 StoreRepresentation(MachineRepresentation::Type, \ |
| 594 kNoWriteBarrier)) {} \ | 594 kNoWriteBarrier)) {} \ |
| 595 }; \ | 595 }; \ |
| 596 Store##Type##NoWriteBarrier##Operator kStore##Type##NoWriteBarrier; \ | 596 Store##Type##NoWriteBarrier##Operator kStore##Type##NoWriteBarrier; \ |
| 597 Store##Type##MapWriteBarrier##Operator kStore##Type##MapWriteBarrier; \ | 597 Store##Type##MapWriteBarrier##Operator kStore##Type##MapWriteBarrier; \ |
| 598 Store##Type##PointerWriteBarrier##Operator \ | 598 Store##Type##PointerWriteBarrier##Operator \ |
| 599 kStore##Type##PointerWriteBarrier; \ | 599 kStore##Type##PointerWriteBarrier; \ |
| 600 Store##Type##FullWriteBarrier##Operator kStore##Type##FullWriteBarrier; \ | 600 Store##Type##FullWriteBarrier##Operator kStore##Type##FullWriteBarrier; \ |
| 601 UnalignedStore##Type##Operator kUnalignedStore##Type; \ | 601 UnalignedStore##Type##Operator kUnalignedStore##Type; \ |
| 602 CheckedStore##Type##Operator kCheckedStore##Type; \ | 602 CheckedStore##Type##Operator kCheckedStore##Type; \ |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 } | 847 } |
| 848 ATOMIC_REPRESENTATION_LIST(STORE) | 848 ATOMIC_REPRESENTATION_LIST(STORE) |
| 849 #undef STORE | 849 #undef STORE |
| 850 UNREACHABLE(); | 850 UNREACHABLE(); |
| 851 return nullptr; | 851 return nullptr; |
| 852 } | 852 } |
| 853 | 853 |
| 854 } // namespace compiler | 854 } // namespace compiler |
| 855 } // namespace internal | 855 } // namespace internal |
| 856 } // namespace v8 | 856 } // namespace v8 |
| OLD | NEW |