Closed
Bug 630543
Opened 14 years ago
Closed 14 years ago
Constant folding assumes `this` is truthy even in strict functions
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jorendorff, Unassigned)
References
Details
(Whiteboard: fixed-in-tracemonkey)
function f() {
"use strict";
return !this;
}
assertEq(f.call(null), true); // FAILS
Comment 1•14 years ago
|
||
Is that a valuable optimization to have, even when it's correct?
Comment 2•14 years ago
|
||
(In reply to comment #1)
> Is that a valuable optimization to have, even when it's correct?
It was a freebie in the pre-ES5-strict days, see Boolish. Easily fixed.
/be
Comment 3•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/41e2276b9b78
Jason, could you add comment 0's test? I'm sick at home here...
/be
Whiteboard: fixed-in-tracemonkey
| Reporter | ||
Comment 4•14 years ago
|
||
Nice patch! I'll push the test tonight; I have a few things to push.
Comment 5•14 years ago
|
||
This should ridealong into b12. We could even put it into m-c today for b11.
/be
Blocks: es5strict
Comment 6•14 years ago
|
||
Backed the test out in http://hg.mozilla.org/tracemonkey/rev/819776ea6cce since it wasn't clear to me whether it was this or the other cset in the same push that caused make check to time out during jit-test/tests/basic/bug627609.js, but the tree was completely hosed.
Comment 7•14 years ago
|
||
And relanded the test in http://hg.mozilla.org/tracemonkey/rev/a1cba95edcf9, since Brendan said to point the orange-stained Finger of Blame at bug 627692 instead.
Comment 8•14 years ago
|
||
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/252f0e61e918
http://hg.mozilla.org/mozilla-central/rev/819776ea6cce (backout)
http://hg.mozilla.org/mozilla-central/rev/a1cba95edcf9
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•