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

Unified Diff: src/compiler/verifier.cc

Issue 2139183002: [turbofan] Unify BooleanToNumber, StringToNumber and PlainPrimitiveToNumber. (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/typer.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index e898a02915cd335d44dabf34891127824bc1ec10..040537d99dec057146d5b284656d071317c76665 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -664,11 +664,6 @@ void Verifier::Visitor::Check(Node* node) {
CheckValueInputIs(node, 0, Type::Boolean());
CheckUpperIs(node, Type::Boolean());
break;
- case IrOpcode::kBooleanToNumber:
- // Boolean -> Number
- CheckValueInputIs(node, 0, Type::Boolean());
- CheckUpperIs(node, Type::Number());
- break;
case IrOpcode::kNumberEqual:
// (Number, Number) -> Boolean
CheckValueInputIs(node, 0, Type::Number());
@@ -790,13 +785,18 @@ void Verifier::Visitor::Check(Node* node) {
CheckUpperIs(node, Type::Unsigned32());
break;
case IrOpcode::kPlainPrimitiveToNumber:
- // Type is Number.
+ // PlainPrimitive -> Number
+ CheckValueInputIs(node, 0, Type::PlainPrimitive());
CheckUpperIs(node, Type::Number());
break;
case IrOpcode::kPlainPrimitiveToWord32:
- CheckUpperIs(node, Type::Number());
+ // PlainPrimitive -> Integral32
+ CheckValueInputIs(node, 0, Type::PlainPrimitive());
+ CheckUpperIs(node, Type::Integral32());
break;
case IrOpcode::kPlainPrimitiveToFloat64:
+ // PlainPrimitive -> Number
+ CheckValueInputIs(node, 0, Type::PlainPrimitive());
CheckUpperIs(node, Type::Number());
break;
case IrOpcode::kStringEqual:
@@ -812,11 +812,6 @@ void Verifier::Visitor::Check(Node* node) {
CheckValueInputIs(node, 0, Type::Number());
CheckUpperIs(node, Type::String());
break;
- case IrOpcode::kStringToNumber:
- // String -> Number
- CheckValueInputIs(node, 0, Type::String());
- CheckUpperIs(node, Type::Number());
- break;
case IrOpcode::kReferenceEqual: {
// (Unique, Any) -> Boolean and
// (Any, Unique) -> Boolean
« no previous file with comments | « src/compiler/typer.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698