WebKit Bugzilla
Attachment 350170 Details for
Bug 189778
: [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189778-20180920144914.patch (text/plain), 64.64 KB, created by
Yusuke Suzuki
on 2018-09-19 22:49:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-09-19 22:49:15 PDT
Size:
64.64 KB
patch
obsolete
>Subversion Revision: 236237 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index eaf909f81fc6ff6d89c2ad58c40beb706743f35c..fe7a68a6a03c0629324acfe034a3fc5ca40f76a0 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,89 @@ >+2018-09-19 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration >+ https://bugs.webkit.org/show_bug.cgi?id=189778 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/tests/PingPongStackOverflowTest.cpp: >+ (testPingPongStackOverflow): >+ * CMakeLists.txt: >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * assembler/MaxFrameExtentForSlowPathCall.h: >+ * bytecode/CallReturnOffsetToBytecodeOffset.h: Removed. >+ * 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): >+ * 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): >+ * 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): >+ * runtime/VM.cpp: >+ (JSC::VM::updateSoftReservedZoneSize): >+ (JSC::sanitizeStackForVM): >+ (JSC::VM::committedStackByteCount): >+ * runtime/VM.h: >+ * runtime/VMInlines.h: >+ (JSC::VM::ensureStackCapacityFor): >+ (JSC::VM::isSafeToRecurseSoft const): >+ > 2018-09-19 Michael Saboff <msaboff@apple.com> > > Add functions to measure memory footprint to JSC >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index d308be19282a9a310e8404b1044d05cde49dadce..e704374202ad6a77b4352d976681007598e167c5 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,12 @@ >+2018-09-19 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration >+ https://bugs.webkit.org/show_bug.cgi?id=189778 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Platform.h: >+ > 2018-09-17 Yusuke Suzuki <utatane.tea@gmail.com> > > [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t >diff --git a/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp b/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp >index fbe46872032b8610903345f647eadda34c0d8991..ed8658efa10fa5b4d291fbe72aca1200d055c993 100644 >--- a/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp >+++ b/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp >@@ -127,7 +127,7 @@ int testPingPongStackOverflow() > > Options::softReservedZoneSize() = 128 * KB; > Options::reservedZoneSize() = 64 * KB; >-#if ENABLE(JIT) >+#if USE(C_LOOP) > // Normally, we want to disable the LLINT to force the use of JITted code which is necessary for > // reproducing the regression in https://bugs.webkit.org/show_bug.cgi?id=148749. However, we only > // want to do this if the LLINT isn't the only available execution engine. >diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt >index 96e33a20577a4a5754a1fea9432d796406124322..1adfa14d64a264cfc70c035ff563f7d7a0016ec7 100644 >--- a/Source/JavaScriptCore/CMakeLists.txt >+++ b/Source/JavaScriptCore/CMakeLists.txt >@@ -232,6 +232,12 @@ else () > > if (NOT ENABLE_JIT) > set(OFFLINE_ASM_BACKEND "C_LOOP") >+ # For major two architectures, we use LLInt ASM interpreters. >+ if (WTF_CPU_X86_64) >+ set(OFFLINE_ASM_BACKEND "X86_64") >+ elseif (WTF_CPU_ARM64) >+ set(OFFLINE_ASM_BACKEND "ARM64") >+ endif () > endif () > endif () > >diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >index 9c5c50c621b8b6e3fa738b3f96bb26b1adbd8dfe..57d0e96e65966e00d8f31abeb665315dcf04ccdd 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >@@ -109,7 +109,6 @@ > 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F0CAEFC1EC4DA6B00970D12 /* JSHeapFinalizerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CAEFA1EC4DA6200970D12 /* JSHeapFinalizerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F0CAEFF1EC4DA8800970D12 /* HeapFinalizerCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CAEFE1EC4DA8500970D12 /* HeapFinalizerCallback.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CD4C015F1A6040032F1C0 /* PutDirectIndexMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -2011,7 +2010,6 @@ > 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExpressionRangeInfo.h; sourceTree = "<group>"; }; > 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallLinkInfo.cpp; sourceTree = "<group>"; }; > 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallLinkInfo.h; sourceTree = "<group>"; }; >- 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallReturnOffsetToBytecodeOffset.h; sourceTree = "<group>"; }; > 0F0CAEF91EC4DA6200970D12 /* JSHeapFinalizerPrivate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHeapFinalizerPrivate.cpp; sourceTree = "<group>"; }; > 0F0CAEFA1EC4DA6200970D12 /* JSHeapFinalizerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHeapFinalizerPrivate.h; sourceTree = "<group>"; }; > 0F0CAEFD1EC4DA8500970D12 /* HeapFinalizerCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapFinalizerCallback.cpp; sourceTree = "<group>"; }; >@@ -7631,7 +7629,6 @@ > 0F93329414CA7DC10085F3C6 /* CallLinkStatus.h */, > 627673211B680C1E00FD9F2E /* CallMode.cpp */, > 627673221B680C1E00FD9F2E /* CallMode.h */, >- 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */, > 0F3B7E2419A11B8000D9BC56 /* CallVariant.cpp */, > 0F3B7E2519A11B8000D9BC56 /* CallVariant.h */, > 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */, >@@ -7830,7 +7827,6 @@ > isa = PBXGroup; > children = ( > 99DA00991BD5992700F4575C /* __init__.py */, >- 99DA009D1BD5992700F4575C /* wkbuiltins.py */, > 99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */, > 99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */, > 412952731D2CF6AC00E78B89 /* builtins_generate_internals_wrapper_header.py */, >@@ -7842,6 +7838,7 @@ > 99DA009A1BD5992700F4575C /* builtins_generator.py */, > 99DA009B1BD5992700F4575C /* builtins_model.py */, > 99DA009C1BD5992700F4575C /* builtins_templates.py */, >+ 99DA009D1BD5992700F4575C /* wkbuiltins.py */, > ); > path = wkbuiltins; > sourceTree = "<group>"; >@@ -8439,7 +8436,6 @@ > DE26E9031CB5DD0500D2BE82 /* BuiltinExecutableCreator.h in Headers */, > A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */, > A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */, >- 99DA00A61BD5993100F4575C /* wkbuiltins.py in Headers */, > 99DA00A71BD5993100F4575C /* builtins_generate_combined_header.py in Headers */, > 99DA00A81BD5993100F4575C /* builtins_generate_combined_implementation.py in Headers */, > 412952771D2CF6BC00E78B89 /* builtins_generate_internals_wrapper_header.py in Headers */, >@@ -8481,7 +8477,6 @@ > 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */, > 0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */, > 627673241B680C1E00FD9F2E /* CallMode.h in Headers */, >- 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */, > 0F3B7E2B19A11B8000D9BC56 /* CallVariant.h in Headers */, > FE80C1971D775CDD008510C0 /* CatchScope.h in Headers */, > 0F24E54217EA9F5900ABB217 /* CCallHelpers.h in Headers */, >@@ -9689,6 +9684,7 @@ > ADBC54D51DF8EA2B005BF738 /* WebAssemblyToJSCallee.h in Headers */, > 52F6C35E1E71EB080081F4CC /* WebAssemblyWrapperFunction.h in Headers */, > BC18C47A0E16F5CD00B34460 /* WebKitAvailability.h in Headers */, >+ 99DA00A61BD5993100F4575C /* wkbuiltins.py in Headers */, > A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */, > C2B6D75318A33793004A9301 /* WriteBarrierInlines.h in Headers */, > 0FC8150A14043BF500CFA603 /* WriteBarrierSupport.h in Headers */, >diff --git a/Source/JavaScriptCore/assembler/MaxFrameExtentForSlowPathCall.h b/Source/JavaScriptCore/assembler/MaxFrameExtentForSlowPathCall.h >index c6f53b347966c66354d01f8ad6dcfbcc8979ff73..4321305c68e4daf62823f6eef75951fa27a936be 100644 >--- a/Source/JavaScriptCore/assembler/MaxFrameExtentForSlowPathCall.h >+++ b/Source/JavaScriptCore/assembler/MaxFrameExtentForSlowPathCall.h >@@ -35,7 +35,7 @@ namespace JSC { > // that can be used for outgoing args when calling a slow path C function > // from JS code. > >-#if !ENABLE(JIT) >+#if !ENABLE(ASSEMBLER) > static const size_t maxFrameExtentForSlowPathCall = 0; > > #elif CPU(X86_64) && OS(WINDOWS) >@@ -69,7 +69,7 @@ static const size_t maxFrameExtentForSlowPathCall = 40; > > COMPILE_ASSERT(!(maxFrameExtentForSlowPathCall % sizeof(Register)), extent_must_be_in_multiples_of_registers); > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > // Make sure that cfr - maxFrameExtentForSlowPathCall bytes will make the stack pointer aligned > COMPILE_ASSERT((maxFrameExtentForSlowPathCall % 16) == 16 - sizeof(CallerFrameAndPC), extent_must_align_stack_from_callframe_pointer); > #endif >diff --git a/Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h b/Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h >deleted file mode 100644 >index 2d1b00cbe818122f6e720277cccf2066abf7eaa6..0000000000000000000000000000000000000000 >--- a/Source/JavaScriptCore/bytecode/CallReturnOffsetToBytecodeOffset.h >+++ /dev/null >@@ -1,54 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-namespace JSC { >- >-#if ENABLE(JIT) >-// This structure is used to map from a call return location >-// (given as an offset in bytes into the JIT code) back to >-// the bytecode index of the corresponding bytecode operation. >-// This is then used to look up the corresponding handler. >-// FIXME: This should be made inlining aware! Currently it isn't >-// because we never inline code that has exception handlers. >-struct CallReturnOffsetToBytecodeOffset { >- CallReturnOffsetToBytecodeOffset(unsigned callReturnOffset, unsigned bytecodeOffset) >- : callReturnOffset(callReturnOffset) >- , bytecodeOffset(bytecodeOffset) >- { >- } >- >- unsigned callReturnOffset; >- unsigned bytecodeOffset; >-}; >- >-inline unsigned getCallReturnOffset(CallReturnOffsetToBytecodeOffset* pc) >-{ >- return pc->callReturnOffset; >-} >-#endif >- >-} // namespace JSC >diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp >index 27af0fde2c08c5a54fb819d1acc3b134e76315e3..c9b9d167b41f0b41f04cc49d4221f7e0ab7dbcb4 100644 >--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp >+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp >@@ -89,7 +89,7 @@ > #include <wtf/StringPrintStream.h> > #include <wtf/text/UniquedStringImpl.h> > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > #include "RegisterAtOffsetList.h" > #endif > >@@ -509,7 +509,7 @@ bool CodeBlock::finishCreation(VM& vm, ScriptExecutable* ownerExecutable, Unlink > if (size_t size = unlinkedCodeBlock->numberOfObjectAllocationProfiles()) > m_objectAllocationProfiles = RefCountedArray<ObjectAllocationProfile>(size); > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > setCalleeSaveRegisters(RegisterSet::llintBaselineCalleeSaveRegisters()); > #endif > >@@ -2145,7 +2145,7 @@ unsigned CodeBlock::reoptimizationRetryCounter() const > #endif // ENABLE(JIT) > } > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > void CodeBlock::setCalleeSaveRegisters(RegisterSet calleeSaveRegisters) > { > m_calleeSaveRegisters = std::make_unique<RegisterAtOffsetList>(calleeSaveRegisters); >@@ -2172,6 +2172,9 @@ size_t CodeBlock::calleeSaveSpaceAsVirtualRegisters() > { > return roundCalleeSaveSpaceAsVirtualRegisters(m_calleeSaveRegisters->size()); > } >+#endif >+ >+#if ENABLE(JIT) > > void CodeBlock::countReoptimization() > { >diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h >index a3a3d263900d3122c09e204f32b57b3e101a32b2..ecf5b795fe2d04fad5658ccbdeed3eb3372f987d 100644 >--- a/Source/JavaScriptCore/bytecode/CodeBlock.h >+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h >@@ -645,11 +645,23 @@ class CodeBlock : public JSCell { > // to avoid thrashing. > JS_EXPORT_PRIVATE unsigned reoptimizationRetryCounter() const; > void countReoptimization(); >-#if ENABLE(JIT) >+ >+#if !USE(C_LOOP) >+ void setCalleeSaveRegisters(RegisterSet); >+ void setCalleeSaveRegisters(std::unique_ptr<RegisterAtOffsetList>); >+ >+ RegisterAtOffsetList* calleeSaveRegisters() const { return m_calleeSaveRegisters.get(); } >+ > static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return RegisterSet::llintBaselineCalleeSaveRegisters().numberOfSetRegisters(); } > static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters(); > size_t calleeSaveSpaceAsVirtualRegisters(); >+#else >+ static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return 0; } >+ static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters() { return 0; }; >+ size_t calleeSaveSpaceAsVirtualRegisters() { return 0; } >+#endif > >+#if ENABLE(JIT) > unsigned numberOfDFGCompiles(); > > int32_t codeTypeThresholdMultiplier() const; >@@ -739,14 +751,7 @@ class CodeBlock : public JSCell { > bool shouldReoptimizeNow(); > bool shouldReoptimizeFromLoopNow(); > >- void setCalleeSaveRegisters(RegisterSet); >- void setCalleeSaveRegisters(std::unique_ptr<RegisterAtOffsetList>); >- >- RegisterAtOffsetList* calleeSaveRegisters() const { return m_calleeSaveRegisters.get(); } > #else // No JIT >- static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return 0; } >- static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters() { return 0; }; >- size_t calleeSaveSpaceAsVirtualRegisters() { return 0; } > void optimizeAfterWarmUp() { } > unsigned numberOfDFGCompiles() { return 0; } > #endif >@@ -965,8 +970,10 @@ class CodeBlock : public JSCell { > SentinelLinkedList<LLIntCallLinkInfo, BasicRawSentinelNode<LLIntCallLinkInfo>> m_incomingLLIntCalls; > StructureWatchpointMap m_llintGetByIdWatchpointMap; > PoisonedRefPtr<CodeBlockPoison, JITCode> m_jitCode; >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters; >+#endif >+#if ENABLE(JIT) > PoisonedBag<CodeBlockPoison, StructureStubInfo> m_stubInfos; > PoisonedBag<CodeBlockPoison, JITAddIC> m_addICs; > PoisonedBag<CodeBlockPoison, JITMulIC> m_mulICs; >diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h >index 4ef274faeb34b01f8ecbc6d4df95401c8997da38..0a946bc40ace31d689da1d7b590d8e22a976d52e 100644 >--- a/Source/JavaScriptCore/bytecode/Opcode.h >+++ b/Source/JavaScriptCore/bytecode/Opcode.h >@@ -58,7 +58,7 @@ namespace JSC { > #undef OPCODE_ID_ENUM > > const int maxOpcodeLength = 9; >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_CLOOP_BYTECODE_HELPER_IDS + NUMBER_OF_BYTECODE_HELPER_IDS; > #else > const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_BYTECODE_HELPER_IDS; >diff --git a/Source/JavaScriptCore/heap/Heap.cpp b/Source/JavaScriptCore/heap/Heap.cpp >index 7a46a52e7a3785402bf21377d08541a4d57cf0d0..2dff7922f79f454487668c58934d682802670915 100644 >--- a/Source/JavaScriptCore/heap/Heap.cpp >+++ b/Source/JavaScriptCore/heap/Heap.cpp >@@ -672,7 +672,7 @@ void Heap::gatherStackRoots(ConservativeRoots& roots) > > void Heap::gatherJSStackRoots(ConservativeRoots& roots) > { >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > m_vm->interpreter->cloopStack().gatherConservativeRoots(roots, *m_jitStubRoutines, *m_codeBlocks); > #else > UNUSED_PARAM(roots); >diff --git a/Source/JavaScriptCore/interpreter/CLoopStack.cpp b/Source/JavaScriptCore/interpreter/CLoopStack.cpp >index abc10a8fead286151969ba2235cb347c7e61e857..1fe3b88091018bfbd8303986ab791f1205cd3aab 100644 >--- a/Source/JavaScriptCore/interpreter/CLoopStack.cpp >+++ b/Source/JavaScriptCore/interpreter/CLoopStack.cpp >@@ -29,7 +29,7 @@ > #include "config.h" > #include "CLoopStack.h" > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > #include "CLoopStackInlines.h" > #include "ConservativeRoots.h" >@@ -163,4 +163,4 @@ size_t CLoopStack::committedByteCount() > > } // namespace JSC > >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/interpreter/CLoopStack.h b/Source/JavaScriptCore/interpreter/CLoopStack.h >index 9e5dda14b2bb0d4fc77f5c7d6994a7bf2771f1bb..bc0e39d7472c09f6136c3f3df1b4992d43fed1a3 100644 >--- a/Source/JavaScriptCore/interpreter/CLoopStack.h >+++ b/Source/JavaScriptCore/interpreter/CLoopStack.h >@@ -28,7 +28,7 @@ > > #pragma once > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > #include "Register.h" > #include <wtf/Noncopyable.h> >@@ -107,4 +107,4 @@ namespace JSC { > > } // namespace JSC > >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/interpreter/CLoopStackInlines.h b/Source/JavaScriptCore/interpreter/CLoopStackInlines.h >index 997faf66cc37888f16c2a35f0db5213563cdc3ee..e4cd13638e4959c214229291ef2ca0a995ac9519 100644 >--- a/Source/JavaScriptCore/interpreter/CLoopStackInlines.h >+++ b/Source/JavaScriptCore/interpreter/CLoopStackInlines.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > #include "CLoopStack.h" > #include "CallFrame.h" >@@ -59,4 +59,4 @@ inline void CLoopStack::setCLoopStackLimit(Register* newTopOfStack) > > } // namespace JSC > >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/interpreter/EntryFrame.h b/Source/JavaScriptCore/interpreter/EntryFrame.h >index be842590f6e90ccda6148fc60d01bb267c4a4c86..8bc70de8464e93d20d90a0ccb12e1a6248b8a8cb 100644 >--- a/Source/JavaScriptCore/interpreter/EntryFrame.h >+++ b/Source/JavaScriptCore/interpreter/EntryFrame.h >@@ -31,7 +31,7 @@ > namespace JSC { > > struct EntryFrame { >-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 >+#if !USE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 > static ptrdiff_t vmEntryRecordOffset() > { > EntryFrame* fakeEntryFrame = reinterpret_cast<EntryFrame*>(0x1000); >diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp >index 7126d029f6223b2ea20026a9265dd952eb405255..753262dc6b81ac64c98adf0f35e7a105655c265d 100644 >--- a/Source/JavaScriptCore/interpreter/Interpreter.cpp >+++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp >@@ -67,6 +67,7 @@ > #include "ProtoCallFrame.h" > #include "RegExpObject.h" > #include "Register.h" >+#include "RegisterAtOffsetList.h" > #include "ScopedArguments.h" > #include "StackAlignment.h" > #include "StackFrame.h" >@@ -332,7 +333,7 @@ void setupForwardArgumentsFrameAndSetThis(CallFrame* execCaller, CallFrame* exec > > Interpreter::Interpreter(VM& vm) > : m_vm(vm) >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > , m_cloopStack(vm) > #endif > { >@@ -563,7 +564,7 @@ class UnwindFunctor { > private: > void copyCalleeSavesToEntryFrameCalleeSavesBuffer(StackVisitor& visitor) const > { >-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 >+#if !USE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 > RegisterAtOffsetList* currentCalleeSaves = visitor->calleeSaveRegisters(); > > if (!currentCalleeSaves) >diff --git a/Source/JavaScriptCore/interpreter/Interpreter.h b/Source/JavaScriptCore/interpreter/Interpreter.h >index 08d65ba5bae376016fa4712928bc4fbaed4255fe..7cb881fddbda12d61cc02248b9d553ce0c40b0ed 100644 >--- a/Source/JavaScriptCore/interpreter/Interpreter.h >+++ b/Source/JavaScriptCore/interpreter/Interpreter.h >@@ -36,7 +36,7 @@ > #include "StackAlignment.h" > #include <wtf/HashMap.h> > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > #include "CLoopStack.h" > #endif > >@@ -93,7 +93,7 @@ namespace JSC { > Interpreter(VM &); > ~Interpreter(); > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > CLoopStack& cloopStack() { return m_cloopStack; } > #endif > >@@ -147,7 +147,7 @@ namespace JSC { > JSValue execute(CallFrameClosure&); > > VM& m_vm; >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > CLoopStack m_cloopStack; > #endif > >diff --git a/Source/JavaScriptCore/interpreter/StackVisitor.cpp b/Source/JavaScriptCore/interpreter/StackVisitor.cpp >index 60911ab1e57c1d51237d9cc7f6a0965eeb27a624..b697500d286c9f23e3008169811ae454fb21362c 100644 >--- a/Source/JavaScriptCore/interpreter/StackVisitor.cpp >+++ b/Source/JavaScriptCore/interpreter/StackVisitor.cpp >@@ -257,7 +257,7 @@ RegisterAtOffsetList* StackVisitor::Frame::calleeSaveRegisters() > if (isInlinedFrame()) > return nullptr; > >-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 >+#if !USE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 > > #if ENABLE(WEBASSEMBLY) > if (isWasmFrame()) { >@@ -273,7 +273,7 @@ RegisterAtOffsetList* StackVisitor::Frame::calleeSaveRegisters() > if (CodeBlock* codeBlock = this->codeBlock()) > return codeBlock->calleeSaveRegisters(); > >-#endif // ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 >+#endif // !USE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 > > return nullptr; > } >diff --git a/Source/JavaScriptCore/interpreter/VMEntryRecord.h b/Source/JavaScriptCore/interpreter/VMEntryRecord.h >index edb7e7e8c8bbc2985d1c415ca45e9f50efc6c6d0..a7275da0b66a31899ba68caee757a2609a14c5e9 100644 >--- a/Source/JavaScriptCore/interpreter/VMEntryRecord.h >+++ b/Source/JavaScriptCore/interpreter/VMEntryRecord.h >@@ -46,7 +46,7 @@ struct VMEntryRecord { > > JSObject* callee() const { return m_callee; } > >-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 >+#if !USE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 > intptr_t calleeSaveRegistersBuffer[NUMBER_OF_CALLEE_SAVES_REGISTERS]; > #endif > >diff --git a/Source/JavaScriptCore/jit/ExecutableAllocator.h b/Source/JavaScriptCore/jit/ExecutableAllocator.h >index 18bde41ce4f1489392d59ee26cb23c2f244b2847..077ed582ea948a4141ddae277d0b44ed43507fb7 100644 >--- a/Source/JavaScriptCore/jit/ExecutableAllocator.h >+++ b/Source/JavaScriptCore/jit/ExecutableAllocator.h >@@ -145,7 +145,7 @@ class ExecutableAllocator { > > #else > inline bool isJITPC(void*) { return false; } >-#endif // ENABLE(JIT) && ENABLE(ASSEMBLER) >+#endif // ENABLE(ASSEMBLER) > > > } // namespace JSC >diff --git a/Source/JavaScriptCore/jit/FPRInfo.h b/Source/JavaScriptCore/jit/FPRInfo.h >index a24d1cb75a3ff99b63895ebbd179ae6142da56ec..48f4022ede3a7b278b8eb51c6fe8a3d7c2172b6f 100644 >--- a/Source/JavaScriptCore/jit/FPRInfo.h >+++ b/Source/JavaScriptCore/jit/FPRInfo.h >@@ -33,7 +33,7 @@ namespace JSC { > typedef MacroAssembler::FPRegisterID FPRReg; > static constexpr FPRReg InvalidFPRReg { FPRReg::InvalidFPRReg }; > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #if CPU(X86) || CPU(X86_64) > >@@ -332,7 +332,7 @@ class FPRInfo { > // We use this hack to get the FPRInfo from the FPRReg type in templates because our code is bad and we should feel bad.. > constexpr FPRInfo toInfoFromReg(FPRReg) { return FPRInfo(); } > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) > > } // namespace JSC > >@@ -340,7 +340,7 @@ namespace WTF { > > inline void printInternal(PrintStream& out, JSC::FPRReg reg) > { >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > out.print("%", JSC::FPRInfo::debugName(reg)); > #else > out.printf("%%fr%d", reg); >diff --git a/Source/JavaScriptCore/jit/GPRInfo.cpp b/Source/JavaScriptCore/jit/GPRInfo.cpp >index 5a8005f9b85d1c0cf98e0c303fe91aa516d5992f..af8e358074cd45338d465491a52e021a8707bfec 100644 >--- a/Source/JavaScriptCore/jit/GPRInfo.cpp >+++ b/Source/JavaScriptCore/jit/GPRInfo.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "GPRInfo.h" > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > namespace JSC { > >@@ -48,4 +48,4 @@ const GPRReg GPRInfo::patchpointScratchRegister = ARM64Registers::ip0; > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/jit/GPRInfo.h b/Source/JavaScriptCore/jit/GPRInfo.h >index 2d374e3b859d3dac76fb8f4dfc08a10f1300e874..805449f7b157f2134a71d3d98af38e6991ff7469 100644 >--- a/Source/JavaScriptCore/jit/GPRInfo.h >+++ b/Source/JavaScriptCore/jit/GPRInfo.h >@@ -41,7 +41,7 @@ enum NoResultTag { NoResult }; > typedef MacroAssembler::RegisterID GPRReg; > static constexpr GPRReg InvalidGPRReg { GPRReg::InvalidGPRReg }; > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #if USE(JSVALUE64) > class JSValueRegs { >@@ -816,7 +816,7 @@ inline NoResultTag extractResult(NoResultTag) { return NoResult; } > // We use this hack to get the GPRInfo from the GPRReg type in templates because our code is bad and we should feel bad.. > constexpr GPRInfo toInfoFromReg(GPRReg) { return GPRInfo(); } > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) > > } // namespace JSC > >@@ -824,7 +824,7 @@ namespace WTF { > > inline void printInternal(PrintStream& out, JSC::GPRReg reg) > { >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > out.print("%", JSC::GPRInfo::debugName(reg)); > #else > out.printf("%%r%d", reg); >diff --git a/Source/JavaScriptCore/jit/HostCallReturnValue.cpp b/Source/JavaScriptCore/jit/HostCallReturnValue.cpp >index e8d01916b9c5904795ccc5db6c4e6ce836111302..76d8ba5cdd71bcabaf2b37fba1274176d2ccab59 100644 >--- a/Source/JavaScriptCore/jit/HostCallReturnValue.cpp >+++ b/Source/JavaScriptCore/jit/HostCallReturnValue.cpp >@@ -26,6 +26,8 @@ > #include "config.h" > #include "HostCallReturnValue.h" > >+#if !USE(C_LOOP) >+ > #include "CallFrame.h" > #include "JSCJSValueInlines.h" > #include "JSObject.h" >@@ -35,7 +37,109 @@ > > namespace JSC { > >-// Nothing to see here. >+// Note: getHostCallReturnValueWithExecState() needs to be placed before the >+// definition of getHostCallReturnValue() below because the Windows build >+// requires it. >+extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) >+{ >+ if (!exec) >+ return JSValue::encode(JSValue()); >+ return JSValue::encode(exec->vm().hostCallReturnValue); >+} >+ >+#if COMPILER(GCC_OR_CLANG) && CPU(X86_64) >+asm ( >+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >+HIDE_SYMBOL(getHostCallReturnValue) "\n" >+SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >+ "lea -8(%rsp), %rdi\n" >+ "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >+); >+ >+#elif COMPILER(GCC_OR_CLANG) && CPU(X86) >+asm ( >+".text" "\n" \ >+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >+HIDE_SYMBOL(getHostCallReturnValue) "\n" >+SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >+ "push %ebp\n" >+ "mov %esp, %eax\n" >+ "leal -4(%esp), %esp\n" >+ "push %eax\n" >+ "call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >+ "leal 8(%esp), %esp\n" >+ "pop %ebp\n" >+ "ret\n" >+); >+ >+#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2) >+asm ( >+".text" "\n" >+".align 2" "\n" >+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >+HIDE_SYMBOL(getHostCallReturnValue) "\n" >+".thumb" "\n" >+".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" >+SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >+ "sub r0, sp, #8" "\n" >+ "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >+); >+ >+#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL) >+asm ( >+".text" "\n" >+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >+HIDE_SYMBOL(getHostCallReturnValue) "\n" >+INLINE_ARM_FUNCTION(getHostCallReturnValue) >+SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >+ "sub r0, sp, #8" "\n" >+ "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >+); >+ >+#elif CPU(ARM64) >+asm ( >+".text" "\n" >+".align 2" "\n" >+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >+HIDE_SYMBOL(getHostCallReturnValue) "\n" >+SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >+ "sub x0, sp, #16" "\n" >+ "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >+); >+ >+#elif COMPILER(GCC_OR_CLANG) && CPU(MIPS) >+ >+#if WTF_MIPS_PIC >+#define LOAD_FUNCTION_TO_T9(function) \ >+ ".set noreorder" "\n" \ >+ ".cpload $25" "\n" \ >+ ".set reorder" "\n" \ >+ "la $t9, " LOCAL_REFERENCE(function) "\n" >+#else >+#define LOAD_FUNCTION_TO_T9(function) "" "\n" >+#endif >+ >+asm ( >+".text" "\n" >+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >+HIDE_SYMBOL(getHostCallReturnValue) "\n" >+SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >+ LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState) >+ "addi $a0, $sp, -8" "\n" >+ "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >+); >+ >+#elif COMPILER(MSVC) && CPU(X86) >+extern "C" { >+ __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue() >+ { >+ __asm lea eax, [esp - 4] >+ __asm mov [esp + 4], eax; >+ __asm jmp getHostCallReturnValueWithExecState >+ } >+} >+#endif > > } // namespace JSC > >+#endif // !USE(C_LOOP) >diff --git a/Source/JavaScriptCore/jit/HostCallReturnValue.h b/Source/JavaScriptCore/jit/HostCallReturnValue.h >index 62eb2a566b98102027723a2726aef4726aebd6ce..635ffe24050fec71398adaecb9b97cf793155d5b 100644 >--- a/Source/JavaScriptCore/jit/HostCallReturnValue.h >+++ b/Source/JavaScriptCore/jit/HostCallReturnValue.h >@@ -27,7 +27,7 @@ > > #include "JSCJSValue.h" > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > > #if CALLING_CONVENTION_IS_STDCALL > #define HOST_CALL_RETURN_VALUE_OPTION CDECL >@@ -57,4 +57,4 @@ inline void initializeHostCallReturnValue() { } > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // !USE(C_LOOP) >diff --git a/Source/JavaScriptCore/jit/JITOperations.cpp b/Source/JavaScriptCore/jit/JITOperations.cpp >index b2eb418cff89d523022a61adb0b8be4f68802e62..7aacf6b1c16f9215a2d865866f3d2c3a891d4ecb 100644 >--- a/Source/JavaScriptCore/jit/JITOperations.cpp >+++ b/Source/JavaScriptCore/jit/JITOperations.cpp >@@ -2908,109 +2908,6 @@ int32_t JIT_OPERATION operationCheckIfExceptionIsUncatchableAndNotifyProfiler(Ex > > } // extern "C" > >-// Note: getHostCallReturnValueWithExecState() needs to be placed before the >-// definition of getHostCallReturnValue() below because the Windows build >-// requires it. >-extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) >-{ >- if (!exec) >- return JSValue::encode(JSValue()); >- return JSValue::encode(exec->vm().hostCallReturnValue); >-} >- >-#if COMPILER(GCC_OR_CLANG) && CPU(X86_64) >-asm ( >-".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >-HIDE_SYMBOL(getHostCallReturnValue) "\n" >-SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >- "lea -8(%rsp), %rdi\n" >- "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >-); >- >-#elif COMPILER(GCC_OR_CLANG) && CPU(X86) >-asm ( >-".text" "\n" \ >-".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >-HIDE_SYMBOL(getHostCallReturnValue) "\n" >-SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >- "push %ebp\n" >- "mov %esp, %eax\n" >- "leal -4(%esp), %esp\n" >- "push %eax\n" >- "call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >- "leal 8(%esp), %esp\n" >- "pop %ebp\n" >- "ret\n" >-); >- >-#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2) >-asm ( >-".text" "\n" >-".align 2" "\n" >-".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >-HIDE_SYMBOL(getHostCallReturnValue) "\n" >-".thumb" "\n" >-".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" >-SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >- "sub r0, sp, #8" "\n" >- "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >-); >- >-#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL) >-asm ( >-".text" "\n" >-".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >-HIDE_SYMBOL(getHostCallReturnValue) "\n" >-INLINE_ARM_FUNCTION(getHostCallReturnValue) >-SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >- "sub r0, sp, #8" "\n" >- "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >-); >- >-#elif CPU(ARM64) >-asm ( >-".text" "\n" >-".align 2" "\n" >-".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >-HIDE_SYMBOL(getHostCallReturnValue) "\n" >-SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >- "sub x0, sp, #16" "\n" >- "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >-); >- >-#elif COMPILER(GCC_OR_CLANG) && CPU(MIPS) >- >-#if WTF_MIPS_PIC >-#define LOAD_FUNCTION_TO_T9(function) \ >- ".set noreorder" "\n" \ >- ".cpload $25" "\n" \ >- ".set reorder" "\n" \ >- "la $t9, " LOCAL_REFERENCE(function) "\n" >-#else >-#define LOAD_FUNCTION_TO_T9(function) "" "\n" >-#endif >- >-asm ( >-".text" "\n" >-".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >-HIDE_SYMBOL(getHostCallReturnValue) "\n" >-SYMBOL_STRING(getHostCallReturnValue) ":" "\n" >- LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState) >- "addi $a0, $sp, -8" "\n" >- "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" >-); >- >-#elif COMPILER(MSVC) && CPU(X86) >-extern "C" { >- __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue() >- { >- __asm lea eax, [esp - 4] >- __asm mov [esp + 4], eax; >- __asm jmp getHostCallReturnValueWithExecState >- } >-} >-#endif >- > } // namespace JSC > > #endif // ENABLE(JIT) >diff --git a/Source/JavaScriptCore/jit/JITOperationsMSVC64.cpp b/Source/JavaScriptCore/jit/JITOperationsMSVC64.cpp >index 544bca3946c1945ec003b2c0d531e6075e923c84..31cc5713df0417f2903ddd440d83ca8e8140a30c 100644 >--- a/Source/JavaScriptCore/jit/JITOperationsMSVC64.cpp >+++ b/Source/JavaScriptCore/jit/JITOperationsMSVC64.cpp >@@ -25,7 +25,7 @@ > > #include "config.h" > >-#if !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64) >+#if USE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64) > > #include "CallFrame.h" > #include "JSCJSValue.h" >diff --git a/Source/JavaScriptCore/jit/Reg.cpp b/Source/JavaScriptCore/jit/Reg.cpp >index 4aa96537474184b113401ae0ccd9481e2275104b..3cc49c03d86889d4c4cda0e7e37e2b9aa2401bfa 100644 >--- a/Source/JavaScriptCore/jit/Reg.cpp >+++ b/Source/JavaScriptCore/jit/Reg.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "Reg.h" > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "FPRInfo.h" > #include "GPRInfo.h" >@@ -54,5 +54,5 @@ void Reg::dump(PrintStream& out) const > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) > >diff --git a/Source/JavaScriptCore/jit/Reg.h b/Source/JavaScriptCore/jit/Reg.h >index 84ae35904768cfa1fe0d27ac5ee560653d788b07..9d246ade5bc710500b7f717396d1217b3ed20f5b 100644 >--- a/Source/JavaScriptCore/jit/Reg.h >+++ b/Source/JavaScriptCore/jit/Reg.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "MacroAssembler.h" > >@@ -245,4 +245,4 @@ template<> struct HashTraits<JSC::Reg> : SimpleClassHashTraits<JSC::Reg> { > > } // namespace WTF > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/jit/RegisterAtOffset.cpp b/Source/JavaScriptCore/jit/RegisterAtOffset.cpp >index 16a639ca8c796260ef35760561947759e1ee258e..0e44e2db11e805d043e30dcf142895ea0c8a5d75 100644 >--- a/Source/JavaScriptCore/jit/RegisterAtOffset.cpp >+++ b/Source/JavaScriptCore/jit/RegisterAtOffset.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "RegisterAtOffset.h" > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > namespace JSC { > >@@ -41,5 +41,5 @@ void RegisterAtOffset::dump(PrintStream& out) const > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) > >diff --git a/Source/JavaScriptCore/jit/RegisterAtOffset.h b/Source/JavaScriptCore/jit/RegisterAtOffset.h >index 0db8da4a7261b8b8b700c103fb352b8e5ae2b2f3..cd415b6d669f939ff1d35cf31c7cd7b4a20e92c4 100644 >--- a/Source/JavaScriptCore/jit/RegisterAtOffset.h >+++ b/Source/JavaScriptCore/jit/RegisterAtOffset.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "Reg.h" > #include <wtf/PrintStream.h> >@@ -74,4 +74,4 @@ class RegisterAtOffset { > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp b/Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp >index dd5b5b32f37ad0ddba3c73ba58a5076d3e299448..6fe06e7762b4a479dd05146860aae9b4dd1a3fbd 100644 >--- a/Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp >+++ b/Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "RegisterAtOffsetList.h" > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include <wtf/ListDump.h> > >@@ -68,5 +68,5 @@ unsigned RegisterAtOffsetList::indexOf(Reg reg) const > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) > >diff --git a/Source/JavaScriptCore/jit/RegisterAtOffsetList.h b/Source/JavaScriptCore/jit/RegisterAtOffsetList.h >index e0b2541ab8dc923ff71ed488764506075c3b9e3c..5e3a3cb2ce0293411957f6899339d677f4a9f455 100644 >--- a/Source/JavaScriptCore/jit/RegisterAtOffsetList.h >+++ b/Source/JavaScriptCore/jit/RegisterAtOffsetList.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "RegisterAtOffset.h" > #include "RegisterSet.h" >@@ -69,4 +69,4 @@ class RegisterAtOffsetList { > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/jit/RegisterMap.h b/Source/JavaScriptCore/jit/RegisterMap.h >index 0f3f9574f1f95e6e02f8ba4714103f8db182dd5b..5a77977caa912a095edb68c702454d9af18ba02d 100644 >--- a/Source/JavaScriptCore/jit/RegisterMap.h >+++ b/Source/JavaScriptCore/jit/RegisterMap.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "FPRInfo.h" > #include "GPRInfo.h" >@@ -107,4 +107,4 @@ class FPRMap { > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/jit/RegisterSet.cpp b/Source/JavaScriptCore/jit/RegisterSet.cpp >index 85256f7b1462599aeaec67d9e07842de4c615c18..a602141aa8661ddabe901b2f42449ced39fee561 100644 >--- a/Source/JavaScriptCore/jit/RegisterSet.cpp >+++ b/Source/JavaScriptCore/jit/RegisterSet.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "RegisterSet.h" > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "GPRInfo.h" > #include "JSCInlines.h" >@@ -395,5 +395,5 @@ void RegisterSet::dump(PrintStream& out) const > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) > >diff --git a/Source/JavaScriptCore/jit/RegisterSet.h b/Source/JavaScriptCore/jit/RegisterSet.h >index c87eaf8c3b53bcc8f30c1cae8978603d4dc0dc25..dd730403804229508da2affc3ec34c2e69467fc5 100644 >--- a/Source/JavaScriptCore/jit/RegisterSet.h >+++ b/Source/JavaScriptCore/jit/RegisterSet.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > > #include "GPRInfo.h" > #include "MacroAssembler.h" >@@ -246,4 +246,4 @@ template<> struct HashTraits<JSC::RegisterSet> : public CustomHashTraits<JSC::Re > > } // namespace WTF > >-#endif // ENABLE(JIT) >+#endif // !USE(C_LOOP) >diff --git a/Source/JavaScriptCore/jit/TempRegisterSet.cpp b/Source/JavaScriptCore/jit/TempRegisterSet.cpp >index 9c2e73d432b6ca6dbaa56bb05e8a9b7f28482fd5..3f3521ea26156a7d0c1b4c2fcc5bc0baff3406ff 100644 >--- a/Source/JavaScriptCore/jit/TempRegisterSet.cpp >+++ b/Source/JavaScriptCore/jit/TempRegisterSet.cpp >@@ -26,9 +26,8 @@ > #include "config.h" > #include "TempRegisterSet.h" > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > >-#include "JSCInlines.h" > #include "RegisterSet.h" > > namespace JSC { >@@ -51,4 +50,4 @@ TempRegisterSet::TempRegisterSet(const RegisterSet& other) > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/jit/TempRegisterSet.h b/Source/JavaScriptCore/jit/TempRegisterSet.h >index 9983229efafc43fe917256c87ddcee9b0825fdf5..66383f59f88562abcbb0f9569a4153003d81b71b 100644 >--- a/Source/JavaScriptCore/jit/TempRegisterSet.h >+++ b/Source/JavaScriptCore/jit/TempRegisterSet.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if ENABLE(JIT) >+#if ENABLE(ASSEMBLER) > > #include "FPRInfo.h" > #include "GPRInfo.h" >@@ -205,7 +205,7 @@ class TempRegisterSet { > > } // namespace JSC > >-#else // ENABLE(JIT) -> so if JIT is disabled >+#else // ENABLE(ASSEMBLER) -> so if JIT is disabled > > namespace JSC { > >@@ -216,4 +216,4 @@ struct TempRegisterSet { }; > > } // namespace JSC > >-#endif // ENABLE(JIT) >+#endif // ENABLE(ASSEMBLER) >diff --git a/Source/JavaScriptCore/llint/LLIntCLoop.cpp b/Source/JavaScriptCore/llint/LLIntCLoop.cpp >index e3c6c6ce97e5fda708989b781ed37625f097bcc9..d5b36437724e53a2acb6ade5e70802b69c6a3669 100644 >--- a/Source/JavaScriptCore/llint/LLIntCLoop.cpp >+++ b/Source/JavaScriptCore/llint/LLIntCLoop.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "LLIntCLoop.h" > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > #include "LLIntData.h" > >@@ -41,4 +41,4 @@ void CLoop::initialize() > } // namespace LLInt > } // namespace JSC > >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/llint/LLIntCLoop.h b/Source/JavaScriptCore/llint/LLIntCLoop.h >index a315914551fb0d8cc612becddc48f9fccacc05e2..8a8933b4dc95de833d41c7294188666368ceb283 100644 >--- a/Source/JavaScriptCore/llint/LLIntCLoop.h >+++ b/Source/JavaScriptCore/llint/LLIntCLoop.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > #include "JSCJSValue.h" > #include "Opcode.h" >@@ -44,4 +44,4 @@ class CLoop { > > using JSC::LLInt::CLoop; > >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp >index 41f64b4afa31e819cf54b9fbcd8083f5a3136e6f..3c908251dfd4f4982151e46b8c441ff48d4da7a7 100644 >--- a/Source/JavaScriptCore/llint/LLIntData.cpp >+++ b/Source/JavaScriptCore/llint/LLIntData.cpp >@@ -46,16 +46,16 @@ namespace JSC { namespace LLInt { > Instruction Data::s_exceptionInstructions[maxOpcodeLength + 1] = { }; > Opcode Data::s_opcodeMap[numOpcodeIDs] = { }; > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > extern "C" void llint_entry(void*); > #endif > > void initialize() > { >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > CLoop::initialize(); > >-#else // ENABLE(JIT) >+#else // !USE(C_LOOP) > llint_entry(&Data::s_opcodeMap); > > for (int i = 0; i < numOpcodeIDs; ++i) >@@ -64,7 +64,7 @@ void initialize() > void* handler = Data::s_opcodeMap[llint_throw_from_slow_path_trampoline]; > for (int i = 0; i < maxOpcodeLength + 1; ++i) > Data::s_exceptionInstructions[i].u.pointer = handler; >-#endif // ENABLE(JIT) >+#endif // USE(C_LOOP) > } > > IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn") >@@ -125,7 +125,7 @@ void Data::performAssertions(VM& vm) > STATIC_ASSERT(ValueUndefined == (TagBitTypeOther | TagBitUndefined)); > STATIC_ASSERT(ValueNull == TagBitTypeOther); > #endif >-#if (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) || !ENABLE(JIT) >+#if (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) || !ENABLE(ASSEMBLER) > STATIC_ASSERT(!maxFrameExtentForSlowPathCall); > #elif CPU(ARM) > STATIC_ASSERT(maxFrameExtentForSlowPathCall == 24); >@@ -135,7 +135,7 @@ void Data::performAssertions(VM& vm) > STATIC_ASSERT(maxFrameExtentForSlowPathCall == 64); > #endif > >-#if !ENABLE(JIT) || USE(JSVALUE32_64) >+#if USE(C_LOOP) || USE(JSVALUE32_64) > ASSERT(!CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters()); > #elif (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) > ASSERT(CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters() == 3); >diff --git a/Source/JavaScriptCore/llint/LLIntData.h b/Source/JavaScriptCore/llint/LLIntData.h >index be58c00ae5c66ac30581ae3d4849428e5bb301d0..90b523dd789589a862e81fcfab07ece0db7729d2 100644 >--- a/Source/JavaScriptCore/llint/LLIntData.h >+++ b/Source/JavaScriptCore/llint/LLIntData.h >@@ -34,7 +34,7 @@ namespace JSC { > class VM; > struct Instruction; > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > typedef OpcodeID LLIntCode; > #else > typedef void (*LLIntCode)(); >diff --git a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h >index a6437d403a40a991f9558e6e3f40793c7dec7923..33fe622d0ab0d3f32ea7bb70ac99dea436d56650 100644 >--- a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h >+++ b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h >@@ -30,7 +30,7 @@ > #include <wtf/Gigacage.h> > #include <wtf/Poisoned.h> > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > #define OFFLINE_ASM_C_LOOP 1 > #define OFFLINE_ASM_X86 0 > #define OFFLINE_ASM_X86_WIN 0 >@@ -45,7 +45,7 @@ > #define OFFLINE_ASM_ARMv7s 0 > #define OFFLINE_ASM_MIPS 0 > >-#else // ENABLE(JIT) >+#else // USE(C_LOOP) > > #define OFFLINE_ASM_C_LOOP 0 > >@@ -137,7 +137,7 @@ > #endif > #endif > >-#endif // ENABLE(JIT) >+#endif // USE(C_LOOP) > > #if USE(JSVALUE64) > #define OFFLINE_ASM_JSVALUE64 1 >diff --git a/Source/JavaScriptCore/llint/LLIntOpcode.h b/Source/JavaScriptCore/llint/LLIntOpcode.h >index 85905e37043823783bdf7bfec14567d14115c185..002273817501001ef822a8d59e3974e85c092977 100644 >--- a/Source/JavaScriptCore/llint/LLIntOpcode.h >+++ b/Source/JavaScriptCore/llint/LLIntOpcode.h >@@ -25,7 +25,7 @@ > > #pragma once > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > #define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \ > FOR_EACH_CLOOP_BYTECODE_HELPER_ID(macro) >diff --git a/Source/JavaScriptCore/llint/LLIntPCRanges.h b/Source/JavaScriptCore/llint/LLIntPCRanges.h >index 942185e82446e9c27c8f5ff143eea6085519aa63..d702d1f1b807523cee985394808a4f3dc9fed904 100644 >--- a/Source/JavaScriptCore/llint/LLIntPCRanges.h >+++ b/Source/JavaScriptCore/llint/LLIntPCRanges.h >@@ -46,7 +46,7 @@ ALWAYS_INLINE bool isLLIntPC(void* pc) > return llintStart <= pcAsInt && pcAsInt <= llintEnd; > } > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > static const GPRReg LLIntPC = GPRInfo::regT4; > #endif > >diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >index 3c5f9a2942b3003fe42138f7e4ddc3ea0deeb7c4..3f185308ceba4b3b3d759fa8bca128ce7c2c5cd1 100644 >--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp >@@ -536,7 +536,7 @@ LLINT_SLOW_PATH_DECL(stack_check) > slowPathLogF("Num vars = %u.\n", codeBlock->numVars()); > } > slowPathLogF("Current OS stack end is at %p.\n", vm.softStackLimit()); >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > slowPathLogF("Current C Loop stack end is at %p.\n", vm.cloopStackLimit()); > #endif > >@@ -547,7 +547,7 @@ LLINT_SLOW_PATH_DECL(stack_check) > // For JIT enabled builds which uses the C stack, the stack is not growable. > // Hence, if we get here, then we know a stack overflow is imminent. So, just > // throw the StackOverflowError unconditionally. >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > Register* topOfFrame = exec->topOfFrame(); > if (LIKELY(topOfFrame < reinterpret_cast<Register*>(exec))) { > ASSERT(!vm.interpreter->cloopStack().containsAddress(topOfFrame)); >@@ -1861,7 +1861,7 @@ extern "C" SlowPathReturnType llint_throw_stack_overflow_error(VM* vm, ProtoCall > return encodeResult(0, 0); > } > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM* vm, Register* newTopOfStack) > { > bool success = vm->ensureStackCapacityFor(newTopOfStack); >diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.h b/Source/JavaScriptCore/llint/LLIntSlowPaths.h >index 7cfeca7a816d1dc530a347e86fb9d5fd360bcb80..654a1924df1778c5b89141b971bbab70290f1d6e 100644 >--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.h >+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.h >@@ -132,7 +132,7 @@ LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_log_shadow_chicken_tail); > LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_super_sampler_begin); > LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_super_sampler_end); > extern "C" SlowPathReturnType llint_throw_stack_overflow_error(VM*, ProtoCallFrame*) WTF_INTERNAL; >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM*, Register*) WTF_INTERNAL; > #endif > extern "C" NO_RETURN_DUE_TO_CRASH void llint_crash() WTF_INTERNAL; >diff --git a/Source/JavaScriptCore/llint/LLIntThunks.cpp b/Source/JavaScriptCore/llint/LLIntThunks.cpp >index 2446bdbfe76cf96294025dc65757da0e49930e8a..97e29192b686412063fb9c78a7a6b87460e4ab90 100644 >--- a/Source/JavaScriptCore/llint/LLIntThunks.cpp >+++ b/Source/JavaScriptCore/llint/LLIntThunks.cpp >@@ -98,8 +98,9 @@ MacroAssemblerCodeRef<JITThunkPtrTag> moduleProgramEntryThunkGenerator(VM* vm) > > } // namespace LLInt > >-#else // ENABLE(JIT) >+#endif > >+#if USE(C_LOOP) > // Non-JIT (i.e. C Loop LLINT) case: > > EncodedJSValue vmEntryToJavaScript(void* executableAddress, VM* vm, ProtoCallFrame* protoCallFrame) >@@ -122,7 +123,6 @@ extern "C" VMEntryRecord* vmEntryRecord(EntryFrame* entryFrame) > return reinterpret_cast<VMEntryRecord*>(reinterpret_cast<char*>(entryFrame) - VMEntryTotalFrameSize); > } > >- >-#endif // ENABLE(JIT) >+#endif // USE(C_LOOP) > > } // namespace JSC >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp >index 78bff0884c4802939a4de860f76b582eaa9a4265..dab77caff35dba3bd1dbeeae3308226e2a4aa03f 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp >@@ -29,7 +29,7 @@ > #include "LLIntOfflineAsmConfig.h" > #include <wtf/InlineASM.h> > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > #include "Bytecodes.h" > #include "CLoopStackInlines.h" > #include "CodeBlock.h" >@@ -559,4 +559,4 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* executableAddress, VM* vm, > // for the interpreter, as compiled from LowLevelInterpreter.asm. > #include "LLIntAssembly.h" > >-#endif // ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.h b/Source/JavaScriptCore/llint/LowLevelInterpreter.h >index 83008e1225bf53dcfcffdda0385d6f76ae962730..b5e97b7531bae5b2b724bd2d58898b196f20bc5c 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.h >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.h >@@ -27,7 +27,7 @@ > > #include "Opcode.h" > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > > namespace JSC { > >@@ -44,4 +44,4 @@ FOR_EACH_CORE_OPCODE_ID(LLINT_OPCODE_ALIAS) > > } // namespace JSC > >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) >diff --git a/Source/JavaScriptCore/runtime/JSCJSValue.h b/Source/JavaScriptCore/runtime/JSCJSValue.h >index 5442277699bef256c4ba62346c9afb305f85ed38..7d26721f8fe7e40bc38bf08bc83c3065885c9d8e 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValue.h >+++ b/Source/JavaScriptCore/runtime/JSCJSValue.h >@@ -59,7 +59,7 @@ class OSRExitCompiler; > class SpeculativeJIT; > } > #endif >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > namespace LLInt { > class CLoop; > } >@@ -147,7 +147,7 @@ class JSValue { > friend class DFG::OSRExitCompiler; > friend class DFG::SpeculativeJIT; > #endif >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > friend class LLInt::CLoop; > #endif > >diff --git a/Source/JavaScriptCore/runtime/MachineContext.h b/Source/JavaScriptCore/runtime/MachineContext.h >index 836d755688b172fc12f8c79482b0a60585305c79..c3e2a66f61771f6052aec797c53283a4a0105c1f 100644 >--- a/Source/JavaScriptCore/runtime/MachineContext.h >+++ b/Source/JavaScriptCore/runtime/MachineContext.h >@@ -50,10 +50,10 @@ inline void setInstructionPointer(PlatformRegisters&, MacroAssemblerCodePtr<CFun > > template<size_t N> void*& argumentPointer(PlatformRegisters&); > template<size_t N> void* argumentPointer(const PlatformRegisters&); >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > void*& llintInstructionPointer(PlatformRegisters&); > void* llintInstructionPointer(const PlatformRegisters&); >-#endif // ENABLE(JIT) >+#endif // !USE(C_LOOP) > > #if HAVE(MACHINE_CONTEXT) > >@@ -72,10 +72,10 @@ inline void setInstructionPointer(mcontext_t&, MacroAssemblerCodePtr<CFunctionPt > > template<size_t N> void*& argumentPointer(mcontext_t&); > template<size_t N> void* argumentPointer(const mcontext_t&); >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > void*& llintInstructionPointer(mcontext_t&); > void* llintInstructionPointer(const mcontext_t&); >-#endif // ENABLE(JIT) >+#endif // !USE(C_LOOP) > #endif // HAVE(MACHINE_CONTEXT) > #endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT) > >@@ -668,7 +668,7 @@ inline void* argumentPointer(const mcontext_t& machineContext) > } > #endif // HAVE(MACHINE_CONTEXT) > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > #if OS(WINDOWS) || HAVE(MACHINE_CONTEXT) > inline void*& llintInstructionPointer(PlatformRegisters& regs) > { >@@ -783,7 +783,7 @@ inline void* llintInstructionPointer(const mcontext_t& machineContext) > return llintInstructionPointer(const_cast<mcontext_t&>(machineContext)); > } > #endif // HAVE(MACHINE_CONTEXT) >-#endif // ENABLE(JIT) >+#endif // !USE(C_LOOP) > > } > } >diff --git a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >index b6935e4c7554da1af20d44ab62992f5a3891bcbd..0f2184303f6e3dd2e51ff5d93541dd753d6622ec 100644 >--- a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >+++ b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >@@ -601,10 +601,16 @@ void SamplingProfiler::processUnverifiedStackTraces() > storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee); > startIndex = 1; > } >- } else if (std::optional<CodeOrigin> codeOrigin = topCodeBlock->findPC(unprocessedStackTrace.topPC)) { >- appendCodeOrigin(topCodeBlock, *codeOrigin); >- storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee); >- startIndex = 1; >+ } else { >+#if ENABLE(JIT) >+ if (std::optional<CodeOrigin> codeOrigin = topCodeBlock->findPC(unprocessedStackTrace.topPC)) { >+ appendCodeOrigin(topCodeBlock, *codeOrigin); >+ storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee); >+ startIndex = 1; >+ } >+#else >+ UNUSED_PARAM(appendCodeOrigin); >+#endif > } > } > >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index 8e092bc5a8a78be8609b49d6cc6fced185a84519..a66bce701c4813c79adfa896e8879f7ad156b3eb 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -159,7 +159,7 @@ > #include <wtf/text/AtomicStringTable.h> > #include <wtf/text/SymbolRegistry.h> > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > #include "CLoopStack.h" > #include "CLoopStackInlines.h" > #endif >@@ -876,7 +876,7 @@ size_t VM::updateSoftReservedZoneSize(size_t softReservedZoneSize) > { > size_t oldSoftReservedZoneSize = m_currentSoftReservedZoneSize; > m_currentSoftReservedZoneSize = softReservedZoneSize; >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > interpreter->cloopStack().setSoftReservedZoneSize(softReservedZoneSize); > #endif > >@@ -1145,7 +1145,7 @@ void sanitizeStackForVM(VM* vm) > ASSERT(vm->currentThreadIsHoldingAPILock()); > ASSERT_UNUSED(stackBounds, stackBounds.contains(vm->lastStackTop())); > } >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > vm->interpreter->cloopStack().sanitizeStack(); > #else > sanitizeStackForVMImpl(vm); >@@ -1154,7 +1154,7 @@ void sanitizeStackForVM(VM* vm) > > size_t VM::committedStackByteCount() > { >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > // When using the C stack, we don't know how many stack pages are actually > // committed. So, we use the current stack usage as an estimate. > ASSERT(Thread::current().stack().isGrowingDownward()); >@@ -1166,7 +1166,7 @@ size_t VM::committedStackByteCount() > #endif > } > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > bool VM::ensureStackCapacityForCLoop(Register* newTopOfStack) > { > return interpreter->cloopStack().ensureCapacityFor(newTopOfStack); >@@ -1176,7 +1176,7 @@ bool VM::isSafeToRecurseSoftCLoop() const > { > return interpreter->cloopStack().isSafeToRecurse(); > } >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) > > #if ENABLE(EXCEPTION_SCOPE_VERIFICATION) > void VM::verifyExceptionCheckNeedIsSatisfied(unsigned recursionDepth, ExceptionEventLocation& location) >diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h >index 40da5d36892538b2b2bb4d167612e57d515acd63..8f60305846e34021383ef14021e8fb13c8277490 100644 >--- a/Source/JavaScriptCore/runtime/VM.h >+++ b/Source/JavaScriptCore/runtime/VM.h >@@ -716,7 +716,7 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> { > void* stackLimit() { return m_stackLimit; } > void* softStackLimit() { return m_softStackLimit; } > void** addressOfSoftStackLimit() { return &m_softStackLimit; } >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > void* cloopStackLimit() { return m_cloopStackLimit; } > void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; } > #endif >@@ -929,10 +929,10 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> { > m_exception = nullptr; > } > >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > bool ensureStackCapacityForCLoop(Register* newTopOfStack); > bool isSafeToRecurseSoftCLoop() const; >-#endif // !ENABLE(JIT) >+#endif // USE(C_LOOP) > > JS_EXPORT_PRIVATE void throwException(ExecState*, Exception*); > JS_EXPORT_PRIVATE JSValue throwException(ExecState*, JSValue); >@@ -953,7 +953,7 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> { > size_t m_currentSoftReservedZoneSize; > void* m_stackLimit { nullptr }; > void* m_softStackLimit { nullptr }; >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > void* m_cloopStackLimit { nullptr }; > #endif > void* m_lastStackTop { nullptr }; >@@ -1035,7 +1035,7 @@ inline Heap* WeakSet::heap() const > return &m_vm->heap; > } > >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > extern "C" void sanitizeStackForVMImpl(VM*); > #endif > >diff --git a/Source/JavaScriptCore/runtime/VMInlines.h b/Source/JavaScriptCore/runtime/VMInlines.h >index 15b50d6dfbaea1226299e712910d30dbb3f1f133..c5173a6e49ae514683810c2c858fea689bd9a137 100644 >--- a/Source/JavaScriptCore/runtime/VMInlines.h >+++ b/Source/JavaScriptCore/runtime/VMInlines.h >@@ -35,7 +35,7 @@ namespace JSC { > > bool VM::ensureStackCapacityFor(Register* newTopOfStack) > { >-#if ENABLE(JIT) >+#if !USE(C_LOOP) > ASSERT(Thread::current().stack().isGrowingDownward()); > return newTopOfStack >= m_softStackLimit; > #else >@@ -47,7 +47,7 @@ bool VM::ensureStackCapacityFor(Register* newTopOfStack) > bool VM::isSafeToRecurseSoft() const > { > bool safe = isSafeToRecurse(m_softStackLimit); >-#if !ENABLE(JIT) >+#if USE(C_LOOP) > safe = safe && isSafeToRecurseSoftCLoop(); > #endif > return safe; >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index e569cdc5638972f2caa1439a6bb36218ff9f374b..b39102980e29607a21492bec743d89724c14db74 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -757,6 +757,13 @@ > #define ENABLE_JIT 0 > #endif > >+#if ENABLE(JIT) \ >+ || CPU(X86_64) || (CPU(ARM64) && !defined(__ILP32__)) >+#define USE_C_LOOP 0 >+#else >+#define USE_C_LOOP 1 >+#endif >+ > /* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */ > #if USE(JSVALUE32_64) > #undef ENABLE_FTL_JIT >@@ -863,7 +870,7 @@ > * In configurations other than Windows and Darwin, because layout of mcontext_t depends on standard libraries (like glibc), > * sampling profiler is enabled if WebKit uses pthreads and glibc. */ > #if !defined(ENABLE_SAMPLING_PROFILER) >-#if ENABLE(JIT) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT)) >+#if !USE(C_LOOP) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT)) > #define ENABLE_SAMPLING_PROFILER 1 > #else > #define ENABLE_SAMPLING_PROFILER 0 >@@ -947,11 +954,11 @@ > #endif > > /* Determine if we need to enable Computed Goto Opcodes or not: */ >-#if HAVE(COMPUTED_GOTO) || ENABLE(JIT) >+#if HAVE(COMPUTED_GOTO) || !USE(C_LOOP) > #define ENABLE_COMPUTED_GOTO_OPCODES 1 > #endif > >-#if ENABLE(JIT) && !COMPILER(MSVC) && \ >+#if !USE(C_LOOP) && !COMPILER(MSVC) && \ > (CPU(X86) || CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && OS(DARWIN))) > /* This feature works by embedding the OpcodeID in the 32 bit just before the generated LLint code > that executes each opcode. It cannot be supported by the CLoop since there's no way to embed the >@@ -981,7 +988,7 @@ > > /* If either the JIT or the RegExp JIT is enabled, then the Assembler must be > enabled as well: */ >-#if ENABLE(JIT) || ENABLE(YARR_JIT) >+#if ENABLE(JIT) || ENABLE(YARR_JIT) || !USE(C_LOOP) > #if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER > #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler" > #else >diff --git a/Source/cmake/WebKitFeatures.cmake b/Source/cmake/WebKitFeatures.cmake >index 116e0d96974f12edde0605c1e7cf6d238bf3fa00..5a4528ae17d13c07429a54ccf0a46b97ce3a9f25 100644 >--- a/Source/cmake/WebKitFeatures.cmake >+++ b/Source/cmake/WebKitFeatures.cmake >@@ -195,7 +195,6 @@ macro(WEBKIT_OPTION_BEGIN) > WEBKIT_OPTION_DEPEND(ENABLE_DFG_JIT ENABLE_JIT) > WEBKIT_OPTION_DEPEND(ENABLE_FTL_JIT ENABLE_DFG_JIT) > WEBKIT_OPTION_DEPEND(ENABLE_WEBASSEMBLY ENABLE_FTL_JIT) >- WEBKIT_OPTION_DEPEND(ENABLE_SAMPLING_PROFILER ENABLE_JIT) > WEBKIT_OPTION_DEPEND(ENABLE_INDEXED_DATABASE_IN_WORKERS ENABLE_INDEXED_DATABASE) > WEBKIT_OPTION_DEPEND(ENABLE_MEDIA_CONTROLS_SCRIPT ENABLE_VIDEO) > WEBKIT_OPTION_DEPEND(ENABLE_MEDIA_SOURCE ENABLE_VIDEO) >diff --git a/ChangeLog b/ChangeLog >index 8dc07b7942a20a29bf21f7db72f997f8626d1578..f651240d9e640e302702ac37f3b22e5b09a30572 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,12 @@ >+2018-09-19 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration >+ https://bugs.webkit.org/show_bug.cgi?id=189778 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/WebKitFeatures.cmake: >+ > 2018-09-12 Dan Bernstein <mitz@apple.com> > > Updated svn:ignore after r235381.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189778
:
350170
|
350338
|
350340
|
350342
|
350355
|
350480
|
350482