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

Unified Diff: src/compiler/representation-change.h

Issue 2222983002: [turbofan] Also consume number type feedback for abstract equality. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.h
diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h
index 80d5a73bd9f299c321f005883deb91993ede4811..fac328072a430a3d51c188bc99f1ab210bf1de63 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -78,6 +78,7 @@ enum class TypeCheckKind : uint8_t {
kNone,
kSignedSmall,
kSigned32,
+ kNumber,
kNumberOrOddball
};
@@ -89,6 +90,8 @@ inline std::ostream& operator<<(std::ostream& os, TypeCheckKind type_check) {
return os << "SignedSmall";
case TypeCheckKind::kSigned32:
return os << "Signed32";
+ case TypeCheckKind::kNumber:
+ return os << "Number";
case TypeCheckKind::kNumberOrOddball:
return os << "NumberOrOddball";
}
@@ -146,6 +149,14 @@ class UseInfo {
return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
TypeCheckKind::kSigned32);
}
+ static UseInfo CheckedNumberAsFloat64() {
+ return UseInfo(MachineRepresentation::kFloat64, Truncation::Float64(),
+ TypeCheckKind::kNumber);
+ }
+ static UseInfo CheckedNumberAsWord32() {
+ return UseInfo(MachineRepresentation::kWord32, Truncation::Word32(),
+ TypeCheckKind::kNumber);
+ }
static UseInfo CheckedNumberOrOddballAsFloat64() {
return UseInfo(MachineRepresentation::kFloat64, Truncation::Any(),
TypeCheckKind::kNumberOrOddball);
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698