Changeset 174455 in webkit for trunk/Source/JavaScriptCore/dfg


Ignore:
Timestamp:
Oct 8, 2014, 9:18:03 AM (11 years ago)
Author:
Brent Fulgham
Message:

[Win] Resolve some static analysis warnings in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137508

Reviewed by Geoffrey Garen.

  • API/tests/testapi.c:

(assertEqualsAsCharactersPtr): MSVC insists on using %Iu as its format specifier
for size_t. Make the format string conditional on Windows.

  • bytecode/Watchpoint.h:

(JSC::InlineWatchpointSet::encodeState): Silence warning about left-shifting 'state'
as a 32-bit value before OR-ing it with a 64-bit value.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode): Silence warning about operator prescedence

causing the
operation to take place before the >= test.
  • dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::endBasicBlock): Ditto (
before !=)
  • testRegExp.cpp:

(testOneRegExp): Ditto %Iu format specifier.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): Silence warning about
using a 32-bit value as part of a 64-bit calculation.

Location:
trunk/Source/JavaScriptCore/dfg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r174226 r174455  
    440440                break;
    441441            }
    442             if (node->child1()->shouldSpeculateString() && node->child2()->shouldSpeculateString() && (GPRInfo::numberOfRegisters >= 7 || isFTL(m_graph.m_plan.mode))) {
     442            if (node->child1()->shouldSpeculateString() && node->child2()->shouldSpeculateString() && ((GPRInfo::numberOfRegisters >= 7) || isFTL(m_graph.m_plan.mode))) {
    443443                fixEdge<StringUse>(node->child1());
    444444                fixEdge<StringUse>(node->child2());
     
    470470                break;
    471471            }
    472             if (node->child1()->shouldSpeculateString() && (GPRInfo::numberOfRegisters >= 8 || isFTL(m_graph.m_plan.mode))) {
     472            if (node->child1()->shouldSpeculateString() && ((GPRInfo::numberOfRegisters >= 8) || isFTL(m_graph.m_plan.mode))) {
    473473                fixEdge<StringUse>(node->child1());
    474474                break;
    475475            }
    476             if (node->child2()->shouldSpeculateString() && (GPRInfo::numberOfRegisters >= 8 || isFTL(m_graph.m_plan.mode))) {
     476            if (node->child2()->shouldSpeculateString() && ((GPRInfo::numberOfRegisters >= 8) || isFTL(m_graph.m_plan.mode))) {
    477477                fixEdge<StringUse>(node->child2());
    478478                break;
  • trunk/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp

    r171613 r174455  
    195195    bool changed = false;
    196196   
    197     if (mergeMode != DontMerge || !ASSERT_DISABLED) {
     197    if ((mergeMode != DontMerge) || !ASSERT_DISABLED) {
    198198        changed |= checkAndSet(block->cfaStructureClobberStateAtTail, m_structureClobberState);
    199199   
Note: See TracChangeset for help on using the changeset viewer.