Closed Bug 574834 Opened 15 years ago Closed 13 years ago

jsparse deoptimizes |arguments| var-binding too eagerly

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 740446

People

(Reporter: dherman, Unassigned)

References

Details

Attachments

(1 obsolete file)

This shouldn't need to deoptimize for the |arguments| array: function foo(arguments) { var arguments = ... } since the explicit parameter precludes the |arguments| array. But jsparse.cpp currently does anyway. See: http://hg.mozilla.org/tracemonkey/file/b8461ef5fc81/js/src/jsparse.cpp#l5810 Trivial to fix. I'll post a patch in a minute, but someone should definitely check my thinking. Dave
This appears not to have been committed, but the changes in the patch look like something I saw while working on the analysis portion of strict mode arguments. Did this get fixed elsewhere since original filing?
OS: Mac OS X → Windows 7
Hm, good question. Looks like I forgot to ask for a review? I'll ask around tomorrow. If it didn't get fix can I r? you? Dave
Sounds good to me.
Did you forget to ask for a review again? ;-)
This just sorta fell out of the simple way of handling 'arguments'... js> function f(arguments) { return 3 } js> dis(f) flags: NULL_CLOSURE loc op ----- -- main: 00000: int8 3 00002: return 00003: stop
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Comment on attachment 454235 [details] [diff] [review] avoids deoptimizing if function has a parameter called "arguments" Obsoleted by dupe.
Attachment #454235 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: