| 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/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/compilation-dependencies.h" | 6 #include "src/compilation-dependencies.h" |
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 JSBinopReduction r(this, node); | 587 JSBinopReduction r(this, node); |
| 588 if (r.left() == r.right()) { | 588 if (r.left() == r.right()) { |
| 589 // x === x is always true if x != NaN | 589 // x === x is always true if x != NaN |
| 590 if (!r.left_type()->Maybe(Type::NaN())) { | 590 if (!r.left_type()->Maybe(Type::NaN())) { |
| 591 Node* replacement = jsgraph()->BooleanConstant(!invert); | 591 Node* replacement = jsgraph()->BooleanConstant(!invert); |
| 592 ReplaceWithValue(node, replacement); | 592 ReplaceWithValue(node, replacement); |
| 593 return Replace(replacement); | 593 return Replace(replacement); |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 if (r.OneInputCannotBe(Type::NumberOrString())) { | 596 if (r.OneInputCannotBe(Type::NumberOrSimdOrString())) { |
| 597 // For values with canonical representation (i.e. not string nor number) an | 597 // For values with canonical representation (i.e. neither String, nor |
| 598 // empty type intersection means the values cannot be strictly equal. | 598 // Simd128Value nor Number) an empty type intersection means the values |
| 599 // cannot be strictly equal. |
| 599 if (!r.left_type()->Maybe(r.right_type())) { | 600 if (!r.left_type()->Maybe(r.right_type())) { |
| 600 Node* replacement = jsgraph()->BooleanConstant(invert); | 601 Node* replacement = jsgraph()->BooleanConstant(invert); |
| 601 ReplaceWithValue(node, replacement); | 602 ReplaceWithValue(node, replacement); |
| 602 return Replace(replacement); | 603 return Replace(replacement); |
| 603 } | 604 } |
| 604 } | 605 } |
| 605 Reduction const reduction = ReduceJSEqualTypeOf(node, invert); | 606 Reduction const reduction = ReduceJSEqualTypeOf(node, invert); |
| 606 if (reduction.Changed()) { | 607 if (reduction.Changed()) { |
| 607 return reduction; | 608 return reduction; |
| 608 } | 609 } |
| (...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 } | 1899 } |
| 1899 | 1900 |
| 1900 | 1901 |
| 1901 CompilationDependencies* JSTypedLowering::dependencies() const { | 1902 CompilationDependencies* JSTypedLowering::dependencies() const { |
| 1902 return dependencies_; | 1903 return dependencies_; |
| 1903 } | 1904 } |
| 1904 | 1905 |
| 1905 } // namespace compiler | 1906 } // namespace compiler |
| 1906 } // namespace internal | 1907 } // namespace internal |
| 1907 } // namespace v8 | 1908 } // namespace v8 |
| OLD | NEW |