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/dfg/DFGPlan.cpp

    r172737 r173370  
    182182        default:
    183183            RELEASE_ASSERT_NOT_REACHED();
     184#if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
    184185            pathName = "";
     186#endif
    185187            break;
    186188        }
Note: See TracChangeset for help on using the changeset viewer.