Bug 40415

Summary: [Qt] Optimization of the QScriptValuePrivate.
Product: WebKit Reporter: Jędrzej Nowacki <jedrzej.nowacki>
Component: JavaScriptCoreAssignee: Jędrzej Nowacki <jedrzej.nowacki>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jedrzej.nowacki, kenneth, kent.hansen
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 40412    
Bug Blocks: 31863    
Attachments:
Description Flags
Fix v1
eric: commit-queue-
Fix none

Jędrzej Nowacki
Reported 2010-06-10 03:28:17 PDT
The QScriptValuePrivate can optimized. Now, each state have a separate attribute in which his value is kept. So, for the CString state the value is stored in m_string, for CNumber it is m_numbe... It would be much better to store the value in an union to save a memory and maybe unnecessary initialization.
Attachments
Fix v1 (15.87 KB, patch)
2010-06-10 03:54 PDT, Jędrzej Nowacki
eric: commit-queue-
Fix (15.87 KB, patch)
2010-06-14 02:00 PDT, Jędrzej Nowacki
no flags
Jędrzej Nowacki
Comment 1 2010-06-10 03:54:55 PDT
Created attachment 58358 [details] Fix v1 NOTE: The patch can be applied after 40412.
Jędrzej Nowacki
Comment 2 2010-06-11 07:58:02 PDT
Bug 40412 is closed. Should I reapply the patch to bugzilla?
Eric Seidel (no email)
Comment 3 2010-06-12 20:36:49 PDT
Comment on attachment 58358 [details] Fix v1 This patch can't be landed by the commit-queue since it does not apply.
Jędrzej Nowacki
Comment 4 2010-06-14 02:00:06 PDT
Jędrzej Nowacki
Comment 5 2010-06-14 03:57:56 PDT
(In reply to comment #3) > (From update of attachment 58358 [details]) > This patch can't be landed by the commit-queue since it does not apply. Does it mean that commit-queue would block it? As I worte the patch couldn't be applied before 40412, I posted it for review. I have uploaded the same patch again.
Kent Hansen
Comment 6 2010-06-22 06:58:12 PDT
Patch applies cleanly now and looks OK. As we discussed offline, one could use an anonymous union; this reduces the size of the patch. However, the "u." does make it more apparent that it's a union that's being manipulated. (I'm not aware of any WebKit style guidelines for unions, their naming etc.)
Simon Hausmann
Comment 7 2010-06-23 03:07:36 PDT
Comment on attachment 58630 [details] Fix r=me. This miight cause problems with non-gcc compilers in the future, but let's deal with that when we cross that bridge :). This certainly improves the readability at lot, too.
WebKit Commit Bot
Comment 8 2010-06-23 18:49:29 PDT
Comment on attachment 58630 [details] Fix Clearing flags on attachment: 58630 Committed r61726: <http://trac.webkit.org/changeset/61726>
WebKit Commit Bot
Comment 9 2010-06-23 18:49:34 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.