| 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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 | 1041 |
| 1042 // JS unary operators. | 1042 // JS unary operators. |
| 1043 | 1043 |
| 1044 | 1044 |
| 1045 Type* Typer::Visitor::TypeJSTypeOf(Node* node) { | 1045 Type* Typer::Visitor::TypeJSTypeOf(Node* node) { |
| 1046 return Type::InternalizedString(); | 1046 return Type::InternalizedString(); |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 Type* Typer::Visitor::TypeJSIsUndetectable(Node* node) { |
| 1050 return Type::Boolean(); |
| 1051 } |
| 1049 | 1052 |
| 1050 // JS conversion operators. | 1053 // JS conversion operators. |
| 1051 | 1054 |
| 1052 | 1055 |
| 1053 Type* Typer::Visitor::TypeJSToBoolean(Node* node) { | 1056 Type* Typer::Visitor::TypeJSToBoolean(Node* node) { |
| 1054 return TypeUnaryOp(node, ToBoolean); | 1057 return TypeUnaryOp(node, ToBoolean); |
| 1055 } | 1058 } |
| 1056 | 1059 |
| 1057 Type* Typer::Visitor::TypeJSToInteger(Node* node) { | 1060 Type* Typer::Visitor::TypeJSToInteger(Node* node) { |
| 1058 return TypeUnaryOp(node, ToInteger); | 1061 return TypeUnaryOp(node, ToInteger); |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1838 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1836 if (Type::IsInteger(*value)) { | 1839 if (Type::IsInteger(*value)) { |
| 1837 return Type::Range(value->Number(), value->Number(), zone()); | 1840 return Type::Range(value->Number(), value->Number(), zone()); |
| 1838 } | 1841 } |
| 1839 return Type::NewConstant(value, zone()); | 1842 return Type::NewConstant(value, zone()); |
| 1840 } | 1843 } |
| 1841 | 1844 |
| 1842 } // namespace compiler | 1845 } // namespace compiler |
| 1843 } // namespace internal | 1846 } // namespace internal |
| 1844 } // namespace v8 | 1847 } // namespace v8 |
| OLD | NEW |