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

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

Issue 2819653002: 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 Type* arg = Operand(node, 0); 1807 return typer_->operation_typer_.CheckNumber(Operand(node, 0));
1808 return Type::Intersect(arg, Type::Number(), zone());
1809 } 1808 }
1810 1809
1811 Type* Typer::Visitor::TypeCheckReceiver(Node* node) { 1810 Type* Typer::Visitor::TypeCheckReceiver(Node* node) {
1812 Type* arg = Operand(node, 0); 1811 Type* arg = Operand(node, 0);
1813 return Type::Intersect(arg, Type::Receiver(), zone()); 1812 return Type::Intersect(arg, Type::Receiver(), zone());
1814 } 1813 }
1815 1814
1816 Type* Typer::Visitor::TypeCheckSmi(Node* node) { 1815 Type* Typer::Visitor::TypeCheckSmi(Node* node) {
1817 Type* arg = Operand(node, 0); 1816 Type* arg = Operand(node, 0);
1818 return Type::Intersect(arg, Type::SignedSmall(), zone()); 1817 return Type::Intersect(arg, Type::SignedSmall(), zone());
1819 } 1818 }
1820 1819
1821 Type* Typer::Visitor::TypeCheckString(Node* node) { 1820 Type* Typer::Visitor::TypeCheckString(Node* node) {
1822 Type* arg = Operand(node, 0); 1821 Type* arg = Operand(node, 0);
1823 return Type::Intersect(arg, Type::String(), zone()); 1822 return Type::Intersect(arg, Type::String(), zone());
1824 } 1823 }
1825 1824
1826 Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) { 1825 Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) {
1827 Type* type = Operand(node, 0); 1826 return typer_->operation_typer_.CheckFloat64Hole(Operand(node, 0));
1828 return type;
1829 } 1827 }
1830 1828
1831 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) { 1829 Type* Typer::Visitor::TypeCheckTaggedHole(Node* node) {
1832 Type* type = Operand(node, 0); 1830 Type* type = Operand(node, 0);
1833 type = Type::Intersect(type, Type::NonInternal(), zone()); 1831 type = Type::Intersect(type, Type::NonInternal(), zone());
1834 return type; 1832 return type;
1835 } 1833 }
1836 1834
1837 Type* Typer::Visitor::TypeConvertTaggedHoleToUndefined(Node* node) { 1835 Type* Typer::Visitor::TypeConvertTaggedHoleToUndefined(Node* node) {
1838 Type* type = Operand(node, 0); 1836 Type* type = Operand(node, 0);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1946 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1949 if (Type::IsInteger(*value)) { 1947 if (Type::IsInteger(*value)) {
1950 return Type::Range(value->Number(), value->Number(), zone()); 1948 return Type::Range(value->Number(), value->Number(), zone());
1951 } 1949 }
1952 return Type::NewConstant(value, zone()); 1950 return Type::NewConstant(value, zone());
1953 } 1951 }
1954 1952
1955 } // namespace compiler 1953 } // namespace compiler
1956 } // namespace internal 1954 } // namespace internal
1957 } // namespace v8 1955 } // 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