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 <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 // TODO(rossberg): Ideally FrameState wouldn't have a value output. | 827 // TODO(rossberg): Ideally FrameState wouldn't have a value output. |
828 return Type::Internal(); | 828 return Type::Internal(); |
829 } | 829 } |
830 | 830 |
831 Type* Typer::Visitor::TypeStateValues(Node* node) { return Type::Internal(); } | 831 Type* Typer::Visitor::TypeStateValues(Node* node) { return Type::Internal(); } |
832 | 832 |
833 Type* Typer::Visitor::TypeTypedStateValues(Node* node) { | 833 Type* Typer::Visitor::TypeTypedStateValues(Node* node) { |
834 return Type::Internal(); | 834 return Type::Internal(); |
835 } | 835 } |
836 | 836 |
837 Type* Typer::Visitor::TypeArgumentsObjectState(Node* node) { | 837 Type* Typer::Visitor::TypeArgumentsElementsState(Node* node) { |
838 return Type::Internal(); | 838 return Type::Internal(); |
839 } | 839 } |
840 | 840 |
841 Type* Typer::Visitor::TypeObjectState(Node* node) { return Type::Internal(); } | 841 Type* Typer::Visitor::TypeObjectState(Node* node) { return Type::Internal(); } |
842 | 842 |
843 Type* Typer::Visitor::TypeTypedObjectState(Node* node) { | 843 Type* Typer::Visitor::TypeTypedObjectState(Node* node) { |
844 return Type::Internal(); | 844 return Type::Internal(); |
845 } | 845 } |
846 | 846 |
847 Type* Typer::Visitor::TypeCall(Node* node) { return Type::Any(); } | 847 Type* Typer::Visitor::TypeCall(Node* node) { return Type::Any(); } |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 } | 1919 } |
1920 | 1920 |
1921 Type* Typer::Visitor::TypeObjectIsString(Node* node) { | 1921 Type* Typer::Visitor::TypeObjectIsString(Node* node) { |
1922 return TypeUnaryOp(node, ObjectIsString); | 1922 return TypeUnaryOp(node, ObjectIsString); |
1923 } | 1923 } |
1924 | 1924 |
1925 Type* Typer::Visitor::TypeObjectIsUndetectable(Node* node) { | 1925 Type* Typer::Visitor::TypeObjectIsUndetectable(Node* node) { |
1926 return TypeUnaryOp(node, ObjectIsUndetectable); | 1926 return TypeUnaryOp(node, ObjectIsUndetectable); |
1927 } | 1927 } |
1928 | 1928 |
| 1929 Type* Typer::Visitor::TypeArgumentsLength(Node* node) { |
| 1930 return TypeCache::Get().kArgumentsLengthType; |
| 1931 } |
| 1932 |
| 1933 Type* Typer::Visitor::TypeArgumentsFrame(Node* node) { |
| 1934 return Type::ExternalPointer(); |
| 1935 } |
| 1936 |
1929 Type* Typer::Visitor::TypeNewUnmappedArgumentsElements(Node* node) { | 1937 Type* Typer::Visitor::TypeNewUnmappedArgumentsElements(Node* node) { |
1930 return Type::OtherInternal(); | 1938 return Type::OtherInternal(); |
1931 } | 1939 } |
1932 | 1940 |
1933 Type* Typer::Visitor::TypeNewRestParameterElements(Node* node) { | |
1934 return Type::OtherInternal(); | |
1935 } | |
1936 | |
1937 Type* Typer::Visitor::TypeArrayBufferWasNeutered(Node* node) { | 1941 Type* Typer::Visitor::TypeArrayBufferWasNeutered(Node* node) { |
1938 return Type::Boolean(); | 1942 return Type::Boolean(); |
1939 } | 1943 } |
1940 | 1944 |
1941 // Heap constants. | 1945 // Heap constants. |
1942 | 1946 |
1943 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1947 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1944 if (Type::IsInteger(*value)) { | 1948 if (Type::IsInteger(*value)) { |
1945 return Type::Range(value->Number(), value->Number(), zone()); | 1949 return Type::Range(value->Number(), value->Number(), zone()); |
1946 } | 1950 } |
1947 return Type::NewConstant(value, zone()); | 1951 return Type::NewConstant(value, zone()); |
1948 } | 1952 } |
1949 | 1953 |
1950 } // namespace compiler | 1954 } // namespace compiler |
1951 } // namespace internal | 1955 } // namespace internal |
1952 } // namespace v8 | 1956 } // namespace v8 |
OLD | NEW |