| 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 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1939 Type* arg = Operand(node, 0); | 1939 Type* arg = Operand(node, 0); |
| 1940 DCHECK(arg->Is(Type::Boolean())); | 1940 DCHECK(arg->Is(Type::Boolean())); |
| 1941 return ChangeRepresentation(arg, Type::UntaggedBit(), zone()); | 1941 return ChangeRepresentation(arg, Type::UntaggedBit(), zone()); |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 Type* Typer::Visitor::TypeChangeBitToTagged(Node* node) { | 1944 Type* Typer::Visitor::TypeChangeBitToTagged(Node* node) { |
| 1945 Type* arg = Operand(node, 0); | 1945 Type* arg = Operand(node, 0); |
| 1946 return ChangeRepresentation(arg, Type::TaggedPointer(), zone()); | 1946 return ChangeRepresentation(arg, Type::TaggedPointer(), zone()); |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 Type* Typer::Visitor::TypeCheckBounds(Node* node) { | |
| 1950 // TODO(bmeurer): We could do better here based on the limit. | |
| 1951 return Type::Unsigned31(); | |
| 1952 } | |
| 1953 | |
| 1954 Type* Typer::Visitor::TypeCheckedUint32ToInt32(Node* node) { | 1949 Type* Typer::Visitor::TypeCheckedUint32ToInt32(Node* node) { |
| 1955 return Type::Signed32(); | 1950 return Type::Signed32(); |
| 1956 } | 1951 } |
| 1957 | 1952 |
| 1958 Type* Typer::Visitor::TypeCheckedFloat64ToInt32(Node* node) { | 1953 Type* Typer::Visitor::TypeCheckedFloat64ToInt32(Node* node) { |
| 1959 return Type::Signed32(); | 1954 return Type::Signed32(); |
| 1960 } | 1955 } |
| 1961 | 1956 |
| 1962 Type* Typer::Visitor::TypeCheckedTaggedToInt32(Node* node) { | 1957 Type* Typer::Visitor::TypeCheckedTaggedToInt32(Node* node) { |
| 1963 return Type::Signed32(); | 1958 return Type::Signed32(); |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2681 } | 2676 } |
| 2682 if (Type::IsInteger(*value)) { | 2677 if (Type::IsInteger(*value)) { |
| 2683 return Type::Range(value->Number(), value->Number(), zone()); | 2678 return Type::Range(value->Number(), value->Number(), zone()); |
| 2684 } | 2679 } |
| 2685 return Type::Constant(value, zone()); | 2680 return Type::Constant(value, zone()); |
| 2686 } | 2681 } |
| 2687 | 2682 |
| 2688 } // namespace compiler | 2683 } // namespace compiler |
| 2689 } // namespace internal | 2684 } // namespace internal |
| 2690 } // namespace v8 | 2685 } // namespace v8 |
| OLD | NEW |