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

Issue 1255173006: Introduce safe interface to "copy and grow" FixedArray. (Closed)

Created:
5 years, 4 months ago by Michael Starzinger
Modified:
5 years, 4 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Introduce safe interface to "copy and grow" FixedArray. This introduces a CopyFixedArrayAndGrow method on Factory that takes the "grow amount" instead of the "new size" as an argument. The new interface is safer because it allows for mutations by the GC that potentially trim the source array. This also fixes a bug in SharedFunctionInfo::AddToOptimizedCodeMap where the aformentioned scenario led to unused entries within the optimized code map. Note that FixedArray::CopySize is hereby deprecated because it is considered unsafe and should no longer be used. R=hpayer@chromium.org TEST=mjsunit/regress/regress-crbug-513507 BUG=chromium:513507 LOG=n Committed: https://crrev.com/bcad9b547d00320f818ce6ff08016a02ce0b6e5b Cr-Commit-Position: refs/heads/master@{#30012}

Patch Set 1 #

Patch Set 2 : Added a cctest. #

Total comments: 4

Patch Set 3 : Addressed nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -10 lines) Patch
M src/factory.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/factory.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M src/heap/heap.h View 1 chunk +7 lines, -6 lines 0 comments Download
M src/heap/heap.cc View 3 chunks +23 lines, -2 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-heap.cc View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-crbug-513507.js View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Michael Starzinger
5 years, 4 months ago (2015-08-04 12:52:17 UTC) #1
Hannes Payer (out of office)
lgtm, and one cctest please with verified states.
5 years, 4 months ago (2015-08-04 16:34:19 UTC) #2
Michael Starzinger
One cctest coming right up. Still warm out of the printer. PTAL.
5 years, 4 months ago (2015-08-04 16:52:25 UTC) #3
Hannes Payer (out of office)
lgtm, with 2 nits https://codereview.chromium.org/1255173006/diff/20001/test/cctest/test-heap.cc File test/cctest/test-heap.cc (right): https://codereview.chromium.org/1255173006/diff/20001/test/cctest/test-heap.cc#newcode4528 test/cctest/test-heap.cc:4528: // Prepare optimize code that ...
5 years, 4 months ago (2015-08-04 16:57:38 UTC) #4
Michael Starzinger
https://codereview.chromium.org/1255173006/diff/20001/test/cctest/test-heap.cc File test/cctest/test-heap.cc (right): https://codereview.chromium.org/1255173006/diff/20001/test/cctest/test-heap.cc#newcode4528 test/cctest/test-heap.cc:4528: // Prepare optimize code that we can use. On ...
5 years, 4 months ago (2015-08-04 17:02:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255173006/20002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255173006/20002
5 years, 4 months ago (2015-08-04 17:18:10 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:20002)
5 years, 4 months ago (2015-08-04 17:49:38 UTC) #9
commit-bot: I haz the power
5 years, 4 months ago (2015-08-04 17:49:53 UTC) #10
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/bcad9b547d00320f818ce6ff08016a02ce0b6e5b
Cr-Commit-Position: refs/heads/master@{#30012}

Powered by Google App Engine
This is Rietveld 408576698