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/runtime/LiteralParser.cpp

    r148696 r162906  
    555555                JSArray* array = constructEmptyArray(m_exec, 0);
    556556                objectStack.append(array);
    557                 // fallthrough
    558557            }
    559558            doParseArrayStartExpression:
     559            FALLTHROUGH;
    560560            case DoParseArrayStartExpression: {
    561561                TokenType lastToken = m_lexer.currentToken().type;
Note: See TracChangeset for help on using the changeset viewer.