Web Inspector: Debugger: Step Over should only step through comma expressions if they are comma statements
https://bugs.webkit.org/show_bug.cgi?id=210588
Reviewed by Brian Burg.
Source/JavaScriptCore:
(JSC::ExpressionNode::isStatement const): Added.
(JSC::ExpressionNode::setIsStatement): Added.
- parser/NodeConstructors.h:
(JSC::ExprStatementNode::ExprStatementNode):
(JSC::DeclarationStatement::DeclarationStatement):
(JSC::ReturnNode::ReturnNode):
(JSC::ThrowNode::ThrowNode):
- bytecompiler/NodesCodegen.cpp:
(JSC::CommaNode::emitBytecode):
Only emit WillExecuteStatement
debug hooks inside CommaNode
if it's the only child of a
statement parent node (e.g. a(), b(), c()
vs true && (a(), b(), c()) && true
).
- parser/Parser.h:
- parser/Parser.cpp:
(JSC::Parser<LexerType>::parseReturnStatement):
(JSC::Parser<LexerType>::parseThrowStatement):
(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
(JSC::Parser<LexerType>::parseExpressionStatement):
(JSC::Parser<LexerType>::parseExpression):
Only record a pause location for each sub-expression in a comma separated expression if it's
the only child of a statement (e.g. a(), b(), c()
vs true && (a(), b(), c()) && true
).
LayoutTests:
- inspector/debugger/resources/log-pause-location.js:
(TestPage.registerInitializer.window.step):
- inspector/debugger/breakpoints/resources/dump-functions.js:
- inspector/debugger/breakpoints/resources/dump-general.js:
- inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
- inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
- inspector/debugger/stepping/stepInto.html:
- inspector/debugger/stepping/stepInto-expected.txt:
- inspector/debugger/stepping/stepNext.html:
- inspector/debugger/stepping/stepNext-expected.txt:
- inspector/debugger/stepping/stepOut.html:
- inspector/debugger/stepping/stepOut-expected.txt:
- inspector/debugger/stepping/stepOver.html:
- inspector/debugger/stepping/stepOver-expected.txt:
- inspector/debugger/stepping/stepping-control-flow.html:
- inspector/debugger/stepping/stepping-control-flow-expected.txt:
- inspector/debugger/stepping/stepping-loops.html:
- inspector/debugger/stepping/stepping-loops-expected.txt:
- inspector/formatting/resources/javascript-tests/arrow-functions.js:
- inspector/formatting/resources/javascript-tests/arrow-functions-expected.js:
- inspector/formatting/resources/javascript-tests/functions.js:
- inspector/formatting/resources/javascript-tests/functions-expected.js:
- inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js:
- inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js: