Bug 180988

Summary: [DFG][FTL] regExpMatchFast should be handled
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, fpizlo, joepeck, keith_miller, mark.lam, msaboff, rniwa, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews101 for mac-elcapitan
none
Archive of layout-test-results from ews113 for mac-elcapitan
none
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
mark.lam: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 none

Yusuke Suzuki
Reported 2017-12-19 12:32:20 PST
[DFG][FTL] regExpMatchFast should be handled
Attachments
Patch (25.07 KB, patch)
2017-12-19 12:39 PST, Yusuke Suzuki
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (2.46 MB, application/zip)
2017-12-19 13:47 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews113 for mac-elcapitan (3.24 MB, application/zip)
2017-12-19 14:10 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (2.73 MB, application/zip)
2017-12-19 14:34 PST, EWS Watchlist
no flags
Patch (23.50 KB, patch)
2017-12-20 18:19 PST, Yusuke Suzuki
no flags
Patch (23.51 KB, patch)
2017-12-20 18:27 PST, Yusuke Suzuki
no flags
Patch (24.42 KB, patch)
2017-12-20 18:32 PST, Yusuke Suzuki
no flags
Patch (24.41 KB, patch)
2018-01-04 18:47 PST, Yusuke Suzuki
no flags
Patch (22.90 KB, patch)
2018-01-04 19:00 PST, Yusuke Suzuki
mark.lam: review+
ews-watchlist: commit-queue-
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (2.58 MB, application/zip)
2018-01-04 20:09 PST, EWS Watchlist
no flags
Yusuke Suzuki
Comment 1 2017-12-19 12:39:56 PST
Keith Miller
Comment 2 2017-12-19 13:19:53 PST
Looks like you upset the EWS. :(
EWS Watchlist
Comment 3 2017-12-19 13:47:42 PST
Comment on attachment 329795 [details] Patch Attachment 329795 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/5757662 New failing tests: css3/shapes/shape-outside/values/shape-outside-ellipse-004.html css3/shapes/shape-outside/values/shape-outside-circle-004.html imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-004.html
EWS Watchlist
Comment 4 2017-12-19 13:47:44 PST
Created attachment 329808 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 5 2017-12-19 13:51:17 PST
Comment on attachment 329795 [details] Patch Attachment 329795 [details] did not pass jsc-ews (mac): Output: http://webkit-queues.webkit.org/results/5757696 New failing tests: mozilla-tests.yaml/ecma_2/String/match-001.js.mozilla-dfg-eager-no-cjit-validate-phases stress/regress-174044.js.ftl-no-cjit-small-pool stress/regress-174044.js.default stress/regress-174044.js.ftl-eager-no-cjit-b3o1 mozilla-tests.yaml/ecma_2/String/match-003.js.mozilla-ftl-eager-no-cjit-validate-phases mozilla-tests.yaml/ecma_2/String/match-001.js.mozilla-ftl-eager-no-cjit-validate-phases mozilla-tests.yaml/ecma_2/String/match-003.js.mozilla-dfg-eager-no-cjit-validate-phases stress/regress-174044.js.dfg-eager-no-cjit-validate stress/regress-174044.js.ftl-no-cjit-no-put-stack-validate stress/regress-174044.js.dfg-eager stress/regress-174044.js.no-cjit-collect-continuously stress/regress-174044.js.no-ftl stress/regress-174044.js.ftl-no-cjit-b3o1 stress/regress-174044.js.no-llint stress/regress-174044.js.ftl-eager-no-cjit stress/regress-174044.js.ftl-no-cjit-validate-sampling-profiler stress/regress-174044.js.ftl-eager stress/regress-174044.js.no-cjit-validate-phases stress/regress-174044.js.dfg-maximal-flush-validate-no-cjit
EWS Watchlist
Comment 6 2017-12-19 14:10:11 PST
Comment on attachment 329795 [details] Patch Attachment 329795 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/5757733 New failing tests: css3/shapes/shape-outside/values/shape-outside-ellipse-004.html css3/shapes/shape-outside/values/shape-outside-circle-004.html svg/custom/object-sizing-explicit-width.xhtml imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-004.html
EWS Watchlist
Comment 7 2017-12-19 14:10:13 PST
Created attachment 329819 [details] Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 8 2017-12-19 14:34:51 PST
Comment on attachment 329795 [details] Patch Attachment 329795 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5758585 New failing tests: css3/shapes/shape-outside/values/shape-outside-ellipse-004.html css3/shapes/shape-outside/values/shape-outside-circle-004.html imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-004.html
EWS Watchlist
Comment 9 2017-12-19 14:34:53 PST
Created attachment 329828 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Yusuke Suzuki
Comment 10 2017-12-20 18:19:07 PST
Yusuke Suzuki
Comment 11 2017-12-20 18:27:14 PST
Yusuke Suzuki
Comment 12 2017-12-20 18:32:41 PST
Yusuke Suzuki
Comment 13 2018-01-04 18:10:59 PST
Ping?
Joseph Pecoraro
Comment 14 2018-01-04 18:38:50 PST
Comment on attachment 329988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=329988&action=review Neat! > Source/JavaScriptCore/builtins/RegExpPrototype.js:85 > + 'use strict'; Style: Most of the time this is a double quoted string.
Yusuke Suzuki
Comment 15 2018-01-04 18:42:33 PST
Comment on attachment 329988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=329988&action=review >> Source/JavaScriptCore/builtins/RegExpPrototype.js:85 >> + 'use strict'; > > Style: Most of the time this is a double quoted string. Thanks, fixed.
Yusuke Suzuki
Comment 16 2018-01-04 18:47:41 PST
Yusuke Suzuki
Comment 17 2018-01-04 19:00:24 PST
EWS Watchlist
Comment 18 2018-01-04 20:09:46 PST
Comment on attachment 330510 [details] Patch Attachment 330510 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5934791 New failing tests: fast/mediastream/MediaStream-MediaElement-setObject-null.html
EWS Watchlist
Comment 19 2018-01-04 20:09:47 PST
Created attachment 330516 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Yusuke Suzuki
Comment 20 2018-01-04 21:07:44 PST
(In reply to Build Bot from comment #19) > Created attachment 330516 [details] > Archive of layout-test-results from ews106 for mac-elcapitan-wk2 > > The attached test failures were seen while running run-webkit-tests on the > mac-wk2-ews. > Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6 Seems unrelated.
Yusuke Suzuki
Comment 21 2018-01-08 16:55:10 PST
Ping?
Mark Lam
Comment 22 2018-01-10 11:11:02 PST
Comment on attachment 330510 [details] Patch r=me
Mark Lam
Comment 23 2018-01-10 11:12:55 PST
(In reply to Yusuke Suzuki from comment #20) > (In reply to Build Bot from comment #19) > > Created attachment 330516 [details] > > Archive of layout-test-results from ews106 for mac-elcapitan-wk2 > > > > The attached test failures were seen while running run-webkit-tests on the > > mac-wk2-ews. > > Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6 > > Seems unrelated. Can you please run the failed test locally and confirm that it passes with your patch before landing?
Saam Barati
Comment 24 2018-01-10 11:20:43 PST
Comment on attachment 330510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330510&action=review > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1968 > + case RegExpMatch: This name confused me. I vote for calling this RegExpMatchFast to align w/ the intrinsic. I originally thought this was the entire match operation, but it's only the fast path.
Saam Barati
Comment 25 2018-01-10 11:26:25 PST
Comment on attachment 330510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330510&action=review LGTM too > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2621 > + if (argumentCountIncludingThis != 2) > + return false; Seems like this should be a release assert since this is only called by our builtins. > Source/JavaScriptCore/dfg/DFGOperations.cpp:1026 > +EncodedJSValue JIT_OPERATION operationRegExpMatchString(ExecState* exec, JSGlobalObject* globalObject, RegExpObject* regExpObject, JSString* argument) I would also add "fast" here to align the names. > Source/JavaScriptCore/runtime/RegExpPrototype.cpp:-149 > - VM& vm = exec->vm(); > - auto scope = DECLARE_THROW_SCOPE(vm); > - > - JSValue thisValue = exec->thisValue(); > - if (!thisValue.inherits(vm, RegExpObject::info())) > - return throwVMTypeError(exec, scope); > - JSString* string = exec->argument(0).toStringOrNull(exec); > - EXCEPTION_ASSERT(!!scope.exception() == !string); > - if (!string) > - return encodedJSValue(); > - if (!asRegExpObject(thisValue)->regExp()->global()) { > - scope.release(); > - return JSValue::encode(asRegExpObject(thisValue)->exec(exec, exec->lexicalGlobalObject(), string)); > - } > - scope.release(); > - return JSValue::encode(asRegExpObject(thisValue)->matchGlobal(exec, exec->lexicalGlobalObject(), string)); This was all unneeded because we already do the safety checks in the builtin, right? Why was this here before then?
Yusuke Suzuki
Comment 26 2018-01-11 05:28:43 PST
Comment on attachment 330510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=330510&action=review Thanks! >> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1968 >> + case RegExpMatch: > > This name confused me. I vote for calling this RegExpMatchFast to align w/ the intrinsic. I originally thought this was the entire match operation, but it's only the fast path. OK, changed it to RegExpMatchFast. >> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2621 >> + return false; > > Seems like this should be a release assert since this is only called by our builtins. Right. Changed. >> Source/JavaScriptCore/dfg/DFGOperations.cpp:1026 >> +EncodedJSValue JIT_OPERATION operationRegExpMatchString(ExecState* exec, JSGlobalObject* globalObject, RegExpObject* regExpObject, JSString* argument) > > I would also add "fast" here to align the names. Fixed. >> Source/JavaScriptCore/runtime/RegExpPrototype.cpp:-149 >> - return JSValue::encode(asRegExpObject(thisValue)->matchGlobal(exec, exec->lexicalGlobalObject(), string)); > > This was all unneeded because we already do the safety checks in the builtin, right? Why was this here before then? Right. This function is only called if the above check is met. So this is unnecessary. I'm not sure why we have these unnecessary checks.
Yusuke Suzuki
Comment 27 2018-01-11 06:19:36 PST
(In reply to Mark Lam from comment #23) > (In reply to Yusuke Suzuki from comment #20) > > (In reply to Build Bot from comment #19) > > > Created attachment 330516 [details] > > > Archive of layout-test-results from ews106 for mac-elcapitan-wk2 > > > > > > The attached test failures were seen while running run-webkit-tests on the > > > mac-wk2-ews. > > > Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6 > > > > Seems unrelated. > > Can you please run the failed test locally and confirm that it passes with > your patch before landing? OK, the test runs as expected in my working copy.
Yusuke Suzuki
Comment 28 2018-01-11 06:20:51 PST
Radar WebKit Bug Importer
Comment 29 2018-01-11 06:21:41 PST
Note You need to log in before you can comment on or make changes to this bug.