| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/operation-typer.h" | 5 #include "src/compiler/operation-typer.h" |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" |
| 7 #include "src/factory.h" | 8 #include "src/factory.h" |
| 8 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 9 #include "src/type-cache.h" | 10 #include "src/type-cache.h" |
| 10 #include "src/types.h" | 11 #include "src/types.h" |
| 11 | 12 |
| 12 #include "src/objects-inl.h" | 13 #include "src/objects-inl.h" |
| 13 | 14 |
| 14 namespace v8 { | 15 namespace v8 { |
| 15 namespace internal { | 16 namespace internal { |
| 16 namespace compiler { | 17 namespace compiler { |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 if ((outcome & kComparisonFalse) != 0 || | 905 if ((outcome & kComparisonFalse) != 0 || |
| 905 (outcome & kComparisonUndefined) != 0) { | 906 (outcome & kComparisonUndefined) != 0) { |
| 906 return (outcome & kComparisonTrue) != 0 ? Type::Boolean() | 907 return (outcome & kComparisonTrue) != 0 ? Type::Boolean() |
| 907 : singleton_false(); | 908 : singleton_false(); |
| 908 } | 909 } |
| 909 // Type should be non empty, so we know it should be true. | 910 // Type should be non empty, so we know it should be true. |
| 910 DCHECK((outcome & kComparisonTrue) != 0); | 911 DCHECK((outcome & kComparisonTrue) != 0); |
| 911 return singleton_true(); | 912 return singleton_true(); |
| 912 } | 913 } |
| 913 | 914 |
| 915 Type* OperationTyper::TypeTypeGuard(const Operator* sigma_op, Type* input) { |
| 916 return Type::Intersect(input, TypeGuardTypeOf(sigma_op), zone()); |
| 917 } |
| 918 |
| 914 } // namespace compiler | 919 } // namespace compiler |
| 915 } // namespace internal | 920 } // namespace internal |
| 916 } // namespace v8 | 921 } // namespace v8 |
| OLD | NEW |