Closed
Bug 574834
Opened 15 years ago
Closed 13 years ago
jsparse deoptimizes |arguments| var-binding too eagerly
Categories
(Core :: JavaScript Engine, defect)
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
Reporter | ||
Comment 1•15 years ago
|
||
Easy fix.
Dave
Reporter | ||
Updated•15 years ago
|
Blocks: harmony:restparams
Comment 2•14 years ago
|
||
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
Reporter | ||
Comment 3•14 years ago
|
||
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
Comment 4•14 years ago
|
||
Sounds good to me.
Comment 5•14 years ago
|
||
Did you forget to ask for a review again? ;-)
Comment 6•13 years ago
|
||
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 7•13 years ago
|
||
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.
Description
•