| 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 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 Type* Typer::Visitor::TypeCheckSmi(Node* node) { | 1853 Type* Typer::Visitor::TypeCheckSmi(Node* node) { |
| 1854 Type* arg = Operand(node, 0); | 1854 Type* arg = Operand(node, 0); |
| 1855 return Type::Intersect(arg, Type::SignedSmall(), zone()); | 1855 return Type::Intersect(arg, Type::SignedSmall(), zone()); |
| 1856 } | 1856 } |
| 1857 | 1857 |
| 1858 Type* Typer::Visitor::TypeCheckString(Node* node) { | 1858 Type* Typer::Visitor::TypeCheckString(Node* node) { |
| 1859 Type* arg = Operand(node, 0); | 1859 Type* arg = Operand(node, 0); |
| 1860 return Type::Intersect(arg, Type::String(), zone()); | 1860 return Type::Intersect(arg, Type::String(), zone()); |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 Type* Typer::Visitor::TypeCheckSymbol(Node* node) { |
| 1864 Type* arg = Operand(node, 0); |
| 1865 return Type::Intersect(arg, Type::Symbol(), zone()); |
| 1866 } |
| 1867 |
| 1863 Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) { | 1868 Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) { |
| 1864 return typer_->operation_typer_.CheckFloat64Hole(Operand(node, 0)); | 1869 return typer_->operation_typer_.CheckFloat64Hole(Operand(node, 0)); |
| 1865 } | 1870 } |
| 1866 | 1871 |
| 1867 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) { | 1872 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) { |
| 1868 Type* type = Operand(node, 0); | 1873 Type* type = Operand(node, 0); |
| 1869 type = Type::Intersect(type, Type::NonInternal(), zone()); | 1874 type = Type::Intersect(type, Type::NonInternal(), zone()); |
| 1870 return type; | 1875 return type; |
| 1871 } | 1876 } |
| 1872 | 1877 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 2003 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1999 if (Type::IsInteger(*value)) { | 2004 if (Type::IsInteger(*value)) { |
| 2000 return Type::Range(value->Number(), value->Number(), zone()); | 2005 return Type::Range(value->Number(), value->Number(), zone()); |
| 2001 } | 2006 } |
| 2002 return Type::NewConstant(value, zone()); | 2007 return Type::NewConstant(value, zone()); |
| 2003 } | 2008 } |
| 2004 | 2009 |
| 2005 } // namespace compiler | 2010 } // namespace compiler |
| 2006 } // namespace internal | 2011 } // namespace internal |
| 2007 } // namespace v8 | 2012 } // namespace v8 |
| OLD | NEW |