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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 return Type::Any(); | 1634 return Type::Any(); |
1635 } | 1635 } |
1636 | 1636 |
1637 | 1637 |
1638 Type* Typer::Visitor::TypeJSConvertReceiver(Node* node) { | 1638 Type* Typer::Visitor::TypeJSConvertReceiver(Node* node) { |
1639 return Type::Receiver(); | 1639 return Type::Receiver(); |
1640 } | 1640 } |
1641 | 1641 |
1642 | 1642 |
1643 Type* Typer::Visitor::TypeJSForInNext(Node* node) { | 1643 Type* Typer::Visitor::TypeJSForInNext(Node* node) { |
1644 return Type::Union(Type::Name(), Type::Undefined(), zone()); | 1644 return Type::Union(Type::String(), Type::Undefined(), zone()); |
1645 } | 1645 } |
1646 | 1646 |
1647 | 1647 |
1648 Type* Typer::Visitor::TypeJSForInPrepare(Node* node) { | 1648 Type* Typer::Visitor::TypeJSForInPrepare(Node* node) { |
1649 STATIC_ASSERT(Map::EnumLengthBits::kMax <= FixedArray::kMaxLength); | 1649 STATIC_ASSERT(Map::EnumLengthBits::kMax <= FixedArray::kMaxLength); |
1650 Type* const cache_type = | 1650 Type* const cache_type = |
1651 Type::Union(Type::SignedSmall(), Type::OtherInternal(), zone()); | 1651 Type::Union(Type::SignedSmall(), Type::OtherInternal(), zone()); |
1652 Type* const cache_array = Type::OtherInternal(); | 1652 Type* const cache_array = Type::OtherInternal(); |
1653 Type* const cache_length = typer_->cache_.kFixedArrayLengthType; | 1653 Type* const cache_length = typer_->cache_.kFixedArrayLengthType; |
1654 return Type::Tuple(cache_type, cache_array, cache_length, zone()); | 1654 return Type::Tuple(cache_type, cache_array, cache_length, zone()); |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1946 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1947 if (Type::IsInteger(*value)) { | 1947 if (Type::IsInteger(*value)) { |
1948 return Type::Range(value->Number(), value->Number(), zone()); | 1948 return Type::Range(value->Number(), value->Number(), zone()); |
1949 } | 1949 } |
1950 return Type::NewConstant(value, zone()); | 1950 return Type::NewConstant(value, zone()); |
1951 } | 1951 } |
1952 | 1952 |
1953 } // namespace compiler | 1953 } // namespace compiler |
1954 } // namespace internal | 1954 } // namespace internal |
1955 } // namespace v8 | 1955 } // namespace v8 |
OLD | NEW |