| 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/graph-inl.h" | 5 #include "src/compiler/graph-inl.h" |
| 6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
| 7 #include "src/compiler/js-typed-lowering.h" | 7 #include "src/compiler/js-typed-lowering.h" |
| 8 #include "src/compiler/machine-operator.h" | 8 #include "src/compiler/machine-operator.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 790 |
| 791 if (effect_use != NULL) { | 791 if (effect_use != NULL) { |
| 792 R.CheckEffectInput(R.start(), effect_use); | 792 R.CheckEffectInput(R.start(), effect_use); |
| 793 // Check that value uses of ToNumber() do not go to start(). | 793 // Check that value uses of ToNumber() do not go to start(). |
| 794 for (int i = 0; i < effect_use->op()->ValueInputCount(); i++) { | 794 for (int i = 0; i < effect_use->op()->ValueInputCount(); i++) { |
| 795 CHECK_NE(R.start(), effect_use->InputAt(i)); | 795 CHECK_NE(R.start(), effect_use->InputAt(i)); |
| 796 } | 796 } |
| 797 } | 797 } |
| 798 } | 798 } |
| 799 | 799 |
| 800 CHECK_EQ(NULL, effect_use); // should have done all cases above. | 800 CHECK(!effect_use); // should have done all cases above. |
| 801 } | 801 } |
| 802 | 802 |
| 803 | 803 |
| 804 // Helper class for testing the reduction of a single binop. | 804 // Helper class for testing the reduction of a single binop. |
| 805 class BinopEffectsTester { | 805 class BinopEffectsTester { |
| 806 public: | 806 public: |
| 807 explicit BinopEffectsTester(const Operator* op, Type* t0, Type* t1) | 807 explicit BinopEffectsTester(const Operator* op, Type* t0, Type* t1) |
| 808 : R(), | 808 : R(), |
| 809 p0(R.Parameter(t0, 0)), | 809 p0(R.Parameter(t0, 0)), |
| 810 p1(R.Parameter(t1, 1)), | 810 p1(R.Parameter(t1, 1)), |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 CHECK_EQ(p1, r->InputAt(0)); | 1277 CHECK_EQ(p1, r->InputAt(0)); |
| 1278 CHECK_EQ(p0, r->InputAt(1)); | 1278 CHECK_EQ(p0, r->InputAt(1)); |
| 1279 } else { | 1279 } else { |
| 1280 CHECK_EQ(p0, r->InputAt(0)); | 1280 CHECK_EQ(p0, r->InputAt(0)); |
| 1281 CHECK_EQ(p1, r->InputAt(1)); | 1281 CHECK_EQ(p1, r->InputAt(1)); |
| 1282 } | 1282 } |
| 1283 } | 1283 } |
| 1284 } | 1284 } |
| 1285 } | 1285 } |
| 1286 } | 1286 } |
| OLD | NEW |