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

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

Issue 2171703002: [turbofan] Sanitize the Truncation query method names. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_SimplifiedLowering_TruncationNone
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/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.cc
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc
index a5df68e20d924ae93155691912f76e5199c577e5..da62bce9ad6f6690bfd152b36aec78c56259b430 100644
--- a/src/compiler/representation-change.cc
+++ b/src/compiler/representation-change.cc
@@ -278,7 +278,7 @@ Node* RepresentationChanger::GetFloat32RepresentationFor(
node = jsgraph()->graph()->NewNode(op, node);
op = machine()->TruncateFloat64ToFloat32();
} else if (output_type->Is(Type::Unsigned32()) ||
- truncation.TruncatesToWord32()) {
+ truncation.IsUsedAsWord32()) {
// Either the output is uint32 or the uses only care about the
// low 32 bits (so we can pick uint32 safely).
@@ -340,7 +340,7 @@ Node* RepresentationChanger::GetFloat64RepresentationFor(
if (output_type->Is(Type::Signed32())) {
op = machine()->ChangeInt32ToFloat64();
} else if (output_type->Is(Type::Unsigned32()) ||
- use_info.truncation().TruncatesToWord32()) {
+ use_info.truncation().IsUsedAsWord32()) {
// Either the output is uint32 or the uses only care about the
// low 32 bits (so we can pick uint32 safely).
op = machine()->ChangeUint32ToFloat64();
@@ -415,7 +415,7 @@ Node* RepresentationChanger::GetWord32RepresentationFor(
op = machine()->ChangeFloat64ToUint32();
} else if (output_type->Is(Type::Signed32())) {
op = machine()->ChangeFloat64ToInt32();
- } else if (use_info.truncation().TruncatesToWord32()) {
+ } else if (use_info.truncation().IsUsedAsWord32()) {
op = machine()->TruncateFloat64ToWord32();
} else if (use_info.type_check() == TypeCheckKind::kSigned32) {
op = simplified()->CheckedFloat64ToInt32();
@@ -426,7 +426,7 @@ Node* RepresentationChanger::GetWord32RepresentationFor(
op = machine()->ChangeFloat64ToUint32();
} else if (output_type->Is(Type::Signed32())) {
op = machine()->ChangeFloat64ToInt32();
- } else if (use_info.truncation().TruncatesToWord32()) {
+ } else if (use_info.truncation().IsUsedAsWord32()) {
op = machine()->TruncateFloat64ToWord32();
} else if (use_info.type_check() == TypeCheckKind::kSigned32) {
op = simplified()->CheckedFloat64ToInt32();
@@ -438,7 +438,7 @@ Node* RepresentationChanger::GetWord32RepresentationFor(
op = simplified()->ChangeTaggedToUint32();
} else if (output_type->Is(Type::Signed32())) {
op = simplified()->ChangeTaggedToInt32();
- } else if (use_info.truncation().TruncatesToWord32()) {
+ } else if (use_info.truncation().IsUsedAsWord32()) {
op = simplified()->TruncateTaggedToWord32();
} else if (use_info.type_check() == TypeCheckKind::kSigned32) {
op = simplified()->CheckedTaggedToInt32();
@@ -543,7 +543,7 @@ Node* RepresentationChanger::GetCheckedWord32RepresentationFor(
op = machine()->ChangeFloat64ToUint32();
} else if (output_type->Is(Type::Signed32())) {
op = machine()->ChangeFloat64ToInt32();
- } else if (truncation.TruncatesToWord32()) {
+ } else if (truncation.IsUsedAsWord32()) {
op = machine()->TruncateFloat64ToWord32();
} else if (check == TypeCheckKind::kSigned32) {
op = simplified()->CheckedFloat64ToInt32();
@@ -554,7 +554,7 @@ Node* RepresentationChanger::GetCheckedWord32RepresentationFor(
op = machine()->ChangeFloat64ToUint32();
} else if (output_type->Is(Type::Signed32())) {
op = machine()->ChangeFloat64ToInt32();
- } else if (truncation.TruncatesToWord32()) {
+ } else if (truncation.IsUsedAsWord32()) {
op = machine()->TruncateFloat64ToWord32();
} else if (check == TypeCheckKind::kSigned32) {
op = simplified()->CheckedFloat64ToInt32();
@@ -566,7 +566,7 @@ Node* RepresentationChanger::GetCheckedWord32RepresentationFor(
op = simplified()->ChangeTaggedToUint32();
} else if (output_type->Is(Type::Signed32())) {
op = simplified()->ChangeTaggedToInt32();
- } else if (truncation.TruncatesToWord32()) {
+ } else if (truncation.IsUsedAsWord32()) {
op = simplified()->TruncateTaggedToWord32();
} else if (check == TypeCheckKind::kSigned32) {
op = simplified()->CheckedTaggedToInt32();
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698