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 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 } | 1446 } |
1447 | 1447 |
1448 | 1448 |
1449 Type* Typer::Visitor::TypeJSForInNext(Node* node) { | 1449 Type* Typer::Visitor::TypeJSForInNext(Node* node) { |
1450 return Type::Union(Type::Name(), Type::Undefined(), zone()); | 1450 return Type::Union(Type::Name(), Type::Undefined(), zone()); |
1451 } | 1451 } |
1452 | 1452 |
1453 | 1453 |
1454 Type* Typer::Visitor::TypeJSForInPrepare(Node* node) { | 1454 Type* Typer::Visitor::TypeJSForInPrepare(Node* node) { |
1455 STATIC_ASSERT(Map::EnumLengthBits::kMax <= FixedArray::kMaxLength); | 1455 STATIC_ASSERT(Map::EnumLengthBits::kMax <= FixedArray::kMaxLength); |
1456 Factory* const f = isolate()->factory(); | 1456 Type* const cache_type = |
1457 Type* const cache_type = Type::Union( | 1457 Type::Union(typer_->cache_.kSmi, Type::OtherInternal(), zone()); |
1458 typer_->cache_.kSmi, Type::Class(f->meta_map(), zone()), zone()); | 1458 Type* const cache_array = Type::OtherInternal(); |
1459 Type* const cache_array = Type::Class(f->fixed_array_map(), zone()); | |
1460 Type* const cache_length = typer_->cache_.kFixedArrayLengthType; | 1459 Type* const cache_length = typer_->cache_.kFixedArrayLengthType; |
1461 return Type::Tuple(cache_type, cache_array, cache_length, zone()); | 1460 return Type::Tuple(cache_type, cache_array, cache_length, zone()); |
1462 } | 1461 } |
1463 | 1462 |
1464 | 1463 |
1465 Type* Typer::Visitor::TypeJSLoadMessage(Node* node) { return Type::Any(); } | 1464 Type* Typer::Visitor::TypeJSLoadMessage(Node* node) { return Type::Any(); } |
1466 | 1465 |
1467 | 1466 |
1468 Type* Typer::Visitor::TypeJSStoreMessage(Node* node) { | 1467 Type* Typer::Visitor::TypeJSStoreMessage(Node* node) { |
1469 UNREACHABLE(); | 1468 UNREACHABLE(); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1719 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1721 if (Type::IsInteger(*value)) { | 1720 if (Type::IsInteger(*value)) { |
1722 return Type::Range(value->Number(), value->Number(), zone()); | 1721 return Type::Range(value->Number(), value->Number(), zone()); |
1723 } | 1722 } |
1724 return Type::Constant(value, zone()); | 1723 return Type::Constant(value, zone()); |
1725 } | 1724 } |
1726 | 1725 |
1727 } // namespace compiler | 1726 } // namespace compiler |
1728 } // namespace internal | 1727 } // namespace internal |
1729 } // namespace v8 | 1728 } // namespace v8 |
OLD | NEW |