New issue
Advanced search Search tips

Issue 7220 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 7
Cc:
Components:
HW: ----
NextAction: ----
OS: ----
Priority: 2
Type: FeatureRequest



Sign in to add a comment

Implement Array.prototype.{flatten,flatMap}

Project Member Reported by mathias@chromium.org, Dec 17 2017

Issue description

This is a Stage 3 proposal.

Spec text: https://tc39.github.io/proposal-flatMap/
 
Labels: -Priority-3 Priority-2
Looks like there's test262 tests: https://github.com/tc39/test262/pull/1388
And Firefox nightly ships this: https://bugzilla.mozilla.org/show_bug.cgi?id=1421398

Bumping up the priority. Is this something you want to take on Mathias?
Yes!
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/697d39abff90510523f297bb8577d5c64322229f

commit 697d39abff90510523f297bb8577d5c64322229f
Author: Mathias Bynens <mathias@chromium.org>
Date: Thu Mar 15 17:26:12 2018

[esnext] Implement Array.prototype.{flatten,flatMap} 🥙

Proposal repo: https://tc39.github.io/proposal-flatMap/

Bug:  v8:7220 
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I61661fc6d5c39d084ce5c96a9e150e5c26799e2d
Also-By: bmeurer@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/957043
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51967}
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/bootstrapper.cc
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/builtins/builtins-array-gen.cc
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/builtins/builtins-definitions.h
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/code-stub-assembler.cc
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/code-stub-assembler.h
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/flag-definitions.h
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/src/messages.h
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/cctest/interpreter/bytecode_expectations/ForOf.golden
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/cctest/interpreter/bytecode_expectations/Generators.golden
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
[add] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/mjsunit/harmony/array-flatMap.js
[add] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/mjsunit/harmony/array-flatten.js
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/test/test262/testcfg.py
[modify] https://crrev.com/697d39abff90510523f297bb8577d5c64322229f/tools/presubmit.py

At the May 22nd TC39 meeting, `flatten` was renamed to `flat`.
Project Member

Comment 5 by bugdroid1@chromium.org, May 23

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/72f1abfbec0b8c798bc4cf150c774b5411d522ae

commit 72f1abfbec0b8c798bc4cf150c774b5411d522ae
Author: Mathias Bynens <mathias@chromium.org>
Date: Wed May 23 02:13:05 2018

[esnext] Rename `Array#flatten` to `flat`

The TC39 committee reached consensus to rename `flatten` to `flat`
during the May 22nd meeting. The corresponding patch to the proposal
is here:

https://github.com/tc39/proposal-flatMap/commit/093eacc7fe0906e70f7626bf6c7d6e9dfc53cce9

Bug:  v8:7220 
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie8049ae4d4589a4ae7fe3d203053cef798c135e4
Reviewed-on: https://chromium-review.googlesource.com/1069467
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53294}
[modify] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/src/bootstrapper.cc
[modify] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/src/builtins/builtins-array-gen.cc
[modify] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/src/builtins/builtins-definitions.h
[modify] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/src/flag-definitions.h
[add] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/test/mjsunit/harmony/array-flat.js
[modify] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/test/mjsunit/harmony/array-flatMap.js
[delete] https://crrev.com/6b2c305c18ff426c7c04f86b5c7ecfbb863cb200/test/mjsunit/harmony/array-flatten.js
[modify] https://crrev.com/72f1abfbec0b8c798bc4cf150c774b5411d522ae/test/test262/testcfg.py

Project Member

Comment 7 by bugdroid1@chromium.org, May 29

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/10b98d0d93916f56df59712d9d174c6de3baf706

commit 10b98d0d93916f56df59712d9d174c6de3baf706
Author: Mathias Bynens <mathias@chromium.org>
Date: Tue May 29 14:24:18 2018

Stage Array.prototype.{flat,flatMap}

Proposal repo: https://tc39.github.io/proposal-flatMap/

Bug:  v8:7220 
Change-Id: I79022fe26c609225dce21c0b45e8bedff12cc7b5
Reviewed-on: https://chromium-review.googlesource.com/1076427
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53412}
[modify] https://crrev.com/10b98d0d93916f56df59712d9d174c6de3baf706/src/flag-definitions.h

Project Member

Comment 8 by bugdroid1@chromium.org, May 29

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/dd78d603591663dd9abd64d1ed64caab7edfc966

commit dd78d603591663dd9abd64d1ed64caab7edfc966
Author: Mathias Bynens <mathias@chromium.org>
Date: Tue May 29 15:44:18 2018

Ship Array.prototype.{flat,flatMap} 🎉

Intent to ship:
https://groups.google.com/d/msg/v8-users/15GL4-UHEcE/OEKOou3bBgAJ

Bug:  v8:7220 
Change-Id: Ib1efde29e27b956db3d8ebf12ff7a3f163db7c22
Reviewed-on: https://chromium-review.googlesource.com/1076335
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53419}
[modify] https://crrev.com/dd78d603591663dd9abd64d1ed64caab7edfc966/src/debug/debug-evaluate.cc
[modify] https://crrev.com/dd78d603591663dd9abd64d1ed64caab7edfc966/src/flag-definitions.h
[modify] https://crrev.com/dd78d603591663dd9abd64d1ed64caab7edfc966/test/debugger/debug/side-effect/debug-evaluate-no-side-effect-builtins.js

Status: Fixed (was: Assigned)

Sign in to add a comment