Bug 68794 - Refactor code for JSVALUE32_64 DFG JIT
Summary: Refactor code for JSVALUE32_64 DFG JIT
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 02:11 PDT by Yuqiang Xian
Modified: 2012-09-07 13:55 PDT (History)
4 users (show)

See Also:


Attachments
WIP patch (403.47 KB, patch)
2011-09-26 02:39 PDT, Yuqiang Xian
no flags Details | Formatted Diff | Diff
updated patch (645.45 KB, patch)
2011-09-27 02:39 PDT, Yuqiang Xian
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
patch (648.51 KB, patch)
2011-09-27 07:20 PDT, Yuqiang Xian
barraclough: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuqiang Xian 2011-09-26 02:11:52 PDT
JSVALUE32_64 DFG JIT code should share JSVALUE64 code as much as possible.
Comment 1 Yuqiang Xian 2011-09-26 02:39:36 PDT
Created attachment 108649 [details]
WIP patch

This is the initial patch (WIP). Basically,

1) DFGJITCompiler.cpp and DFGJITCompiler32_64.cpp are merged, and some old unused routines for original spec->nonspec purpose have been removed.
2) Commonly used helper functions in DFGJITCodeGenerator have been extracted out to a newly created file "DFGJITCodeGeneratorHelpers.cpp". DFGJITCodeGenerator.cpp and DFGJITCodeGenerator32_64.cpp now only contain format specific nonSpeculative opcode implementations.
3) A DFG node is marked with more flags to indicate whether it should consume or produce a JS Value. For those nodes that don't involve JS values the code between JSVALUE64 and JSVALUE32_64 is shared in SpeculativeJIT. Currently we put all the stuffs into the single big DFGSpeculativeJIT.cpp file with "ifdef"s. Not sure whether we need to split them into different files. Also some problems still exist especially for ValueAdd and ArithAdd, where both nodes share some code but ValueAdd is format specific while ArithAdd is format neutral. So current WIP patch still has some unnecessary duplicates. Ideas on improving this are highly appreciated. Thanks a lot!
Comment 2 Yuqiang Xian 2011-09-27 02:39:43 PDT
Created attachment 108818 [details]
updated patch

This patch mainly splits the stuffs in the big DFGSpeculativeJIT.cpp file of the original patch into multiple files (Common, 64 and 32_64). Also rename the DFGJITCodeGenerator*.cpp to match the DFGSpeculativeJIT*.cpp naming conventions.
Comment 3 Early Warning System Bot 2011-09-27 02:46:49 PDT
Comment on attachment 108818 [details]
updated patch

Attachment 108818 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/9883202
Comment 4 Gustavo Noronha (kov) 2011-09-27 03:59:47 PDT
Comment on attachment 108818 [details]
updated patch

Attachment 108818 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/9877301
Comment 5 Yuqiang Xian 2011-09-27 07:20:06 PDT
Created attachment 108844 [details]
patch

This should fix the qt and gtk ports issues.
Comment 6 Gavin Barraclough 2011-09-29 00:48:41 PDT
Comment on attachment 108844 [details]
patch

r- because this is way too much to be doing in one change.  Per my email, I'd suggest letting me make some of these changes since I can probably get a faster turnaround on getting the bulk of them in.
Comment 7 Gavin Barraclough 2012-09-07 13:55:56 PDT
This patch won't still apply, much refactoring has taken place, there may still be more to do but I don't think this bug is still tracking active work.