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 2201073002: [turbofan] Adds speculative operator for bitwise and, or and xor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handles kSigned32 feedback. 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/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 } 1698 }
1699 1699
1700 Type* Typer::Visitor::TypeSpeculativeNumberShiftRight(Node* node) { 1700 Type* Typer::Visitor::TypeSpeculativeNumberShiftRight(Node* node) {
1701 return Type::Signed32(); 1701 return Type::Signed32();
1702 } 1702 }
1703 1703
1704 Type* Typer::Visitor::TypeSpeculativeNumberShiftRightLogical(Node* node) { 1704 Type* Typer::Visitor::TypeSpeculativeNumberShiftRightLogical(Node* node) {
1705 return Type::Unsigned32(); 1705 return Type::Unsigned32();
1706 } 1706 }
1707 1707
1708 Type* Typer::Visitor::TypeSpeculativeNumberBitwiseOr(Node* node) {
1709 return Type::Signed32();
1710 }
1711
1712 Type* Typer::Visitor::TypeSpeculativeNumberBitwiseXor(Node* node) {
1713 return Type::Signed32();
1714 }
1715
1716 Type* Typer::Visitor::TypeSpeculativeNumberBitwiseAnd(Node* node) {
1717 return Type::Signed32();
1718 }
1719
1708 Type* Typer::Visitor::TypeNumberMultiply(Node* node) { return Type::Number(); } 1720 Type* Typer::Visitor::TypeNumberMultiply(Node* node) { return Type::Number(); }
1709 1721
1710 Type* Typer::Visitor::TypeNumberDivide(Node* node) { return Type::Number(); } 1722 Type* Typer::Visitor::TypeNumberDivide(Node* node) { return Type::Number(); }
1711 1723
1712 Type* Typer::Visitor::TypeNumberModulus(Node* node) { return Type::Number(); } 1724 Type* Typer::Visitor::TypeNumberModulus(Node* node) { return Type::Number(); }
1713 1725
1714 Type* Typer::Visitor::TypeNumberBitwiseOr(Node* node) { 1726 Type* Typer::Visitor::TypeNumberBitwiseOr(Node* node) {
1715 return Type::Signed32(); 1727 return Type::Signed32();
1716 } 1728 }
1717 1729
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2692 } 2704 }
2693 if (Type::IsInteger(*value)) { 2705 if (Type::IsInteger(*value)) {
2694 return Type::Range(value->Number(), value->Number(), zone()); 2706 return Type::Range(value->Number(), value->Number(), zone());
2695 } 2707 }
2696 return Type::Constant(value, zone()); 2708 return Type::Constant(value, zone());
2697 } 2709 }
2698 2710
2699 } // namespace compiler 2711 } // namespace compiler
2700 } // namespace internal 2712 } // namespace internal
2701 } // namespace v8 2713 } // 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