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

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

Issue 2059653002: [turbofan] Introduce PlainPrimitiveToNumber. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweak Created 4 years, 6 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/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 343cfa462366ad7cbc9ecf87923f7b7a2eb56f4f..f6fc86cfa3f9ed0c6e9cc8fcf51c9500e8fad68d 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1639,6 +1639,24 @@ class RepresentationSelector {
}
return;
}
+ case IrOpcode::kPlainPrimitiveToNumber:
+ ProcessInput(node, 0, UseInfo::AnyTagged());
+ if (truncation.TruncatesToWord32()) {
+ SetOutput(node, MachineRepresentation::kWord32);
+ if (lower()) {
+ NodeProperties::ChangeOp(node,
+ simplified()->PlainPrimitiveToWord32());
+ }
+ } else if (truncation.TruncatesToFloat64()) {
+ SetOutput(node, MachineRepresentation::kFloat64);
+ if (lower()) {
+ NodeProperties::ChangeOp(node,
+ simplified()->PlainPrimitiveToFloat64());
+ }
+ } else {
+ SetOutput(node, MachineRepresentation::kTagged);
+ }
+ return;
case IrOpcode::kObjectIsCallable:
case IrOpcode::kObjectIsNumber:
case IrOpcode::kObjectIsReceiver:
@@ -1808,6 +1826,8 @@ class RepresentationSelector {
case IrOpcode::kCheckedFloat64ToInt32:
case IrOpcode::kCheckedTaggedToInt32:
case IrOpcode::kCheckedTaggedToFloat64:
+ case IrOpcode::kPlainPrimitiveToWord32:
+ case IrOpcode::kPlainPrimitiveToFloat64:
FATAL("Representation inference: unsupported opcodes.");
break;
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698