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

Issue 1965593002: Fix Map::AsArray to properly iterate over the backing store (Closed)

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

Description

Fix Map::AsArray to properly iterate over the backing store Old code failed to walk over deleted elements, instead treating deleted elements as "undefined" in the output array. This is the Map equivalent of commit 2d9bfe9ad5. Also micro-optimized the loops to avoid an extra call to KeyAt() and used a direct hole comparison instead of calling IsTheHole(). R=cbruni@chromium.org BUG=v8:4946 LOG=y Committed: https://crrev.com/b767329b3704632229c88d9c6ea5b0dab28d4e37 Cr-Commit-Position: refs/heads/master@{#36149}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Micro-optimized #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -11 lines) Patch
M src/api.cc View 1 2 chunks +21 lines, -10 lines 0 comments Download
M test/cctest/test-api.cc View 2 chunks +29 lines, -1 line 0 comments Download

Messages

Total messages: 12 (6 generated)
adamk
4 years, 7 months ago (2016-05-09 22:15:25 UTC) #1
Camillo Bruni
LGTM with nit https://codereview.chromium.org/1965593002/diff/1/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1965593002/diff/1/src/api.cc#newcode6376 src/api.cc:6376: if (key->IsTheHole()) continue; nit: IsTheHole in ...
4 years, 7 months ago (2016-05-10 06:50:59 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1965593002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1965593002/20001
4 years, 7 months ago (2016-05-10 17:19:13 UTC) #7
adamk
https://codereview.chromium.org/1965593002/diff/1/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1965593002/diff/1/src/api.cc#newcode6376 src/api.cc:6376: if (key->IsTheHole()) continue; On 2016/05/10 06:50:59, Camillo Bruni wrote: ...
4 years, 7 months ago (2016-05-10 17:19:24 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-10 18:05:34 UTC) #10
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 18:08:06 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/b767329b3704632229c88d9c6ea5b0dab28d4e37
Cr-Commit-Position: refs/heads/master@{#36149}

Powered by Google App Engine
This is Rietveld 408576698