Closed Bug 938246 Opened 11 years ago Closed 11 years ago

getJSReturnTypeTag returns incorrect value for booleans

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

We return JSVAL_TYPE_INT32, not JSVAL_TYPE_BOOLEAN.  That means the jit can't optimize away its type guards, since it knows it's seen types other than this one.
Whiteboard: [need review]
Attachment #831674 - Attachment is obsolete: true
Attachment #831674 - Flags: review?(efaustbmo)
Comment on attachment 831678 [details] [diff] [review]
Don't try to tell the JIT that our booleans are 32-bit integers, when they're actually booleans.

Nice catch. This looks like it might have been very unpleasant to track down. r=me
Attachment #831678 - Flags: review?(efaustbmo) → review+
I actually saw it while reading the code in Codegen.py...
https://hg.mozilla.org/integration/mozilla-inbound/rev/a90375867a74
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla28
https://hg.mozilla.org/mozilla-central/rev/a90375867a74
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: