Changeset 236381 in webkit


Ignore:
Timestamp:
Sep 21, 2018, 10:26:44 PM (7 years ago)
Author:
yusukesuzuki@slowstart.org
Message:

[JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
https://bugs.webkit.org/show_bug.cgi?id=189778

Reviewed by Keith Miller.

.:

ENABLE_SAMPLING_PROFILER does not depend on ENABLE_JIT now since it can be
used with LLInt ASM interpreter.

  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

LLInt ASM interpreter is 2x and 15% faster than CLoop interpreter on
Linux and macOS respectively. We would like to enable it for non JIT
configurations in X86_64 and ARM64.

This patch enables LLInt for non JIT builds in X86_64 and ARM64 architectures.
Previously, we switch LLInt ASM interpreter and CLoop by using ENABLE(JIT)
configuration. But it is wrong in the new scenario since we have a build
configuration that uses LLInt ASM interpreter and JIT is disabled. We introduce
ENABLE(C_LOOP) option, which represents that we use CLoop. And we replace
ENABLE(JIT) with ENABLE(C_LOOP) if the previous ENABLE(JIT) is essentially just
related to LLInt ASM interpreter and not related to JIT.

We also replace some ENABLE(JIT) configurations with ENABLE(ASSEMBLER).
ENABLE(ASSEMBLER) is now enabled even if we disable JIT since MacroAssembler
has machine register information that is used in LLInt ASM interpreter.

  • API/tests/PingPongStackOverflowTest.cpp:

(testPingPongStackOverflow):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MaxFrameExtentForSlowPathCall.h:
  • bytecode/CallReturnOffsetToBytecodeOffset.h: Removed. It is no longer used.
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::calleeSaveRegisters const):
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters):
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters):
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):

  • bytecode/Opcode.h:

(JSC::padOpcodeName):

  • heap/Heap.cpp:

(JSC::Heap::gatherJSStackRoots):
(JSC::Heap::stopThePeriphery):

  • interpreter/CLoopStack.cpp:
  • interpreter/CLoopStack.h:
  • interpreter/CLoopStackInlines.h:
  • interpreter/EntryFrame.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::Interpreter):
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • interpreter/Interpreter.h:
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegisters):

  • interpreter/VMEntryRecord.h:
  • jit/ExecutableAllocator.h:
  • jit/FPRInfo.h:

(WTF::printInternal):

  • jit/GPRInfo.cpp:
  • jit/GPRInfo.h:

(WTF::printInternal):

  • jit/HostCallReturnValue.cpp:

(JSC::getHostCallReturnValueWithExecState): Moved. They are used in LLInt ASM interpreter too.

  • jit/HostCallReturnValue.h:
  • jit/JITOperations.cpp:

(JSC::getHostCallReturnValueWithExecState): Deleted.

  • jit/JITOperationsMSVC64.cpp:
  • jit/Reg.cpp:
  • jit/Reg.h:
  • jit/RegisterAtOffset.cpp:
  • jit/RegisterAtOffset.h:
  • jit/RegisterAtOffsetList.cpp:
  • jit/RegisterAtOffsetList.h:
  • jit/RegisterMap.h:
  • jit/RegisterSet.cpp:
  • jit/RegisterSet.h:
  • jit/TempRegisterSet.cpp:
  • jit/TempRegisterSet.h:
  • llint/LLIntCLoop.cpp:
  • llint/LLIntCLoop.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):
(JSC::LLInt::Data::performAssertions):

  • llint/LLIntData.h:
  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntOpcode.h:
  • llint/LLIntPCRanges.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LLIntThunks.cpp:
  • llint/LowLevelInterpreter.cpp:
  • llint/LowLevelInterpreter.h:
  • runtime/JSCJSValue.h:
  • runtime/MachineContext.h:
  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::processUnverifiedStackTraces): Enable SamplingProfiler
for LLInt ASM interpreter with non JIT configuration.

  • runtime/TestRunnerUtils.cpp:

(JSC::optimizeNextInvocation):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::getHostFunction):
(JSC::VM::updateSoftReservedZoneSize):
(JSC::sanitizeStackForVM):
(JSC::VM::committedStackByteCount):

  • runtime/VM.h:
  • runtime/VMInlines.h:

(JSC::VM::ensureStackCapacityFor):
(JSC::VM::isSafeToRecurseSoft const):

Source/WTF:

This patch adds ENABLE(C_LOOP) which indicates we use CLoop as the interpreter.
Previously, we used !ENABLE(JIT) for this configuration. But now, we have
a build configuration that has LLInt ASM interpreter (not CLoop) and !ENABLE(JIT).

We enable LLInt ASM interpreter for non JIT environment in X86_64 and ARM64 architectures.
And we enable ENABLE(ASSEMBLER) for non JIT environment since it offers machine register
information which is used for LLInt and SamplingProfiler.

  • wtf/Platform.h:
Location:
trunk
Files:
1 deleted
59 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r236321 r236381  
     12018-09-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
     2
     3        [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
     4        https://bugs.webkit.org/show_bug.cgi?id=189778
     5
     6        Reviewed by Keith Miller.
     7
     8        ENABLE_SAMPLING_PROFILER does not depend on ENABLE_JIT now since it can be
     9        used with LLInt ASM interpreter.
     10
     11        * Source/cmake/WebKitFeatures.cmake:
     12
    1132018-09-21  Mike Gorse  <mgorse@suse.com>
    214
  • trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp

    r236032 r236381  
    128128    Options::softReservedZoneSize() = 128 * KB;
    129129    Options::reservedZoneSize() = 64 * KB;
    130 #if ENABLE(JIT)
     130#if ENABLE(C_LOOP)
    131131    // Normally, we want to disable the LLINT to force the use of JITted code which is necessary for
    132132    // reproducing the regression in https://bugs.webkit.org/show_bug.cgi?id=148749. However, we only
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r236005 r236381  
    232232
    233233    if (NOT ENABLE_JIT)
    234         set(OFFLINE_ASM_BACKEND "C_LOOP")
     234        if (ENABLE_C_LOOP)
     235            set(OFFLINE_ASM_BACKEND "C_LOOP")
     236        endif ()
    235237    endif ()
    236238endif ()
     
    265267# running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
    266268# after every asm.rb run.
    267 if (MSVC AND ENABLE_JIT)
     269if (MSVC AND NOT ENABLE_C_LOOP)
    268270    set(LLIntOutput LowLevelInterpreterWin.asm)
    269271    set(OFFLINE_ASM_ARGS --assembler=MASM)
     
    285287# files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
    286288# since it is used in the add_library() call at the end of this file.
    287 if (MSVC AND ENABLE_JIT)
     289if (MSVC AND NOT ENABLE_C_LOOP)
    288290    enable_language(ASM_MASM)
    289291    if (CMAKE_SIZEOF_VOID_P EQUAL 4)
     
    11831185
    11841186if (WTF_CPU_X86_64)
    1185     if (MSVC AND ENABLE_JIT)
     1187    if (MSVC AND NOT ENABLE_C_LOOP)
    11861188        add_custom_command(
    11871189            OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
  • trunk/Source/JavaScriptCore/ChangeLog

    r236372 r236381  
     12018-09-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
     2
     3        [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
     4        https://bugs.webkit.org/show_bug.cgi?id=189778
     5
     6        Reviewed by Keith Miller.
     7
     8        LLInt ASM interpreter is 2x and 15% faster than CLoop interpreter on
     9        Linux and macOS respectively. We would like to enable it for non JIT
     10        configurations in X86_64 and ARM64.
     11
     12        This patch enables LLInt for non JIT builds in X86_64 and ARM64 architectures.
     13        Previously, we switch LLInt ASM interpreter and CLoop by using ENABLE(JIT)
     14        configuration. But it is wrong in the new scenario since we have a build
     15        configuration that uses LLInt ASM interpreter and JIT is disabled. We introduce
     16        ENABLE(C_LOOP) option, which represents that we use CLoop. And we replace
     17        ENABLE(JIT) with ENABLE(C_LOOP) if the previous ENABLE(JIT) is essentially just
     18        related to LLInt ASM interpreter and not related to JIT.
     19
     20        We also replace some ENABLE(JIT) configurations with ENABLE(ASSEMBLER).
     21        ENABLE(ASSEMBLER) is now enabled even if we disable JIT since MacroAssembler
     22        has machine register information that is used in LLInt ASM interpreter.
     23
     24        * API/tests/PingPongStackOverflowTest.cpp:
     25        (testPingPongStackOverflow):
     26        * CMakeLists.txt:
     27        * JavaScriptCore.xcodeproj/project.pbxproj:
     28        * assembler/MaxFrameExtentForSlowPathCall.h:
     29        * bytecode/CallReturnOffsetToBytecodeOffset.h: Removed. It is no longer used.
     30        * bytecode/CodeBlock.cpp:
     31        (JSC::CodeBlock::finishCreation):
     32        * bytecode/CodeBlock.h:
     33        (JSC::CodeBlock::calleeSaveRegisters const):
     34        (JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters):
     35        (JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters):
     36        (JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):
     37        * bytecode/Opcode.h:
     38        (JSC::padOpcodeName):
     39        * heap/Heap.cpp:
     40        (JSC::Heap::gatherJSStackRoots):
     41        (JSC::Heap::stopThePeriphery):
     42        * interpreter/CLoopStack.cpp:
     43        * interpreter/CLoopStack.h:
     44        * interpreter/CLoopStackInlines.h:
     45        * interpreter/EntryFrame.h:
     46        * interpreter/Interpreter.cpp:
     47        (JSC::Interpreter::Interpreter):
     48        (JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):
     49        * interpreter/Interpreter.h:
     50        * interpreter/StackVisitor.cpp:
     51        (JSC::StackVisitor::Frame::calleeSaveRegisters):
     52        * interpreter/VMEntryRecord.h:
     53        * jit/ExecutableAllocator.h:
     54        * jit/FPRInfo.h:
     55        (WTF::printInternal):
     56        * jit/GPRInfo.cpp:
     57        * jit/GPRInfo.h:
     58        (WTF::printInternal):
     59        * jit/HostCallReturnValue.cpp:
     60        (JSC::getHostCallReturnValueWithExecState): Moved. They are used in LLInt ASM interpreter too.
     61        * jit/HostCallReturnValue.h:
     62        * jit/JITOperations.cpp:
     63        (JSC::getHostCallReturnValueWithExecState): Deleted.
     64        * jit/JITOperationsMSVC64.cpp:
     65        * jit/Reg.cpp:
     66        * jit/Reg.h:
     67        * jit/RegisterAtOffset.cpp:
     68        * jit/RegisterAtOffset.h:
     69        * jit/RegisterAtOffsetList.cpp:
     70        * jit/RegisterAtOffsetList.h:
     71        * jit/RegisterMap.h:
     72        * jit/RegisterSet.cpp:
     73        * jit/RegisterSet.h:
     74        * jit/TempRegisterSet.cpp:
     75        * jit/TempRegisterSet.h:
     76        * llint/LLIntCLoop.cpp:
     77        * llint/LLIntCLoop.h:
     78        * llint/LLIntData.cpp:
     79        (JSC::LLInt::initialize):
     80        (JSC::LLInt::Data::performAssertions):
     81        * llint/LLIntData.h:
     82        * llint/LLIntOfflineAsmConfig.h:
     83        * llint/LLIntOpcode.h:
     84        * llint/LLIntPCRanges.h:
     85        * llint/LLIntSlowPaths.cpp:
     86        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
     87        * llint/LLIntSlowPaths.h:
     88        * llint/LLIntThunks.cpp:
     89        * llint/LowLevelInterpreter.cpp:
     90        * llint/LowLevelInterpreter.h:
     91        * runtime/JSCJSValue.h:
     92        * runtime/MachineContext.h:
     93        * runtime/SamplingProfiler.cpp:
     94        (JSC::SamplingProfiler::processUnverifiedStackTraces): Enable SamplingProfiler
     95        for LLInt ASM interpreter with non JIT configuration.
     96        * runtime/TestRunnerUtils.cpp:
     97        (JSC::optimizeNextInvocation):
     98        * runtime/VM.cpp:
     99        (JSC::VM::VM):
     100        (JSC::VM::getHostFunction):
     101        (JSC::VM::updateSoftReservedZoneSize):
     102        (JSC::sanitizeStackForVM):
     103        (JSC::VM::committedStackByteCount):
     104        * runtime/VM.h:
     105        * runtime/VMInlines.h:
     106        (JSC::VM::ensureStackCapacityFor):
     107        (JSC::VM::isSafeToRecurseSoft const):
     108
    11092018-09-21  Keith Miller  <keith_miller@apple.com>
    2110
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r236372 r236381  
    110110                0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
    111111                0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
    112                 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */; settings = {ATTRIBUTES = (Private, ); }; };
    113112                0F0CAEFC1EC4DA6B00970D12 /* JSHeapFinalizerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CAEFA1EC4DA6200970D12 /* JSHeapFinalizerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    114113                0F0CAEFF1EC4DA8800970D12 /* HeapFinalizerCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CAEFE1EC4DA8500970D12 /* HeapFinalizerCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    20132012                0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallLinkInfo.cpp; sourceTree = "<group>"; };
    20142013                0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallLinkInfo.h; sourceTree = "<group>"; };
    2015                 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallReturnOffsetToBytecodeOffset.h; sourceTree = "<group>"; };
    20162014                0F0CAEF91EC4DA6200970D12 /* JSHeapFinalizerPrivate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHeapFinalizerPrivate.cpp; sourceTree = "<group>"; };
    20172015                0F0CAEFA1EC4DA6200970D12 /* JSHeapFinalizerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHeapFinalizerPrivate.h; sourceTree = "<group>"; };
     
    76357633                                627673211B680C1E00FD9F2E /* CallMode.cpp */,
    76367634                                627673221B680C1E00FD9F2E /* CallMode.h */,
    7637                                 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */,
    76387635                                0F3B7E2419A11B8000D9BC56 /* CallVariant.cpp */,
    76397636                                0F3B7E2519A11B8000D9BC56 /* CallVariant.h */,
     
    84848481                                0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */,
    84858482                                627673241B680C1E00FD9F2E /* CallMode.h in Headers */,
    8486                                 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */,
    84878483                                0F3B7E2B19A11B8000D9BC56 /* CallVariant.h in Headers */,
    84888484                                FE80C1971D775CDD008510C0 /* CatchScope.h in Headers */,
  • trunk/Source/JavaScriptCore/assembler/MaxFrameExtentForSlowPathCall.h

    r210232 r236381  
    3636// from JS code.
    3737
    38 #if !ENABLE(JIT)
     38#if !ENABLE(ASSEMBLER)
    3939static const size_t maxFrameExtentForSlowPathCall = 0;
    4040
     
    7070COMPILE_ASSERT(!(maxFrameExtentForSlowPathCall % sizeof(Register)), extent_must_be_in_multiples_of_registers);
    7171
    72 #if ENABLE(JIT)
     72#if ENABLE(ASSEMBLER)
    7373// Make sure that cfr - maxFrameExtentForSlowPathCall bytes will make the stack pointer aligned
    7474COMPILE_ASSERT((maxFrameExtentForSlowPathCall % 16) == 16 - sizeof(CallerFrameAndPC), extent_must_align_stack_from_callframe_pointer);
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r234501 r236381  
    9090#include <wtf/text/UniquedStringImpl.h>
    9191
    92 #if ENABLE(JIT)
     92#if ENABLE(ASSEMBLER)
    9393#include "RegisterAtOffsetList.h"
    9494#endif
     
    510510        m_objectAllocationProfiles = RefCountedArray<ObjectAllocationProfile>(size);
    511511
    512 #if ENABLE(JIT)
     512#if !ENABLE(C_LOOP)
    513513    setCalleeSaveRegisters(RegisterSet::llintBaselineCalleeSaveRegisters());
    514514#endif
     
    21462146}
    21472147
    2148 #if ENABLE(JIT)
     2148#if !ENABLE(C_LOOP)
    21492149void CodeBlock::setCalleeSaveRegisters(RegisterSet calleeSaveRegisters)
    21502150{
     
    21732173    return roundCalleeSaveSpaceAsVirtualRegisters(m_calleeSaveRegisters->size());
    21742174}
     2175#endif
     2176
     2177#if ENABLE(JIT)
    21752178
    21762179void CodeBlock::countReoptimization()
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r234086 r236381  
    646646    JS_EXPORT_PRIVATE unsigned reoptimizationRetryCounter() const;
    647647    void countReoptimization();
    648 #if ENABLE(JIT)
     648
     649#if !ENABLE(C_LOOP)
     650    void setCalleeSaveRegisters(RegisterSet);
     651    void setCalleeSaveRegisters(std::unique_ptr<RegisterAtOffsetList>);
     652
     653    RegisterAtOffsetList* calleeSaveRegisters() const { return m_calleeSaveRegisters.get(); }
     654
    649655    static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return RegisterSet::llintBaselineCalleeSaveRegisters().numberOfSetRegisters(); }
    650656    static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters();
    651657    size_t calleeSaveSpaceAsVirtualRegisters();
    652 
     658#else
     659    static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return 0; }
     660    static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters() { return 0; };
     661    size_t calleeSaveSpaceAsVirtualRegisters() { return 0; }
     662#endif
     663
     664#if ENABLE(JIT)
    653665    unsigned numberOfDFGCompiles();
    654666
     
    740752    bool shouldReoptimizeFromLoopNow();
    741753
    742     void setCalleeSaveRegisters(RegisterSet);
    743     void setCalleeSaveRegisters(std::unique_ptr<RegisterAtOffsetList>);
    744    
    745     RegisterAtOffsetList* calleeSaveRegisters() const { return m_calleeSaveRegisters.get(); }
    746754#else // No JIT
    747     static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return 0; }
    748     static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters() { return 0; };
    749     size_t calleeSaveSpaceAsVirtualRegisters() { return 0; }
    750755    void optimizeAfterWarmUp() { }
    751756    unsigned numberOfDFGCompiles() { return 0; }
     
    966971    StructureWatchpointMap m_llintGetByIdWatchpointMap;
    967972    PoisonedRefPtr<CodeBlockPoison, JITCode> m_jitCode;
     973#if !ENABLE(C_LOOP)
     974    std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters;
     975#endif
    968976#if ENABLE(JIT)
    969     std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters;
    970977    PoisonedBag<CodeBlockPoison, StructureStubInfo> m_stubInfos;
    971978    PoisonedBag<CodeBlockPoison, JITAddIC> m_addICs;
  • trunk/Source/JavaScriptCore/bytecode/Opcode.h

    r235935 r236381  
    5959
    6060const int maxOpcodeLength = 9;
    61 #if !ENABLE(JIT)
     61#if ENABLE(C_LOOP)
    6262const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_CLOOP_BYTECODE_HELPER_IDS + NUMBER_OF_BYTECODE_HELPER_IDS;
    6363#else
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r235271 r236381  
    673673void Heap::gatherJSStackRoots(ConservativeRoots& roots)
    674674{
    675 #if !ENABLE(JIT)
     675#if ENABLE(C_LOOP)
    676676    m_vm->interpreter->cloopStack().gatherConservativeRoots(roots, *m_jitStubRoutines, *m_codeBlocks);
    677677#else
     
    16061606            setGCDidJIT();
    16071607    }
    1608 #else
     1608#endif // ENABLE(JIT)
    16091609    UNUSED_PARAM(conn);
    1610 #endif // ENABLE(JIT)
    16111610   
    16121611    vm()->shadowChicken().update(*vm(), vm()->topCallFrame);
  • trunk/Source/JavaScriptCore/interpreter/CLoopStack.cpp

    r230303 r236381  
    3030#include "CLoopStack.h"
    3131
    32 #if !ENABLE(JIT)
     32#if ENABLE(C_LOOP)
    3333
    3434#include "CLoopStackInlines.h"
     
    164164} // namespace JSC
    165165
    166 #endif // !ENABLE(JIT)
     166#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/interpreter/CLoopStack.h

    r225140 r236381  
    2929#pragma once
    3030
    31 #if !ENABLE(JIT)
     31#if ENABLE(C_LOOP)
    3232
    3333#include "Register.h"
     
    108108} // namespace JSC
    109109
    110 #endif // !ENABLE(JIT)
     110#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/interpreter/CLoopStackInlines.h

    r225140 r236381  
    2626#pragma once
    2727
    28 #if !ENABLE(JIT)
     28#if ENABLE(C_LOOP)
    2929
    3030#include "CLoopStack.h"
     
    6060} // namespace JSC
    6161
    62 #endif // !ENABLE(JIT)
     62#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/interpreter/EntryFrame.h

    r235419 r236381  
    3232
    3333struct EntryFrame {
    34 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
     34#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
    3535    static ptrdiff_t vmEntryRecordOffset()
    3636    {
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r235450 r236381  
    6868#include "RegExpObject.h"
    6969#include "Register.h"
     70#include "RegisterAtOffsetList.h"
    7071#include "ScopedArguments.h"
    7172#include "StackAlignment.h"
     
    333334Interpreter::Interpreter(VM& vm)
    334335    : m_vm(vm)
    335 #if !ENABLE(JIT)
     336#if ENABLE(C_LOOP)
    336337    , m_cloopStack(vm)
    337338#endif
     
    564565    void copyCalleeSavesToEntryFrameCalleeSavesBuffer(StackVisitor& visitor) const
    565566    {
    566 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
     567#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
    567568        RegisterAtOffsetList* currentCalleeSaves = visitor->calleeSaveRegisters();
    568569
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.h

    r235450 r236381  
    3737#include <wtf/HashMap.h>
    3838
    39 #if !ENABLE(JIT)
     39#if ENABLE(C_LOOP)
    4040#include "CLoopStack.h"
    4141#endif
     
    9494        ~Interpreter();
    9595       
    96 #if !ENABLE(JIT)
     96#if ENABLE(C_LOOP)
    9797        CLoopStack& cloopStack() { return m_cloopStack; }
    9898#endif
     
    148148
    149149        VM& m_vm;
    150 #if !ENABLE(JIT)
     150#if ENABLE(C_LOOP)
    151151        CLoopStack m_cloopStack;
    152152#endif
  • trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp

    r235419 r236381  
    258258        return nullptr;
    259259
    260 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
     260#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
    261261
    262262#if ENABLE(WEBASSEMBLY)
     
    274274        return codeBlock->calleeSaveRegisters();
    275275
    276 #endif // ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
     276#endif // !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
    277277
    278278    return nullptr;
  • trunk/Source/JavaScriptCore/interpreter/VMEntryRecord.h

    r235419 r236381  
    4747    JSObject* callee() const { return m_callee; }
    4848
    49 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
     49#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
    5050    intptr_t calleeSaveRegistersBuffer[NUMBER_OF_CALLEE_SAVES_REGISTERS];
    5151#endif
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h

    r231175 r236381  
    146146#else
    147147inline bool isJITPC(void*) { return false; }
    148 #endif // ENABLE(JIT) && ENABLE(ASSEMBLER)
     148#endif // ENABLE(ASSEMBLER)
    149149
    150150
  • trunk/Source/JavaScriptCore/jit/FPRInfo.h

    r234984 r236381  
    3434static constexpr FPRReg InvalidFPRReg { FPRReg::InvalidFPRReg };
    3535
    36 #if ENABLE(JIT)
     36#if ENABLE(ASSEMBLER)
    3737
    3838#if CPU(X86) || CPU(X86_64)
     
    333333constexpr FPRInfo toInfoFromReg(FPRReg) { return FPRInfo(); }
    334334
    335 #endif // ENABLE(JIT)
     335#endif // ENABLE(ASSEMBLER)
    336336
    337337} // namespace JSC
     
    341341inline void printInternal(PrintStream& out, JSC::FPRReg reg)
    342342{
    343 #if ENABLE(JIT)
     343#if ENABLE(ASSEMBLER)
    344344    out.print("%", JSC::FPRInfo::debugName(reg));
    345345#else
  • trunk/Source/JavaScriptCore/jit/GPRInfo.cpp

    r199069 r236381  
    2727#include "GPRInfo.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(ASSEMBLER)
    3030
    3131namespace JSC {
     
    4949} // namespace JSC
    5050
    51 #endif // ENABLE(JIT)
     51#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/GPRInfo.h

    r234984 r236381  
    4242static constexpr GPRReg InvalidGPRReg { GPRReg::InvalidGPRReg };
    4343
    44 #if ENABLE(JIT)
     44#if ENABLE(ASSEMBLER)
    4545
    4646#if USE(JSVALUE64)
     
    817817constexpr GPRInfo toInfoFromReg(GPRReg) { return GPRInfo(); }
    818818
    819 #endif // ENABLE(JIT)
     819#endif // ENABLE(ASSEMBLER)
    820820
    821821} // namespace JSC
     
    825825inline void printInternal(PrintStream& out, JSC::GPRReg reg)
    826826{
    827 #if ENABLE(JIT)
     827#if ENABLE(ASSEMBLER)
    828828    out.print("%", JSC::GPRInfo::debugName(reg));
    829829#else
  • trunk/Source/JavaScriptCore/jit/HostCallReturnValue.cpp

    r163844 r236381  
    2727#include "HostCallReturnValue.h"
    2828
     29#if !ENABLE(C_LOOP)
     30
    2931#include "CallFrame.h"
    3032#include "JSCJSValueInlines.h"
     
    3638namespace JSC {
    3739
    38 // Nothing to see here.
     40// Note: getHostCallReturnValueWithExecState() needs to be placed before the
     41// definition of getHostCallReturnValue() below because the Windows build
     42// requires it.
     43extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec)
     44{
     45    if (!exec)
     46        return JSValue::encode(JSValue());
     47    return JSValue::encode(exec->vm().hostCallReturnValue);
     48}
     49
     50#if COMPILER(GCC_OR_CLANG) && CPU(X86_64)
     51asm (
     52".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     53HIDE_SYMBOL(getHostCallReturnValue) "\n"
     54SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
     55    "lea -8(%rsp), %rdi\n"
     56    "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
     57);
     58
     59#elif COMPILER(GCC_OR_CLANG) && CPU(X86)
     60asm (
     61".text" "\n" \
     62".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     63HIDE_SYMBOL(getHostCallReturnValue) "\n"
     64SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
     65    "push %ebp\n"
     66    "mov %esp, %eax\n"
     67    "leal -4(%esp), %esp\n"
     68    "push %eax\n"
     69    "call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
     70    "leal 8(%esp), %esp\n"
     71    "pop %ebp\n"
     72    "ret\n"
     73);
     74
     75#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2)
     76asm (
     77".text" "\n"
     78".align 2" "\n"
     79".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     80HIDE_SYMBOL(getHostCallReturnValue) "\n"
     81".thumb" "\n"
     82".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"
     83SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
     84    "sub r0, sp, #8" "\n"
     85    "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
     86);
     87
     88#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL)
     89asm (
     90".text" "\n"
     91".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     92HIDE_SYMBOL(getHostCallReturnValue) "\n"
     93INLINE_ARM_FUNCTION(getHostCallReturnValue)
     94SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
     95    "sub r0, sp, #8" "\n"
     96    "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
     97);
     98
     99#elif CPU(ARM64)
     100asm (
     101".text" "\n"
     102".align 2" "\n"
     103".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     104HIDE_SYMBOL(getHostCallReturnValue) "\n"
     105SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
     106     "sub x0, sp, #16" "\n"
     107     "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
     108);
     109
     110#elif COMPILER(GCC_OR_CLANG) && CPU(MIPS)
     111
     112#if WTF_MIPS_PIC
     113#define LOAD_FUNCTION_TO_T9(function) \
     114        ".set noreorder" "\n" \
     115        ".cpload $25" "\n" \
     116        ".set reorder" "\n" \
     117        "la $t9, " LOCAL_REFERENCE(function) "\n"
     118#else
     119#define LOAD_FUNCTION_TO_T9(function) "" "\n"
     120#endif
     121
     122asm (
     123".text" "\n"
     124".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     125HIDE_SYMBOL(getHostCallReturnValue) "\n"
     126SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
     127    LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState)
     128    "addi $a0, $sp, -8" "\n"
     129    "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
     130);
     131
     132#elif COMPILER(MSVC) && CPU(X86)
     133extern "C" {
     134    __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue()
     135    {
     136        __asm lea eax, [esp - 4]
     137        __asm mov [esp + 4], eax;
     138        __asm jmp getHostCallReturnValueWithExecState
     139    }
     140}
     141#endif
    39142
    40143} // namespace JSC
    41144
     145#endif // !ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/jit/HostCallReturnValue.h

    r218794 r236381  
    2828#include "JSCJSValue.h"
    2929
    30 #if ENABLE(JIT)
     30#if !ENABLE(C_LOOP)
    3131
    3232#if CALLING_CONVENTION_IS_STDCALL
     
    5858} // namespace JSC
    5959
    60 #endif // ENABLE(JIT)
     60#endif // !ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r235419 r236381  
    29092909} // extern "C"
    29102910
    2911 // Note: getHostCallReturnValueWithExecState() needs to be placed before the
    2912 // definition of getHostCallReturnValue() below because the Windows build
    2913 // requires it.
    2914 extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec)
    2915 {
    2916     if (!exec)
    2917         return JSValue::encode(JSValue());
    2918     return JSValue::encode(exec->vm().hostCallReturnValue);
    2919 }
    2920 
    2921 #if COMPILER(GCC_OR_CLANG) && CPU(X86_64)
    2922 asm (
    2923 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
    2924 HIDE_SYMBOL(getHostCallReturnValue) "\n"
    2925 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    2926     "lea -8(%rsp), %rdi\n"
    2927     "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
    2928 );
    2929 
    2930 #elif COMPILER(GCC_OR_CLANG) && CPU(X86)
    2931 asm (
    2932 ".text" "\n" \
    2933 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
    2934 HIDE_SYMBOL(getHostCallReturnValue) "\n"
    2935 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    2936     "push %ebp\n"
    2937     "mov %esp, %eax\n"
    2938     "leal -4(%esp), %esp\n"
    2939     "push %eax\n"
    2940     "call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
    2941     "leal 8(%esp), %esp\n"
    2942     "pop %ebp\n"
    2943     "ret\n"
    2944 );
    2945 
    2946 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2)
    2947 asm (
    2948 ".text" "\n"
    2949 ".align 2" "\n"
    2950 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
    2951 HIDE_SYMBOL(getHostCallReturnValue) "\n"
    2952 ".thumb" "\n"
    2953 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"
    2954 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    2955     "sub r0, sp, #8" "\n"
    2956     "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
    2957 );
    2958 
    2959 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL)
    2960 asm (
    2961 ".text" "\n"
    2962 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
    2963 HIDE_SYMBOL(getHostCallReturnValue) "\n"
    2964 INLINE_ARM_FUNCTION(getHostCallReturnValue)
    2965 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    2966     "sub r0, sp, #8" "\n"
    2967     "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
    2968 );
    2969 
    2970 #elif CPU(ARM64)
    2971 asm (
    2972 ".text" "\n"
    2973 ".align 2" "\n"
    2974 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
    2975 HIDE_SYMBOL(getHostCallReturnValue) "\n"
    2976 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    2977      "sub x0, sp, #16" "\n"
    2978      "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
    2979 );
    2980 
    2981 #elif COMPILER(GCC_OR_CLANG) && CPU(MIPS)
    2982 
    2983 #if WTF_MIPS_PIC
    2984 #define LOAD_FUNCTION_TO_T9(function) \
    2985         ".set noreorder" "\n" \
    2986         ".cpload $25" "\n" \
    2987         ".set reorder" "\n" \
    2988         "la $t9, " LOCAL_REFERENCE(function) "\n"
    2989 #else
    2990 #define LOAD_FUNCTION_TO_T9(function) "" "\n"
    2991 #endif
    2992 
    2993 asm (
    2994 ".text" "\n"
    2995 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
    2996 HIDE_SYMBOL(getHostCallReturnValue) "\n"
    2997 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
    2998     LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState)
    2999     "addi $a0, $sp, -8" "\n"
    3000     "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
    3001 );
    3002 
    3003 #elif COMPILER(MSVC) && CPU(X86)
    3004 extern "C" {
    3005     __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue()
    3006     {
    3007         __asm lea eax, [esp - 4]
    3008         __asm mov [esp + 4], eax;
    3009         __asm jmp getHostCallReturnValueWithExecState
    3010     }
    3011 }
    3012 #endif
    3013 
    30142911} // namespace JSC
    30152912
  • trunk/Source/JavaScriptCore/jit/JITOperationsMSVC64.cpp

    r163844 r236381  
    2626#include "config.h"
    2727
    28 #if !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)
     28#if ENABLE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64)
    2929
    3030#include "CallFrame.h"
     
    4444} // namespace JSC
    4545
    46 #endif // !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)
     46#endif // ENABLE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64)
  • trunk/Source/JavaScriptCore/jit/Reg.cpp

    r201783 r236381  
    2727#include "Reg.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(ASSEMBLER)
    3030
    3131#include "FPRInfo.h"
     
    5555} // namespace JSC
    5656
    57 #endif // ENABLE(JIT)
     57#endif // ENABLE(ASSEMBLER)
    5858
  • trunk/Source/JavaScriptCore/jit/Reg.h

    r206525 r236381  
    2626#pragma once
    2727
    28 #if ENABLE(JIT)
     28#if ENABLE(ASSEMBLER)
    2929
    3030#include "MacroAssembler.h"
     
    246246} // namespace WTF
    247247
    248 #endif // ENABLE(JIT)
     248#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/RegisterAtOffset.cpp

    r195365 r236381  
    2727#include "RegisterAtOffset.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(ASSEMBLER)
    3030
    3131namespace JSC {
     
    4242} // namespace JSC
    4343
    44 #endif // ENABLE(JIT)
     44#endif // ENABLE(ASSEMBLER)
    4545
  • trunk/Source/JavaScriptCore/jit/RegisterAtOffset.h

    r206525 r236381  
    2626#pragma once
    2727
    28 #if ENABLE(JIT)
     28#if ENABLE(ASSEMBLER)
    2929
    3030#include "Reg.h"
     
    7575} // namespace JSC
    7676
    77 #endif // ENABLE(JIT)
     77#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp

    r199758 r236381  
    2727#include "RegisterAtOffsetList.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(ASSEMBLER)
    3030
    3131#include <wtf/ListDump.h>
     
    6969} // namespace JSC
    7070
    71 #endif // ENABLE(JIT)
     71#endif // ENABLE(ASSEMBLER)
    7272
  • trunk/Source/JavaScriptCore/jit/RegisterAtOffsetList.h

    r215292 r236381  
    2626#pragma once
    2727
    28 #if ENABLE(JIT)
     28#if ENABLE(ASSEMBLER)
    2929
    3030#include "RegisterAtOffset.h"
     
    7070} // namespace JSC
    7171
    72 #endif // ENABLE(JIT)
     72#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/RegisterMap.h

    r206525 r236381  
    2626#pragma once
    2727
    28 #if ENABLE(JIT)
     28#if ENABLE(ASSEMBLER)
    2929
    3030#include "FPRInfo.h"
     
    108108} // namespace JSC
    109109
    110 #endif // ENABLE(JIT)
     110#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/RegisterSet.cpp

    r231961 r236381  
    2727#include "RegisterSet.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(ASSEMBLER)
    3030
    3131#include "GPRInfo.h"
     
    396396} // namespace JSC
    397397
    398 #endif // ENABLE(JIT)
    399 
     398#endif // ENABLE(ASSEMBLER)
     399
  • trunk/Source/JavaScriptCore/jit/RegisterSet.h

    r230517 r236381  
    2626#pragma once
    2727
    28 #if ENABLE(JIT)
     28#if !ENABLE(C_LOOP)
    2929
    3030#include "GPRInfo.h"
     
    247247} // namespace WTF
    248248
    249 #endif // ENABLE(JIT)
     249#endif // !ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/jit/TempRegisterSet.cpp

    r165021 r236381  
    2727#include "TempRegisterSet.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(ASSEMBLER)
    3030
    31 #include "JSCInlines.h"
    3231#include "RegisterSet.h"
    3332
     
    5251} // namespace JSC
    5352
    54 #endif // ENABLE(JIT)
     53#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/TempRegisterSet.h

    r206525 r236381  
    2626#pragma once
    2727
    28 #if ENABLE(JIT)
     28#if ENABLE(ASSEMBLER)
    2929
    3030#include "FPRInfo.h"
     
    206206} // namespace JSC
    207207
    208 #else // ENABLE(JIT) -> so if JIT is disabled
     208#else // ENABLE(ASSEMBLER) -> so if JIT is disabled
    209209
    210210namespace JSC {
     
    217217} // namespace JSC
    218218
    219 #endif // ENABLE(JIT)
     219#endif // ENABLE(ASSEMBLER)
  • trunk/Source/JavaScriptCore/llint/LLIntCLoop.cpp

    r170147 r236381  
    2727#include "LLIntCLoop.h"
    2828
    29 #if !ENABLE(JIT)
     29#if ENABLE(C_LOOP)
    3030
    3131#include "LLIntData.h"
     
    4242} // namespace JSC
    4343
    44 #endif // !ENABLE(JIT)
     44#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/llint/LLIntCLoop.h

    r218794 r236381  
    2626#pragma once
    2727
    28 #if !ENABLE(JIT)
     28#if ENABLE(C_LOOP)
    2929
    3030#include "JSCJSValue.h"
     
    4545using JSC::LLInt::CLoop;
    4646
    47 #endif // !ENABLE(JIT)
     47#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/llint/LLIntData.cpp

    r235935 r236381  
    4747Opcode Data::s_opcodeMap[numOpcodeIDs] = { };
    4848
    49 #if ENABLE(JIT)
     49#if !ENABLE(C_LOOP)
    5050extern "C" void llint_entry(void*);
    5151#endif
     
    5353void initialize()
    5454{
    55 #if !ENABLE(JIT)
     55#if ENABLE(C_LOOP)
    5656    CLoop::initialize();
    5757
    58 #else // ENABLE(JIT)
     58#else // !ENABLE(C_LOOP)
    5959    llint_entry(&Data::s_opcodeMap);
    6060
     
    6565    for (int i = 0; i < maxOpcodeLength + 1; ++i)
    6666        Data::s_exceptionInstructions[i].u.pointer = handler;
    67 #endif // ENABLE(JIT)
     67#endif // ENABLE(C_LOOP)
    6868}
    6969
     
    126126    STATIC_ASSERT(ValueNull == TagBitTypeOther);
    127127#endif
    128 #if (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) || !ENABLE(JIT)
     128#if (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) || !ENABLE(ASSEMBLER)
    129129    STATIC_ASSERT(!maxFrameExtentForSlowPathCall);
    130130#elif CPU(ARM)
     
    136136#endif
    137137
    138 #if !ENABLE(JIT) || USE(JSVALUE32_64)
     138#if ENABLE(C_LOOP) || USE(JSVALUE32_64)
    139139    ASSERT(!CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters());
    140140#elif (CPU(X86_64) && !OS(WINDOWS))  || CPU(ARM64)
  • trunk/Source/JavaScriptCore/llint/LLIntData.h

    r232719 r236381  
    3535struct Instruction;
    3636
    37 #if !ENABLE(JIT)
     37#if ENABLE(C_LOOP)
    3838typedef OpcodeID LLIntCode;
    3939#else
  • trunk/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h

    r233658 r236381  
    3131#include <wtf/Poisoned.h>
    3232
    33 #if !ENABLE(JIT)
     33#if ENABLE(C_LOOP)
    3434#define OFFLINE_ASM_C_LOOP 1
    3535#define OFFLINE_ASM_X86 0
     
    4646#define OFFLINE_ASM_MIPS 0
    4747
    48 #else // ENABLE(JIT)
     48#else // ENABLE(C_LOOP)
    4949
    5050#define OFFLINE_ASM_C_LOOP 0
     
    138138#endif
    139139
    140 #endif // ENABLE(JIT)
     140#endif // ENABLE(C_LOOP)
    141141
    142142#if USE(JSVALUE64)
  • trunk/Source/JavaScriptCore/llint/LLIntOpcode.h

    r206525 r236381  
    2626#pragma once
    2727
    28 #if !ENABLE(JIT)
     28#if ENABLE(C_LOOP)
    2929
    3030#define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \
    3131    FOR_EACH_CLOOP_BYTECODE_HELPER_ID(macro)
    3232
    33 #else // ENABLE(JIT)
     33#else // !ENABLE(C_LOOP)
    3434
    3535#define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \
    36     // Nothing to do here. Use the JIT impl instead.
     36    // Nothing to do here. Use the LLInt ASM / JIT impl instead.
    3737
    38 #endif // !ENABLE(JIT)
     38#endif // ENABLE(C_LOOP)
    3939
    4040
  • trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h

    r231027 r236381  
    4747}
    4848
    49 #if ENABLE(JIT)
     49#if !ENABLE(C_LOOP)
    5050static const GPRReg LLIntPC = GPRInfo::regT4;
    5151#endif
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r235935 r236381  
    537537    }
    538538    slowPathLogF("Current OS stack end is at %p.\n", vm.softStackLimit());
    539 #if !ENABLE(JIT)
     539#if ENABLE(C_LOOP)
    540540    slowPathLogF("Current C Loop stack end is at %p.\n", vm.cloopStackLimit());
    541541#endif
     
    548548    // Hence, if we get here, then we know a stack overflow is imminent. So, just
    549549    // throw the StackOverflowError unconditionally.
    550 #if !ENABLE(JIT)
     550#if ENABLE(C_LOOP)
    551551    Register* topOfFrame = exec->topOfFrame();
    552552    if (LIKELY(topOfFrame < reinterpret_cast<Register*>(exec))) {
     
    18621862}
    18631863
    1864 #if !ENABLE(JIT)
     1864#if ENABLE(C_LOOP)
    18651865extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM* vm, Register* newTopOfStack)
    18661866{
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h

    r233658 r236381  
    133133LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_super_sampler_end);
    134134extern "C" SlowPathReturnType llint_throw_stack_overflow_error(VM*, ProtoCallFrame*) WTF_INTERNAL;
    135 #if !ENABLE(JIT)
     135#if ENABLE(C_LOOP)
    136136extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM*, Register*) WTF_INTERNAL;
    137137#endif
  • trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp

    r235785 r236381  
    9999} // namespace LLInt
    100100
    101 #else // ENABLE(JIT)
     101#endif
    102102
     103#if ENABLE(C_LOOP)
    103104// Non-JIT (i.e. C Loop LLINT) case:
    104105
     
    123124}
    124125
    125 
    126 #endif // ENABLE(JIT)
     126#endif // ENABLE(C_LOOP)
    127127
    128128} // namespace JSC
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp

    r232719 r236381  
    3030#include <wtf/InlineASM.h>
    3131
    32 #if !ENABLE(JIT)
     32#if ENABLE(C_LOOP)
    3333#include "Bytecodes.h"
    3434#include "CLoopStackInlines.h"
     
    560560#include "LLIntAssembly.h"
    561561
    562 #endif // ENABLE(JIT)
     562#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.h

    r206525 r236381  
    2828#include "Opcode.h"
    2929
    30 #if !ENABLE(JIT)
     30#if ENABLE(C_LOOP)
    3131
    3232namespace JSC {
     
    4545} // namespace JSC
    4646
    47 #endif // !ENABLE(JIT)
     47#endif // ENABLE(C_LOOP)
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.h

    r233630 r236381  
    6060}
    6161#endif
    62 #if !ENABLE(JIT)
     62#if ENABLE(C_LOOP)
    6363namespace LLInt {
    6464class CLoop;
     
    148148    friend class DFG::SpeculativeJIT;
    149149#endif
    150 #if !ENABLE(JIT)
     150#if ENABLE(C_LOOP)
    151151    friend class LLInt::CLoop;
    152152#endif
  • trunk/Source/JavaScriptCore/runtime/MachineContext.h

    r234649 r236381  
    5151template<size_t N> void*& argumentPointer(PlatformRegisters&);
    5252template<size_t N> void* argumentPointer(const PlatformRegisters&);
    53 #if ENABLE(JIT)
     53#if !ENABLE(C_LOOP)
    5454void*& llintInstructionPointer(PlatformRegisters&);
    5555void* llintInstructionPointer(const PlatformRegisters&);
    56 #endif // ENABLE(JIT)
     56#endif // !ENABLE(C_LOOP)
    5757
    5858#if HAVE(MACHINE_CONTEXT)
     
    7373template<size_t N> void*& argumentPointer(mcontext_t&);
    7474template<size_t N> void* argumentPointer(const mcontext_t&);
    75 #if ENABLE(JIT)
     75#if !ENABLE(C_LOOP)
    7676void*& llintInstructionPointer(mcontext_t&);
    7777void* llintInstructionPointer(const mcontext_t&);
    78 #endif // ENABLE(JIT)
     78#endif // !ENABLE(C_LOOP)
    7979#endif // HAVE(MACHINE_CONTEXT)
    8080#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
     
    669669#endif // HAVE(MACHINE_CONTEXT)
    670670
    671 #if ENABLE(JIT)
     671#if !ENABLE(C_LOOP)
    672672#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
    673673inline void*& llintInstructionPointer(PlatformRegisters& regs)
     
    784784}
    785785#endif // HAVE(MACHINE_CONTEXT)
    786 #endif // ENABLE(JIT)
    787 
    788 }
    789 }
     786#endif // !ENABLE(C_LOOP)
     787
     788}
     789}
  • trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp

    r234528 r236381  
    602602                    startIndex = 1;
    603603                }
    604             } else if (std::optional<CodeOrigin> codeOrigin = topCodeBlock->findPC(unprocessedStackTrace.topPC)) {
    605                 appendCodeOrigin(topCodeBlock, *codeOrigin);
    606                 storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee);
    607                 startIndex = 1;
     604            } else {
     605#if ENABLE(JIT)
     606                if (std::optional<CodeOrigin> codeOrigin = topCodeBlock->findPC(unprocessedStackTrace.topPC)) {
     607                    appendCodeOrigin(topCodeBlock, *codeOrigin);
     608                    storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee);
     609                    startIndex = 1;
     610                }
     611#endif
     612                UNUSED_PARAM(appendCodeOrigin);
    608613            }
    609614        }
  • trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.cpp

    r229478 r236381  
    103103    if (CodeBlock* baselineCodeBlock = getSomeBaselineCodeBlockForFunction(theFunctionValue))
    104104        baselineCodeBlock->optimizeNextInvocation();
    105 #else
     105#endif
    106106    UNUSED_PARAM(theFunctionValue);
    107 #endif
    108 
    109107    return jsUndefined();
    110108}
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r235419 r236381  
    160160#include <wtf/text/SymbolRegistry.h>
    161161
    162 #if !ENABLE(JIT)
     162#if ENABLE(C_LOOP)
    163163#include "CLoopStack.h"
    164164#include "CLoopStackInlines.h"
     
    462462#endif // ENABLE(FTL_JIT)
    463463   
    464 #if ENABLE(JIT)
     464#if !ENABLE(C_LOOP)
    465465    initializeHostCallReturnValue(); // This is needed to convince the linker not to drop host call return support.
    466466#endif
     
    742742            intrinsic, signature, name);
    743743    }
    744 #else // ENABLE(JIT)
     744#endif // ENABLE(JIT)
    745745    UNUSED_PARAM(intrinsic);
    746 #endif // ENABLE(JIT)
    747746    return NativeExecutable::create(*this,
    748747        adoptRef(*new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITCode::HostCallThunk)), function,
     
    877876    size_t oldSoftReservedZoneSize = m_currentSoftReservedZoneSize;
    878877    m_currentSoftReservedZoneSize = softReservedZoneSize;
    879 #if !ENABLE(JIT)
     878#if ENABLE(C_LOOP)
    880879    interpreter->cloopStack().setSoftReservedZoneSize(softReservedZoneSize);
    881880#endif
     
    11461145        ASSERT_UNUSED(stackBounds, stackBounds.contains(vm->lastStackTop()));
    11471146    }
    1148 #if !ENABLE(JIT)
     1147#if ENABLE(C_LOOP)
    11491148    vm->interpreter->cloopStack().sanitizeStack();
    11501149#else
     
    11551154size_t VM::committedStackByteCount()
    11561155{
    1157 #if ENABLE(JIT)
     1156#if !ENABLE(C_LOOP)
    11581157    // When using the C stack, we don't know how many stack pages are actually
    11591158    // committed. So, we use the current stack usage as an estimate.
     
    11671166}
    11681167
    1169 #if !ENABLE(JIT)
     1168#if ENABLE(C_LOOP)
    11701169bool VM::ensureStackCapacityForCLoop(Register* newTopOfStack)
    11711170{
     
    11771176    return interpreter->cloopStack().isSafeToRecurse();
    11781177}
    1179 #endif // !ENABLE(JIT)
     1178#endif // ENABLE(C_LOOP)
    11801179
    11811180#if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r235419 r236381  
    717717    void* softStackLimit() { return m_softStackLimit; }
    718718    void** addressOfSoftStackLimit() { return &m_softStackLimit; }
    719 #if !ENABLE(JIT)
     719#if ENABLE(C_LOOP)
    720720    void* cloopStackLimit() { return m_cloopStackLimit; }
    721721    void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; }
     
    930930    }
    931931
    932 #if !ENABLE(JIT)   
     932#if ENABLE(C_LOOP)
    933933    bool ensureStackCapacityForCLoop(Register* newTopOfStack);
    934934    bool isSafeToRecurseSoftCLoop() const;
    935 #endif // !ENABLE(JIT)
     935#endif // ENABLE(C_LOOP)
    936936
    937937    JS_EXPORT_PRIVATE void throwException(ExecState*, Exception*);
     
    954954    void* m_stackLimit { nullptr };
    955955    void* m_softStackLimit { nullptr };
    956 #if !ENABLE(JIT)
     956#if ENABLE(C_LOOP)
    957957    void* m_cloopStackLimit { nullptr };
    958958#endif
     
    10361036}
    10371037
    1038 #if ENABLE(JIT)
     1038#if !ENABLE(C_LOOP)
    10391039extern "C" void sanitizeStackForVMImpl(VM*);
    10401040#endif
  • trunk/Source/JavaScriptCore/runtime/VMInlines.h

    r235419 r236381  
    3636bool VM::ensureStackCapacityFor(Register* newTopOfStack)
    3737{
    38 #if ENABLE(JIT)
     38#if !ENABLE(C_LOOP)
    3939    ASSERT(Thread::current().stack().isGrowingDownward());
    4040    return newTopOfStack >= m_softStackLimit;
     
    4848{
    4949    bool safe = isSafeToRecurse(m_softStackLimit);
    50 #if !ENABLE(JIT)
     50#if ENABLE(C_LOOP)
    5151    safe = safe && isSafeToRecurseSoftCLoop();
    5252#endif
  • trunk/Source/WTF/ChangeLog

    r236372 r236381  
     12018-09-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
     2
     3        [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
     4        https://bugs.webkit.org/show_bug.cgi?id=189778
     5
     6        Reviewed by Keith Miller.
     7
     8        This patch adds ENABLE(C_LOOP) which indicates we use CLoop as the interpreter.
     9        Previously, we used !ENABLE(JIT) for this configuration. But now, we have
     10        a build configuration that has LLInt ASM interpreter (not CLoop) and !ENABLE(JIT).
     11
     12        We enable LLInt ASM interpreter for non JIT environment in X86_64 and ARM64 architectures.
     13        And we enable ENABLE(ASSEMBLER) for non JIT environment since it offers machine register
     14        information which is used for LLInt and SamplingProfiler.
     15
     16        * wtf/Platform.h:
     17
    1182018-09-21  Keith Miller  <keith_miller@apple.com>
    219
  • trunk/Source/WTF/wtf/Platform.h

    r236077 r236381  
    758758#endif
    759759
     760#if !defined(ENABLE_C_LOOP)
     761#if ENABLE(JIT) \
     762    || CPU(X86_64) || (CPU(ARM64) && !defined(__ILP32__))
     763#define ENABLE_C_LOOP 0
     764#else
     765#define ENABLE_C_LOOP 1
     766#endif
     767#endif
     768
    760769/* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */
    761770#if USE(JSVALUE32_64)
     
    864873 * sampling profiler is enabled if WebKit uses pthreads and glibc. */
    865874#if !defined(ENABLE_SAMPLING_PROFILER)
    866 #if ENABLE(JIT) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT))
     875#if !ENABLE(C_LOOP) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT))
    867876#define ENABLE_SAMPLING_PROFILER 1
    868877#else
     
    948957
    949958/* Determine if we need to enable Computed Goto Opcodes or not: */
    950 #if HAVE(COMPUTED_GOTO) || ENABLE(JIT)
     959#if HAVE(COMPUTED_GOTO) || !ENABLE(C_LOOP)
    951960#define ENABLE_COMPUTED_GOTO_OPCODES 1
    952961#endif
    953962
    954 #if ENABLE(JIT) && !COMPILER(MSVC) && \
     963#if !ENABLE(C_LOOP) && !COMPILER(MSVC) && \
    955964    (CPU(X86) || CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && OS(DARWIN)))
    956965/* This feature works by embedding the OpcodeID in the 32 bit just before the generated LLint code
     
    982991/* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
    983992   enabled as well: */
    984 #if ENABLE(JIT) || ENABLE(YARR_JIT)
     993#if ENABLE(JIT) || ENABLE(YARR_JIT) || !ENABLE(C_LOOP)
    985994#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
    986995#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
  • trunk/Source/cmake/WebKitFeatures.cmake

    r235531 r236381  
    7272        set(ENABLE_JIT_DEFAULT ON)
    7373        set(USE_SYSTEM_MALLOC_DEFAULT OFF)
     74        set(ENABLE_C_LOOP_DEFAULT OFF)
     75        set(ENABLE_SAMPLING_PROFILER_DEFAULT ON)
    7476    else ()
    7577        set(ENABLE_JIT_DEFAULT OFF)
    7678        set(USE_SYSTEM_MALLOC_DEFAULT ON)
     79        set(ENABLE_C_LOOP_DEFAULT ON)
     80        set(ENABLE_SAMPLING_PROFILER_DEFAULT OFF)
    7781    endif ()
    7882
     
    101105    WEBKIT_OPTION_DEFINE(ENABLE_CURSOR_VISIBILITY "Toggle cursor visibility support" PRIVATE OFF)
    102106    WEBKIT_OPTION_DEFINE(ENABLE_CUSTOM_SCHEME_HANDLER "Toggle Custom Scheme Handler support" PRIVATE OFF)
     107    WEBKIT_OPTION_DEFINE(ENABLE_C_LOOP "Enable CLoop interpreter" PRIVATE ${ENABLE_C_LOOP_DEFAULT})
    103108    WEBKIT_OPTION_DEFINE(ENABLE_DASHBOARD_SUPPORT "Toggle dashboard support" PRIVATE OFF)
    104109    WEBKIT_OPTION_DEFINE(ENABLE_DATACUE_VALUE "Toggle datacue value support" PRIVATE OFF)
     
    159164    WEBKIT_OPTION_DEFINE(ENABLE_RESOURCE_USAGE "Toggle resource usage support" PRIVATE OFF)
    160165    WEBKIT_OPTION_DEFINE(ENABLE_RUBBER_BANDING "Toggle rubber banding support" PRIVATE OFF)
    161     WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ON)
     166    WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ${ENABLE_SAMPLING_PROFILER_DEFAULT})
    162167    WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_CONTROLS "Toggle service controls support" PRIVATE OFF)
    163168    WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_WORKER "Toggle ServiceWorker support" PRIVATE OFF)
     
    191196    WEBKIT_OPTION_DEFINE(USE_SYSTEM_MALLOC "Toggle system allocator instead of WebKit's custom allocator" PRIVATE ${USE_SYSTEM_MALLOC_DEFAULT})
    192197
     198    WEBKIT_OPTION_CONFLICT(ENABLE_JIT ENABLE_C_LOOP)
     199    WEBKIT_OPTION_CONFLICT(ENABLE_SAMPLING_PROFILER ENABLE_C_LOOP)
     200
    193201    WEBKIT_OPTION_DEPEND(ENABLE_WEB_RTC ENABLE_MEDIA_STREAM)
    194202    WEBKIT_OPTION_DEPEND(ENABLE_LEGACY_ENCRYPTED_MEDIA ENABLE_VIDEO)
     
    196204    WEBKIT_OPTION_DEPEND(ENABLE_FTL_JIT ENABLE_DFG_JIT)
    197205    WEBKIT_OPTION_DEPEND(ENABLE_WEBASSEMBLY ENABLE_FTL_JIT)
    198     WEBKIT_OPTION_DEPEND(ENABLE_SAMPLING_PROFILER ENABLE_JIT)
    199206    WEBKIT_OPTION_DEPEND(ENABLE_INDEXED_DATABASE_IN_WORKERS ENABLE_INDEXED_DATABASE)
    200207    WEBKIT_OPTION_DEPEND(ENABLE_MEDIA_CONTROLS_SCRIPT ENABLE_VIDEO)
Note: See TracChangeset for help on using the changeset viewer.