``````test.js`````` for (let v0 = 0; v0 < 40; v0++) { let v16 = RegExp.prototype try { v16.test(); } catch (e23) { print(e23) } } ``````````````````` Run args: ./jsc -f test.js --useConcurrentJIT=0 --jitPolicyScale=0 Output: TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Builtin RegExp exec can only be called on a RegExp object TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error TypeError: Type error When thisObject is not a RegExp object: In RegExpPrototype.cpp, regExpProtoFuncExec throw `Builtin RegExp exec can only be called on a RegExp object`, In DFGOperations.cpp, operationRegExpExecGeneric throw `Type error`.
<rdar://problem/111737204>
Pull request: https://github.com/WebKit/WebKit/pull/28444
Committed 278663@main (9d09c5e0ff19): <https://commits.webkit.org/278663@main> Reviewed commits have been landed. Closing PR #28444 and removing active labels.