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

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

Issue 2149583002: [turbofan] Extend undefined-to-number truncation to all oddballs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 4e0d6f2eddbf6285b50abac713e3830a2fd47597..b6cf7fa5995425d755ff1031c3f555782290069e 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -73,12 +73,7 @@ class Truncation final {
static bool LessGeneral(TruncationKind rep1, TruncationKind rep2);
};
-enum class TypeCheckKind : uint8_t {
- kNone,
- kSigned32,
- kNumberOrUndefined,
- kNumber
-};
+enum class TypeCheckKind : uint8_t { kNone, kSigned32, kNumberOrOddball };
inline std::ostream& operator<<(std::ostream& os, TypeCheckKind type_check) {
switch (type_check) {
@@ -86,10 +81,8 @@ inline std::ostream& operator<<(std::ostream& os, TypeCheckKind type_check) {
return os << "None";
case TypeCheckKind::kSigned32:
return os << "Signed32";
- case TypeCheckKind::kNumberOrUndefined:
- return os << "NumberOrUndefined";
- case TypeCheckKind::kNumber:
- return os << "Number";
+ case TypeCheckKind::kNumberOrOddball:
+ return os << "NumberOrOddball";
}
UNREACHABLE();
return os;
@@ -141,9 +134,9 @@ class UseInfo {
return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
TypeCheckKind::kSigned32);
}
- static UseInfo CheckedNumberOrUndefinedAsFloat64() {
+ static UseInfo CheckedNumberOrOddballAsFloat64() {
return UseInfo(MachineRepresentation::kFloat64, Truncation::Any(),
- TypeCheckKind::kNumberOrUndefined);
+ TypeCheckKind::kNumberOrOddball);
}
// Undetermined representation.
« 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