Closed Bug 630213 Opened 9 years ago Closed 9 years ago

ASTSerializer::leftAssociate right-associates

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 file)

I was playing with my minimizer this weekend and came across this.

Reflect.parse("a-b-c") produces a tree for "a-(b-c)".

  js> uneval(Reflect.parse("a-b-c",{loc:0})) ===
      uneval(Reflect.parse("a-(b-c)",{loc:0}))
  true

But they're two different programs.

  js> var a=3, b=2, c=1;
  js> a-b-c
  0
  js> a-(b-c)
  2
Attached patch v1Splinter Review
Assignee: general → jorendorff
Attachment #508422 - Flags: review?(dherman)
Oy, this one's embarrassing. Patch is good, thanks. r=me

Dave
Attachment #508422 - Flags: review?(dherman) → review+
http://hg.mozilla.org/tracemonkey/rev/5c9527251fe9
Whiteboard: [fixed-in-tracemonkey]
http://hg.mozilla.org/mozilla-central/rev/5c9527251fe9
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Duplicate of this bug: 686305
You need to log in before you can comment on or make changes to this bug.