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

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

Issue 2181943003: [turbofan] Introduce CheckString simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/simplified-operator.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/compiler/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include "src/base/flags.h" 7 #include "src/base/flags.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 Type* Typer::Visitor::TypeCheckBounds(Node* node) { 1799 Type* Typer::Visitor::TypeCheckBounds(Node* node) {
1800 // TODO(bmeurer): We could do better here based on the limit. 1800 // TODO(bmeurer): We could do better here based on the limit.
1801 return Type::Unsigned31(); 1801 return Type::Unsigned31();
1802 } 1802 }
1803 1803
1804 Type* Typer::Visitor::TypeCheckNumber(Node* node) { 1804 Type* Typer::Visitor::TypeCheckNumber(Node* node) {
1805 Type* arg = Operand(node, 0); 1805 Type* arg = Operand(node, 0);
1806 return Type::Intersect(arg, Type::Number(), zone()); 1806 return Type::Intersect(arg, Type::Number(), zone());
1807 } 1807 }
1808 1808
1809 Type* Typer::Visitor::TypeCheckString(Node* node) {
1810 Type* arg = Operand(node, 0);
1811 return Type::Intersect(arg, Type::String(), zone());
1812 }
1813
1809 Type* Typer::Visitor::TypeCheckIf(Node* node) { 1814 Type* Typer::Visitor::TypeCheckIf(Node* node) {
1810 UNREACHABLE(); 1815 UNREACHABLE();
1811 return nullptr; 1816 return nullptr;
1812 } 1817 }
1813 1818
1814 Type* Typer::Visitor::TypeCheckTaggedPointer(Node* node) { 1819 Type* Typer::Visitor::TypeCheckTaggedPointer(Node* node) {
1815 Type* arg = Operand(node, 0); 1820 Type* arg = Operand(node, 0);
1816 return Type::Intersect(arg, Type::TaggedPointer(), zone()); 1821 return Type::Intersect(arg, Type::TaggedPointer(), zone());
1817 } 1822 }
1818 1823
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 } 2609 }
2605 if (Type::IsInteger(*value)) { 2610 if (Type::IsInteger(*value)) {
2606 return Type::Range(value->Number(), value->Number(), zone()); 2611 return Type::Range(value->Number(), value->Number(), zone());
2607 } 2612 }
2608 return Type::Constant(value, zone()); 2613 return Type::Constant(value, zone());
2609 } 2614 }
2610 2615
2611 } // namespace compiler 2616 } // namespace compiler
2612 } // namespace internal 2617 } // namespace internal
2613 } // namespace v8 2618 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698