| 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/js-graph.h" |    5 #include "src/compiler/js-graph.h" | 
|    6 #include "src/compiler/simplified-operator.h" |    6 #include "src/compiler/simplified-operator.h" | 
|    7 #include "src/compiler/simplified-operator-reducer.h" |    7 #include "src/compiler/simplified-operator-reducer.h" | 
|    8 #include "src/conversions.h" |    8 #include "src/conversions.h" | 
|    9 #include "src/types.h" |    9 #include "src/types.h" | 
|   10 #include "test/unittests/compiler/graph-unittest.h" |   10 #include "test/unittests/compiler/graph-unittest.h" | 
|   11 #include "test/unittests/compiler/node-test-utils.h" |   11 #include "test/unittests/compiler/node-test-utils.h" | 
|   12  |   12  | 
|   13 namespace v8 { |   13 namespace v8 { | 
|   14 namespace internal { |   14 namespace internal { | 
|   15 namespace compiler { |   15 namespace compiler { | 
|   16  |   16  | 
|   17 class SimplifiedOperatorReducerTest : public GraphTest { |   17 class SimplifiedOperatorReducerTest : public GraphTest { | 
|   18  public: |   18  public: | 
|   19   explicit SimplifiedOperatorReducerTest(int num_parameters = 1) |   19   explicit SimplifiedOperatorReducerTest(int num_parameters = 1) | 
|   20       : GraphTest(num_parameters), simplified_(zone()) {} |   20       : GraphTest(num_parameters), simplified_(zone()) {} | 
|   21   virtual ~SimplifiedOperatorReducerTest() {} |   21   virtual ~SimplifiedOperatorReducerTest() {} | 
|   22  |   22  | 
|   23  protected: |   23  protected: | 
|   24   Reduction Reduce(Node* node) { |   24   Reduction Reduce(Node* node) { | 
|   25     MachineOperatorBuilder machine; |   25     MachineOperatorBuilder machine(zone()); | 
|   26     JSOperatorBuilder javascript(zone()); |   26     JSOperatorBuilder javascript(zone()); | 
|   27     JSGraph jsgraph(graph(), common(), &javascript, &machine); |   27     JSGraph jsgraph(graph(), common(), &javascript, &machine); | 
|   28     SimplifiedOperatorReducer reducer(&jsgraph); |   28     SimplifiedOperatorReducer reducer(&jsgraph); | 
|   29     return reducer.Reduce(node); |   29     return reducer.Reduce(node); | 
|   30   } |   30   } | 
|   31  |   31  | 
|   32   SimplifiedOperatorBuilder* simplified() { return &simplified_; } |   32   SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 
|   33  |   33  | 
|   34  private: |   34  private: | 
|   35   SimplifiedOperatorBuilder simplified_; |   35   SimplifiedOperatorBuilder simplified_; | 
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  594     Reduction r = |  594     Reduction r = | 
|  595         Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, |  595         Reduce(graph()->NewNode(simplified()->StoreElement(access), base, key, | 
|  596                                 length, value, effect, control)); |  596                                 length, value, effect, control)); | 
|  597     ASSERT_FALSE(r.Changed()); |  597     ASSERT_FALSE(r.Changed()); | 
|  598   } |  598   } | 
|  599 } |  599 } | 
|  600  |  600  | 
|  601 }  // namespace compiler |  601 }  // namespace compiler | 
|  602 }  // namespace internal |  602 }  // namespace internal | 
|  603 }  // namespace v8 |  603 }  // namespace v8 | 
| OLD | NEW |