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

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

Issue 2647833004: [turbofan] Properly implement %_ClassOf intrinsic. (Closed)
Patch Set: 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
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/js-operator.h » ('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 ab4d2b0c4badc61c381b90fa9372550122cc527f..a52da9028d6550eb3d98794aeb4712894ba23ac0 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -82,6 +82,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceStringGetRawHashField(node);
case Runtime::kInlineTheHole:
return ReduceTheHole(node);
+ case Runtime::kInlineClassOf:
+ return ReduceClassOf(node);
default:
break;
}
@@ -339,6 +341,13 @@ Reduction JSIntrinsicLowering::ReduceTheHole(Node* node) {
return Replace(value);
}
+Reduction JSIntrinsicLowering::ReduceClassOf(Node* node) {
+ RelaxEffectsAndControls(node);
+ node->TrimInputCount(2);
+ NodeProperties::ChangeOp(node, javascript()->ClassOf());
+ return Changed(node);
+}
+
Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a,
Node* b) {
RelaxControls(node);
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698