RESOLVED FIXED 184236
[DFG] Remove duplicate 32bit code more
https://bugs.webkit.org/show_bug.cgi?id=184236
Summary [DFG] Remove duplicate 32bit code more
Yusuke Suzuki
Reported 2018-04-02 09:49:26 PDT
[DFG] Remove duplicate 32bit code more
Attachments
Patch (111.16 KB, patch)
2018-04-02 09:52 PDT, Yusuke Suzuki
no flags
Patch (111.25 KB, patch)
2018-04-02 10:09 PDT, Yusuke Suzuki
no flags
Patch (111.43 KB, patch)
2018-04-02 10:47 PDT, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2018-04-02 09:52:48 PDT
EWS Watchlist
Comment 2 2018-04-02 09:55:35 PDT
Attachment 336990 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGCompareSlowPathGenerator.h:43: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGCompareSlowPathGenerator.h:44: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 3 2018-04-02 10:09:19 PDT
EWS Watchlist
Comment 4 2018-04-02 10:13:14 PDT
Attachment 336993 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGCompareSlowPathGenerator.h:43: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGCompareSlowPathGenerator.h:44: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 5 2018-04-02 10:47:20 PDT
EWS Watchlist
Comment 6 2018-04-02 10:48:59 PDT
Attachment 336998 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGCompareSlowPathGenerator.h:43: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGCompareSlowPathGenerator.h:44: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 7 2018-04-07 07:09:30 PDT
Ping?
Mark Lam
Comment 8 2018-04-09 21:20:14 PDT
Comment on attachment 336998 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336998&action=review > Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:12920 > + unblessedBooleanResult(resultGPR, node, UseChildrenCalledExplicitly); This is not equivalent to the original. From my reading of the code, this merely performs a bool to JSBoolean conversion. The original code which calls jsValueResult() (see DFGSpeculativeJIT.h:855-867) which adds JIT asserts, do some tracking for register spilling, and capture GenerationInfo. There appear to be a lot of work which are missing here. > Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:438 > + JITCompiler::Jump twoCellsCase = m_jit.branchTest64(JITCompiler::Zero, resultGPR, GPRInfo::tagMaskRegister); I don't see how this can work for 32-bit targets. The tagMaskRegister only exits for x86_64 and ARM64. What am I missing?
Mark Lam
Comment 9 2018-04-10 22:15:58 PDT
(In reply to Mark Lam from comment #8) > Comment on attachment 336998 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=336998&action=review > > > Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:12920 > > + unblessedBooleanResult(resultGPR, node, UseChildrenCalledExplicitly); > > This is not equivalent to the original. From my reading of the code, this > merely performs a bool to JSBoolean conversion. The original code which > calls jsValueResult() (see DFGSpeculativeJIT.h:855-867) which adds JIT > asserts, do some tracking for register spilling, and capture GenerationInfo. > There appear to be a lot of work which are missing here. I misread the code. I thought unblessedBooleanResult() only did blessBoolean() part for 64-bit, and not the blessedBooleanResult() part. It actually does both. > > Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:438 > > + JITCompiler::Jump twoCellsCase = m_jit.branchTest64(JITCompiler::Zero, resultGPR, GPRInfo::tagMaskRegister); > > I don't see how this can work for 32-bit targets. The tagMaskRegister only > exits for x86_64 and ARM64. What am I missing? I misread this part too. I thought that there's only one consolidated version of nonSpeculativeNonPeepholeStrictEq(). That's not the case: this is just the 64-bit version. Hence, there's no issue here. Sorry for the noise.
Mark Lam
Comment 10 2018-04-10 23:26:52 PDT
Comment on attachment 336998 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336998&action=review r=me. Thanks for the hard work. This is a big patch. > Source/JavaScriptCore/jit/RegisterSet.h:210 > + void setAny(JSValueRegs reg) { set(reg); } nit: lets call the argument "regs" instead of "reg". I think this is the convention used everywhere else.
Yusuke Suzuki
Comment 11 2018-04-11 00:17:13 PDT
Comment on attachment 336998 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336998&action=review Thank you for your review! >> Source/JavaScriptCore/jit/RegisterSet.h:210 >> + void setAny(JSValueRegs reg) { set(reg); } > > nit: lets call the argument "regs" instead of "reg". I think this is the convention used everywhere else. Fixed!
Yusuke Suzuki
Comment 12 2018-04-11 00:45:03 PDT
Radar WebKit Bug Importer
Comment 13 2018-04-11 00:46:19 PDT
Yusuke Suzuki
Comment 14 2018-04-11 02:37:22 PDT
Note You need to log in before you can comment on or make changes to this bug.