Closed Bug 1084959 Opened 10 years ago Closed 10 years ago

(a) = ...; aborts syntax parsing

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

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();
Attached patch PatchSplinter Review
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Attachment #8509407 - Flags: review?(bhackett1024)
Attachment #8509407 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/d6d519cc677b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Blocks: 1111101
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: