[Webkit-unassigned] [Bug 40969] Web Inspector: Prettyprint the contents of the scripts tab in case it is minified.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 22 00:46:20 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40969





--- Comment #3 from Zoltan Herczeg <zherczeg at webkit.org>  2010-06-22 00:46:19 PST ---
As for nodes in the Abstract Syntax Tree, there is an m_line (int) member for each nodes, but only StatementNodes where its value is trusted (moreover, m_lastLine is right for StatementNodes as well). It is the nature of the bison parser that it could not capture all line locations, since it usually reads some tokens ahead before it could make a decision (thus, the callback handlers do some guesswork to get some useful data). Those nodes, which inherites from ThrowableExpressionData, a "start" and an "end" offset are also provided.

Basically, after the byte-code is generated, the AST is dropped, and the byte-code does not contain line info except for op_debug instructions. However, if an exception occurs, the code is reparsed again, and the line info for all nodes are stored in the CodeBlock (see CodeBlock->lineNumberForBytecodeOffset())

The recursive descent parsers would be capable to do this for all nodes without line info error.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list