⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244764 in webkit


Ignore:
Timestamp:
Apr 29, 2019, 8:27:39 PM (7 years ago)
Author:
sbarati@apple.com
Message:

Make JITType an enum class
https://bugs.webkit.org/show_bug.cgi?id=197394

Reviewed by Yusuke Suzuki.

This makes the code more easily searchable.

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFor):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpAssumingJITType const):
(JSC::CodeBlock::specialOSREntryBlockOrNull):
(JSC::timeToLive):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::baselineAlternative):
(JSC::CodeBlock::baselineVersion):
(JSC::CodeBlock::hasOptimizedReplacement):
(JSC::CodeBlock::noticeIncomingCall):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
(JSC::CodeBlock::tallyFrequentExitSites):
(JSC::CodeBlock::frameRegisterCount):
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::jitType const):
(JSC::CodeBlock::hasBaselineJITProfiling const):

  • bytecode/CodeBlockWithJITType.h:

(JSC::CodeBlockWithJITType::CodeBlockWithJITType):

  • bytecode/DeferredSourceDump.cpp:

(JSC::DeferredSourceDump::DeferredSourceDump):

  • bytecode/DeferredSourceDump.h:
  • bytecode/ExitingJITType.h:

(JSC::exitingJITTypeFor):

  • bytecode/InlineCallFrame.h:

(JSC::baselineCodeBlockForOriginAndBaselineCodeBlock):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGDisassembler.cpp:

(JSC::DFG::Disassembler::dumpHeader):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGJITCode.cpp:

(JSC::DFG::JITCode::JITCode):
(JSC::DFG::JITCode::checkIfOptimizationThresholdReached):
(JSC::DFG::JITCode::optimizeNextInvocation):
(JSC::DFG::JITCode::dontOptimizeAnytimeSoon):
(JSC::DFG::JITCode::optimizeAfterWarmUp):
(JSC::DFG::JITCode::optimizeSoon):
(JSC::DFG::JITCode::forceOptimizationSlowPathConcurrently):
(JSC::DFG::JITCode::setOptimizationThresholdBasedOnCompilationResult):

  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):
(JSC::DFG::prepareCatchOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::OSRExit::compileOSRExit):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGOSRExitCompilerCommon.h:

(JSC::DFG::adjustFrameAndStackInOSRExitCompilerThunk):

  • dfg/DFGOperations.cpp:
  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct const):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::JITCode):

  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::finalizeCommon):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileFTLOSRExit):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::callSiteBitsAreBytecodeOffset const):
(JSC::CallFrame::callSiteBitsAreCodeOriginIndex const):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::dump const):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::AssemblyHelpers):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITCode.cpp:

(JSC::JITCode::typeName):
(WTF::printInternal):

  • jit/JITCode.h:

(JSC::JITCode::bottomTierJIT):
(JSC::JITCode::topTierJIT):
(JSC::JITCode::nextTierJIT):
(JSC::JITCode::isExecutableScript):
(JSC::JITCode::couldBeInterpreted):
(JSC::JITCode::isJIT):
(JSC::JITCode::isOptimizingJIT):
(JSC::JITCode::isBaselineCode):
(JSC::JITCode::jitTypeFor):

  • jit/JITDisassembler.cpp:

(JSC::JITDisassembler::dumpHeader):

  • jit/JITOperations.cpp:
  • jit/JITThunks.cpp:

(JSC::JITThunks::hostFunctionStub):

  • jit/JITToDFGDeferredCompilationCallback.cpp:

(JSC::JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):

  • jit/Repatch.cpp:

(JSC::readPutICCallTarget):
(JSC::ftlThunkAwareRepatchCall):

  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
(JSC::LLInt::setModuleProgramEntrypoint):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::processUnverifiedStackTraces):

  • runtime/SamplingProfiler.h:
  • runtime/VM.cpp:

(JSC::jitCodeForCallTrampoline):
(JSC::jitCodeForConstructTrampoline):

  • tools/CodeProfile.cpp:

(JSC::CodeProfile::sample):

  • tools/JSDollarVM.cpp:

(JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor):
(JSC::CallerFrameJITTypeFunctor::jitType):
(JSC::functionLLintTrue):
(JSC::functionJITTrue):

Location:
trunk/Source/JavaScriptCore
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r244763 r244764  
     12019-04-29  Saam Barati  <sbarati@apple.com>
     2
     3        Make JITType an enum class
     4        https://bugs.webkit.org/show_bug.cgi?id=197394
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        This makes the code more easily searchable.
     9
     10        * bytecode/CallLinkStatus.cpp:
     11        (JSC::CallLinkStatus::computeFor):
     12        * bytecode/CodeBlock.cpp:
     13        (JSC::CodeBlock::dumpAssumingJITType const):
     14        (JSC::CodeBlock::specialOSREntryBlockOrNull):
     15        (JSC::timeToLive):
     16        (JSC::CodeBlock::propagateTransitions):
     17        (JSC::CodeBlock::baselineAlternative):
     18        (JSC::CodeBlock::baselineVersion):
     19        (JSC::CodeBlock::hasOptimizedReplacement):
     20        (JSC::CodeBlock::noticeIncomingCall):
     21        (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
     22        (JSC::CodeBlock::tallyFrequentExitSites):
     23        (JSC::CodeBlock::frameRegisterCount):
     24        (JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex):
     25        * bytecode/CodeBlock.h:
     26        (JSC::CodeBlock::jitType const):
     27        (JSC::CodeBlock::hasBaselineJITProfiling const):
     28        * bytecode/CodeBlockWithJITType.h:
     29        (JSC::CodeBlockWithJITType::CodeBlockWithJITType):
     30        * bytecode/DeferredSourceDump.cpp:
     31        (JSC::DeferredSourceDump::DeferredSourceDump):
     32        * bytecode/DeferredSourceDump.h:
     33        * bytecode/ExitingJITType.h:
     34        (JSC::exitingJITTypeFor):
     35        * bytecode/InlineCallFrame.h:
     36        (JSC::baselineCodeBlockForOriginAndBaselineCodeBlock):
     37        * dfg/DFGByteCodeParser.cpp:
     38        (JSC::DFG::ByteCodeParser::parseCodeBlock):
     39        * dfg/DFGDisassembler.cpp:
     40        (JSC::DFG::Disassembler::dumpHeader):
     41        * dfg/DFGDriver.cpp:
     42        (JSC::DFG::compileImpl):
     43        * dfg/DFGGraph.cpp:
     44        (JSC::DFG::Graph::dump):
     45        * dfg/DFGJITCode.cpp:
     46        (JSC::DFG::JITCode::JITCode):
     47        (JSC::DFG::JITCode::checkIfOptimizationThresholdReached):
     48        (JSC::DFG::JITCode::optimizeNextInvocation):
     49        (JSC::DFG::JITCode::dontOptimizeAnytimeSoon):
     50        (JSC::DFG::JITCode::optimizeAfterWarmUp):
     51        (JSC::DFG::JITCode::optimizeSoon):
     52        (JSC::DFG::JITCode::forceOptimizationSlowPathConcurrently):
     53        (JSC::DFG::JITCode::setOptimizationThresholdBasedOnCompilationResult):
     54        * dfg/DFGJITFinalizer.cpp:
     55        (JSC::DFG::JITFinalizer::finalize):
     56        (JSC::DFG::JITFinalizer::finalizeFunction):
     57        * dfg/DFGOSREntry.cpp:
     58        (JSC::DFG::prepareOSREntry):
     59        (JSC::DFG::prepareCatchOSREntry):
     60        * dfg/DFGOSRExit.cpp:
     61        (JSC::DFG::OSRExit::executeOSRExit):
     62        (JSC::DFG::reifyInlinedCallFrames):
     63        (JSC::DFG::OSRExit::compileOSRExit):
     64        * dfg/DFGOSRExitCompilerCommon.cpp:
     65        (JSC::DFG::handleExitCounts):
     66        (JSC::DFG::reifyInlinedCallFrames):
     67        (JSC::DFG::adjustAndJumpToTarget):
     68        * dfg/DFGOSRExitCompilerCommon.h:
     69        (JSC::DFG::adjustFrameAndStackInOSRExitCompilerThunk):
     70        * dfg/DFGOperations.cpp:
     71        * dfg/DFGThunks.cpp:
     72        (JSC::DFG::osrExitGenerationThunkGenerator):
     73        * dfg/DFGVariableEventStream.cpp:
     74        (JSC::DFG::VariableEventStream::reconstruct const):
     75        * ftl/FTLCompile.cpp:
     76        (JSC::FTL::compile):
     77        * ftl/FTLJITCode.cpp:
     78        (JSC::FTL::JITCode::JITCode):
     79        * ftl/FTLJITFinalizer.cpp:
     80        (JSC::FTL::JITFinalizer::finalizeCommon):
     81        * ftl/FTLLink.cpp:
     82        (JSC::FTL::link):
     83        * ftl/FTLOSRExitCompiler.cpp:
     84        (JSC::FTL::compileFTLOSRExit):
     85        * ftl/FTLThunks.cpp:
     86        (JSC::FTL::genericGenerationThunkGenerator):
     87        * interpreter/CallFrame.cpp:
     88        (JSC::CallFrame::callSiteBitsAreBytecodeOffset const):
     89        (JSC::CallFrame::callSiteBitsAreCodeOriginIndex const):
     90        * interpreter/StackVisitor.cpp:
     91        (JSC::StackVisitor::Frame::dump const):
     92        * jit/AssemblyHelpers.h:
     93        (JSC::AssemblyHelpers::AssemblyHelpers):
     94        * jit/JIT.cpp:
     95        (JSC::JIT::link):
     96        * jit/JITCode.cpp:
     97        (JSC::JITCode::typeName):
     98        (WTF::printInternal):
     99        * jit/JITCode.h:
     100        (JSC::JITCode::bottomTierJIT):
     101        (JSC::JITCode::topTierJIT):
     102        (JSC::JITCode::nextTierJIT):
     103        (JSC::JITCode::isExecutableScript):
     104        (JSC::JITCode::couldBeInterpreted):
     105        (JSC::JITCode::isJIT):
     106        (JSC::JITCode::isOptimizingJIT):
     107        (JSC::JITCode::isBaselineCode):
     108        (JSC::JITCode::jitTypeFor):
     109        * jit/JITDisassembler.cpp:
     110        (JSC::JITDisassembler::dumpHeader):
     111        * jit/JITOperations.cpp:
     112        * jit/JITThunks.cpp:
     113        (JSC::JITThunks::hostFunctionStub):
     114        * jit/JITToDFGDeferredCompilationCallback.cpp:
     115        (JSC::JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
     116        (JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
     117        * jit/JITWorklist.cpp:
     118        (JSC::JITWorklist::compileLater):
     119        (JSC::JITWorklist::compileNow):
     120        * jit/Repatch.cpp:
     121        (JSC::readPutICCallTarget):
     122        (JSC::ftlThunkAwareRepatchCall):
     123        * llint/LLIntEntrypoint.cpp:
     124        (JSC::LLInt::setFunctionEntrypoint):
     125        (JSC::LLInt::setEvalEntrypoint):
     126        (JSC::LLInt::setProgramEntrypoint):
     127        (JSC::LLInt::setModuleProgramEntrypoint):
     128        * llint/LLIntSlowPaths.cpp:
     129        (JSC::LLInt::jitCompileAndSetHeuristics):
     130        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
     131        * runtime/SamplingProfiler.cpp:
     132        (JSC::SamplingProfiler::processUnverifiedStackTraces):
     133        * runtime/SamplingProfiler.h:
     134        * runtime/VM.cpp:
     135        (JSC::jitCodeForCallTrampoline):
     136        (JSC::jitCodeForConstructTrampoline):
     137        * tools/CodeProfile.cpp:
     138        (JSC::CodeProfile::sample):
     139        * tools/JSDollarVM.cpp:
     140        (JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor):
     141        (JSC::CallerFrameJITTypeFunctor::jitType):
     142        (JSC::functionLLintTrue):
     143        (JSC::functionJITTrue):
     144
    11452019-04-29  Yusuke Suzuki  <ysuzuki@apple.com>
    2146
  • trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp

    r243467 r244764  
    343343        // path or it's a full IC. So, for them, if there is an IC status then it means case (1).
    344344       
    345         bool checkStatusFirst = context->optimizedCodeBlock->jitType() == JITCode::FTLJIT;
     345        bool checkStatusFirst = context->optimizedCodeBlock->jitType() == JITType::FTLJIT;
    346346       
    347347        auto bless = [&] (CallLinkStatus& result) {
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r244088 r244764  
    181181}
    182182
    183 void CodeBlock::dumpAssumingJITType(PrintStream& out, JITCode::JITType jitType) const
     183void CodeBlock::dumpAssumingJITType(PrintStream& out, JITType jitType) const
    184184{
    185185    out.print(inferredName(), "#", hashAsStringIfPossible());
     
    192192        out.print(specializationKind());
    193193    out.print(", ", instructionCount());
    194     if (this->jitType() == JITCode::BaselineJIT && m_shouldAlwaysBeInlined)
     194    if (this->jitType() == JITType::BaselineJIT && m_shouldAlwaysBeInlined)
    195195        out.print(" (ShouldAlwaysBeInlined)");
    196196    if (ownerExecutable()->neverInline())
     
    206206    if (m_didFailJITCompilation)
    207207        out.print(" (JITFail)");
    208     if (this->jitType() == JITCode::BaselineJIT && m_didFailFTLCompilation)
     208    if (this->jitType() == JITType::BaselineJIT && m_didFailFTLCompilation)
    209209        out.print(" (FTLFail)");
    210     if (this->jitType() == JITCode::BaselineJIT && m_hasBeenCompiledWithFTL)
     210    if (this->jitType() == JITType::BaselineJIT && m_hasBeenCompiledWithFTL)
    211211        out.print(" (HadFTLReplacement)");
    212212    out.print("]");
     
    930930{
    931931#if ENABLE(FTL_JIT)
    932     if (jitType() != JITCode::DFGJIT)
     932    if (jitType() != JITType::DFGJIT)
    933933        return 0;
    934934    DFG::JITCode* jitCode = m_jitCode->dfg();
     
    10031003}
    10041004
    1005 static Seconds timeToLive(JITCode::JITType jitType)
     1005static Seconds timeToLive(JITType jitType)
    10061006{
    10071007    if (UNLIKELY(Options::useEagerCodeBlockJettisonTiming())) {
    10081008        switch (jitType) {
    1009         case JITCode::InterpreterThunk:
     1009        case JITType::InterpreterThunk:
    10101010            return 10_ms;
    1011         case JITCode::BaselineJIT:
     1011        case JITType::BaselineJIT:
    10121012            return 30_ms;
    1013         case JITCode::DFGJIT:
     1013        case JITType::DFGJIT:
    10141014            return 40_ms;
    1015         case JITCode::FTLJIT:
     1015        case JITType::FTLJIT:
    10161016            return 120_ms;
    10171017        default:
     
    10211021
    10221022    switch (jitType) {
    1023     case JITCode::InterpreterThunk:
     1023    case JITType::InterpreterThunk:
    10241024        return 5_s;
    1025     case JITCode::BaselineJIT:
     1025    case JITType::BaselineJIT:
    10261026        // Effectively 10 additional seconds, since BaselineJIT and
    10271027        // InterpreterThunk share a CodeBlock.
    10281028        return 15_s;
    1029     case JITCode::DFGJIT:
     1029    case JITType::DFGJIT:
    10301030        return 20_s;
    1031     case JITCode::FTLJIT:
     1031    case JITType::FTLJIT:
    10321032        return 60_s;
    10331033    default:
     
    10691069    VM& vm = *m_vm;
    10701070
    1071     if (jitType() == JITCode::InterpreterThunk) {
     1071    if (jitType() == JITType::InterpreterThunk) {
    10721072        const Vector<InstructionStream::Offset>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
    10731073        const InstructionStream& instructionStream = instructions();
     
    16311631        result = result->alternative();
    16321632    RELEASE_ASSERT(result);
    1633     RELEASE_ASSERT(JITCode::isBaselineCode(result->jitType()) || result->jitType() == JITCode::None);
     1633    RELEASE_ASSERT(JITCode::isBaselineCode(result->jitType()) || result->jitType() == JITType::None);
    16341634    return result;
    16351635#else
     
    16411641{
    16421642#if ENABLE(JIT)
    1643     JITCode::JITType selfJITType = jitType();
     1643    JITType selfJITType = jitType();
    16441644    if (JITCode::isBaselineCode(selfJITType))
    16451645        return this;
     
    16551655            // This can happen if we're creating the original CodeBlock for an executable.
    16561656            // Assume that we're the baseline CodeBlock.
    1657             RELEASE_ASSERT(selfJITType == JITCode::None);
     1657            RELEASE_ASSERT(selfJITType == JITType::None);
    16581658            return this;
    16591659        }
     
    16681668
    16691669#if ENABLE(JIT)
    1670 bool CodeBlock::hasOptimizedReplacement(JITCode::JITType typeToReplace)
     1670bool CodeBlock::hasOptimizedReplacement(JITType typeToReplace)
    16711671{
    16721672    CodeBlock* replacement = this->replacement();
     
    21482148    }
    21492149
    2150     if (callerCodeBlock->jitType() == JITCode::InterpreterThunk) {
     2150    if (callerCodeBlock->jitType() == JITType::InterpreterThunk) {
    21512151        // If the caller is still in the interpreter, then we can't expect inlining to
    21522152        // happen anytime soon. Assume it's profitable to optimize it separately. This
     
    24902490void CodeBlock::setOptimizationThresholdBasedOnCompilationResult(CompilationResult result)
    24912491{
    2492     JITCode::JITType type = jitType();
    2493     if (type != JITCode::BaselineJIT) {
     2492    JITType type = jitType();
     2493    if (type != JITType::BaselineJIT) {
    24942494        dataLog(*this, ": expected to have baseline code but have ", type, "\n");
    2495         CRASH_WITH_INFO(bitwise_cast<uintptr_t>(jitCode().get()), type);
     2495        CRASH_WITH_INFO(bitwise_cast<uintptr_t>(jitCode().get()), static_cast<uint8_t>(type));
    24962496    }
    24972497   
     
    27242724{
    27252725    ASSERT(JITCode::isOptimizingJIT(jitType()));
    2726     ASSERT(alternative()->jitType() == JITCode::BaselineJIT);
     2726    ASSERT(alternative()->jitType() == JITType::BaselineJIT);
    27272727   
    27282728    CodeBlock* profiledBlock = alternative();
    27292729   
    27302730    switch (jitType()) {
    2731     case JITCode::DFGJIT: {
     2731    case JITType::DFGJIT: {
    27322732        DFG::JITCode* jitCode = m_jitCode->dfg();
    27332733        for (auto& exit : jitCode->osrExit)
     
    27372737
    27382738#if ENABLE(FTL_JIT)
    2739     case JITCode::FTLJIT: {
     2739    case JITType::FTLJIT: {
    27402740        // There is no easy way to avoid duplicating this code since the FTL::JITCode::osrExit
    27412741        // vector contains a totally different type, that just so happens to behave like
     
    28252825{
    28262826    switch (jitType()) {
    2827     case JITCode::InterpreterThunk:
     2827    case JITType::InterpreterThunk:
    28282828        return LLInt::frameRegisterCountFor(this);
    28292829
    28302830#if ENABLE(JIT)
    2831     case JITCode::BaselineJIT:
     2831    case JITType::BaselineJIT:
    28322832        return JIT::frameRegisterCountFor(this);
    28332833#endif // ENABLE(JIT)
    28342834
    28352835#if ENABLE(DFG_JIT)
    2836     case JITCode::DFGJIT:
    2837     case JITCode::FTLJIT:
     2836    case JITType::DFGJIT:
     2837    case JITType::FTLJIT:
    28382838        return jitCode()->dfgCommon()->frameRegisterCount;
    28392839#endif // ENABLE(DFG_JIT)
     
    31763176{
    31773177    Optional<unsigned> bytecodeOffset;
    3178     JITCode::JITType jitType = this->jitType();
    3179     if (jitType == JITCode::InterpreterThunk || jitType == JITCode::BaselineJIT) {
     3178    JITType jitType = this->jitType();
     3179    if (jitType == JITType::InterpreterThunk || jitType == JITType::BaselineJIT) {
    31803180#if USE(JSVALUE64)
    31813181        bytecodeOffset = callSiteIndex.bits();
     
    31843184        bytecodeOffset = this->bytecodeOffset(instruction);
    31853185#endif
    3186     } else if (jitType == JITCode::DFGJIT || jitType == JITCode::FTLJIT) {
     3186    } else if (jitType == JITType::DFGJIT || jitType == JITType::FTLJIT) {
    31873187#if ENABLE(DFG_JIT)
    31883188        RELEASE_ASSERT(canGetCodeOrigin(callSiteIndex));
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r243467 r244764  
    143143    CString sourceCodeForTools() const; // Not quite the actual source we parsed; this will do things like prefix the source for a function with a reified signature.
    144144    CString sourceCodeOnOneLine() const; // As sourceCodeForTools(), but replaces all whitespace runs with a single space.
    145     void dumpAssumingJITType(PrintStream&, JITCode::JITType) const;
     145    void dumpAssumingJITType(PrintStream&, JITType) const;
    146146    JS_EXPORT_PRIVATE void dump(PrintStream&) const;
    147147
     
    403403    RefPtr<JITCode> jitCode() { return m_jitCode; }
    404404    static ptrdiff_t jitCodeOffset() { return OBJECT_OFFSETOF(CodeBlock, m_jitCode); }
    405     JITCode::JITType jitType() const
     405    JITType jitType() const
    406406    {
    407407        JITCode* jitCode = m_jitCode.get();
    408408        WTF::loadLoadFence();
    409         JITCode::JITType result = JITCode::jitTypeFor(jitCode);
     409        JITType result = JITCode::jitTypeFor(jitCode);
    410410        WTF::loadLoadFence(); // This probably isn't needed. Oh well, paranoia is good.
    411411        return result;
     
    414414    bool hasBaselineJITProfiling() const
    415415    {
    416         return jitType() == JITCode::BaselineJIT;
     416        return jitType() == JITType::BaselineJIT;
    417417    }
    418418   
     
    424424    DFG::CapabilityLevel capabilityLevelState() { return static_cast<DFG::CapabilityLevel>(m_capabilityLevelState); }
    425425
    426     bool hasOptimizedReplacement(JITCode::JITType typeToReplace);
     426    bool hasOptimizedReplacement(JITType typeToReplace);
    427427    bool hasOptimizedReplacement(); // the typeToReplace is my JITType
    428428#endif
  • trunk/Source/JavaScriptCore/bytecode/CodeBlockWithJITType.h

    r206525 r244764  
    3535class CodeBlockWithJITType {
    3636public:
    37     CodeBlockWithJITType(CodeBlock* codeBlock, JITCode::JITType jitType)
     37    CodeBlockWithJITType(CodeBlock* codeBlock, JITType jitType)
    3838        : m_codeBlock(codeBlock)
    3939        , m_jitType(jitType)
     
    4747private:
    4848    CodeBlock* m_codeBlock;
    49     JITCode::JITType m_jitType;
     49    JITType m_jitType;
    5050};
    5151
  • trunk/Source/JavaScriptCore/bytecode/DeferredSourceDump.cpp

    r235684 r244764  
    3535DeferredSourceDump::DeferredSourceDump(CodeBlock* codeBlock)
    3636    : m_codeBlock(*codeBlock->vm(), codeBlock)
    37     , m_rootJITType(JITCode::None)
     37    , m_rootJITType(JITType::None)
    3838{
    3939}
    4040
    41 DeferredSourceDump::DeferredSourceDump(CodeBlock* codeBlock, CodeBlock* rootCodeBlock, JITCode::JITType rootJITType, unsigned callerBytecodeIndex)
     41DeferredSourceDump::DeferredSourceDump(CodeBlock* codeBlock, CodeBlock* rootCodeBlock, JITType rootJITType, unsigned callerBytecodeIndex)
    4242    : m_codeBlock(*codeBlock->vm(), codeBlock)
    4343    , m_rootCodeBlock(*codeBlock->vm(), rootCodeBlock)
  • trunk/Source/JavaScriptCore/bytecode/DeferredSourceDump.h

    r243232 r244764  
    3636public:
    3737    DeferredSourceDump(CodeBlock*);
    38     DeferredSourceDump(CodeBlock*, CodeBlock* rootCodeBlock, JITCode::JITType rootJITType, unsigned callerBytecodeIndex);
     38    DeferredSourceDump(CodeBlock*, CodeBlock* rootCodeBlock, JITType rootJITType, unsigned callerBytecodeIndex);
    3939
    4040    void dump();
     
    4343    Strong<CodeBlock> m_codeBlock;
    4444    Strong<CodeBlock> m_rootCodeBlock;
    45     JITCode::JITType m_rootJITType;
     45    JITType m_rootJITType;
    4646    unsigned m_callerBytecodeIndex { UINT_MAX };
    4747};
  • trunk/Source/JavaScriptCore/bytecode/ExitingJITType.h

    r206525 r244764  
    3636};
    3737
    38 inline ExitingJITType exitingJITTypeFor(JITCode::JITType type)
     38inline ExitingJITType exitingJITTypeFor(JITType type)
    3939{
    4040    switch (type) {
    41     case JITCode::DFGJIT:
     41    case JITType::DFGJIT:
    4242        return ExitFromDFG;
    43     case JITCode::FTLJIT:
     43    case JITType::FTLJIT:
    4444        return ExitFromFTL;
    4545    default:
  • trunk/Source/JavaScriptCore/bytecode/InlineCallFrame.h

    r243232 r244764  
    241241inline CodeBlock* baselineCodeBlockForOriginAndBaselineCodeBlock(const CodeOrigin& codeOrigin, CodeBlock* baselineCodeBlock)
    242242{
    243     ASSERT(baselineCodeBlock->jitType() == JITCode::BaselineJIT);
     243    ASSERT(baselineCodeBlock->jitType() == JITType::BaselineJIT);
    244244    auto* inlineCallFrame = codeOrigin.inlineCallFrame();
    245245    if (inlineCallFrame)
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r244324 r244764  
    70957095        Vector<DeferredSourceDump>& deferredSourceDump = m_graph.m_plan.callback()->ensureDeferredSourceDump();
    70967096        if (inlineCallFrame()) {
    7097             DeferredSourceDump dump(codeBlock->baselineVersion(), m_codeBlock, JITCode::DFGJIT, inlineCallFrame()->directCaller.bytecodeIndex());
     7097            DeferredSourceDump dump(codeBlock->baselineVersion(), m_codeBlock, JITType::DFGJIT, inlineCallFrame()->directCaller.bytecodeIndex());
    70987098            deferredSourceDump.append(dump);
    70997099        } else
     
    71057105        if (inlineCallFrame()) {
    71067106            dataLog(
    7107                 " for inlining at ", CodeBlockWithJITType(m_codeBlock, JITCode::DFGJIT),
     7107                " for inlining at ", CodeBlockWithJITType(m_codeBlock, JITType::DFGJIT),
    71087108                " ", inlineCallFrame()->directCaller);
    71097109        }
  • trunk/Source/JavaScriptCore/dfg/DFGDisassembler.cpp

    r230748 r244764  
    7575void Disassembler::dumpHeader(PrintStream& out, LinkBuffer& linkBuffer)
    7676{
    77     out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITCode::DFGJIT), ", instruction count = ", m_graph.m_codeBlock->instructionCount(), ":\n");
     77    out.print("Generated DFG JIT code for ", CodeBlockWithJITType(m_graph.m_codeBlock, JITType::DFGJIT), ", instruction count = ", m_graph.m_codeBlock->instructionCount(), ":\n");
    7878    out.print("    Optimized with execution counter = ", m_graph.m_profiledBlock->jitExecuteCounter(), "\n");
    7979    out.print("    Code at [", RawPointer(linkBuffer.debugAddress()), ", ", RawPointer(static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.size()), "):\n");
  • trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp

    r242192 r244764  
    8282    ASSERT(codeBlock);
    8383    ASSERT(codeBlock->alternative());
    84     ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
    85     ASSERT(!profiledDFGCodeBlock || profiledDFGCodeBlock->jitType() == JITCode::DFGJIT);
     84    ASSERT(codeBlock->alternative()->jitType() == JITType::BaselineJIT);
     85    ASSERT(!profiledDFGCodeBlock || profiledDFGCodeBlock->jitType() == JITType::DFGJIT);
    8686   
    8787    if (logCompilationChanges(mode))
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp

    r244193 r244764  
    526526   
    527527    out.print("\n");
    528     out.print("DFG for ", CodeBlockWithJITType(m_codeBlock, JITCode::DFGJIT), ":\n");
     528    out.print("DFG for ", CodeBlockWithJITType(m_codeBlock, JITType::DFGJIT), ":\n");
    529529    out.print("  Fixpoint state: ", m_fixpointState, "; Form: ", m_form, "; Unification state: ", m_unificationState, "; Ref count state: ", m_refCountState, "\n");
    530530    if (m_form == SSA) {
  • trunk/Source/JavaScriptCore/dfg/DFGJITCode.cpp

    r242192 r244764  
    3737
    3838JITCode::JITCode()
    39     : DirectJITCode(DFGJIT)
     39    : DirectJITCode(JITType::DFGJIT)
    4040#if ENABLE(FTL_JIT)
    4141    , osrEntryRetry(0)
     
    124124bool JITCode::checkIfOptimizationThresholdReached(CodeBlock* codeBlock)
    125125{
    126     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     126    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    127127    return tierUpCounter.checkIfThresholdCrossedAndSet(codeBlock);
    128128}
     
    130130void JITCode::optimizeNextInvocation(CodeBlock* codeBlock)
    131131{
    132     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     132    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    133133    if (Options::verboseOSR())
    134134        dataLog(*codeBlock, ": FTL-optimizing next invocation.\n");
     
    138138void JITCode::dontOptimizeAnytimeSoon(CodeBlock* codeBlock)
    139139{
    140     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     140    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    141141    if (Options::verboseOSR())
    142142        dataLog(*codeBlock, ": Not FTL-optimizing anytime soon.\n");
     
    146146void JITCode::optimizeAfterWarmUp(CodeBlock* codeBlock)
    147147{
    148     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     148    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    149149    if (Options::verboseOSR())
    150150        dataLog(*codeBlock, ": FTL-optimizing after warm-up.\n");
     
    157157void JITCode::optimizeSoon(CodeBlock* codeBlock)
    158158{
    159     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     159    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    160160    if (Options::verboseOSR())
    161161        dataLog(*codeBlock, ": FTL-optimizing soon.\n");
     
    168168void JITCode::forceOptimizationSlowPathConcurrently(CodeBlock* codeBlock)
    169169{
    170     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     170    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    171171    if (Options::verboseOSR())
    172172        dataLog(*codeBlock, ": Forcing slow path concurrently for FTL entry.\n");
     
    177177    CodeBlock* codeBlock, CompilationResult result)
    178178{
    179     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     179    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    180180    switch (result) {
    181181    case CompilationSuccessful:
  • trunk/Source/JavaScriptCore/dfg/DFGJITFinalizer.cpp

    r241560 r244764  
    5757bool JITFinalizer::finalize()
    5858{
    59     MacroAssemblerCodeRef<JSEntryPtrTag> codeRef = FINALIZE_DFG_CODE(*m_linkBuffer, JSEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITCode::DFGJIT)).data());
     59    MacroAssemblerCodeRef<JSEntryPtrTag> codeRef = FINALIZE_DFG_CODE(*m_linkBuffer, JSEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITType::DFGJIT)).data());
    6060    m_jitCode->initializeCodeRefForDFG(codeRef, codeRef.code());
    6161
     
    7171    RELEASE_ASSERT(!m_withArityCheck.isEmptyValue());
    7272    m_jitCode->initializeCodeRefForDFG(
    73         FINALIZE_DFG_CODE(*m_linkBuffer, JSEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITCode::DFGJIT)).data()),
     73        FINALIZE_DFG_CODE(*m_linkBuffer, JSEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITType::DFGJIT)).data()),
    7474        m_withArityCheck);
    7575    m_plan.codeBlock()->setJITCode(m_jitCode.copyRef());
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp

    r243596 r244764  
    9797    ASSERT(JITCode::isOptimizingJIT(codeBlock->jitType()));
    9898    ASSERT(codeBlock->alternative());
    99     ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
     99    ASSERT(codeBlock->alternative()->jitType() == JITType::BaselineJIT);
    100100    ASSERT(!codeBlock->jitCodeMap());
    101101
     
    116116        codeBlock->ownerExecutable()->setDidTryToEnterInLoop(true);
    117117   
    118     if (codeBlock->jitType() != JITCode::DFGJIT) {
    119         RELEASE_ASSERT(codeBlock->jitType() == JITCode::FTLJIT);
     118    if (codeBlock->jitType() != JITType::DFGJIT) {
     119        RELEASE_ASSERT(codeBlock->jitType() == JITType::FTLJIT);
    120120       
    121121        // When will this happen? We could have:
     
    342342MacroAssemblerCodePtr<ExceptionHandlerPtrTag> prepareCatchOSREntry(ExecState* exec, CodeBlock* codeBlock, unsigned bytecodeIndex)
    343343{
    344     ASSERT(codeBlock->jitType() == JITCode::DFGJIT || codeBlock->jitType() == JITCode::FTLJIT);
    345 
    346     if (!Options::useOSREntryToDFG() && codeBlock->jitCode()->jitType() == JITCode::DFGJIT)
    347         return nullptr;
    348     if (!Options::useOSREntryToFTL() && codeBlock->jitCode()->jitType() == JITCode::FTLJIT)
     344    ASSERT(codeBlock->jitType() == JITType::DFGJIT || codeBlock->jitType() == JITType::FTLJIT);
     345
     346    if (!Options::useOSREntryToDFG() && codeBlock->jitCode()->jitType() == JITType::DFGJIT)
     347        return nullptr;
     348    if (!Options::useOSREntryToFTL() && codeBlock->jitCode()->jitType() == JITType::FTLJIT)
    349349        return nullptr;
    350350
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp

    r243959 r244764  
    352352    CodeBlock* codeBlock = exec->codeBlock();
    353353    ASSERT(codeBlock);
    354     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     354    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    355355
    356356    // It's sort of preferable that we don't GC while in here. Anyways, doing so wouldn't
     
    376376
    377377        CodeBlock* baselineCodeBlock = codeBlock->baselineAlternative();
    378         ASSERT(baselineCodeBlock->jitType() == JITCode::BaselineJIT);
     378        ASSERT(baselineCodeBlock->jitType() == JITType::BaselineJIT);
    379379
    380380        SpeculationRecovery* recovery = nullptr;
     
    446446    OSRExitState& exitState = *exit.exitState.get();
    447447    CodeBlock* baselineCodeBlock = exitState.baselineCodeBlock;
    448     ASSERT(baselineCodeBlock->jitType() == JITCode::BaselineJIT);
     448    ASSERT(baselineCodeBlock->jitType() == JITType::BaselineJIT);
    449449
    450450    Operands<ValueRecovery>& operands = exitState.operands;
     
    753753    // in presence of inlined tail calls.
    754754    // https://bugs.webkit.org/show_bug.cgi?id=147511
    755     ASSERT(outermostBaselineCodeBlock->jitType() == JITCode::BaselineJIT);
     755    ASSERT(outermostBaselineCodeBlock->jitType() == JITType::BaselineJIT);
    756756    frame.setOperand<CodeBlock*>(CallFrameSlot::codeBlock, outermostBaselineCodeBlock);
    757757
     
    10361036    CodeBlock* codeBlock = exec->codeBlock();
    10371037    ASSERT(codeBlock);
    1038     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     1038    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    10391039
    10401040    // It's sort of preferable that we don't GC while in here. Anyways, doing so wouldn't
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp

    r243286 r244764  
    117117    int32_t clippedValue;
    118118    switch (jit.codeBlock()->jitType()) {
    119     case JITCode::DFGJIT:
     119    case JITType::DFGJIT:
    120120        clippedValue = BaselineExecutionCounter::clippedThreshold(jit.codeBlock()->globalObject(), targetValue);
    121121        break;
    122     case JITCode::FTLJIT:
     122    case JITType::FTLJIT:
    123123        clippedValue = UpperTierExecutionCounter::clippedThreshold(jit.codeBlock()->globalObject(), targetValue);
    124124        break;
     
    142142    // in presence of inlined tail calls.
    143143    // https://bugs.webkit.org/show_bug.cgi?id=147511
    144     ASSERT(jit.baselineCodeBlock()->jitType() == JITCode::BaselineJIT);
     144    ASSERT(jit.baselineCodeBlock()->jitType() == JITType::BaselineJIT);
    145145    jit.storePtr(AssemblyHelpers::TrustedImmPtr(jit.baselineCodeBlock()), AssemblyHelpers::addressFor((VirtualRegister)CallFrameSlot::codeBlock));
    146146
     
    311311    CodeBlock* codeBlockForExit = jit.baselineCodeBlockFor(exit.m_codeOrigin);
    312312    ASSERT(codeBlockForExit == codeBlockForExit->baselineVersion());
    313     ASSERT(codeBlockForExit->jitType() == JITCode::BaselineJIT);
     313    ASSERT(codeBlockForExit->jitType() == JITType::BaselineJIT);
    314314    CodeLocationLabel<JSEntryPtrTag> codeLocation = codeBlockForExit->jitCodeMap().find(exit.m_codeOrigin.bytecodeIndex());
    315315    ASSERT(codeLocation);
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.h

    r242100 r244764  
    4242
    4343template <typename JITCodeType>
    44 void adjustFrameAndStackInOSRExitCompilerThunk(MacroAssembler& jit, VM* vm, JITCode::JITType jitType)
     44void adjustFrameAndStackInOSRExitCompilerThunk(MacroAssembler& jit, VM* vm, JITType jitType)
    4545{
    46     ASSERT(jitType == JITCode::DFGJIT || jitType == JITCode::FTLJIT);
     46    ASSERT(jitType == JITType::DFGJIT || jitType == JITType::FTLJIT);
    4747
    48     bool isFTLOSRExit = jitType == JITCode::FTLJIT;
     48    bool isFTLOSRExit = jitType == JITType::FTLJIT;
    4949    RegisterSet registersToPreserve;
    5050    registersToPreserve.set(GPRInfo::regT0);
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r244067 r244764  
    31683168    sanitizeStackForVM(vm);
    31693169
    3170     if (codeBlock->jitType() != JITCode::DFGJIT) {
     3170    if (codeBlock->jitType() != JITType::DFGJIT) {
    31713171        dataLog("Unexpected code block in DFG->FTL tier-up: ", *codeBlock, "\n");
    31723172        RELEASE_ASSERT_NOT_REACHED();
     
    34343434    sanitizeStackForVM(vm);
    34353435
    3436     if (codeBlock->jitType() != JITCode::DFGJIT) {
     3436    if (codeBlock->jitType() != JITType::DFGJIT) {
    34373437        dataLog("Unexpected code block in DFG->FTL trigger tier up now in loop: ", *codeBlock, "\n");
    34383438        RELEASE_ASSERT_NOT_REACHED();
     
    34683468    sanitizeStackForVM(vm);
    34693469
    3470     if (codeBlock->jitType() != JITCode::DFGJIT) {
     3470    if (codeBlock->jitType() != JITType::DFGJIT) {
    34713471        dataLog("Unexpected code block in DFG->FTL tier-up: ", *codeBlock, "\n");
    34723472        RELEASE_ASSERT_NOT_REACHED();
  • trunk/Source/JavaScriptCore/dfg/DFGThunks.cpp

    r230748 r244764  
    5454
    5555    // This needs to happen before we use the scratch buffer because this function also uses the scratch buffer.
    56     adjustFrameAndStackInOSRExitCompilerThunk<DFG::JITCode>(jit, vm, JITCode::DFGJIT);
     56    adjustFrameAndStackInOSRExitCompilerThunk<DFG::JITCode>(jit, vm, JITType::DFGJIT);
    5757   
    5858    size_t scratchSize = sizeof(EncodedJSValue) * (GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters);
  • trunk/Source/JavaScriptCore/dfg/DFGVariableEventStream.cpp

    r243232 r244764  
    120120    unsigned index, Operands<ValueRecovery>& valueRecoveries, Vector<UndefinedOperandSpan>* undefinedOperandSpans) const
    121121{
    122     ASSERT(codeBlock->jitType() == JITCode::DFGJIT);
     122    ASSERT(codeBlock->jitType() == JITType::DFGJIT);
    123123    CodeBlock* baselineCodeBlock = codeBlock->baselineVersion();
    124124
  • trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp

    r234178 r244764  
    8080        std::make_unique<RegisterAtOffsetList>(state.proc->calleeSaveRegisterAtOffsetList());
    8181    if (shouldDumpDisassembly())
    82         dataLog("Unwind info for ", CodeBlockWithJITType(codeBlock, JITCode::FTLJIT), ": ", *registerOffsets, "\n");
     82        dataLog("Unwind info for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ": ", *registerOffsets, "\n");
    8383    codeBlock->setCalleeSaveRegisters(WTFMove(registerOffsets));
    8484    ASSERT(!(state.proc->frameSize() % sizeof(EncodedJSValue)));
     
    169169        PrintStream& out = WTF::dataFile();
    170170
    171         out.print("Generated ", state.graph.m_plan.mode(), " code for ", CodeBlockWithJITType(state.graph.m_codeBlock, JITCode::FTLJIT), ", instruction count = ", state.graph.m_codeBlock->instructionCount(), ":\n");
     171        out.print("Generated ", state.graph.m_plan.mode(), " code for ", CodeBlockWithJITType(state.graph.m_codeBlock, JITType::FTLJIT), ", instruction count = ", state.graph.m_codeBlock->instructionCount(), ":\n");
    172172
    173173        LinkBuffer& linkBuffer = *state.finalizer->b3CodeLinkBuffer;
  • trunk/Source/JavaScriptCore/ftl/FTLJITCode.cpp

    r239427 r244764  
    3737
    3838JITCode::JITCode()
    39     : JSC::JITCode(FTLJIT)
     39    : JSC::JITCode(JITType::FTLJIT)
    4040{
    4141}
  • trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp

    r234178 r244764  
    7676    MacroAssemblerCodeRef<JSEntryPtrTag> b3CodeRef =
    7777        FINALIZE_CODE_IF(dumpDisassembly, *b3CodeLinkBuffer, JSEntryPtrTag,
    78             "FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITCode::FTLJIT)).data());
     78            "FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITType::FTLJIT)).data());
    7979
    8080    MacroAssemblerCodeRef<JSEntryPtrTag> arityCheckCodeRef = entrypointLinkBuffer
    8181        ? FINALIZE_CODE_IF(dumpDisassembly, *entrypointLinkBuffer, JSEntryPtrTag,
    82             "FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITCode::FTLJIT)).data(), function)
     82            "FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITType::FTLJIT)).data(), function)
    8383        : MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(b3CodeRef.code());
    8484
  • trunk/Source/JavaScriptCore/ftl/FTLLink.cpp

    r241222 r244764  
    7272        compilation->addDescription(
    7373            Profiler::OriginStack(),
    74             toCString("Generated FTL JIT code for ", CodeBlockWithJITType(codeBlock, JITCode::FTLJIT), ", instruction count = ", graph.m_codeBlock->instructionCount(), ":\n"));
     74            toCString("Generated FTL JIT code for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ", instruction count = ", graph.m_codeBlock->instructionCount(), ":\n"));
    7575       
    7676        graph.ensureSSADominators();
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp

    r243959 r244764  
    507507   
    508508    ASSERT(codeBlock);
    509     ASSERT(codeBlock->jitType() == JITCode::FTLJIT);
     509    ASSERT(codeBlock->jitType() == JITType::FTLJIT);
    510510   
    511511    // It's sort of preferable that we don't GC while in here. Anyways, doing so wouldn't
  • trunk/Source/JavaScriptCore/ftl/FTLThunks.cpp

    r243254 r244764  
    5454    if (frameAndStackAdjustmentRequirement == FrameAndStackAdjustmentRequirement::Needed) {
    5555        // This needs to happen before we use the scratch buffer because this function also uses the scratch buffer.
    56         adjustFrameAndStackInOSRExitCompilerThunk<FTL::JITCode>(jit, vm, JITCode::FTLJIT);
     56        adjustFrameAndStackInOSRExitCompilerThunk<FTL::JITCode>(jit, vm, JITType::FTLJIT);
    5757    }
    5858   
  • trunk/Source/JavaScriptCore/interpreter/CallFrame.cpp

    r243232 r244764  
    5353    ASSERT(codeBlock());
    5454    switch (codeBlock()->jitType()) {
    55     case JITCode::InterpreterThunk:
    56     case JITCode::BaselineJIT:
     55    case JITType::InterpreterThunk:
     56    case JITType::BaselineJIT:
    5757        return true;
    58     case JITCode::None:
    59     case JITCode::HostCallThunk:
     58    case JITType::None:
     59    case JITType::HostCallThunk:
    6060        RELEASE_ASSERT_NOT_REACHED();
    6161        return false;
     
    7272    ASSERT(codeBlock());
    7373    switch (codeBlock()->jitType()) {
    74     case JITCode::DFGJIT:
    75     case JITCode::FTLJIT:
     74    case JITType::DFGJIT:
     75    case JITType::FTLJIT:
    7676        return true;
    77     case JITCode::None:
    78     case JITCode::HostCallThunk:
     77    case JITType::None:
     78    case JITType::HostCallThunk:
    7979        RELEASE_ASSERT_NOT_REACHED();
    8080        return false;
  • trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp

    r244088 r244764  
    493493                    out.print(indent, "callSiteIndex: ", callSiteIndex.bits(), " of ", codeBlock->codeOrigins().size(), "\n");
    494494
    495                     JITCode::JITType jitType = codeBlock->jitType();
    496                     if (jitType != JITCode::FTLJIT) {
     495                    JITType jitType = codeBlock->jitType();
     496                    if (jitType != JITType::FTLJIT) {
    497497                        JITCode* jitCode = codeBlock->jitCode().get();
    498498                        out.print(indent, "jitCode: ", RawPointer(jitCode),
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r244433 r244764  
    5858            ASSERT(m_baselineCodeBlock);
    5959            ASSERT(!m_baselineCodeBlock->alternative());
    60             ASSERT(m_baselineCodeBlock->jitType() == JITCode::None || JITCode::isBaselineCode(m_baselineCodeBlock->jitType()));
     60            ASSERT(m_baselineCodeBlock->jitType() == JITType::None || JITCode::isBaselineCode(m_baselineCodeBlock->jitType()));
    6161        }
    6262    }
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r241222 r244764  
    904904    CodeRef<JSEntryPtrTag> result = FINALIZE_CODE(
    905905        patchBuffer, JSEntryPtrTag,
    906         "Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data());
     906        "Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITType::BaselineJIT)).data());
    907907   
    908908    m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT->add(
     
    912912    m_codeBlock->shrinkToFit(CodeBlock::LateShrink);
    913913    m_codeBlock->setJITCode(
    914         adoptRef(*new DirectJITCode(result, withArityCheck, JITCode::BaselineJIT)));
     914        adoptRef(*new DirectJITCode(result, withArityCheck, JITType::BaselineJIT)));
    915915
    916916    if (JITInternal::verbose)
  • trunk/Source/JavaScriptCore/jit/JITCode.cpp

    r242928 r244764  
    4646{
    4747    switch (jitType) {
    48     case None:
     48    case JITType::None:
    4949        return "None";
    50     case HostCallThunk:
     50    case JITType::HostCallThunk:
    5151        return "Host";
    52     case InterpreterThunk:
     52    case JITType::InterpreterThunk:
    5353        return "LLInt";
    54     case BaselineJIT:
     54    case JITType::BaselineJIT:
    5555        return "Baseline";
    56     case DFGJIT:
     56    case JITType::DFGJIT:
    5757        return "DFG";
    58     case FTLJIT:
     58    case JITType::FTLJIT:
    5959        return "FTL";
    6060    default:
     
    242242namespace WTF {
    243243
    244 void printInternal(PrintStream& out, JSC::JITCode::JITType type)
     244void printInternal(PrintStream& out, JSC::JITType type)
    245245{
    246246    out.print(JSC::JITCode::typeName(type));
  • trunk/Source/JavaScriptCore/jit/JITCode.h

    r242928 r244764  
    5252class VM;
    5353
     54enum class JITType : uint8_t {
     55    None,
     56    HostCallThunk,
     57    InterpreterThunk,
     58    BaselineJIT,
     59    DFGJIT,
     60    FTLJIT
     61};
     62
    5463class JITCode : public ThreadSafeRefCounted<JITCode> {
    5564public:
     
    5766    template<PtrTag tag> using CodeRef = MacroAssemblerCodeRef<tag>;
    5867
    59     enum JITType : uint8_t {
    60         None,
    61         HostCallThunk,
    62         InterpreterThunk,
    63         BaselineJIT,
    64         DFGJIT,
    65         FTLJIT
    66     };
    67    
    6868    static const char* typeName(JITType);
    6969
    7070    static JITType bottomTierJIT()
    7171    {
    72         return BaselineJIT;
     72        return JITType::BaselineJIT;
    7373    }
    7474   
    7575    static JITType topTierJIT()
    7676    {
    77         return FTLJIT;
     77        return JITType::FTLJIT;
    7878    }
    7979   
     
    8181    {
    8282        switch (jitType) {
    83         case BaselineJIT:
    84             return DFGJIT;
    85         case DFGJIT:
    86             return FTLJIT;
     83        case JITType::BaselineJIT:
     84            return JITType::DFGJIT;
     85        case JITType::DFGJIT:
     86            return JITType::FTLJIT;
    8787        default:
    8888            RELEASE_ASSERT_NOT_REACHED();
    89             return None;
     89            return JITType::None;
    9090        }
    9191    }
     
    9494    {
    9595        switch (jitType) {
    96         case None:
    97         case HostCallThunk:
     96        case JITType::None:
     97        case JITType::HostCallThunk:
    9898            return false;
    9999        default:
     
    105105    {
    106106        switch (jitType) {
    107         case InterpreterThunk:
    108         case BaselineJIT:
     107        case JITType::InterpreterThunk:
     108        case JITType::BaselineJIT:
    109109            return true;
    110110        default:
     
    116116    {
    117117        switch (jitType) {
    118         case BaselineJIT:
    119         case DFGJIT:
    120         case FTLJIT:
     118        case JITType::BaselineJIT:
     119        case JITType::DFGJIT:
     120        case JITType::FTLJIT:
    121121            return true;
    122122        default:
     
    149149    static bool isOptimizingJIT(JITType jitType)
    150150    {
    151         return jitType == DFGJIT || jitType == FTLJIT;
     151        return jitType == JITType::DFGJIT || jitType == JITType::FTLJIT;
    152152    }
    153153   
    154154    static bool isBaselineCode(JITType jitType)
    155155    {
    156         return jitType == InterpreterThunk || jitType == BaselineJIT;
     156        return jitType == JITType::InterpreterThunk || jitType == JITType::BaselineJIT;
    157157    }
    158158
     
    179179    {
    180180        if (!jitCode)
    181             return None;
     181            return JITType::None;
    182182        return jitCode->jitType();
    183183    }
     
    279279
    280280class PrintStream;
    281 void printInternal(PrintStream&, JSC::JITCode::JITType);
     281void printInternal(PrintStream&, JSC::JITType);
    282282
    283283} // namespace WTF
  • trunk/Source/JavaScriptCore/jit/JITDisassembler.cpp

    r237547 r244764  
    9090void JITDisassembler::dumpHeader(PrintStream& out, LinkBuffer& linkBuffer)
    9191{
    92     out.print("Generated Baseline JIT code for ", CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT), ", instruction count = ", m_codeBlock->instructionCount(), "\n");
     92    out.print("Generated Baseline JIT code for ", CodeBlockWithJITType(m_codeBlock, JITType::BaselineJIT), ", instruction count = ", m_codeBlock->instructionCount(), "\n");
    9393    out.print("   Source: ", m_codeBlock->sourceCodeOnOneLine(), "\n");
    9494    out.print("   Code at [", RawPointer(linkBuffer.debugAddress()), ", ", RawPointer(static_cast<char*>(linkBuffer.debugAddress()) + linkBuffer.size()), "):\n");
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r244211 r244764  
    14281428   
    14291429    CodeBlock* codeBlock = exec->codeBlock();
    1430     if (UNLIKELY(codeBlock->jitType() != JITCode::BaselineJIT)) {
     1430    if (UNLIKELY(codeBlock->jitType() != JITType::BaselineJIT)) {
    14311431        dataLog("Unexpected code block in Baseline->DFG tier-up: ", *codeBlock, "\n");
    14321432        RELEASE_ASSERT_NOT_REACHED();
     
    16611661
    16621662    switch (optimizedReplacement->jitType()) {
    1663     case JITCode::DFGJIT:
    1664     case JITCode::FTLJIT: {
     1663    case JITType::DFGJIT:
     1664    case JITType::FTLJIT: {
    16651665        MacroAssemblerCodePtr<ExceptionHandlerPtrTag> entry = DFG::prepareCatchOSREntry(exec, optimizedReplacement, bytecodeIndex);
    16661666        return entry.executableAddress<char*>();
     
    16831683
    16841684    switch (optimizedReplacement->jitType()) {
    1685     case JITCode::DFGJIT:
    1686     case JITCode::FTLJIT: {
     1685    case JITType::DFGJIT:
     1686    case JITType::FTLJIT: {
    16871687        MacroAssemblerCodePtr<ExceptionHandlerPtrTag> entry = DFG::prepareCatchOSREntry(exec, optimizedReplacement, bytecodeIndex);
    16881688        return entry.executableAddress<char*>();
  • trunk/Source/JavaScriptCore/jit/JITThunks.cpp

    r241037 r244764  
    125125    if (generator) {
    126126        MacroAssemblerCodeRef<JSEntryPtrTag> entry = generator(vm).retagged<JSEntryPtrTag>();
    127         forCall = adoptRef(new DirectJITCode(entry, entry.code(), JITCode::HostCallThunk, intrinsic));
     127        forCall = adoptRef(new DirectJITCode(entry, entry.code(), JITType::HostCallThunk, intrinsic));
    128128    } else if (signature)
    129         forCall = adoptRef(new NativeDOMJITCode(MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(ctiNativeCall(vm).retagged<JSEntryPtrTag>()), JITCode::HostCallThunk, intrinsic, signature));
     129        forCall = adoptRef(new NativeDOMJITCode(MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(ctiNativeCall(vm).retagged<JSEntryPtrTag>()), JITType::HostCallThunk, intrinsic, signature));
    130130    else
    131         forCall = adoptRef(new NativeJITCode(MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(ctiNativeCall(vm).retagged<JSEntryPtrTag>()), JITCode::HostCallThunk, intrinsic));
     131        forCall = adoptRef(new NativeJITCode(MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(ctiNativeCall(vm).retagged<JSEntryPtrTag>()), JITType::HostCallThunk, intrinsic));
    132132   
    133     Ref<JITCode> forConstruct = adoptRef(*new NativeJITCode(MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(ctiNativeConstruct(vm).retagged<JSEntryPtrTag>()), JITCode::HostCallThunk, NoIntrinsic));
     133    Ref<JITCode> forConstruct = adoptRef(*new NativeJITCode(MacroAssemblerCodeRef<JSEntryPtrTag>::createSelfManagedCodeRef(ctiNativeConstruct(vm).retagged<JSEntryPtrTag>()), JITType::HostCallThunk, NoIntrinsic));
    134134   
    135135    NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall.releaseNonNull(), function, WTFMove(forConstruct), constructor, name);
  • trunk/Source/JavaScriptCore/jit/JITToDFGDeferredCompilationCallback.cpp

    r241222 r244764  
    4646{
    4747    ASSERT_UNUSED(profiledDFGCodeBlock, !profiledDFGCodeBlock);
    48     ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
     48    ASSERT(codeBlock->alternative()->jitType() == JITType::BaselineJIT);
    4949   
    5050    if (Options::verboseOSR())
     
    5858{
    5959    ASSERT(!profiledDFGCodeBlock);
    60     ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT);
     60    ASSERT(codeBlock->alternative()->jitType() == JITType::BaselineJIT);
    6161   
    6262    if (Options::verboseOSR())
  • trunk/Source/JavaScriptCore/jit/JITWorklist.cpp

    r241582 r244764  
    232232{
    233233    DeferGC deferGC(codeBlock->vm()->heap);
    234     RELEASE_ASSERT(codeBlock->jitType() == JITCode::InterpreterThunk);
     234    RELEASE_ASSERT(codeBlock->jitType() == JITType::InterpreterThunk);
    235235   
    236236    if (codeBlock->m_didFailJITCompilation) {
     
    285285    VM* vm = codeBlock->vm();
    286286    DeferGC deferGC(vm->heap);
    287     if (codeBlock->jitType() != JITCode::InterpreterThunk)
     287    if (codeBlock->jitType() != JITType::InterpreterThunk)
    288288        return;
    289289   
     
    301301   
    302302    // Now it might be compiled!
    303     if (codeBlock->jitType() != JITCode::InterpreterThunk)
     303    if (codeBlock->jitType() != JITType::InterpreterThunk)
    304304        return;
    305305   
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r244711 r244764  
    7373    FunctionPtr<OperationPtrTag> target = MacroAssembler::readCallTarget<OperationPtrTag>(call);
    7474#if ENABLE(FTL_JIT)
    75     if (codeBlock->jitType() == JITCode::FTLJIT) {
     75    if (codeBlock->jitType() == JITType::FTLJIT) {
    7676        MacroAssemblerCodePtr<JITThunkPtrTag> thunk = MacroAssemblerCodePtr<OperationPtrTag>::createFromExecutableAddress(target.executableAddress()).retagged<JITThunkPtrTag>();
    7777        return codeBlock->vm()->ftlThunks->keyForSlowPathCallThunk(thunk).callTarget().retagged<CFunctionPtrTag>();
     
    8686{
    8787#if ENABLE(FTL_JIT)
    88     if (codeBlock->jitType() == JITCode::FTLJIT) {
     88    if (codeBlock->jitType() == JITType::FTLJIT) {
    8989        VM& vm = *codeBlock->vm();
    9090        FTL::Thunks& thunks = *vm.ftlThunks;
  • trunk/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp

    r244088 r244764  
    5252                auto callRef = functionForCallEntryThunk().retagged<JSEntryPtrTag>();
    5353                auto callArityCheckRef = functionForCallArityCheckThunk().retaggedCode<JSEntryPtrTag>();
    54                 jitCode = new DirectJITCode(callRef, callArityCheckRef, JITCode::InterpreterThunk, JITCode::ShareAttribute::Shared);
     54                jitCode = new DirectJITCode(callRef, callArityCheckRef, JITType::InterpreterThunk, JITCode::ShareAttribute::Shared);
    5555            });
    5656
     
    6565            auto constructRef = functionForConstructEntryThunk().retagged<JSEntryPtrTag>();
    6666            auto constructArityCheckRef = functionForConstructArityCheckThunk().retaggedCode<JSEntryPtrTag>();
    67             jitCode = new DirectJITCode(constructRef, constructArityCheckRef, JITCode::InterpreterThunk, JITCode::ShareAttribute::Shared);
     67            jitCode = new DirectJITCode(constructRef, constructArityCheckRef, JITType::InterpreterThunk, JITCode::ShareAttribute::Shared);
    6868        });
    6969
     
    7777        static std::once_flag onceKey;
    7878        std::call_once(onceKey, [&] {
    79             jitCode = new DirectJITCode(getCodeRef<JSEntryPtrTag>(llint_function_for_call_prologue), getCodePtr<JSEntryPtrTag>(llint_function_for_call_arity_check), JITCode::InterpreterThunk, JITCode::ShareAttribute::Shared);
     79            jitCode = new DirectJITCode(getCodeRef<JSEntryPtrTag>(llint_function_for_call_prologue), getCodePtr<JSEntryPtrTag>(llint_function_for_call_arity_check), JITType::InterpreterThunk, JITCode::ShareAttribute::Shared);
    8080        });
    8181        codeBlock->setJITCode(makeRef(*jitCode));
     
    8484        static std::once_flag onceKey;
    8585        std::call_once(onceKey, [&] {
    86             jitCode = new DirectJITCode(getCodeRef<JSEntryPtrTag>(llint_function_for_construct_prologue), getCodePtr<JSEntryPtrTag>(llint_function_for_construct_arity_check), JITCode::InterpreterThunk, JITCode::ShareAttribute::Shared);
     86            jitCode = new DirectJITCode(getCodeRef<JSEntryPtrTag>(llint_function_for_construct_prologue), getCodePtr<JSEntryPtrTag>(llint_function_for_construct_arity_check), JITType::InterpreterThunk, JITCode::ShareAttribute::Shared);
    8787        });
    8888        codeBlock->setJITCode(makeRef(*jitCode));
     
    9898        std::call_once(onceKey, [&] {
    9999            MacroAssemblerCodeRef<JSEntryPtrTag> codeRef = evalEntryThunk().retagged<JSEntryPtrTag>();
    100             jitCode = new NativeJITCode(codeRef, JITCode::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
     100            jitCode = new NativeJITCode(codeRef, JITType::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
    101101        });
    102102        codeBlock->setJITCode(makeRef(*jitCode));
     
    108108    static std::once_flag onceKey;
    109109    std::call_once(onceKey, [&] {
    110         jitCode = new NativeJITCode(getCodeRef<JSEntryPtrTag>(llint_eval_prologue), JITCode::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
     110        jitCode = new NativeJITCode(getCodeRef<JSEntryPtrTag>(llint_eval_prologue), JITType::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
    111111    });
    112112    codeBlock->setJITCode(makeRef(*jitCode));
     
    121121        std::call_once(onceKey, [&] {
    122122            MacroAssemblerCodeRef<JSEntryPtrTag> codeRef = programEntryThunk().retagged<JSEntryPtrTag>();
    123             jitCode = new NativeJITCode(codeRef, JITCode::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
     123            jitCode = new NativeJITCode(codeRef, JITType::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
    124124        });
    125125        codeBlock->setJITCode(makeRef(*jitCode));
     
    131131    static std::once_flag onceKey;
    132132    std::call_once(onceKey, [&] {
    133         jitCode = new NativeJITCode(getCodeRef<JSEntryPtrTag>(llint_program_prologue), JITCode::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
     133        jitCode = new NativeJITCode(getCodeRef<JSEntryPtrTag>(llint_program_prologue), JITType::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
    134134    });
    135135    codeBlock->setJITCode(makeRef(*jitCode));
     
    144144        std::call_once(onceKey, [&] {
    145145            MacroAssemblerCodeRef<JSEntryPtrTag> codeRef = moduleProgramEntryThunk().retagged<JSEntryPtrTag>();
    146             jitCode = new NativeJITCode(codeRef, JITCode::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
     146            jitCode = new NativeJITCode(codeRef, JITType::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
    147147        });
    148148        codeBlock->setJITCode(makeRef(*jitCode));
     
    154154    static std::once_flag onceKey;
    155155    std::call_once(onceKey, [&] {
    156         jitCode = new NativeJITCode(getCodeRef<JSEntryPtrTag>(llint_module_program_prologue), JITCode::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
     156        jitCode = new NativeJITCode(getCodeRef<JSEntryPtrTag>(llint_module_program_prologue), JITType::InterpreterThunk, Intrinsic::NoIntrinsic, JITCode::ShareAttribute::Shared);
    157157    });
    158158    codeBlock->setJITCode(makeRef(*jitCode));
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r243560 r244764  
    384384   
    385385    switch (codeBlock->jitType()) {
    386     case JITCode::BaselineJIT: {
     386    case JITType::BaselineJIT: {
    387387        if (Options::verboseOSR())
    388388            dataLogF("    Code was already compiled.\n");
     
    390390        return true;
    391391    }
    392     case JITCode::InterpreterThunk: {
     392    case JITType::InterpreterThunk: {
    393393        JITWorklist::ensureGlobalWorklist().compileLater(codeBlock, loopOSREntryBytecodeOffset);
    394         return codeBlock->jitType() == JITCode::BaselineJIT;
     394        return codeBlock->jitType() == JITType::BaselineJIT;
    395395    }
    396396    default:
     
    481481    CODEBLOCK_LOG_EVENT(codeBlock, "osrEntry", ("at bc#", loopOSREntryBytecodeOffset));
    482482
    483     ASSERT(codeBlock->jitType() == JITCode::BaselineJIT);
     483    ASSERT(codeBlock->jitType() == JITType::BaselineJIT);
    484484
    485485    const JITCodeMap& codeMap = codeBlock->jitCodeMap();
  • trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp

    r243232 r244764  
    591591                // by ignoring it.
    592592                unsigned bytecodeIndex = 0;
    593                 if (topCodeBlock->jitType() == JITCode::InterpreterThunk || topCodeBlock->jitType() == JITCode::BaselineJIT) {
     593                if (topCodeBlock->jitType() == JITType::InterpreterThunk || topCodeBlock->jitType() == JITType::BaselineJIT) {
    594594                    bool isValidPC;
    595595                    unsigned bits;
  • trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h

    r242812 r244764  
    109109            unsigned bytecodeIndex { std::numeric_limits<unsigned>::max() };
    110110            CodeBlockHash codeBlockHash;
    111             JITCode::JITType jitType { JITCode::None };
     111            JITType jitType { JITType::None };
    112112        };
    113113
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r244505 r244764  
    690690    static std::once_flag onceKey;
    691691    std::call_once(onceKey, [&] {
    692         result = new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITCode::HostCallThunk, NoIntrinsic);
     692        result = new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITType::HostCallThunk, NoIntrinsic);
    693693    });
    694694    return makeRef(*result);
     
    700700    static std::once_flag onceKey;
    701701    std::call_once(onceKey, [&] {
    702         result = new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_construct_trampoline), JITCode::HostCallThunk, NoIntrinsic);
     702        result = new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_construct_trampoline), JITType::HostCallThunk, NoIntrinsic);
    703703    });
    704704    return makeRef(*result);
  • trunk/Source/JavaScriptCore/tools/CodeProfile.cpp

    r240718 r244764  
    8383        else {
    8484            CodeBlock* codeBlock = static_cast<CodeBlock*>(ownerUID);
    85             if (codeBlock->jitType() == JITCode::DFGJIT)
     85            if (codeBlock->jitType() == JITType::DFGJIT)
    8686                type = DFGJIT;
    8787            else if (!canCompile(codeBlock->capabilityLevelState()))
  • trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp

    r242999 r244764  
    13011301    CallerFrameJITTypeFunctor()
    13021302        : m_currentFrame(0)
    1303         , m_jitType(JITCode::None)
     1303        , m_jitType(JITType::None)
    13041304    {
    13051305    }
     
    13141314    }
    13151315   
    1316     JITCode::JITType jitType() { return m_jitType; }
     1316    JITType jitType() { return m_jitType; }
    13171317
    13181318private:
    13191319    mutable unsigned m_currentFrame;
    1320     mutable JITCode::JITType m_jitType;
     1320    mutable JITType m_jitType;
    13211321};
    13221322
     
    13451345    CallerFrameJITTypeFunctor functor;
    13461346    exec->iterate(functor);
    1347     return JSValue::encode(jsBoolean(functor.jitType() == JITCode::InterpreterThunk));
     1347    return JSValue::encode(jsBoolean(functor.jitType() == JITType::InterpreterThunk));
    13481348}
    13491349
     
    13561356    CallerFrameJITTypeFunctor functor;
    13571357    exec->iterate(functor);
    1358     return JSValue::encode(jsBoolean(functor.jitType() == JITCode::BaselineJIT));
     1358    return JSValue::encode(jsBoolean(functor.jitType() == JITType::BaselineJIT));
    13591359}
    13601360
Note: See TracChangeset for help on using the changeset viewer.