WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 68404
Add static version of JSCell::visitChildren
https://bugs.webkit.org/show_bug.cgi?id=68404
Summary
Add static version of JSCell::visitChildren
Mark Hahnenberg
Reported
2011-09-19 15:39:11 PDT
In the ongoing effort to un-virtualize JSCell, we need to replace visitChildren with a non-virtual version. This will eventually be done by adding a function pointer to the ClassInfo struct. First we need to make a version of visitChildren that we can reference easily as a function pointer. Since member methods are difficult to work into ClassInfo due to their implicit "this" and the special ways that compilers treat them, we will need to replace them with static methods. Initially we'll add them and simply have the current virtual visitChildren call the static methods, which will in turn call their parent static method, etc. This will preserve the correctness of the code while allowing us to work incrementally.
Attachments
Patch
(99.82 KB, patch)
2011-09-20 16:14 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Resetting bindings
(101.88 KB, patch)
2011-09-20 16:16 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Fixing windows
(115.46 KB, patch)
2011-09-21 11:35 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Patch
(113.42 KB, patch)
2011-09-21 11:56 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Benchmark results
(4.43 KB, text/plain)
2011-09-21 12:56 PDT
,
Mark Hahnenberg
no flags
Details
Fix GTK
(115.76 KB, patch)
2011-09-21 18:09 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Fix GTK for real
(113.05 KB, patch)
2011-09-22 08:19 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Fix bad merge
(115.68 KB, patch)
2011-09-22 08:52 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Patch
(118.31 KB, patch)
2011-09-22 23:53 PDT
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Patch
(118.20 KB, patch)
2011-09-23 09:06 PDT
,
Mark Hahnenberg
darin
: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Mark Hahnenberg
Comment 1
2011-09-20 16:14:38 PDT
Created
attachment 108072
[details]
Patch
Mark Hahnenberg
Comment 2
2011-09-20 16:16:20 PDT
Created
attachment 108074
[details]
Resetting bindings
Darin Adler
Comment 3
2011-09-20 16:20:40 PDT
Comment on
attachment 108074
[details]
Resetting bindings I think that using the word static in the name of the new function is unclear and not helpful. It would be a shame to be left with that word in the names of functions after this task is done. If we have to rename something to keep these functions out of each others’ way, why not rename the virtual function that we are getting rid of? The new non-virtual version can be named visitChildren and the old could be called visitChildrenVirtual. These new functions should be private, since they are not intended to be called directly outside of the class.
Mark Hahnenberg
Comment 4
2011-09-20 16:30:37 PDT
(In reply to
comment #3
)
> (From update of
attachment 108074
[details]
) > I think that using the word static in the name of the new function is unclear and not helpful. It would be a shame to be left with that word in the names of functions after this task is done. If we have to rename something to keep these functions out of each others’ way, why not rename the virtual function that we are getting rid of? The new non-virtual version can be named visitChildren and the old could be called visitChildrenVirtual.
In the end, my goal is to keep visitChildren in just JSCell so that any current call sites to the virtual version are unaffected. There are a few instances of classes declaring internal visitChildrenDirect() methods. Perhaps I can adopt that name for these new functions and merge any existing visitChildrenDirect() methods with the new ones?
> These new functions should be private, since they are not intended to be called directly outside of the class.
Some of the visitChildren functions call one another directly (especially children calling parent implementations) so at least some of them shouldn't be private. I attempted to duplicate the access permissions of whatever the visitChildren function was before. I can check for any instances that are incorrect, though.
Geoffrey Garen
Comment 5
2011-09-20 18:22:31 PDT
> In the end, my goal is to keep visitChildren in just JSCell so that any current call sites to the virtual version are unaffected.
I believe there is only one current caller of the virtual visitChildren: SlotVisitor::visitChildren(). (You can verify this by just making it private.) I think you should either remove that function entirely, or, like Darin suggested, give it the worse name (*Virtual).
Geoffrey Garen
Comment 6
2011-09-20 18:22:55 PDT
Comment on
attachment 108074
[details]
Resetting bindings r- for build failure and because I think the naming could be better.
Mark Hahnenberg
Comment 7
2011-09-21 11:35:17 PDT
Created
attachment 108194
[details]
Fixing windows
Mark Hahnenberg
Comment 8
2011-09-21 11:56:44 PDT
Created
attachment 108199
[details]
Patch
Geoffrey Garen
Comment 9
2011-09-21 12:32:29 PDT
Comment on
attachment 108199
[details]
Patch Looks good. r=me if it builds and is not a perf. regression.
Mark Hahnenberg
Comment 10
2011-09-21 12:56:27 PDT
Created
attachment 108211
[details]
Benchmark results
Gustavo Noronha (kov)
Comment 11
2011-09-21 14:06:31 PDT
Comment on
attachment 108199
[details]
Patch
Attachment 108199
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/9770894
Mark Hahnenberg
Comment 12
2011-09-21 15:31:18 PDT
Not quite sure how to fix the build failure on GTK…link error with a method (JSNode::visitChildrenVirtual) that definitely exists (it's defined in WebCore/bindings/js/JSNodeCustom.cpp) and is exported in the WebCore.exp.in. What linker magic does GTK need to get this to work?
Oliver Hunt
Comment 13
2011-09-21 15:48:02 PDT
Comment on
attachment 108199
[details]
Patch Looks like gtk-ews has gone weird
Martin Robinson
Comment 14
2011-09-21 16:27:29 PDT
(In reply to
comment #12
)
> Not quite sure how to fix the build failure on GTK…link error with a method (JSNode::visitChildrenVirtual) that definitely exists (it's defined in WebCore/bindings/js/JSNodeCustom.cpp) and is exported in the WebCore.exp.in. What linker magic does GTK need to get this to work?
You need to add the symbol the the Source/autotools/symbols.filter to fix the GTK+ build.
Mark Hahnenberg
Comment 15
2011-09-21 18:09:18 PDT
Created
attachment 108264
[details]
Fix GTK
Collabora GTK+ EWS bot
Comment 16
2011-09-21 21:00:12 PDT
Comment on
attachment 108264
[details]
Fix GTK
Attachment 108264
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/9794063
Gustavo Noronha (kov)
Comment 17
2011-09-21 21:11:59 PDT
Comment on
attachment 108264
[details]
Fix GTK
Attachment 108264
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/9793097
Geoffrey Garen
Comment 18
2011-09-21 21:59:42 PDT
Is the GTK build failure real? I can't tell from this output: /usr/bin/ld:../../Source/autotools/symbols.filter:60: syntax error in VERSION script
Geoffrey Garen
Comment 19
2011-09-21 22:00:31 PDT
Comment on
attachment 108264
[details]
Fix GTK r=me, assuming the GTK build failure really is a syntax error in the VERSION script.
Martin Robinson
Comment 20
2011-09-21 23:17:06 PDT
(In reply to
comment #18
)
> Is the GTK build failure real? I can't tell from this output: > > /usr/bin/ld:../../Source/autotools/symbols.filter:60: syntax error in VERSION script
Yes. The new line in symbols.filter is missing a semi-colon.
Mark Hahnenberg
Comment 21
2011-09-22 08:19:32 PDT
Created
attachment 108335
[details]
Fix GTK for real
Gustavo Noronha (kov)
Comment 22
2011-09-22 08:29:01 PDT
Comment on
attachment 108335
[details]
Fix GTK for real
Attachment 108335
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/9792337
Early Warning System Bot
Comment 23
2011-09-22 08:32:36 PDT
Comment on
attachment 108335
[details]
Fix GTK for real
Attachment 108335
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/9794261
Gyuyoung Kim
Comment 24
2011-09-22 08:34:04 PDT
Comment on
attachment 108335
[details]
Fix GTK for real
Attachment 108335
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/9798236
Mark Hahnenberg
Comment 25
2011-09-22 08:52:01 PDT
Created
attachment 108340
[details]
Fix bad merge
Geoffrey Garen
Comment 26
2011-09-22 09:45:54 PDT
Comment on
attachment 108340
[details]
Fix bad merge r=me, assuming it builds.
WebKit Review Bot
Comment 27
2011-09-22 18:57:48 PDT
Comment on
attachment 108340
[details]
Fix bad merge Rejecting
attachment 108340
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: ore/bindings/scripts/test/JS/JSTestObj.cpp patching file Source/WebCore/bindings/scripts/test/JS/JSTestObj.h patching file Source/WebCore/bridge/qt/qt_instance.cpp patching file Source/WebCore/bridge/qt/qt_runtime.cpp patching file Source/WebCore/bridge/qt/qt_runtime.h patching file Source/WebCore/workers/WorkerContext.h patching file Source/autotools/symbols.filter Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Geoffrey Garen', u'--f..." exit_code: 1 Full output:
http://queues.webkit.org/results/9769015
Mark Hahnenberg
Comment 28
2011-09-22 23:53:12 PDT
Created
attachment 108445
[details]
Patch
Collabora GTK+ EWS bot
Comment 29
2011-09-23 01:30:08 PDT
Comment on
attachment 108445
[details]
Patch
Attachment 108445
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/9815120
Gustavo Noronha (kov)
Comment 30
2011-09-23 02:07:16 PDT
Comment on
attachment 108445
[details]
Patch
Attachment 108445
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/9811222
Mark Hahnenberg
Comment 31
2011-09-23 09:06:01 PDT
Created
attachment 108482
[details]
Patch
WebKit Review Bot
Comment 32
2011-09-23 10:39:29 PDT
Comment on
attachment 108482
[details]
Patch Rejecting
attachment 108482
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: o-playing-and-pause.html = MISSING PASS Regressions: Unexpected image and text mismatch : (1) svg/custom/svg-fonts-word-spacing.html = IMAGE+TEXT Regressions: Unexpected image mismatch : (5) fast/text/atsui-multiple-renderers.html = IMAGE fast/text/international/danda-space.html = IMAGE fast/text/international/thai-baht-space.html = IMAGE fast/text/international/thai-line-breaks.html = IMAGE platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html = IMAGE Full output:
http://queues.webkit.org/results/9801615
Mark Hahnenberg
Comment 33
2011-09-23 10:46:05 PDT
(In reply to
comment #32
)
> (From update of
attachment 108482
[details]
) > Rejecting
attachment 108482
[details]
from commit-queue. > > Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 > > Last 500 characters of output: > o-playing-and-pause.html = MISSING PASS > > > Regressions: Unexpected image and text mismatch : (1) > svg/custom/svg-fonts-word-spacing.html = IMAGE+TEXT > > Regressions: Unexpected image mismatch : (5) > fast/text/atsui-multiple-renderers.html = IMAGE > fast/text/international/danda-space.html = IMAGE > fast/text/international/thai-baht-space.html = IMAGE > fast/text/international/thai-line-breaks.html = IMAGE > platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html = IMAGE > > > > Full output:
http://queues.webkit.org/results/9801615
I don't think this is an actual failure :-(
Mark Hahnenberg
Comment 34
2011-09-23 12:39:31 PDT
Committed
r95849
: <
http://trac.webkit.org/changeset/95849
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug