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

Issue 2801073006: Decouple root visitors from object visitors. (Closed)

Created:
3 years, 8 months ago by ulan
Modified:
3 years, 8 months ago
CC:
v8-reviews_googlegroups.com, mythria
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Decouple root visitors from object visitors. This patch adds a new interface called RootVisitor and changes the root iteration functions to accept a RootVisitor instead of an ObjectVisitor. Future CLs will change ObjectVisitor to provide the host object to all visiting functions, which will bring it in sync with static visitors. Having separate visitors for roots and objects removes ambiguity in VisitPointers and reduces chances of forgetting to record slots. This is intended as pure refactoring. All places that require behavior change are marked with TODO and will addressed in future CLs. BUG=chromium:709075 Review-Url: https://codereview.chromium.org/2801073006 Cr-Commit-Position: refs/heads/master@{#44852} Committed: https://chromium.googlesource.com/v8/v8/+/e671ed361026d01342d6032c3dab84abe48d19a6

Patch Set 1 #

Patch Set 2 : reupload #

Patch Set 3 : add comment #

Patch Set 4 : whitespace #

Patch Set 5 : rebase #

Total comments: 2

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+517 lines, -381 lines) Patch
M BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/api.h View 1 2 3 4 5 3 chunks +4 lines, -5 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 4 chunks +16 lines, -16 lines 0 comments Download
M src/api-arguments.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/bootstrapper.h View 1 2 3 4 5 3 chunks +5 lines, -3 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/builtins/builtins.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M src/builtins/builtins-api.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M src/compilation-cache.h View 3 chunks +4 lines, -2 lines 0 comments Download
M src/compilation-cache.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M src/debug/debug.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/debug/debug.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M src/frames.h View 1 2 3 4 5 14 chunks +15 lines, -14 lines 0 comments Download
M src/frames.cc View 1 2 3 4 5 14 chunks +24 lines, -36 lines 0 comments Download
M src/global-handles.h View 7 chunks +9 lines, -9 lines 0 comments Download
M src/global-handles.cc View 11 chunks +22 lines, -24 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 7 chunks +19 lines, -13 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 16 chunks +52 lines, -41 lines 0 comments Download
M src/heap/heap-inl.h View 3 chunks +17 lines, -8 lines 0 comments Download
M src/heap/incremental-marking.cc View 1 2 3 4 5 2 chunks +6 lines, -3 lines 0 comments Download
M src/heap/mark-compact.h View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 23 chunks +109 lines, -53 lines 0 comments Download
M src/heap/object-stats.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M src/heap/scavenger.h View 1 chunk +7 lines, -3 lines 0 comments Download
M src/heap/scavenger.cc View 1 2 3 4 1 chunk +11 lines, -4 lines 0 comments Download
M src/interpreter/interpreter.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 3 chunks +5 lines, -4 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 4 chunks +11 lines, -14 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 4 chunks +6 lines, -41 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 2 chunks +3 lines, -22 lines 0 comments Download
M src/profiler/heap-snapshot-generator.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/profiler/heap-snapshot-generator.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M src/snapshot/code-serializer.cc View 2 chunks +2 lines, -1 line 0 comments Download
M src/snapshot/deserializer.h View 1 2 3 4 5 1 chunk +1 line, -3 lines 0 comments Download
M src/snapshot/deserializer.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M src/snapshot/partial-serializer.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/serializer.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/serializer.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/serializer-common.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M src/snapshot/serializer-common.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/snapshot/startup-serializer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/startup-serializer.cc View 4 chunks +6 lines, -4 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8threads.h View 4 chunks +3 lines, -7 lines 0 comments Download
M src/v8threads.cc View 3 chunks +3 lines, -3 lines 0 comments Download
A src/visitors.h View 1 2 1 chunk +78 lines, -0 lines 0 comments Download
A src/visitors.cc View 1 chunk +22 lines, -0 lines 0 comments Download
M test/cctest/heap/test-heap.cc View 1 chunk +2 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 20 (11 generated)
ulan
mlippautz@, hpayer@, ptal. yangguo@, ptal at serializer. mythria@, ptal at interpreter.
3 years, 8 months ago (2017-04-07 16:39:24 UTC) #3
Yang
On 2017/04/07 16:39:24, ulan wrote: > mlippautz@, hpayer@, ptal. > yangguo@, ptal at serializer. > ...
3 years, 8 months ago (2017-04-10 11:51:23 UTC) #4
rmcilroy
Mythri's on vacation this week, so I'll take this one. interpreter/ LGTM
3 years, 8 months ago (2017-04-10 13:54:57 UTC) #6
Michael Lippautz
lgtm https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc#newcode53 src/heap/mark-compact.cc:53: class MarkingVerifier : public ObjectVisitor, public RootVisitor { ...
3 years, 8 months ago (2017-04-20 09:01:29 UTC) #7
Hannes Payer (out of office)
https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc#newcode53 src/heap/mark-compact.cc:53: class MarkingVerifier : public ObjectVisitor, public RootVisitor { On ...
3 years, 8 months ago (2017-04-21 09:42:09 UTC) #8
ulan
On 2017/04/21 09:42:09, Hannes Payer wrote: > https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc > File src/heap/mark-compact.cc (right): > > https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc#newcode53 ...
3 years, 8 months ago (2017-04-25 10:44:58 UTC) #9
Hannes Payer (out of office)
On 2017/04/25 10:44:58, ulan wrote: > On 2017/04/21 09:42:09, Hannes Payer wrote: > > https://codereview.chromium.org/2801073006/diff/80001/src/heap/mark-compact.cc ...
3 years, 8 months ago (2017-04-25 13:26:27 UTC) #14
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/2801073006/100001
3 years, 8 months ago (2017-04-25 13:30:34 UTC) #17
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 13:32:26 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/v8/v8/+/e671ed361026d01342d6032c3dab84abe48...

Powered by Google App Engine
This is Rietveld 408576698