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

Unified Diff: src/compiler/typed-optimization.cc

Issue 2814013003: [turbofan] Properly represent the float64 hole. (Closed)
Patch Set: Make sure the_hole has the correct hole NaN bit pattern on Win32. Created 3 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/typed-optimization.cc
diff --git a/src/compiler/typed-optimization.cc b/src/compiler/typed-optimization.cc
index 6c958bdac49b6fa5f8f27bf92ef5d23ce4a59b98..b95e22a2e5b73df5f9eb3228e9c844d847b0e603 100644
--- a/src/compiler/typed-optimization.cc
+++ b/src/compiler/typed-optimization.cc
@@ -78,6 +78,8 @@ Reduction TypedOptimization::Reduce(Node* node) {
return ReduceCheckHeapObject(node);
case IrOpcode::kCheckMaps:
return ReduceCheckMaps(node);
+ case IrOpcode::kCheckNumber:
+ return ReduceCheckNumber(node);
case IrOpcode::kCheckString:
return ReduceCheckString(node);
case IrOpcode::kLoadField:
@@ -152,6 +154,16 @@ Reduction TypedOptimization::ReduceCheckMaps(Node* node) {
return NoChange();
}
+Reduction TypedOptimization::ReduceCheckNumber(Node* node) {
+ Node* const input = NodeProperties::GetValueInput(node, 0);
+ Type* const input_type = NodeProperties::GetType(input);
+ if (input_type->Is(Type::Number())) {
+ ReplaceWithValue(node, input);
+ return Replace(input);
+ }
+ return NoChange();
+}
+
Reduction TypedOptimization::ReduceCheckString(Node* node) {
Node* const input = NodeProperties::GetValueInput(node, 0);
Type* const input_type = NodeProperties::GetType(input);

Powered by Google App Engine
This is Rietveld 408576698