Last Comment Bug 1084959 - (a) = ...; aborts syntax parsing
: (a) = ...; aborts syntax parsing
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal with 1 vote (vote)
: mozilla36
Assigned To: Jan de Mooij [:jandem]
:
: Steven DeTar [:sdetar]
Mentors:
Depends on:
Blocks: 935279 1111101
  Show dependency treegraph
 
Reported: 2014-10-18 06:24 PDT by Jan de Mooij [:jandem]
Modified: 2015-01-24 03:56 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (946 bytes, patch)
2014-10-22 04:29 PDT, Jan de Mooij [:jandem]
bhackett: review+
Details | Diff | Splinter Review

Description User image Jan de Mooij [:jandem] 2014-10-18 06:24:03 PDT
I was just looking into JSBench performance and noticed we abort syntax parsing for (a) = ... (assignment with parentheses around LHS).

The abort happens in checkAndMarkAsAssignmentLhs, because pn is SyntaxParseHandler::NodeGeneric.

This should improve the facebook/chrome and facebook/firefox tests by about 10%.

Simple testcase:

function f() {
    function g() {
	var a;
	(a) = 3;
    }
    return 3;
}
f();
Comment 1 User image Jan de Mooij [:jandem] 2014-10-22 04:29:32 PDT
Created attachment 8509407 [details] [diff] [review]
Patch
Comment 3 User image Ryan VanderMeulen [:RyanVM] 2014-10-22 13:11:51 PDT
https://hg.mozilla.org/mozilla-central/rev/d6d519cc677b

Note You need to log in before you can comment on or make changes to this bug.