| 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 "test/cctest/cctest.h" | 5 #include "test/cctest/cctest.h" |
| 6 | 6 |
| 7 #include "src/base/utils/random-number-generator.h" | 7 #include "src/base/utils/random-number-generator.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/machine-operator-reducer.h" | 10 #include "src/compiler/machine-operator-reducer.h" |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 | 708 |
| 709 { | 709 { |
| 710 MachineOperatorReducer reducer(&R.jsgraph); | 710 MachineOperatorReducer reducer(&R.jsgraph); |
| 711 Reduction reduction = reducer.Reduce(load); | 711 Reduction reduction = reducer.Reduce(load); |
| 712 CHECK(!reduction.Changed()); // loads should not be reduced. | 712 CHECK(!reduction.Changed()); // loads should not be reduced. |
| 713 } | 713 } |
| 714 | 714 |
| 715 { | 715 { |
| 716 Node* store = R.graph.NewNode( | 716 Node* store = R.graph.NewNode( |
| 717 R.machine.Store(StoreRepresentation(kMachInt32, kNoWriteBarrier)), base, | 717 R.machine.Store(StoreRepresentation(kMachInt32, kNoWriteBarrier)), base, |
| 718 index, load, load, load); | 718 index, load, load, R.graph.start()); |
| 719 MachineOperatorReducer reducer(&R.jsgraph); | 719 MachineOperatorReducer reducer(&R.jsgraph); |
| 720 Reduction reduction = reducer.Reduce(store); | 720 Reduction reduction = reducer.Reduce(store); |
| 721 CHECK(!reduction.Changed()); // stores should not be reduced. | 721 CHECK(!reduction.Changed()); // stores should not be reduced. |
| 722 } | 722 } |
| 723 } | 723 } |
| 724 | 724 |
| 725 | 725 |
| 726 // TODO(titzer): test MachineOperatorReducer for Word64And | 726 // TODO(titzer): test MachineOperatorReducer for Word64And |
| 727 // TODO(titzer): test MachineOperatorReducer for Word64Or | 727 // TODO(titzer): test MachineOperatorReducer for Word64Or |
| 728 // TODO(titzer): test MachineOperatorReducer for Word64Xor | 728 // TODO(titzer): test MachineOperatorReducer for Word64Xor |
| (...skipping 12 matching lines...) Expand all Loading... |
| 741 // TODO(titzer): test MachineOperatorReducer for Uint64Mod | 741 // TODO(titzer): test MachineOperatorReducer for Uint64Mod |
| 742 // TODO(titzer): test MachineOperatorReducer for Int64Neg | 742 // TODO(titzer): test MachineOperatorReducer for Int64Neg |
| 743 // TODO(titzer): test MachineOperatorReducer for ChangeInt32ToFloat64 | 743 // TODO(titzer): test MachineOperatorReducer for ChangeInt32ToFloat64 |
| 744 // TODO(titzer): test MachineOperatorReducer for ChangeFloat64ToInt32 | 744 // TODO(titzer): test MachineOperatorReducer for ChangeFloat64ToInt32 |
| 745 // TODO(titzer): test MachineOperatorReducer for Float64Compare | 745 // TODO(titzer): test MachineOperatorReducer for Float64Compare |
| 746 // TODO(titzer): test MachineOperatorReducer for Float64Add | 746 // TODO(titzer): test MachineOperatorReducer for Float64Add |
| 747 // TODO(titzer): test MachineOperatorReducer for Float64Sub | 747 // TODO(titzer): test MachineOperatorReducer for Float64Sub |
| 748 // TODO(titzer): test MachineOperatorReducer for Float64Mul | 748 // TODO(titzer): test MachineOperatorReducer for Float64Mul |
| 749 // TODO(titzer): test MachineOperatorReducer for Float64Div | 749 // TODO(titzer): test MachineOperatorReducer for Float64Div |
| 750 // TODO(titzer): test MachineOperatorReducer for Float64Mod | 750 // TODO(titzer): test MachineOperatorReducer for Float64Mod |
| OLD | NEW |