Bug 125122
Summary: | DFG logic mixes boolean and binary operations | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> |
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | bfulgham, ggaren, mark.lam, msaboff |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Brent Fulgham
DFGCommon generates a bunch of warnings when built under Windows:
7>c:\projects\webkit\opensource\source\javascriptcore\dfg\DFGCommon.h(216): warning C4805: '==' : unsafe mix of type 'bool' and type 'int' in operation
7> c:\projects\webkit\opensource\source\javascriptcore\dfg\DFGVariableAccessData.h(96) : see reference to function template instantiation 'bool JSC::DFG::checkAndSet<bool,int>(T &,U)' being compiled
The offending code in DFGVariableAccessData looks like this:
bool mergeIsCaptured(bool isCaptured)
{
return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | isCaptured)
| checkAndSet(m_isCaptured, m_isCaptured | isCaptured);
}
MSVC seems to be promoting the two boolean types in the binary OR operation (e.g., m_shouldNeverUnbox | isCaptured) to integer type, which is then passed to checkAndSet, resulting in a comparison of bool to integer.
Probably harmless, but an annoying warning.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brent Fulgham
I think Mark fixed this already. Can you confirm?
Mark Lam
Yes, this is fixed already in ToT.
Mark Lam
(In reply to comment #2)
> Yes, this is fixed already in ToT.
Specifically, this was fixed for https://bugs.webkit.org/show_bug.cgi?id=135205 in http://trac.webkit.org/changeset/174371.
*** This bug has been marked as a duplicate of bug 135205 ***