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

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

Issue 1223583003: [turbofan] Inline %_FixedArrayGet intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 01552559ea39b83a7c4f62f41ecb743eb2fccb90..8f04fc1bcd5f362122389acf70cbda08cad8c4ca 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -86,6 +86,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceValueOf(node);
case Runtime::kInlineIsMinusZero:
return ReduceIsMinusZero(node);
+ case Runtime::kInlineFixedArrayGet:
+ return ReduceFixedArrayGet(node);
case Runtime::kInlineFixedArraySet:
return ReduceFixedArraySet(node);
case Runtime::kInlineGetTypeFeedbackVector:
@@ -447,6 +449,17 @@ Reduction JSIntrinsicLowering::ReduceIsMinusZero(Node* node) {
}
+Reduction JSIntrinsicLowering::ReduceFixedArrayGet(Node* node) {
+ Node* base = node->InputAt(0);
+ Node* index = node->InputAt(1);
+ Node* effect = NodeProperties::GetEffectInput(node);
+ Node* control = NodeProperties::GetControlInput(node);
+ return Change(
+ node, simplified()->LoadElement(AccessBuilder::ForFixedArrayElement()),
+ base, index, effect, control);
+}
+
+
Reduction JSIntrinsicLowering::ReduceFixedArraySet(Node* node) {
Node* base = node->InputAt(0);
Node* index = node->InputAt(1);
@@ -553,6 +566,19 @@ Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a,
}
+Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a,
+ Node* b, Node* c, Node* d) {
+ node->set_op(op);
+ node->ReplaceInput(0, a);
+ node->ReplaceInput(1, b);
+ node->ReplaceInput(2, c);
+ node->ReplaceInput(3, d);
+ node->TrimInputCount(4);
+ RelaxControls(node);
+ return Changed(node);
+}
+
+
Reduction JSIntrinsicLowering::ChangeToUndefined(Node* node, Node* effect) {
ReplaceWithValue(node, jsgraph()->UndefinedConstant(), effect);
return Changed(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