Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 6518217b0809a5df87822bb3a105cf25f7f5e9d4..58d7facbbfdb4829686f5958a6d8060f0a466f22 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -1254,6 +1254,9 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { |
Node* value = NodeProperties::GetValueInput(node, 2); |
Type* key_type = NodeProperties::GetType(key); |
Type* value_type = NodeProperties::GetType(value); |
+ |
+ if (!value_type->Is(Type::PlainPrimitive())) return NoChange(); |
+ |
HeapObjectMatcher mbase(base); |
if (mbase.HasValue() && mbase.Value()->IsJSTypedArray()) { |
Handle<JSTypedArray> const array = |
@@ -1272,7 +1275,6 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { |
Handle<FixedTypedArrayBase>::cast(handle(array->elements())); |
Node* buffer = jsgraph()->PointerConstant(elements->external_pointer()); |
Node* length = jsgraph()->Constant(byte_length); |
- Node* context = NodeProperties::GetContextInput(node); |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* control = NodeProperties::GetControlInput(node); |
// Convert to a number first. |
@@ -1281,12 +1283,8 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { |
if (number_reduction.Changed()) { |
value = number_reduction.replacement(); |
} else { |
- Node* frame_state_for_to_number = |
- NodeProperties::FindFrameStateBefore(node); |
- value = effect = |
- graph()->NewNode(javascript()->ToNumber(), value, context, |
- frame_state_for_to_number, effect, control); |
- control = graph()->NewNode(common()->IfSuccess(), value); |
+ value = |
+ graph()->NewNode(simplified()->PlainPrimitiveToNumber(), value); |
} |
} |
// Check if we can avoid the bounds check. |