Closed Bug 532041 Opened 15 years ago Closed 15 years ago

js_FindDuplicateFormal misinterprets fun->u.i.names union

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: brendan, Assigned: jimb)

References

Details

(Keywords: regression, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

See bug 514580 comment 11 et seq.

/be
Keywords: regression
OS: Linux → All
Hardware: x86 → All
Attachment #415345 - Flags: review?(jim)
This strict formal checking looks costly -- under ES5's "use strict" or ye olde JSOPTION_STRICT, every function pays for CheckStrictForamls even though the code earlier in FunctionDef adds one formal at a time to fun->u.i.names and therefore knows right away whether there are any dups.

/be
Attachment #415345 - Flags: review?(jim) → review+
http://hg.mozilla.org/tracemonkey/rev/f8d3f3df9691

/be
Whiteboard: fixed-in-tracemonkey
(In reply to comment #2)
> This strict formal checking looks costly -- under ES5's "use strict" or ye olde
> JSOPTION_STRICT, every function pays for CheckStrictForamls even though the
> code earlier in FunctionDef adds one formal at a time to fun->u.i.names and
> therefore knows right away whether there are any dups.

Filed as bug 532421.
Test case added; patch and review in bug 532341.
Flags: in-testsuite+
http://hg.mozilla.org/mozilla-central/rev/872dcbf2c9c6
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
jimb: you missed a call to reportCompare. It will be automatically orange on jsreftests.
(In reply to comment #7)
> jimb: you missed a call to reportCompare. It will be automatically orange on
> jsreftests.

http://hg.mozilla.org/tracemonkey/rev/860a58855453
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: