Commit 9fac6dcb authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[tubofan] Fix performance bug in Array.p.reduce[Right]

This change allows turbofan to store the index variable in
a Word32 integer; my last change caused the index to be
promoted to float64.

Change-Id: Ia60d16461991ae941229f45d393e924d0dca5bbe
Reviewed-on: https://chromium-review.googlesource.com/878160Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50780}
parent 937d161e
......@@ -1104,7 +1104,6 @@ Reduction JSCallReducer::ReduceArrayReduce(Handle<JSFunction> function,
} else {
// Find first/last non holey element.
Node* vloop = k = WireInLoopStart(k, &control, &effect);
Node* next_k = graph()->NewNode(next_op, k, jsgraph()->OneConstant());
Node* loop = control;
Node* eloop = effect;
effect = graph()->NewNode(common()->Checkpoint(),
......@@ -1119,6 +1118,7 @@ Reduction JSCallReducer::ReduceArrayReduce(Handle<JSFunction> function,
continue_test, effect, control);
cur = SafeLoadElement(kind, receiver, control, &effect, &k, p.feedback());
Node* next_k = graph()->NewNode(next_op, k, jsgraph()->OneConstant());
Node* hole_test = graph()->NewNode(simplified()->ReferenceEqual(), cur,
jsgraph()->TheHoleConstant());
......
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