Chromium Code Reviews| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 struct AtomicStore##Type##Operator \ | 519 struct AtomicStore##Type##Operator \ |
| 520 : public Operator1<MachineRepresentation> { \ | 520 : public Operator1<MachineRepresentation> { \ |
| 521 AtomicStore##Type##Operator() \ | 521 AtomicStore##Type##Operator() \ |
| 522 : Operator1<MachineRepresentation>( \ | 522 : Operator1<MachineRepresentation>( \ |
| 523 IrOpcode::kAtomicStore, Operator::kNoRead | Operator::kNoThrow, \ | 523 IrOpcode::kAtomicStore, Operator::kNoRead | Operator::kNoThrow, \ |
| 524 "AtomicStore", 3, 1, 1, 0, 1, 0, MachineRepresentation::Type) {} \ | 524 "AtomicStore", 3, 1, 1, 0, 1, 0, MachineRepresentation::Type) {} \ |
| 525 }; \ | 525 }; \ |
| 526 AtomicStore##Type##Operator kAtomicStore##Type; | 526 AtomicStore##Type##Operator kAtomicStore##Type; |
| 527 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE) | 527 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE) |
| 528 #undef STORE | 528 #undef STORE |
| 529 | |
| 530 struct DebugBreakOperator : public Operator { | |
| 531 DebugBreakOperator() | |
| 532 : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0, | |
| 533 1, 1, 0, 1, 0) {} | |
|
Michael Starzinger
2016/05/19 08:53:23
I assume the effect inputs are there in the hope o
danno
2016/05/19 09:05:04
Done.
| |
| 534 }; | |
| 535 DebugBreakOperator kDebugBreak; | |
| 529 }; | 536 }; |
| 530 | 537 |
| 531 | 538 |
| 532 static base::LazyInstance<MachineOperatorGlobalCache>::type kCache = | 539 static base::LazyInstance<MachineOperatorGlobalCache>::type kCache = |
| 533 LAZY_INSTANCE_INITIALIZER; | 540 LAZY_INSTANCE_INITIALIZER; |
| 534 | 541 |
| 535 | 542 |
| 536 MachineOperatorBuilder::MachineOperatorBuilder(Zone* zone, | 543 MachineOperatorBuilder::MachineOperatorBuilder(Zone* zone, |
| 537 MachineRepresentation word, | 544 MachineRepresentation word, |
| 538 Flags flags) | 545 Flags flags) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 597 MACHINE_REPRESENTATION_LIST(STORE) | 604 MACHINE_REPRESENTATION_LIST(STORE) |
| 598 #undef STORE | 605 #undef STORE |
| 599 case MachineRepresentation::kBit: | 606 case MachineRepresentation::kBit: |
| 600 case MachineRepresentation::kNone: | 607 case MachineRepresentation::kNone: |
| 601 break; | 608 break; |
| 602 } | 609 } |
| 603 UNREACHABLE(); | 610 UNREACHABLE(); |
| 604 return nullptr; | 611 return nullptr; |
| 605 } | 612 } |
| 606 | 613 |
| 614 const Operator* MachineOperatorBuilder::DebugBreak() { | |
| 615 return &cache_.kDebugBreak; | |
| 616 } | |
| 607 | 617 |
| 608 const Operator* MachineOperatorBuilder::CheckedLoad( | 618 const Operator* MachineOperatorBuilder::CheckedLoad( |
| 609 CheckedLoadRepresentation rep) { | 619 CheckedLoadRepresentation rep) { |
| 610 #define LOAD(Type) \ | 620 #define LOAD(Type) \ |
| 611 if (rep == MachineType::Type()) { \ | 621 if (rep == MachineType::Type()) { \ |
| 612 return &cache_.kCheckedLoad##Type; \ | 622 return &cache_.kCheckedLoad##Type; \ |
| 613 } | 623 } |
| 614 MACHINE_TYPE_LIST(LOAD) | 624 MACHINE_TYPE_LIST(LOAD) |
| 615 #undef LOAD | 625 #undef LOAD |
| 616 UNREACHABLE(); | 626 UNREACHABLE(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 } | 676 } |
| 667 ATOMIC_REPRESENTATION_LIST(STORE) | 677 ATOMIC_REPRESENTATION_LIST(STORE) |
| 668 #undef STORE | 678 #undef STORE |
| 669 UNREACHABLE(); | 679 UNREACHABLE(); |
| 670 return nullptr; | 680 return nullptr; |
| 671 } | 681 } |
| 672 | 682 |
| 673 } // namespace compiler | 683 } // namespace compiler |
| 674 } // namespace internal | 684 } // namespace internal |
| 675 } // namespace v8 | 685 } // namespace v8 |
| OLD | NEW |