| 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/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
| 9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 R.CheckEffectInput(R.start(), ton); | 813 R.CheckEffectInput(R.start(), ton); |
| 814 if (effect_use != NULL) R.CheckEffectInput(ton, effect_use); | 814 if (effect_use != NULL) R.CheckEffectInput(ton, effect_use); |
| 815 | 815 |
| 816 Node* r = R.reduce(ton); | 816 Node* r = R.reduce(ton); |
| 817 CHECK_EQ(p0, r); | 817 CHECK_EQ(p0, r); |
| 818 CHECK_NE(R.start(), r); | 818 CHECK_NE(R.start(), r); |
| 819 | 819 |
| 820 if (effect_use != NULL) { | 820 if (effect_use != NULL) { |
| 821 R.CheckEffectInput(R.start(), effect_use); | 821 R.CheckEffectInput(R.start(), effect_use); |
| 822 // Check that value uses of ToNumber() do not go to start(). | 822 // Check that value uses of ToNumber() do not go to start(). |
| 823 for (int i = 0; i < effect_use->op()->InputCount(); i++) { | 823 for (int i = 0; i < effect_use->op()->ValueInputCount(); i++) { |
| 824 CHECK_NE(R.start(), effect_use->InputAt(i)); | 824 CHECK_NE(R.start(), effect_use->InputAt(i)); |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 } | 827 } |
| 828 | 828 |
| 829 CHECK_EQ(NULL, effect_use); // should have done all cases above. | 829 CHECK_EQ(NULL, effect_use); // should have done all cases above. |
| 830 } | 830 } |
| 831 | 831 |
| 832 | 832 |
| 833 // Helper class for testing the reduction of a single binop. | 833 // Helper class for testing the reduction of a single binop. |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 CHECK_EQ(p1, r->InputAt(0)); | 1333 CHECK_EQ(p1, r->InputAt(0)); |
| 1334 CHECK_EQ(p0, r->InputAt(1)); | 1334 CHECK_EQ(p0, r->InputAt(1)); |
| 1335 } else { | 1335 } else { |
| 1336 CHECK_EQ(p0, r->InputAt(0)); | 1336 CHECK_EQ(p0, r->InputAt(0)); |
| 1337 CHECK_EQ(p1, r->InputAt(1)); | 1337 CHECK_EQ(p1, r->InputAt(1)); |
| 1338 } | 1338 } |
| 1339 } | 1339 } |
| 1340 } | 1340 } |
| 1341 } | 1341 } |
| 1342 } | 1342 } |
| OLD | NEW |