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

Issue 939303005: BlinkGCPlugin: Support overloaded trace() call from template. (Closed)

Created:
5 years, 9 months ago by Yuta Kitamura
Modified:
5 years, 9 months ago
Reviewers:
kouhei (in TOK)
CC:
chromium-reviews, zerny-chromium, oilpan-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

BlinkGCPlugin: Support overloaded trace() call from template. With the new setup with InlinedGlobalTracingVisitor, trace() functions are overloaded and may be called from a traceImpl() function in derived classes. As traceImpl() is a function template, the trace() overload cannot be resolved at the time of plugin execution and thus the callee of the trace() call becomes UnresolvedMemberExpr*. This patch adds support for detecting Base::trace() call if the "Base::trace" part is UnresolvedMemberExpr. Specifically, the new code finds a function looking like trace() from the candidates of UnresolvedMemberExpr, and if there's one, we treat it as a valid Base::trace() call. The call needs to give exactly one argument named "visitor" to the function. A few tests are added to test these cases. A stub for InlinedGlobalTracing- Visitor is added to tests/heap/stubs.h so it can be used from tests. BUG=none R=kouhei@chromium.org CC=zerny@chromium.org, oilpan-reviews@chromium.org Committed: https://crrev.com/e5ec4fe6e30327ccff5ed9e2ee57495b24f6878a Cr-Commit-Position: refs/heads/master@{#317768}

Patch Set 1 #

Patch Set 2 : Fix a subtle typo. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -21 lines) Patch
M tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp View 3 chunks +70 lines, -21 lines 2 comments Download
M tools/clang/blink_gc_plugin/Config.h View 1 chunk +1 line, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/heap/stubs.h View 1 chunk +7 lines, -1 line 0 comments Download
A tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h View 1 1 chunk +75 lines, -0 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.cpp View 1 chunk +36 lines, -0 lines 0 comments Download
A + tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/traceimpl_overloaded_error.h View 1 1 chunk +76 lines, -0 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/traceimpl_overloaded_error.cpp View 1 chunk +35 lines, -0 lines 0 comments Download
A tools/clang/blink_gc_plugin/tests/traceimpl_overloaded_error.txt View 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Yuta Kitamura
5 years, 9 months ago (2015-02-24 07:39:19 UTC) #1
kouhei (in TOK)
lgtm https://codereview.chromium.org/939303005/diff/20001/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp File tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp (right): https://codereview.chromium.org/939303005/diff/20001/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp#newcode516 tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp:516: // Check if the passed argument is named ...
5 years, 9 months ago (2015-02-24 07:46:33 UTC) #2
Yuta Kitamura
Thanks! https://codereview.chromium.org/939303005/diff/20001/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp File tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp (right): https://codereview.chromium.org/939303005/diff/20001/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp#newcode516 tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp:516: // Check if the passed argument is named ...
5 years, 9 months ago (2015-02-24 08:35:59 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/939303005/20001
5 years, 9 months ago (2015-02-24 08:37:10 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-02-24 08:56:00 UTC) #6
commit-bot: I haz the power
5 years, 9 months ago (2015-02-24 08:56:37 UTC) #7
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e5ec4fe6e30327ccff5ed9e2ee57495b24f6878a
Cr-Commit-Position: refs/heads/master@{#317768}

Powered by Google App Engine
This is Rietveld 408576698