Commit 72ddee79 authored by sigurds's avatar sigurds Committed by Commit bot

[turbofan] Use NumberConstant for LoadElement's index

LoadElement nodes used a Int32Constant in some cases, which made
matching for constant values in optimizations more difficult than
necessary.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1559853002

Cr-Commit-Position: refs/heads/master@{#33081}
parent 5f6bcdaf
......@@ -2733,7 +2733,7 @@ Node* JSTypedLowering::AllocateElements(Node* effect, Node* control,
AllocationBuilder a(jsgraph(), effect, control);
a.AllocateArray(capacity, elements_map, pretenure);
for (int i = 0; i < capacity; ++i) {
Node* index = jsgraph()->Int32Constant(i);
Node* index = jsgraph()->Constant(i);
a.Store(access, index, value);
}
return a.Finish();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment