Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: src/compiler/typer.cc

Issue 2660543003: [turbofan] for-in only enumerates Strings. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698