Ignore:
Timestamp:
Jan 27, 2014, 8:04:45 PM (11 years ago)
Author:
Joseph Pecoraro
Message:

JavaScriptCore: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
https://bugs.webkit.org/show_bug.cgi?id=127647

Reviewed by Anders Carlsson.

Explicitly annotate switch case fallthroughs in JavaScriptCore and
enable warnings for unannotated fallthroughs.

  • dfg/DFGArithMode.h:

(doesOverflow):
Only insert FALLTHROUGH in release builds. In debug builds, the
FALLTHROUGH would be unreachable (due to the ASSERT_NOT_REACHED)
and would through a warning.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt52):
Due to the templatized nature of this function, a fallthrough
in one of the template expansions would be unreachable. Disable
the warning for this function.

  • Configurations/Base.xcconfig:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):

  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::run):

  • dfg/DFGValidate.cpp:

(JSC::DFG::Validate::validateCPS):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::lex):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseProperty):

  • runtime/JSArray.cpp:

(JSC::JSArray::push):

  • runtime/JSONObject.cpp:

(JSC::Walker::walk):

  • runtime/JSObject.cpp:

(JSC::JSObject::putByIndex):
(JSC::JSObject::putByIndexBeyondVectorLength):

  • runtime/JSObject.h:

(JSC::JSObject::setIndexQuickly):
(JSC::JSObject::initializeIndex):

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::parse):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):

  • yarr/YarrParser.h:

(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseTokens):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp

    r159937 r162906  
    708708        case QuantifierNonGreedy:
    709709            ASSERT(backTrack->begin != notFound);
     710            FALLTHROUGH;
    710711        case QuantifierFixedCount:
    711712            break;
     
    728729                return false;
    729730            }
     731            FALLTHROUGH;
    730732        case QuantifierNonGreedy:
    731733            if (backTrack->begin == notFound) {
     
    743745                return true;
    744746            }
     747            FALLTHROUGH;
    745748        case QuantifierFixedCount:
    746749            break;
Note: See TracChangeset for help on using the changeset viewer.