Closed Bug 646695 Opened 15 years ago Closed 10 years ago

Round-trip change and missing optimization with "new (new a(-2))"

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 632020

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: regression, testcase)

js> f = (function() {return new (new a(-2));}) (function () {return new new a(- 2);}) js> g = eval(uneval(f)) (function () {return new new a(-2);}) js> dis(f) ... 00004: int8 2 00006: neg ... js> dis(g) ... 00004: int8 -2 ...
This shows the missing optimization, but not the round-trip change: js> (function() { (new a.b(-1))() }) (function () {(new a.b(- 1))();})
Here's a more plausible testcase: js> (function() { (function() { return Math.max(g, -2) })() }) (function () {(function () {return Math.max(g, - 2);}());}) js> (function () {(function () {return Math.max(g, - 2);}());}) (function () {(function () {return Math.max(g, -2);}());}) With this testcase, The first bad revision is: changeset: 981eb360a6cb user: Blake Kaplan date: Thu Jan 07 15:58:44 2010 -0800 summary: Bug 537673 - Don't constant-fold a parenthesized callee expression. r=jorendoff Which makes sense, but seems like quite a hammer.
Blocks: 537673
Keywords: regression
I'm guessing this is the same bug, even though it gives me a newer and less sensible regression range: js> (function() { (function(){ -4; })(); }) (function () {(function () {- 4;}());}) js> (function () {(function () {- 4;}());}) (function () {(function () {}());}) The first bad revision is: changeset: 2a8ceeb27f7c user: Bill McCloskey date: Fri Feb 17 14:35:20 2012 -0800 summary: Bug 641025 - Incremental GC (r=igor,smaug,roc,cdleary,gregor)
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.