| 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/typer.h" | 5 #include "src/compiler/typer.h" |
| 6 | 6 |
| 7 #include "src/base/flags.h" | 7 #include "src/base/flags.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 Type* arg = Operand(node, 0); | 1938 Type* arg = Operand(node, 0); |
| 1939 DCHECK(arg->Is(Type::Boolean())); | 1939 DCHECK(arg->Is(Type::Boolean())); |
| 1940 return ChangeRepresentation(arg, Type::UntaggedBit(), zone()); | 1940 return ChangeRepresentation(arg, Type::UntaggedBit(), zone()); |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 Type* Typer::Visitor::TypeChangeBitToTagged(Node* node) { | 1943 Type* Typer::Visitor::TypeChangeBitToTagged(Node* node) { |
| 1944 Type* arg = Operand(node, 0); | 1944 Type* arg = Operand(node, 0); |
| 1945 return ChangeRepresentation(arg, Type::TaggedPointer(), zone()); | 1945 return ChangeRepresentation(arg, Type::TaggedPointer(), zone()); |
| 1946 } | 1946 } |
| 1947 | 1947 |
| 1948 Type* Typer::Visitor::TypeCheckBounds(Node* node) { |
| 1949 // TODO(bmeurer): We could do better here based on the limit. |
| 1950 return Type::Unsigned31(); |
| 1951 } |
| 1952 |
| 1948 Type* Typer::Visitor::TypeCheckedUint32ToInt32(Node* node) { | 1953 Type* Typer::Visitor::TypeCheckedUint32ToInt32(Node* node) { |
| 1949 return Type::Signed32(); | 1954 return Type::Signed32(); |
| 1950 } | 1955 } |
| 1951 | 1956 |
| 1952 Type* Typer::Visitor::TypeCheckedFloat64ToInt32(Node* node) { | 1957 Type* Typer::Visitor::TypeCheckedFloat64ToInt32(Node* node) { |
| 1953 return Type::Signed32(); | 1958 return Type::Signed32(); |
| 1954 } | 1959 } |
| 1955 | 1960 |
| 1956 Type* Typer::Visitor::TypeCheckedTaggedToInt32(Node* node) { | 1961 Type* Typer::Visitor::TypeCheckedTaggedToInt32(Node* node) { |
| 1957 return Type::Signed32(); | 1962 return Type::Signed32(); |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2704 } | 2709 } |
| 2705 if (Type::IsInteger(*value)) { | 2710 if (Type::IsInteger(*value)) { |
| 2706 return Type::Range(value->Number(), value->Number(), zone()); | 2711 return Type::Range(value->Number(), value->Number(), zone()); |
| 2707 } | 2712 } |
| 2708 return Type::Constant(value, zone()); | 2713 return Type::Constant(value, zone()); |
| 2709 } | 2714 } |
| 2710 | 2715 |
| 2711 } // namespace compiler | 2716 } // namespace compiler |
| 2712 } // namespace internal | 2717 } // namespace internal |
| 2713 } // namespace v8 | 2718 } // namespace v8 |
| OLD | NEW |