Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index e4d25bb78a657ef987eaabc4a1dd5712fb8171c0..535e585f40413e0d98b45c4916c1190715eb3364 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -612,7 +612,7 @@ Reduction JSTypedLowering::ReduceJSLoadProperty(Node* node) { |
Handle<ExternalArray>::cast(handle(array->elements())); |
Node* pointer = jsgraph()->IntPtrConstant( |
bit_cast<intptr_t>(elements->external_pointer())); |
- Node* length = jsgraph()->Constant(byte_length / array->element_size()); |
+ Node* length = jsgraph()->Constant(array->length()->Number()); |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* load = graph()->NewNode( |
simplified()->LoadElement( |
@@ -647,7 +647,7 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { |
Handle<ExternalArray>::cast(handle(array->elements())); |
Node* pointer = jsgraph()->IntPtrConstant( |
bit_cast<intptr_t>(elements->external_pointer())); |
- Node* length = jsgraph()->Constant(byte_length / array->element_size()); |
+ Node* length = jsgraph()->Constant(array->length()->Number()); |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* control = NodeProperties::GetControlInput(node); |
Node* store = graph()->NewNode( |