[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:
parent
5f6bcdaf12
commit
72ddee79c3
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user