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

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

Issue 2820603002: Revert of Merged: Squashed multiple commits. (Closed)
Patch Set: Created 3 years, 8 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/typed-optimization.cc ('k') | src/compiler/types.h » ('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/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 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 Type* arg = Operand(node, 0); 1797 Type* arg = Operand(node, 0);
1798 return Type::Intersect(arg, Type::InternalizedString(), zone()); 1798 return Type::Intersect(arg, Type::InternalizedString(), zone());
1799 } 1799 }
1800 1800
1801 Type* Typer::Visitor::TypeCheckMaps(Node* node) { 1801 Type* Typer::Visitor::TypeCheckMaps(Node* node) {
1802 UNREACHABLE(); 1802 UNREACHABLE();
1803 return nullptr; 1803 return nullptr;
1804 } 1804 }
1805 1805
1806 Type* Typer::Visitor::TypeCheckNumber(Node* node) { 1806 Type* Typer::Visitor::TypeCheckNumber(Node* node) {
1807 return typer_->operation_typer_.CheckNumber(Operand(node, 0)); 1807 Type* arg = Operand(node, 0);
1808 return Type::Intersect(arg, Type::Number(), zone());
1808 } 1809 }
1809 1810
1810 Type* Typer::Visitor::TypeCheckReceiver(Node* node) { 1811 Type* Typer::Visitor::TypeCheckReceiver(Node* node) {
1811 Type* arg = Operand(node, 0); 1812 Type* arg = Operand(node, 0);
1812 return Type::Intersect(arg, Type::Receiver(), zone()); 1813 return Type::Intersect(arg, Type::Receiver(), zone());
1813 } 1814 }
1814 1815
1815 Type* Typer::Visitor::TypeCheckSmi(Node* node) { 1816 Type* Typer::Visitor::TypeCheckSmi(Node* node) {
1816 Type* arg = Operand(node, 0); 1817 Type* arg = Operand(node, 0);
1817 return Type::Intersect(arg, Type::SignedSmall(), zone()); 1818 return Type::Intersect(arg, Type::SignedSmall(), zone());
1818 } 1819 }
1819 1820
1820 Type* Typer::Visitor::TypeCheckString(Node* node) { 1821 Type* Typer::Visitor::TypeCheckString(Node* node) {
1821 Type* arg = Operand(node, 0); 1822 Type* arg = Operand(node, 0);
1822 return Type::Intersect(arg, Type::String(), zone()); 1823 return Type::Intersect(arg, Type::String(), zone());
1823 } 1824 }
1824 1825
1825 Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) { 1826 Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) {
1826 return typer_->operation_typer_.CheckFloat64Hole(Operand(node, 0)); 1827 Type* type = Operand(node, 0);
1828 return type;
1827 } 1829 }
1828 1830
1829 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) { 1831 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) {
1830 Type* type = Operand(node, 0); 1832 Type* type = Operand(node, 0);
1831 type = Type::Intersect(type, Type::NonInternal(), zone()); 1833 type = Type::Intersect(type, Type::NonInternal(), zone());
1832 return type; 1834 return type;
1833 } 1835 }
1834 1836
1835 Type* Typer::Visitor::TypeConvertTaggedHoleToUndefined(Node* node) { 1837 Type* Typer::Visitor::TypeConvertTaggedHoleToUndefined(Node* node) {
1836 Type* type = Operand(node, 0); 1838 Type* type = Operand(node, 0);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1948 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1947 if (Type::IsInteger(*value)) { 1949 if (Type::IsInteger(*value)) {
1948 return Type::Range(value->Number(), value->Number(), zone()); 1950 return Type::Range(value->Number(), value->Number(), zone());
1949 } 1951 }
1950 return Type::NewConstant(value, zone()); 1952 return Type::NewConstant(value, zone());
1951 } 1953 }
1952 1954
1953 } // namespace compiler 1955 } // namespace compiler
1954 } // namespace internal 1956 } // namespace internal
1955 } // namespace v8 1957 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typed-optimization.cc ('k') | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698