Commit 2b2dd995 authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[TurboFan] Support Double arrays in Array.prototype.filter inlining.

Bug: v8:1956
Change-Id: I8e35ab6614dbf98facb6c9053fa5c50d4afeda42
Reviewed-on: https://chromium-review.googlesource.com/729019
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49211}
parent 022b2d49
...@@ -1247,8 +1247,8 @@ Reduction JSCallReducer::ReduceArrayFilter(Handle<JSFunction> function, ...@@ -1247,8 +1247,8 @@ Reduction JSCallReducer::ReduceArrayFilter(Handle<JSFunction> function,
const ElementsKind kind = receiver_maps[0]->elements_kind(); const ElementsKind kind = receiver_maps[0]->elements_kind();
// TODO(danno): Handle holey and double elements kinds. // TODO(danno): Handle holey elements kinds.
if (!IsFastPackedElementsKind(kind) || IsDoubleElementsKind(kind)) { if (!IsFastPackedElementsKind(kind)) {
return NoChange(); return NoChange();
} }
...@@ -1467,10 +1467,9 @@ Node* JSCallReducer::DoFilterPostCallbackWork(ElementsKind kind, Node** control, ...@@ -1467,10 +1467,9 @@ Node* JSCallReducer::DoFilterPostCallbackWork(ElementsKind kind, Node** control,
simplified()->LoadField(AccessBuilder::ForFixedArrayLength()), elements, simplified()->LoadField(AccessBuilder::ForFixedArrayLength()), elements,
etrue, if_true); etrue, if_true);
GrowFastElementsMode mode = GrowFastElementsMode::kSmiOrObjectElements; GrowFastElementsMode mode =
// TODO(mvstanton): Make sure{flags} is correct when we handle{a} as a IsDoubleElementsKind(kind) ? GrowFastElementsMode::kDoubleElements
// double output array. : GrowFastElementsMode::kSmiOrObjectElements;
DCHECK(!IsDoubleElementsKind(kind));
elements = etrue = elements = etrue =
graph()->NewNode(simplified()->MaybeGrowFastElements(mode), a, elements, graph()->NewNode(simplified()->MaybeGrowFastElements(mode), a, elements,
checked_to, elements_length, etrue, if_true); checked_to, elements_length, etrue, if_true);
......
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