Ignore:
Timestamp:
Sep 7, 2014, 7:16:47 PM (11 years ago)
Author:
[email protected]
Message:

Introduce COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE) and use it
https://bugs.webkit.org/show_bug.cgi?id=136616

Reviewed by Darin Adler.
Source/JavaScriptCore:


Many compilers will analyze unrechable code paths (e.g. after an
unreachable code path), so sometimes they need dead code initializations.
But clang with suitable warnings will complain about unreachable code. So
use the quirk to include it conditionally.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::printGetByIdOp):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThread):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):

  • jsc.cpp:
  • runtime/JSArray.cpp:

(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToArguments):

  • runtime/RegExp.cpp:

(JSC::RegExp::compile):
(JSC::RegExp::compileMatchOnly):

Source/WTF:

  • wtf/Compiler.h: Define the quirk for all compilers but clang.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r173225 r173370  
    364364    {
    365365        RELEASE_ASSERT_NOT_REACHED();
    366 #if !COMPILER(CLANG) && !COMPILER(MSVC)
     366#if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
    367367        return true;
    368368#endif
Note: See TracChangeset for help on using the changeset viewer.