Closed
Bug 845404
Opened 12 years ago
Closed 12 years ago
Handle 'for' statements in syntax parser
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: bhackett1024, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
Bug 835587 punted on parsing the syntax for 'for' statements as they are incredibly complicated and currently require lots of digging around in the parse tree (which does not exist during syntax parsing). The attached patch adds a simplified version for 'for' statements that doesn't deal with 'let', 'for each', complicated 'for in' initializers or destructuring. This should allow it to handle most any 'for' statement expected to be seen in content.
This also allows the syntax parser to handle 'try' statements, which were being aborted on due to the lexical scope added in catch blocks.
With this change, syntax parsing succeeds on the minified jQuery used in octane-codeload. The speedup from syntax parsing is 3.8x, the same as was seen with the original hacked up patch in bug 835587.
Attachment #718490 -
Flags: review?(jorendorff)
Reporter | ||
Updated•12 years ago
|
Blocks: LazyBytecode
Comment 1•12 years ago
|
||
Comment on attachment 718490 [details] [diff] [review]
patch
Review of attachment 718490 [details] [diff] [review]:
-----------------------------------------------------------------
Awful lot of code duplication. :-\
I guess it's all right. Certainly everything looks correct.
Attachment #718490 -
Flags: review?(jorendorff) → review+
Reporter | ||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•