Closed
Bug 539819
Opened 15 years ago
Closed 6 years ago
The statement "0/0;" is not always compiled out
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 632020
People
(Reporter: jruderman, Unassigned)
Details
(Keywords: regression, testcase)
On the TM branch, jsfunfuzz discovered that whether "0/0;" is compiled out depends on whether the function as a whole is parenthesized. This makes jsfunfuzz complain a lot, so I'll probably have to turn off its round-trip checking until this bug is fixed. Maybe this is related to constant-folding and caused by bug 537673? With parens: js> (function() { (function b() {0 / 0;})(); }) (function () {(function b() {0 / 0;}());}) Without parens: js> function () {(function b() {0 / 0;}());} function () {(function b() {}());}
Comment 1•15 years ago
|
||
Hmm, yeah, we should be hopping down a level or two, not skipping it entirely at that point.
Reporter | ||
Comment 2•13 years ago
|
||
Waldo, ping? We're missing a lot of jsfunfuzz coverage because of this bug.
Comment 3•13 years ago
|
||
The js shell errors out now if the function isn't enclosed in parentheses. Is there another way to test this or is this no longer valid? Not sure if this is really equivalent, but when I use print(), I get the following: js> print((function () {(function b() {0 / 0;}());})) function () { (function b() {}()); } js> print(function () {(function b() {0 / 0;}());}) function () { (function b() {}());
OS: Mac OS X → All
Hardware: x86 → All
Reporter | ||
Comment 4•13 years ago
|
||
I can still reproduce the bug, like this: js> print(function() { (function b() {0 / 0;})(); }) function () { (function b() {0 / 0;}()); } js> print((function () {(function b() {0 / 0;}());})) function () { (function b() {}()); }
Reporter | ||
Comment 5•11 years ago
|
||
With the decompiler gone, this bug no longer bites jsfunfuzz. But it's still present, as can be seen with: dis("-r", function() { (function b() {0 / 0;})(); }) dis("-r", (function () {(function b() {0 / 0;}());}))
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 6•6 years ago
|
||
I just noticed this bug in a bug list. This also applies to things like a["x"] => a.x folding and so it's an interesting perf issue I want to track down.
Flags: needinfo?(jdemooij)
Comment 7•6 years ago
|
||
Probably the same issue as in bug 632020.
Comment 8•6 years ago
|
||
(In reply to André Bargull [:anba] from comment #7) > Probably the same issue as in bug 632020. Yes, thanks :)
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jdemooij)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•