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 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 | 1838 |
1839 namespace { | 1839 namespace { |
1840 | 1840 |
1841 Type* ChangeRepresentation(Type* type, Type* rep, Zone* zone) { | 1841 Type* ChangeRepresentation(Type* type, Type* rep, Zone* zone) { |
1842 return Type::Union(Type::Semantic(type, zone), | 1842 return Type::Union(Type::Semantic(type, zone), |
1843 Type::Representation(rep, zone), zone); | 1843 Type::Representation(rep, zone), zone); |
1844 } | 1844 } |
1845 | 1845 |
1846 } // namespace | 1846 } // namespace |
1847 | 1847 |
| 1848 Type* Typer::Visitor::TypeChangeTaggedSignedToWord32(Node* node) { |
| 1849 Type* arg = Operand(node, 0); |
| 1850 // TODO(neis): DCHECK(arg->Is(Type::Signed32())); |
| 1851 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone()); |
| 1852 } |
1848 | 1853 |
1849 Type* Typer::Visitor::TypeChangeTaggedToInt32(Node* node) { | 1854 Type* Typer::Visitor::TypeChangeTaggedToInt32(Node* node) { |
1850 Type* arg = Operand(node, 0); | 1855 Type* arg = Operand(node, 0); |
1851 // TODO(neis): DCHECK(arg->Is(Type::Signed32())); | 1856 // TODO(neis): DCHECK(arg->Is(Type::Signed32())); |
1852 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone()); | 1857 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone()); |
1853 } | 1858 } |
1854 | 1859 |
1855 | 1860 |
1856 Type* Typer::Visitor::TypeChangeTaggedToUint32(Node* node) { | 1861 Type* Typer::Visitor::TypeChangeTaggedToUint32(Node* node) { |
1857 Type* arg = Operand(node, 0); | 1862 Type* arg = Operand(node, 0); |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2555 } | 2560 } |
2556 if (Type::IsInteger(*value)) { | 2561 if (Type::IsInteger(*value)) { |
2557 return Type::Range(value->Number(), value->Number(), zone()); | 2562 return Type::Range(value->Number(), value->Number(), zone()); |
2558 } | 2563 } |
2559 return Type::Constant(value, zone()); | 2564 return Type::Constant(value, zone()); |
2560 } | 2565 } |
2561 | 2566 |
2562 } // namespace compiler | 2567 } // namespace compiler |
2563 } // namespace internal | 2568 } // namespace internal |
2564 } // namespace v8 | 2569 } // namespace v8 |
OLD | NEW |