WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
70162
Add deleteProperty to the MethodTable
https://bugs.webkit.org/show_bug.cgi?id=70162
Summary
Add deleteProperty to the MethodTable
Mark Hahnenberg
Reported
2011-10-14 17:51:56 PDT
We now need to add both versions of deleteProperty to the MethodTable in ClassInfo in preparation from removing the virtual version of deleteProperty.
Attachments
Patch
(5.93 KB, patch)
2011-10-20 13:15 PDT
,
Mark Hahnenberg
sam
: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Hahnenberg
Comment 1
2011-10-20 13:15:30 PDT
Created
attachment 111834
[details]
Patch
Sam Weinig
Comment 2
2011-10-23 12:04:35 PDT
Have you done any back of the napkin calculations on what the memory difference between C++ vtables and the custom method tables are?
Mark Hahnenberg
Comment 3
2011-10-23 12:18:24 PDT
(In reply to
comment #2
)
> Have you done any back of the napkin calculations on what the memory difference between C++ vtables and the custom method tables are?
I haven't, but my sense is that almost all objects share very few ClassInfos (and therefore MethodTables). However, memory savings aren't the only reason we're trying to get rid of C++ virtual methods; mostly we just want more freedom in how we lay out our objects.
Sam Weinig
Comment 4
2011-10-23 12:21:56 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Have you done any back of the napkin calculations on what the memory difference between C++ vtables and the custom method tables are? > > I haven't, but my sense is that almost all objects share very few ClassInfos (and therefore MethodTables). However, memory savings aren't the only reason we're trying to get rid of C++ virtual methods; mostly we just want more freedom in how we lay out our objects.
I didn't think memory savings was the impetuous, I am just a bit worried about the potential for bloat, so if the new mechanism uses more memory than the old one, we should understand how much.
WebKit Review Bot
Comment 5
2011-10-23 12:23:43 PDT
Comment on
attachment 111834
[details]
Patch Rejecting
attachment 111834
[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: Source/JavaScriptCore/runtime/ClassInfo.h Hunk #1 FAILED at 40. 1 out of 1 hunk FAILED -- saving rejects to file Source/JavaScriptCore/runtime/ClassInfo.h.rej patching file Source/JavaScriptCore/runtime/JSFunction.h Hunk #1 succeeded at 138 with fuzz 2 (offset 5 lines). Hunk #2 succeeded at 148 with fuzz 2 (offset 2 lines). patching file Source/WebCore/WebCore.exp.in Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Sam Weinig', u'--force']" exit_code: 1 Full output:
http://queues.webkit.org/results/10199577
Geoffrey Garen
Comment 6
2011-10-23 14:14:45 PDT
> I didn't think memory savings was the impetuous, I am just a bit worried about the potential for bloat, so if the new mechanism uses more memory than the old one, we should understand how much.
We used to have one vtable per JS-derived class. When we're done, we'll lose the vtables, but gain one MethodTable per JS-derived class. I believe this will be a pure wash. On Windows, one MethodTable per class will be a slight win, since Windows sometimes creates more than one vtable for the same class (e.g., when the class is used in two different DLLs). Using plain function pointers instead of the member function pointers found in a vtable may also be a slight win, since C++ compilers sometimes encode member function pointers as more than just one pointer in size, and sometimes produce more than one copy of a given virtual function for a given class (e.g., a non-virtual thunk that inlines its target). But I don't think many JSCell subclasses trigger those mechanisms.
> my sense is that almost all objects share very few ClassInfos (and therefore MethodTables)
This is true, but also true of vtables. I think Sam's real question was about the total size of all MethodTables for all classes, not just the runtime footprint of commonly used MethodTables.
Mark Hahnenberg
Comment 7
2011-10-23 18:45:25 PDT
Committed
r98205
: <
http://trac.webkit.org/changeset/98205
>
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