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

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

Issue 2646763003: [turbofan] Optimize typeof o === "object" checks. (Closed)
Patch Set: Address comment. Created 3 years, 11 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/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 9f0b5f681e4f08f5b146f187b7146de8f0a0df64..94a078a5976ba129b93d9c5f52f1b9aedd4cf33f 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -2515,8 +2515,11 @@ class RepresentationSelector {
return;
}
case IrOpcode::kObjectIsCallable: {
- // TODO(turbofan): Add Type::Callable to optimize this?
- VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit);
+ VisitObjectIs(node, Type::Callable(), lowering);
+ return;
+ }
+ case IrOpcode::kObjectIsNonCallable: {
+ VisitObjectIs(node, Type::NonCallable(), lowering);
return;
}
case IrOpcode::kObjectIsNumber: {

Powered by Google App Engine
This is Rietveld 408576698