Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Issue 1852703002: Fix treatment of rest pattern in array destructuring. (Closed)

Created:
4 years, 8 months ago by neis
Modified:
4 years, 8 months ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com, oth, rmcilroy
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix treatment of rest pattern in array destructuring. When seeing a rest pattern, we used to get the remaining elements from the iterator by calling %concat_iterable_to_array on it. This was wrong because it caused an observable [[Get]] for @@iterator (which the iterator may not even provide). This CL gets rid of the call to %concat_iterable_to_array and does the iteration manually in a simple while-loop. It also gets rid of %concat_iterable_to_array itself because there aren't any other uses of it. BUG=v8:4759 LOG=n R=adamk@chromium.org Committed: https://crrev.com/4edf16ddd97d8f23d35b57f46b30aada5e8e94a2 Cr-Commit-Position: refs/heads/master@{#35251}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comment #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -43 lines) Patch
M src/contexts.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/js/runtime.js View 2 chunks +0 lines, -12 lines 0 comments Download
M src/parsing/pattern-rewriter.cc View 1 1 chunk +72 lines, -29 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 chunk +1 line, -1 line 0 comments Download
A test/mjsunit/es6/regress/regress-4759.js View 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
neis
4 years, 8 months ago (2016-04-01 09:42:33 UTC) #1
adamk
lgtm with one suggested reorganization https://codereview.chromium.org/1852703002/diff/1/src/parsing/pattern-rewriter.cc File src/parsing/pattern-rewriter.cc (right): https://codereview.chromium.org/1852703002/diff/1/src/parsing/pattern-rewriter.cc#newcode584 src/parsing/pattern-rewriter.cc:584: Expression* result_value = factory()->NewProperty( ...
4 years, 8 months ago (2016-04-04 19:32:46 UTC) #2
neis
On 2016/04/04 19:32:46, adamk wrote: > lgtm with one suggested reorganization > > https://codereview.chromium.org/1852703002/diff/1/src/parsing/pattern-rewriter.cc > ...
4 years, 8 months ago (2016-04-05 08:31:07 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1852703002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1852703002/40001
4 years, 8 months ago (2016-04-05 08:31:26 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-05 08:56:16 UTC) #7
commit-bot: I haz the power
4 years, 8 months ago (2016-04-05 08:57:02 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4edf16ddd97d8f23d35b57f46b30aada5e8e94a2
Cr-Commit-Position: refs/heads/master@{#35251}

Powered by Google App Engine
This is Rietveld 408576698