TM: If the result of a demoted multiplication is 0, must undemote or we lose -0

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
6 years ago

People

(Reporter: gkw, Assigned: gal)

Tracking

(Blocks: 2 bugs, {testcase})

Trunk
x86
Linux
testcase
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.2 +
in-testsuite -

Firefox Tracking Flags

(status1.9.2 beta1-fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
e = 0
let(f = function(y) {++y;
    for each(b in [0, 1 / 0, 0 / 0, 0]) {
        e *= --y
    }
}) {
    f(2)
}
print(uneval(this))

There's a "-0" in the output without -j but no "-0" in the output with -j. Does not seem to affect 1.9.1 branch.

===

$ ~/Desktop/tm-28982-568959fa4956/js-dbg-tm-intelmac 
js> e = 0
0
js> let(f = function(y) {++y;
    for each(b in [0, 1 / 0, 0 / 0, 0]) {
        e *= --y
    }
}) {
    f(2)
}
js> print(uneval(this))
({e:-0, b:0})

$ ~/Desktop/tm-28982-568959fa4956/js-dbg-tm-intelmac -j
js> e = 0
0
js> let(f = function(y) {++y;
    for each(b in [0, 1 / 0, 0 / 0, 0]) {
        e *= --y
    }
}) {
    f(2)
}
js> print(uneval(this))
({e:0, b:0})
Flags: blocking1.9.2?
(Assignee)

Updated

10 years ago
Summary: TM: Different result from testcase involving for...each, function, uneval → TM: If the result of a demoted multiplication is 0, must undemote or we lose -0
(Assignee)

Comment 1

10 years ago
Created attachment 383446 [details] [diff] [review]
patch

-0 sucks
Assignee: general → gal
(Assignee)

Updated

10 years ago
Attachment #383446 - Flags: review?(dvander)
Attachment #383446 - Flags: review?(dvander) → review+

Comment 3

10 years ago
http://hg.mozilla.org/mozilla-central/rev/434d3673d304
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Flags: blocking1.9.2? → blocking1.9.2+
(Reporter)

Updated

10 years ago
Depends on: 501275
(Assignee)

Updated

10 years ago
No longer depends on: 501275
(Reporter)

Updated

9 years ago
Flags: in-testsuite?
Mass change: adding fixed1.9.2 keyword

(This bug was identified as a mozilla1.9.2 blocker which was fixed before the mozilla-1.9.2 repository was branched (August 13th, 2009) as per this query: http://is.gd/2ydcb - if this bug is not actually fixed on mozilla1.9.2, please remove the keyword. Apologies for the bugspam)
Keywords: fixed1.9.2
status1.9.2: --- → beta1-fixed
Keywords: fixed1.9.2
(Reporter)

Updated

7 years ago
Blocks: 349611
Bug in removed tracer code, setting in-testsuite- flag.
Flags: in-testsuite? → in-testsuite-
You need to log in before you can comment on or make changes to this bug.