[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}
This commit is contained in:
sigurds 2016-01-04 05:18:35 -08:00 committed by Commit bot
parent 5f6bcdaf12
commit 72ddee79c3

View File

@ -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();