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

Issue 2972803002: [wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. (Closed)

Created:
3 years, 5 months ago by titzer
Modified:
3 years, 5 months ago
CC:
v8-reviews_googlegroups.com, wasm-v8_google.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. This CL refactors the WasmMemoryObject and WasmInstanceObject classes to use WeakFixedArray instead of using a doubly-linked list of instances. This simplifies the lifetime management of instances by not requiring them to be unlinked from this list upon GC. It also simplifies the iteration over the instances using a given WasmMemoryObject. Note that, contrary to my naive assumption at the outset, it is still necessary for the InstanceFinalizer (called upon a WasmInstanceObject death) to unlink itself from a WasmMemoryObject's instances list, due to finalizer ordering. R=deepti@chromium.org, mlippautz@chromium.org BUG= Review-Url: https://codereview.chromium.org/2972803002 Cr-Commit-Position: refs/heads/master@{#46482} Committed: https://chromium.googlesource.com/v8/v8/+/0a61361e47db80be620704333ac1abaa0d980256

Patch Set 1 #

Patch Set 2 : [wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. #

Patch Set 3 : Rebase #

Total comments: 7

Patch Set 4 : Address review comments #

Patch Set 5 : [wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. #

Total comments: 7

Patch Set 6 : [wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. #

Patch Set 7 : Remove unnecessary handle scope. #

Patch Set 8 : [wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -236 lines) Patch
M src/wasm/module-compiler.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 3 chunks +12 lines, -43 lines 0 comments Download
M src/wasm/wasm-objects.h View 1 2 3 4 5 10 chunks +12 lines, -79 lines 0 comments Download
M src/wasm/wasm-objects.cc View 1 2 3 4 5 6 7 5 chunks +34 lines, -69 lines 0 comments Download
M test/mjsunit/wasm/memory-instance-validation.js View 1 2 chunks +30 lines, -42 lines 0 comments Download
M test/mjsunit/wasm/wasm-module-builder.js View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (33 generated)
titzer
PTAL
3 years, 5 months ago (2017-07-06 16:46:17 UTC) #12
gdeepti
Lgtm, with nits. Thanks for fixing this! https://codereview.chromium.org/2972803002/diff/40001/src/wasm/wasm-objects.cc File src/wasm/wasm-objects.cc (right): https://codereview.chromium.org/2972803002/diff/40001/src/wasm/wasm-objects.cc#newcode351 src/wasm/wasm-objects.cc:351: WeakFixedArray::Add(old_instances, instance, ...
3 years, 5 months ago (2017-07-06 17:42:55 UTC) #13
Michael Lippautz
https://codereview.chromium.org/2972803002/diff/40001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2972803002/diff/40001/src/wasm/wasm-module.cc#newcode117 src/wasm/wasm-module.cc:117: // {Managed<WasmModule>} has been collected earlier in this GC ...
3 years, 5 months ago (2017-07-07 07:38:13 UTC) #14
titzer
https://codereview.chromium.org/2972803002/diff/40001/src/wasm/wasm-objects.cc File src/wasm/wasm-objects.cc (right): https://codereview.chromium.org/2972803002/diff/40001/src/wasm/wasm-objects.cc#newcode351 src/wasm/wasm-objects.cc:351: WeakFixedArray::Add(old_instances, instance, &unused); On 2017/07/06 17:42:55, gdeepti wrote: > ...
3 years, 5 months ago (2017-07-07 08:16:34 UTC) #17
Clemens Hammacher
LGTM, nice cleanup! Some nits. https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc#newcode122 src/wasm/wasm-module.cc:122: HandleScope scope(isolate); If this ...
3 years, 5 months ago (2017-07-07 11:56:22 UTC) #24
titzer
https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc#newcode122 src/wasm/wasm-module.cc:122: HandleScope scope(isolate); On 2017/07/07 11:56:21, Clemens Hammacher wrote: > ...
3 years, 5 months ago (2017-07-07 12:07:41 UTC) #25
Clemens Hammacher
https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc#newcode122 src/wasm/wasm-module.cc:122: HandleScope scope(isolate); On 2017/07/07 at 12:07:41, titzer wrote: > ...
3 years, 5 months ago (2017-07-07 12:14:10 UTC) #28
titzer
On 2017/07/07 12:14:10, Clemens Hammacher wrote: > https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc > File src/wasm/wasm-module.cc (right): > > https://codereview.chromium.org/2972803002/diff/80001/src/wasm/wasm-module.cc#newcode122 ...
3 years, 5 months ago (2017-07-07 12:29:54 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2972803002/140001
3 years, 5 months ago (2017-07-07 13:50:40 UTC) #40
commit-bot: I haz the power
3 years, 5 months ago (2017-07-07 13:52:37 UTC) #43
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/v8/v8/+/0a61361e47db80be620704333ac1abaa0d9...

Powered by Google App Engine
This is Rietveld 408576698