Index: src/compiler/js-intrinsic-lowering.cc |
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc |
index ebe2e4e72330e8101e546d6cef0ca3c1ce25397c..a3d27ee1a5b98a5e7e9d61c47b8a39682ad1be74 100644 |
--- a/src/compiler/js-intrinsic-lowering.cc |
+++ b/src/compiler/js-intrinsic-lowering.cc |
@@ -32,6 +32,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) { |
return ReduceInlineIsInstanceType(node, JS_ARRAY_TYPE); |
case Runtime::kInlineIsFunction: |
return ReduceInlineIsInstanceType(node, JS_FUNCTION_TYPE); |
+ case Runtime::kInlineJSValueGetValue: |
+ return ReduceInlineJSValueGetValue(node); |
case Runtime::kInlineConstructDouble: |
return ReduceInlineConstructDouble(node); |
case Runtime::kInlineDoubleLo: |
@@ -44,6 +46,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) { |
return ReduceInlineMathFloor(node); |
case Runtime::kInlineMathSqrt: |
return ReduceInlineMathSqrt(node); |
+ case Runtime::kInlineStringGetLength: |
+ return ReduceInlineStringGetLength(node); |
case Runtime::kInlineValueOf: |
return ReduceInlineValueOf(node); |
default: |
@@ -103,6 +107,15 @@ Reduction JSIntrinsicLowering::ReduceInlineIsNonNegativeSmi(Node* node) { |
} |
+Reduction JSIntrinsicLowering::ReduceInlineJSValueGetValue(Node* node) { |
+ Node* value = NodeProperties::GetValueInput(node, 0); |
+ Node* effect = NodeProperties::GetEffectInput(node); |
+ Node* control = NodeProperties::GetControlInput(node); |
+ return Change(node, simplified()->LoadField(AccessBuilder::ForValue()), value, |
+ effect, control); |
+} |
+ |
+ |
Reduction JSIntrinsicLowering::ReduceInlineConstructDouble(Node* node) { |
Node* high = NodeProperties::GetValueInput(node, 0); |
Node* low = NodeProperties::GetValueInput(node, 1); |
@@ -177,6 +190,15 @@ Reduction JSIntrinsicLowering::ReduceInlineMathSqrt(Node* node) { |
} |
+Reduction JSIntrinsicLowering::ReduceInlineStringGetLength(Node* node) { |
+ Node* value = NodeProperties::GetValueInput(node, 0); |
+ Node* effect = NodeProperties::GetEffectInput(node); |
+ Node* control = NodeProperties::GetControlInput(node); |
+ return Change(node, simplified()->LoadField(AccessBuilder::ForStringLength()), |
+ value, effect, control); |
+} |
+ |
+ |
Reduction JSIntrinsicLowering::ReduceInlineValueOf(Node* node) { |
// if (%_IsSmi(value)) { |
// return value; |
@@ -258,6 +280,7 @@ Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, |
node->ReplaceInput(1, b); |
node->ReplaceInput(2, c); |
node->TrimInputCount(3); |
+ NodeProperties::ReplaceWithValue(node, node, node); |
return Changed(node); |
} |