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

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

Issue 1160983004: [turbofan] First step towards sanitizing for-in and making it optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add some comments. Created 5 years, 6 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 | « src/compiler/operator-properties.cc ('k') | src/compiler/verifier.cc » ('j') | 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/base/flags.h" 5 #include "src/base/flags.h"
6 #include "src/bootstrapper.h" 6 #include "src/bootstrapper.h"
7 #include "src/compiler/graph-reducer.h" 7 #include "src/compiler/graph-reducer.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 return Bounds(Type::None(), Type::Range(0, 32, zone())); 1595 return Bounds(Type::None(), Type::Range(0, 32, zone()));
1596 case Runtime::kInlineStringGetLength: 1596 case Runtime::kInlineStringGetLength:
1597 return Bounds(Type::None(), Type::Range(0, String::kMaxLength, zone())); 1597 return Bounds(Type::None(), Type::Range(0, String::kMaxLength, zone()));
1598 default: 1598 default:
1599 break; 1599 break;
1600 } 1600 }
1601 return Bounds::Unbounded(zone()); 1601 return Bounds::Unbounded(zone());
1602 } 1602 }
1603 1603
1604 1604
1605 Bounds Typer::Visitor::TypeJSForInNext(Node* node) {
1606 return Bounds(Type::None(zone()),
1607 Type::Union(Type::Name(), Type::Undefined(), zone()));
1608 }
1609
1610
1611 Bounds Typer::Visitor::TypeJSForInPrepare(Node* node) {
1612 // TODO(bmeurer): Return a tuple type here.
1613 return Bounds::Unbounded(zone());
1614 }
1615
1616
1617 Bounds Typer::Visitor::TypeJSForInDone(Node* node) {
1618 return Bounds(Type::None(zone()), Type::Boolean(zone()));
1619 }
1620
1621
1622 Bounds Typer::Visitor::TypeJSForInStep(Node* node) {
1623 STATIC_ASSERT(Map::EnumLengthBits::kMax <= FixedArray::kMaxLength);
1624 return Bounds(Type::None(zone()),
1625 Type::Range(1, FixedArray::kMaxLength + 1, zone()));
1626 }
1627
1628
1605 Bounds Typer::Visitor::TypeJSStackCheck(Node* node) { 1629 Bounds Typer::Visitor::TypeJSStackCheck(Node* node) {
1606 return Bounds::Unbounded(zone()); 1630 return Bounds::Unbounded(zone());
1607 } 1631 }
1608 1632
1609 1633
1610 // Simplified operators. 1634 // Simplified operators.
1611 1635
1612 1636
1613 Bounds Typer::Visitor::TypeBooleanNot(Node* node) { 1637 Bounds Typer::Visitor::TypeBooleanNot(Node* node) {
1614 return Bounds(Type::None(zone()), Type::Boolean(zone())); 1638 return Bounds(Type::None(zone()), Type::Boolean(zone()));
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 TYPED_ARRAYS(TYPED_ARRAY_CASE) 2390 TYPED_ARRAYS(TYPED_ARRAY_CASE)
2367 #undef TYPED_ARRAY_CASE 2391 #undef TYPED_ARRAY_CASE
2368 } 2392 }
2369 } 2393 }
2370 return Type::Constant(value, zone()); 2394 return Type::Constant(value, zone());
2371 } 2395 }
2372 2396
2373 } // namespace compiler 2397 } // namespace compiler
2374 } // namespace internal 2398 } // namespace internal
2375 } // namespace v8 2399 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/operator-properties.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698