JM: Treat known booleans like integers during bitops

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bhackett, Unassigned)

Tracking

(Blocks: 1 bug)

Other Branch
mozilla17
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 643085 [details] [diff] [review]
patch

Emscripten does things like '(x == y) & 1' to convert booleans into integers, which we currently stub.  This is biting bug 773366.  EZ fix.  Don't know if IM has a similar problem.
Attachment #643085 - Flags: review?(jdemooij)
Comment on attachment 643085 [details] [diff] [review]
patch

Review of attachment 643085 [details] [diff] [review]:
-----------------------------------------------------------------

Just checked, Ion doesn't have this problem, for (x == y) & 1:

[jaeger] Insns            cmpl       %ecx, %eax
[jaeger] Insns            sete       %dl
[jaeger] Insns            movzbl     %edx, %edx
[jaeger] Insns            andl       $0x1, %edx
Attachment #643085 - Flags: review?(jdemooij) → review+
(Reporter)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9a11f086069a
Whiteboard: [js:t]

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/9a11f086069a
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.