RESOLVED FIXED 210253
Web Inspector: Debugger: debug hooks should also be emitted for the first sub-expression in a comma expression
https://bugs.webkit.org/show_bug.cgi?id=210253
Summary Web Inspector: Debugger: debug hooks should also be emitted for the first sub...
Devin Rousso
Reported 2020-04-09 00:51:30 PDT
After r259781, debug hooks are now generated for all but the first sub-expression in a comma expression. [Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp](http://trac.webkit.org/changeset/259781/webkit/trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp): ``` RegisterID* CommaNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) { for (; node->next(); node = node->next()) { generator.emitNode(generator.ignoredResult(), node->m_expr); // Don't emit a debug hook for the first expression, as that should've already happened in // the containing statement. generator.emitDebugHook(node->next()->m_expr); } return generator.emitNodeInTailPosition(dst, node->m_expr); } ``` This comment is inaccurate, as in the simple case of `true && (a(), b())`.
Attachments
Patch (24.62 KB, patch)
2020-04-09 01:01 PDT, Devin Rousso
no flags
Patch (24.69 KB, patch)
2020-04-09 09:34 PDT, Devin Rousso
no flags
Patch (24.69 KB, patch)
2020-04-09 09:45 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2020-04-09 01:01:13 PDT
Joseph Pecoraro
Comment 2 2020-04-09 01:27:09 PDT
Comment on attachment 395920 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395920&action=review r=me > Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:3539 > if (!shouldEmitDebugHooks()) > return; Maybe we could use LIKELY macros here.
Devin Rousso
Comment 3 2020-04-09 09:34:13 PDT
Devin Rousso
Comment 4 2020-04-09 09:44:10 PDT
Comment on attachment 395963 [details] Patch Oops, that should be a `LIKELY` 😅
Devin Rousso
Comment 5 2020-04-09 09:45:43 PDT
EWS
Comment 6 2020-04-09 11:22:06 PDT
Committed r259810: <https://trac.webkit.org/changeset/259810> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395967 [details].
Radar WebKit Bug Importer
Comment 7 2020-04-09 11:23:14 PDT
Note You need to log in before you can comment on or make changes to this bug.