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

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years 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-inlining.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index bba3749532f96a14041e2ecc3b217cef82b82ed3..9acab4bbe0370eaa2fe1774d3ba8d1c7df1fa641 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -210,8 +210,6 @@ Reduction JSIntrinsicLowering::ReduceIsInstanceType(
// } else {
// return %_GetInstanceType(%_GetMap(value)) == instance_type;
// }
- MachineType const type = static_cast<MachineType>(kTypeBool | kRepTagged);
-
Node* value = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node);
@@ -239,7 +237,8 @@ Reduction JSIntrinsicLowering::ReduceIsInstanceType(
ReplaceWithValue(node, node, ephi);
// Turn the {node} into a Phi.
- return Change(node, common()->Phi(type, 2), vtrue, vfalse, merge);
+ return Change(node, common()->Phi(MachineRepresentation::kTagged, 2), vtrue,
+ vfalse, merge);
}
@@ -279,8 +278,8 @@ Reduction JSIntrinsicLowering::ReduceIsJSReceiver(Node* node) {
control = graph()->NewNode(common()->Merge(2), if_true, if_false);
effect = graph()->NewNode(common()->EffectPhi(2), etrue, efalse, control);
- value = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), vtrue, vfalse,
- control);
+ value = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
+ vtrue, vfalse, control);
}
ReplaceWithValue(node, node, effect, control);
return Replace(value);
@@ -346,7 +345,8 @@ Reduction JSIntrinsicLowering::ReduceValueOf(Node* node) {
// }
const Operator* const merge_op = common()->Merge(2);
const Operator* const ephi_op = common()->EffectPhi(2);
- const Operator* const phi_op = common()->Phi(kMachAnyTagged, 2);
+ const Operator* const phi_op =
+ common()->Phi(MachineRepresentation::kTagged, 2);
Node* value = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node);
@@ -511,7 +511,7 @@ Reduction JSIntrinsicLowering::ReduceToLength(Node* node) {
} else {
if (value_type->Min() <= 0.0) {
value = graph()->NewNode(
- common()->Select(kMachAnyTagged),
+ common()->Select(MachineRepresentation::kTagged),
graph()->NewNode(simplified()->NumberLessThanOrEqual(), value,
jsgraph()->ZeroConstant()),
jsgraph()->ZeroConstant(), value);
@@ -520,7 +520,7 @@ Reduction JSIntrinsicLowering::ReduceToLength(Node* node) {
}
if (value_type->Max() > kMaxSafeInteger) {
value = graph()->NewNode(
- common()->Select(kMachAnyTagged),
+ common()->Select(MachineRepresentation::kTagged),
graph()->NewNode(simplified()->NumberLessThanOrEqual(),
jsgraph()->Constant(kMaxSafeInteger), value),
jsgraph()->Constant(kMaxSafeInteger), value);
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698