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

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

Issue 1909343002: [turbofan] Move more type checks to the representation selector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
Index: src/compiler/change-lowering.cc
diff --git a/src/compiler/change-lowering.cc b/src/compiler/change-lowering.cc
index 15306d8ccc91b4e1226871083d04aff702883e69..aaf32d68bbbc09006d1cf09c90434d02fc3218f6 100644
--- a/src/compiler/change-lowering.cc
+++ b/src/compiler/change-lowering.cc
@@ -33,8 +33,8 @@ Reduction ChangeLowering::Reduce(Node* node) {
return ChangeInt31ToTagged(node->InputAt(0), control);
case IrOpcode::kChangeInt32ToTagged:
return ChangeInt32ToTagged(node->InputAt(0), control);
- case IrOpcode::kChangeSmiToInt32:
- return ChangeSmiToInt32(node->InputAt(0));
+ case IrOpcode::kChangeTaggedSignedToInt32:
+ return ChangeTaggedSignedToInt32(node->InputAt(0));
case IrOpcode::kChangeTaggedToFloat64:
return ChangeTaggedToFloat64(node->InputAt(0), control);
case IrOpcode::kChangeTaggedToInt32:
@@ -272,16 +272,12 @@ Reduction ChangeLowering::ChangeInt32ToTagged(Node* value, Node* control) {
return Replace(value);
}
-Reduction ChangeLowering::ChangeSmiToInt32(Node* value) {
+Reduction ChangeLowering::ChangeTaggedSignedToInt32(Node* value) {
return Replace(ChangeSmiToWord32(value));
}
Reduction ChangeLowering::ChangeTaggedToUI32(Node* value, Node* control,
Signedness signedness) {
- if (NodeProperties::GetType(value)->Is(Type::TaggedSigned())) {
- return ChangeSmiToInt32(value);
- }
-
const Operator* op = (signedness == kSigned)
? machine()->ChangeFloat64ToInt32()
: machine()->ChangeFloat64ToUint32();

Powered by Google App Engine
This is Rietveld 408576698