Bug 171269

Summary: [JSC] Math unary functions should be handled by DFG
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, keith_miller, mark.lam, msaboff, rniwa, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews103 for mac-elcapitan
none
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews116 for mac-elcapitan
none
Patch
none
Patch saam: review+

Yusuke Suzuki
Reported 2017-04-25 04:40:22 PDT
...
Attachments
Patch (43.43 KB, patch)
2017-04-25 04:52 PDT, Yusuke Suzuki
no flags
Patch (151.40 KB, patch)
2017-04-25 09:16 PDT, Yusuke Suzuki
no flags
Patch (162.98 KB, patch)
2017-04-27 02:56 PDT, Yusuke Suzuki
no flags
Patch (160.46 KB, patch)
2017-04-27 02:59 PDT, Yusuke Suzuki
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (980.56 KB, application/zip)
2017-04-27 04:25 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (924.34 KB, application/zip)
2017-04-27 04:28 PDT, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-elcapitan (1.79 MB, application/zip)
2017-04-27 04:36 PDT, Build Bot
no flags
Patch (160.50 KB, patch)
2017-04-27 04:52 PDT, Yusuke Suzuki
no flags
Patch (160.50 KB, patch)
2017-04-27 11:11 PDT, Yusuke Suzuki
saam: review+
Yusuke Suzuki
Comment 1 2017-04-25 04:52:42 PDT
Yusuke Suzuki
Comment 2 2017-04-25 09:16:53 PDT
Build Bot
Comment 3 2017-04-25 09:19:52 PDT
Attachment 308105 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:43: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:56: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:111: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:978: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2193: Non-label code inside switch statements should be indented. [whitespace/indent] [4] Total errors found: 5 in 41 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 4 2017-04-27 02:56:39 PDT
Yusuke Suzuki
Comment 5 2017-04-27 02:59:42 PDT
Build Bot
Comment 6 2017-04-27 03:01:05 PDT
Attachment 308367 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:43: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:56: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:111: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2193: Non-label code inside switch statements should be indented. [whitespace/indent] [4] Total errors found: 4 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 7 2017-04-27 04:02:59 PDT
Comment on attachment 308367 [details] Patch Attachment 308367 [details] did not pass jsc-ews (mac): Output: http://webkit-queues.webkit.org/results/3618439 New failing tests: stress/regress-159779-1.js.ftl-no-cjit jsc-layout-tests.yaml/js/script-tests/math.js.layout-dfg-eager-no-cjit stress/regress-159779-2.js.no-ftl jsc-layout-tests.yaml/js/script-tests/math.js.layout-no-llint stress/regress-159779-2.js.ftl-eager-no-cjit jsc-layout-tests.yaml/js/script-tests/math.js.layout stress/regress-159779-1.js.default jsc-layout-tests.yaml/js/script-tests/math.js.layout-no-ftl stress/regress-159779-1.js.no-ftl jsc-layout-tests.yaml/js/script-tests/math.js.layout-ftl-eager-no-cjit stress/regress-159779-2.js.ftl-no-cjit stress/regress-159779-1.js.ftl-eager-no-cjit jsc-layout-tests.yaml/js/script-tests/math.js.layout-ftl-no-cjit jsc-layout-tests.yaml/js/script-tests/math.js.layout-no-cjit stress/regress-159779-2.js.default ChakraCore.yaml/ChakraCore/test/es6/ES6MathAPIs.js.default
Build Bot
Comment 8 2017-04-27 04:25:05 PDT
Comment on attachment 308367 [details] Patch Attachment 308367 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3618547 New failing tests: js/math.html
Build Bot
Comment 9 2017-04-27 04:25:07 PDT
Created attachment 308374 [details] Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 10 2017-04-27 04:28:45 PDT
Comment on attachment 308367 [details] Patch Attachment 308367 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3618551 New failing tests: js/math.html
Build Bot
Comment 11 2017-04-27 04:28:46 PDT
Created attachment 308375 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 12 2017-04-27 04:36:31 PDT
Comment on attachment 308367 [details] Patch Attachment 308367 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3618556 New failing tests: js/math.html
Build Bot
Comment 13 2017-04-27 04:36:33 PDT
Created attachment 308376 [details] Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Yusuke Suzuki
Comment 14 2017-04-27 04:52:27 PDT
Build Bot
Comment 15 2017-04-27 04:54:58 PDT
Attachment 308378 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:43: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:56: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:111: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2193: Non-label code inside switch statements should be indented. [whitespace/indent] [4] Total errors found: 4 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 16 2017-04-27 11:11:12 PDT
Build Bot
Comment 17 2017-04-27 11:13:14 PDT
Attachment 308410 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:43: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:56: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGArithMode.cpp:111: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2193: Non-label code inside switch statements should be indented. [whitespace/indent] [4] Total errors found: 4 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 18 2017-05-01 16:09:41 PDT
Ping?
Saam Barati
Comment 19 2017-05-03 12:20:50 PDT
Comment on attachment 308410 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308410&action=review > Source/JavaScriptCore/ChangeLog:12 > + optimization phase. Actually, ArithLog is effective in kraken. what do you mean by effective here? We effectively optimize it in Kraken? > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2186 > + if (argumentCountIncludingThis == 1) { > + insertChecks(); > + set(VirtualRegister(resultOperand), addToGraph(JSConstant, OpInfo(m_constantNaN))); > + return true; > + } Do we have tests for all of these? > Source/JavaScriptCore/dfg/DFGOperations.cpp:406 > + double a = op1.toNumber(exec); \ nit: Lets pick a better name than "a". > Source/JavaScriptCore/runtime/MathCommon.cpp:528 > + if (!value) Nit: the older version had ==0 here, I think that's more readable.
Yusuke Suzuki
Comment 20 2017-05-04 04:28:25 PDT
Comment on attachment 308410 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308410&action=review Thanks! >> Source/JavaScriptCore/ChangeLog:12 >> + optimization phase. Actually, ArithLog is effective in kraken. > > what do you mean by effective here? We effectively optimize it in Kraken? ArithLog was introduced to optimize Kraken. That makes ArithLog pure and encourages code motion. >> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2186 >> + } > > Do we have tests for all of these? Nice, added. >> Source/JavaScriptCore/dfg/DFGOperations.cpp:406 >> + double a = op1.toNumber(exec); \ > > nit: Lets pick a better name than "a". Changed it to result. >> Source/JavaScriptCore/runtime/MathCommon.cpp:528 >> + if (!value) > > Nit: the older version had ==0 here, I think that's more readable. OK, changed.
Yusuke Suzuki
Comment 21 2017-05-04 04:40:56 PDT
Note You need to log in before you can comment on or make changes to this bug.