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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 case Runtime::kInlineToInteger: | 1554 case Runtime::kInlineToInteger: |
1555 return TypeUnaryOp(node, ToInteger); | 1555 return TypeUnaryOp(node, ToInteger); |
1556 case Runtime::kInlineToLength: | 1556 case Runtime::kInlineToLength: |
1557 return TypeUnaryOp(node, ToLength); | 1557 return TypeUnaryOp(node, ToLength); |
1558 case Runtime::kInlineToNumber: | 1558 case Runtime::kInlineToNumber: |
1559 return TypeUnaryOp(node, ToNumber); | 1559 return TypeUnaryOp(node, ToNumber); |
1560 case Runtime::kInlineToObject: | 1560 case Runtime::kInlineToObject: |
1561 return TypeUnaryOp(node, ToObject); | 1561 return TypeUnaryOp(node, ToObject); |
1562 case Runtime::kInlineToString: | 1562 case Runtime::kInlineToString: |
1563 return TypeUnaryOp(node, ToString); | 1563 return TypeUnaryOp(node, ToString); |
| 1564 case Runtime::kClassOf: |
| 1565 case Runtime::kInlineClassOf: |
| 1566 return Type::Union(Type::InternalizedString(), Type::Null(), zone()); |
1564 case Runtime::kHasInPrototypeChain: | 1567 case Runtime::kHasInPrototypeChain: |
1565 return Type::Boolean(); | 1568 return Type::Boolean(); |
1566 default: | 1569 default: |
1567 break; | 1570 break; |
1568 } | 1571 } |
1569 // TODO(turbofan): This should be Type::NonInternal(), but unfortunately we | 1572 // TODO(turbofan): This should be Type::NonInternal(), but unfortunately we |
1570 // have a few weird runtime calls that return the hole or even FixedArrays; | 1573 // have a few weird runtime calls that return the hole or even FixedArrays; |
1571 // change this once those weird runtime calls have been removed. | 1574 // change this once those weird runtime calls have been removed. |
1572 return Type::Any(); | 1575 return Type::Any(); |
1573 } | 1576 } |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1881 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1879 if (Type::IsInteger(*value)) { | 1882 if (Type::IsInteger(*value)) { |
1880 return Type::Range(value->Number(), value->Number(), zone()); | 1883 return Type::Range(value->Number(), value->Number(), zone()); |
1881 } | 1884 } |
1882 return Type::NewConstant(value, zone()); | 1885 return Type::NewConstant(value, zone()); |
1883 } | 1886 } |
1884 | 1887 |
1885 } // namespace compiler | 1888 } // namespace compiler |
1886 } // namespace internal | 1889 } // namespace internal |
1887 } // namespace v8 | 1890 } // namespace v8 |
OLD | NEW |