Commit bdde74cb authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[turbofan] Inline Array.prototype.map for packed double arrays.

Bug: v8:6896
Change-Id: I4c54cc114fd2304de121586f6bcbf19957ae55b8
Reviewed-on: https://chromium-review.googlesource.com/708262
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48431}
parent 0a97c51f
......@@ -849,9 +849,8 @@ Reduction JSCallReducer::ReduceArrayMap(Handle<JSFunction> function,
const ElementsKind kind = receiver_maps[0]->elements_kind();
// TODO(danno): Handle holey Smi and Object fast elements kinds and double
// packed.
if (!IsFastPackedElementsKind(kind) || IsDoubleElementsKind(kind)) {
// TODO(danno): Handle holey elements kinds.
if (!IsFastPackedElementsKind(kind)) {
return NoChange();
}
......@@ -883,8 +882,8 @@ Reduction JSCallReducer::ReduceArrayMap(Handle<JSFunction> function,
effect, control);
Node* original_length = effect = graph()->NewNode(
simplified()->LoadField(AccessBuilder::ForJSArrayLength(PACKED_ELEMENTS)),
receiver, effect, control);
simplified()->LoadField(AccessBuilder::ForJSArrayLength(kind)), receiver,
effect, control);
// This array should be HOLEY_SMI_ELEMENTS because of the non-zero length.
// Even though {JSCreateArray} is not marked as {kNoThrow}, we can elide the
......
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