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

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

Issue 2647733002: [turbofan] Recognize a couple of collection.js intrinsics. (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') | no next file » | 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 2a7a3a3896d4881c3351fcb1227e0d3f155afd91..ab4d2b0c4badc61c381b90fa9372550122cc527f 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -48,6 +48,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceIsInstanceType(node, JS_ARRAY_TYPE);
case Runtime::kInlineIsTypedArray:
return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE);
+ case Runtime::kInlineIsJSProxy:
+ return ReduceIsInstanceType(node, JS_PROXY_TYPE);
case Runtime::kInlineIsJSReceiver:
return ReduceIsJSReceiver(node);
case Runtime::kInlineIsSmi:
@@ -74,6 +76,12 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceCall(node);
case Runtime::kInlineGetSuperConstructor:
return ReduceGetSuperConstructor(node);
+ case Runtime::kInlineJSCollectionGetTable:
+ return ReduceJSCollectionGetTable(node);
+ case Runtime::kInlineStringGetRawHashField:
+ return ReduceStringGetRawHashField(node);
+ case Runtime::kInlineTheHole:
+ return ReduceTheHole(node);
default:
break;
}
@@ -307,6 +315,30 @@ Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) {
active_function_map, effect, control);
}
+Reduction JSIntrinsicLowering::ReduceJSCollectionGetTable(Node* node) {
+ Node* collection = NodeProperties::GetValueInput(node, 0);
+ Node* effect = NodeProperties::GetEffectInput(node);
+ Node* control = NodeProperties::GetControlInput(node);
+ return Change(node,
+ simplified()->LoadField(AccessBuilder::ForJSCollectionTable()),
+ collection, effect, control);
+}
+
+Reduction JSIntrinsicLowering::ReduceStringGetRawHashField(Node* node) {
+ Node* string = NodeProperties::GetValueInput(node, 0);
+ Node* effect = NodeProperties::GetEffectInput(node);
+ Node* control = NodeProperties::GetControlInput(node);
+ return Change(node,
+ simplified()->LoadField(AccessBuilder::ForNameHashField()),
+ string, effect, control);
+}
+
+Reduction JSIntrinsicLowering::ReduceTheHole(Node* node) {
+ Node* value = jsgraph()->TheHoleConstant();
+ ReplaceWithValue(node, value);
+ return Replace(value);
+}
+
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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698