Diff
Modified: trunk/ChangeLog (236380 => 236381)
--- trunk/ChangeLog 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/ChangeLog 2018-09-22 05:26:44 UTC (rev 236381)
@@ -1,3 +1,15 @@
+2018-09-21 Yusuke Suzuki <[email protected]>
+
+ [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:
+
2018-09-21 Mike Gorse <[email protected]>
Build tools should work when the /usr/bin/python is python3
Modified: trunk/Source/_javascript_Core/API/tests/PingPongStackOverflowTest.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/API/tests/PingPongStackOverflowTest.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/API/tests/PingPongStackOverflowTest.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -127,7 +127,7 @@
Options::softReservedZoneSize() = 128 * KB;
Options::reservedZoneSize() = 64 * KB;
-#if ENABLE(JIT)
+#if ENABLE(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.
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (236380 => 236381)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2018-09-22 05:26:44 UTC (rev 236381)
@@ -231,7 +231,9 @@
endif ()
if (NOT ENABLE_JIT)
- set(OFFLINE_ASM_BACKEND "C_LOOP")
+ if (ENABLE_C_LOOP)
+ set(OFFLINE_ASM_BACKEND "C_LOOP")
+ endif ()
endif ()
endif ()
@@ -264,7 +266,7 @@
# LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
# running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
# after every asm.rb run.
-if (MSVC AND ENABLE_JIT)
+if (MSVC AND NOT ENABLE_C_LOOP)
set(LLIntOutput LowLevelInterpreterWin.asm)
set(OFFLINE_ASM_ARGS --assembler=MASM)
else ()
@@ -284,7 +286,7 @@
# the .cpp files below is similar to the one in the previous comment. However, since these .cpp
# files are used to build _javascript_Core itself, we can just add LLIntAssembly.h to JSC_HEADERS
# since it is used in the add_library() call at the end of this file.
-if (MSVC AND ENABLE_JIT)
+if (MSVC AND NOT ENABLE_C_LOOP)
enable_language(ASM_MASM)
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
# Win32 needs /safeseh with assembly, but Win64 does not.
@@ -1182,7 +1184,7 @@
list(APPEND _javascript_Core_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h)
if (WTF_CPU_X86_64)
- if (MSVC AND ENABLE_JIT)
+ if (MSVC AND NOT ENABLE_C_LOOP)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
MAIN_DEPENDENCY ${_javascript_CORE_DIR}/jit/JITStubsMSVC64.asm
Modified: trunk/Source/_javascript_Core/ChangeLog (236380 => 236381)
--- trunk/Source/_javascript_Core/ChangeLog 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-09-22 05:26:44 UTC (rev 236381)
@@ -1,3 +1,111 @@
+2018-09-21 Yusuke Suzuki <[email protected]>
+
+ [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.
+
+ 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:
+ * _javascript_Core.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):
+
2018-09-21 Keith Miller <[email protected]>
Add Promise SPI
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (236380 => 236381)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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, ); }; };
@@ -2012,7 +2011,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>"; };
@@ -7634,7 +7632,6 @@
0F93329414CA7DC10085F3C6 /* CallLinkStatus.h */,
627673211B680C1E00FD9F2E /* CallMode.cpp */,
627673221B680C1E00FD9F2E /* CallMode.h */,
- 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */,
0F3B7E2419A11B8000D9BC56 /* CallVariant.cpp */,
0F3B7E2519A11B8000D9BC56 /* CallVariant.h */,
969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */,
@@ -8483,7 +8480,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 */,
Modified: trunk/Source/_javascript_Core/assembler/MaxFrameExtentForSlowPathCall.h (236380 => 236381)
--- trunk/Source/_javascript_Core/assembler/MaxFrameExtentForSlowPathCall.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/assembler/MaxFrameExtentForSlowPathCall.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -35,7 +35,7 @@
// 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 @@
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
Deleted: trunk/Source/_javascript_Core/bytecode/CallReturnOffsetToBytecodeOffset.h (236380 => 236381)
--- trunk/Source/_javascript_Core/bytecode/CallReturnOffsetToBytecodeOffset.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/bytecode/CallReturnOffsetToBytecodeOffset.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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 @@
if (size_t size = unlinkedCodeBlock->numberOfObjectAllocationProfiles())
m_objectAllocationProfiles = RefCountedArray<ObjectAllocationProfile>(size);
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
setCalleeSaveRegisters(RegisterSet::llintBaselineCalleeSaveRegisters());
#endif
@@ -2145,7 +2145,7 @@
#endif // ENABLE(JIT)
}
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
void CodeBlock::setCalleeSaveRegisters(RegisterSet calleeSaveRegisters)
{
m_calleeSaveRegisters = std::make_unique<RegisterAtOffsetList>(calleeSaveRegisters);
@@ -2172,7 +2172,10 @@
{
return roundCalleeSaveSpaceAsVirtualRegisters(m_calleeSaveRegisters->size());
}
+#endif
+#if ENABLE(JIT)
+
void CodeBlock::countReoptimization()
{
m_reoptimizationRetryCounter++;
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (236380 => 236381)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -645,11 +645,23 @@
// to avoid thrashing.
JS_EXPORT_PRIVATE unsigned reoptimizationRetryCounter() const;
void countReoptimization();
-#if ENABLE(JIT)
+
+#if !ENABLE(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 @@
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 @@
SentinelLinkedList<LLIntCallLinkInfo, BasicRawSentinelNode<LLIntCallLinkInfo>> m_incomingLLIntCalls;
StructureWatchpointMap m_llintGetByIdWatchpointMap;
PoisonedRefPtr<CodeBlockPoison, JITCode> m_jitCode;
+#if !ENABLE(C_LOOP)
+ std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters;
+#endif
#if ENABLE(JIT)
- std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters;
PoisonedBag<CodeBlockPoison, StructureStubInfo> m_stubInfos;
PoisonedBag<CodeBlockPoison, JITAddIC> m_addICs;
PoisonedBag<CodeBlockPoison, JITMulIC> m_mulICs;
Modified: trunk/Source/_javascript_Core/bytecode/Opcode.h (236380 => 236381)
--- trunk/Source/_javascript_Core/bytecode/Opcode.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/bytecode/Opcode.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -58,7 +58,7 @@
#undef OPCODE_ID_ENUM
const int maxOpcodeLength = 9;
-#if !ENABLE(JIT)
+#if ENABLE(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;
Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/heap/Heap.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -672,7 +672,7 @@
void Heap::gatherJSStackRoots(ConservativeRoots& roots)
{
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
m_vm->interpreter->cloopStack().gatherConservativeRoots(roots, *m_jitStubRoutines, *m_codeBlocks);
#else
UNUSED_PARAM(roots);
@@ -1605,9 +1605,8 @@
&& conn == GCConductor::Collector)
setGCDidJIT();
}
-#else
+#endif // ENABLE(JIT)
UNUSED_PARAM(conn);
-#endif // ENABLE(JIT)
vm()->shadowChicken().update(*vm(), vm()->topCallFrame);
Modified: trunk/Source/_javascript_Core/interpreter/CLoopStack.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/CLoopStack.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/CLoopStack.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -29,7 +29,7 @@
#include "config.h"
#include "CLoopStack.h"
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "CLoopStackInlines.h"
#include "ConservativeRoots.h"
@@ -163,4 +163,4 @@
} // namespace JSC
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/interpreter/CLoopStack.h (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/CLoopStack.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/CLoopStack.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -28,7 +28,7 @@
#pragma once
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "Register.h"
#include <wtf/Noncopyable.h>
@@ -107,4 +107,4 @@
} // namespace JSC
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/interpreter/CLoopStackInlines.h (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/CLoopStackInlines.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/CLoopStackInlines.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "CLoopStack.h"
#include "CallFrame.h"
@@ -59,4 +59,4 @@
} // namespace JSC
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/interpreter/EntryFrame.h (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/EntryFrame.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/EntryFrame.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -31,7 +31,7 @@
namespace JSC {
struct EntryFrame {
-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
+#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
static ptrdiff_t vmEntryRecordOffset()
{
EntryFrame* fakeEntryFrame = reinterpret_cast<EntryFrame*>(0x1000);
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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 @@
Interpreter::Interpreter(VM& vm)
: m_vm(vm)
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
, m_cloopStack(vm)
#endif
{
@@ -563,7 +564,7 @@
private:
void copyCalleeSavesToEntryFrameCalleeSavesBuffer(StackVisitor& visitor) const
{
-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
+#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
RegisterAtOffsetList* currentCalleeSaves = visitor->calleeSaveRegisters();
if (!currentCalleeSaves)
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.h (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -36,7 +36,7 @@
#include "StackAlignment.h"
#include <wtf/HashMap.h>
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "CLoopStack.h"
#endif
@@ -93,7 +93,7 @@
Interpreter(VM &);
~Interpreter();
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
CLoopStack& cloopStack() { return m_cloopStack; }
#endif
@@ -147,7 +147,7 @@
JSValue execute(CallFrameClosure&);
VM& m_vm;
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
CLoopStack m_cloopStack;
#endif
Modified: trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -257,7 +257,7 @@
if (isInlinedFrame())
return nullptr;
-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
+#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
#if ENABLE(WEBASSEMBLY)
if (isWasmFrame()) {
@@ -273,7 +273,7 @@
if (CodeBlock* codeBlock = this->codeBlock())
return codeBlock->calleeSaveRegisters();
-#endif // ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
+#endif // !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
return nullptr;
}
Modified: trunk/Source/_javascript_Core/interpreter/VMEntryRecord.h (236380 => 236381)
--- trunk/Source/_javascript_Core/interpreter/VMEntryRecord.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/interpreter/VMEntryRecord.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -46,7 +46,7 @@
JSObject* callee() const { return m_callee; }
-#if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
+#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
intptr_t calleeSaveRegistersBuffer[NUMBER_OF_CALLEE_SAVES_REGISTERS];
#endif
Modified: trunk/Source/_javascript_Core/jit/ExecutableAllocator.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/ExecutableAllocator.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/ExecutableAllocator.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -145,7 +145,7 @@
#else
inline bool isJITPC(void*) { return false; }
-#endif // ENABLE(JIT) && ENABLE(ASSEMBLER)
+#endif // ENABLE(ASSEMBLER)
} // namespace JSC
Modified: trunk/Source/_javascript_Core/jit/FPRInfo.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/FPRInfo.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/FPRInfo.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -33,7 +33,7 @@
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 @@
// 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 @@
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);
Modified: trunk/Source/_javascript_Core/jit/GPRInfo.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/GPRInfo.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/GPRInfo.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -26,7 +26,7 @@
#include "config.h"
#include "GPRInfo.h"
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
namespace JSC {
@@ -48,4 +48,4 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/GPRInfo.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/GPRInfo.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/GPRInfo.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -41,7 +41,7 @@
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 @@
// 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 @@
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);
Modified: trunk/Source/_javascript_Core/jit/HostCallReturnValue.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/HostCallReturnValue.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/HostCallReturnValue.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -26,6 +26,8 @@
#include "config.h"
#include "HostCallReturnValue.h"
+#if !ENABLE(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 // !ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/jit/HostCallReturnValue.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/HostCallReturnValue.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/HostCallReturnValue.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -27,7 +27,7 @@
#include "JSCJSValue.h"
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
#if CALLING_CONVENTION_IS_STDCALL
#define HOST_CALL_RETURN_VALUE_OPTION CDECL
@@ -57,4 +57,4 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // !ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/JITOperations.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -2908,109 +2908,6 @@
} // 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)
Modified: trunk/Source/_javascript_Core/jit/JITOperationsMSVC64.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/JITOperationsMSVC64.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/JITOperationsMSVC64.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#include "config.h"
-#if !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)
+#if ENABLE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64)
#include "CallFrame.h"
#include "JSCJSValue.h"
@@ -43,4 +43,4 @@
} // namespace JSC
-#endif // !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)
+#endif // ENABLE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64)
Modified: trunk/Source/_javascript_Core/jit/Reg.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/Reg.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/Reg.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/Reg.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/Reg.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/Reg.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
#include "MacroAssembler.h"
@@ -245,4 +245,4 @@
} // namespace WTF
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterAtOffset.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterAtOffset.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterAtOffset.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -26,7 +26,7 @@
#include "config.h"
#include "RegisterAtOffset.h"
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
namespace JSC {
@@ -41,5 +41,5 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterAtOffset.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterAtOffset.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterAtOffset.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
#include "Reg.h"
#include <wtf/PrintStream.h>
@@ -74,4 +74,4 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterAtOffsetList.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterAtOffsetList.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterAtOffsetList.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -26,7 +26,7 @@
#include "config.h"
#include "RegisterAtOffsetList.h"
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
#include <wtf/ListDump.h>
@@ -68,5 +68,5 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterAtOffsetList.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterAtOffsetList.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterAtOffsetList.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
#include "RegisterAtOffset.h"
#include "RegisterSet.h"
@@ -69,4 +69,4 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterMap.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterMap.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterMap.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
#include "FPRInfo.h"
#include "GPRInfo.h"
@@ -107,4 +107,4 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterSet.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterSet.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterSet.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/RegisterSet.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/RegisterSet.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/RegisterSet.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
#include "GPRInfo.h"
#include "MacroAssembler.h"
@@ -246,4 +246,4 @@
} // namespace WTF
-#endif // ENABLE(JIT)
+#endif // !ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/jit/TempRegisterSet.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/TempRegisterSet.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/TempRegisterSet.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -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 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/TempRegisterSet.h (236380 => 236381)
--- trunk/Source/_javascript_Core/jit/TempRegisterSet.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/jit/TempRegisterSet.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(JIT)
+#if ENABLE(ASSEMBLER)
#include "FPRInfo.h"
#include "GPRInfo.h"
@@ -205,7 +205,7 @@
} // namespace JSC
-#else // ENABLE(JIT) -> so if JIT is disabled
+#else // ENABLE(ASSEMBLER) -> so if JIT is disabled
namespace JSC {
@@ -216,4 +216,4 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(ASSEMBLER)
Modified: trunk/Source/_javascript_Core/llint/LLIntCLoop.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntCLoop.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntCLoop.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -26,7 +26,7 @@
#include "config.h"
#include "LLIntCLoop.h"
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "LLIntData.h"
@@ -41,4 +41,4 @@
} // namespace LLInt
} // namespace JSC
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/llint/LLIntCLoop.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntCLoop.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntCLoop.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,7 +25,7 @@
#pragma once
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "JSCJSValue.h"
#include "Opcode.h"
@@ -44,4 +44,4 @@
using JSC::LLInt::CLoop;
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/llint/LLIntData.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntData.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntData.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -46,16 +46,16 @@
Instruction Data::s_exceptionInstructions[maxOpcodeLength + 1] = { };
Opcode Data::s_opcodeMap[numOpcodeIDs] = { };
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
extern "C" void llint_entry(void*);
#endif
void initialize()
{
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
CLoop::initialize();
-#else // ENABLE(JIT)
+#else // !ENABLE(C_LOOP)
llint_entry(&Data::s_opcodeMap);
for (int i = 0; i < numOpcodeIDs; ++i)
@@ -64,7 +64,7 @@
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 // ENABLE(C_LOOP)
}
IGNORE_CLANG_WARNINGS_BEGIN("missing-noreturn")
@@ -125,7 +125,7 @@
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 @@
STATIC_ASSERT(maxFrameExtentForSlowPathCall == 64);
#endif
-#if !ENABLE(JIT) || USE(JSVALUE32_64)
+#if ENABLE(C_LOOP) || USE(JSVALUE32_64)
ASSERT(!CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters());
#elif (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64)
ASSERT(CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters() == 3);
Modified: trunk/Source/_javascript_Core/llint/LLIntData.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntData.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntData.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -34,7 +34,7 @@
class VM;
struct Instruction;
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
typedef OpcodeID LLIntCode;
#else
typedef void (*LLIntCode)();
Modified: trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -30,7 +30,7 @@
#include <wtf/Gigacage.h>
#include <wtf/Poisoned.h>
-#if !ENABLE(JIT)
+#if ENABLE(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 // ENABLE(C_LOOP)
#define OFFLINE_ASM_C_LOOP 0
@@ -137,7 +137,7 @@
#endif
#endif
-#endif // ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
#if USE(JSVALUE64)
#define OFFLINE_ASM_JSVALUE64 1
Modified: trunk/Source/_javascript_Core/llint/LLIntOpcode.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntOpcode.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntOpcode.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -25,17 +25,17 @@
#pragma once
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \
FOR_EACH_CLOOP_BYTECODE_HELPER_ID(macro)
-#else // ENABLE(JIT)
+#else // !ENABLE(C_LOOP)
#define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \
- // Nothing to do here. Use the JIT impl instead.
+ // Nothing to do here. Use the LLInt ASM / JIT impl instead.
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
#define FOR_EACH_LLINT_NATIVE_HELPER(macro) \
Modified: trunk/Source/_javascript_Core/llint/LLIntPCRanges.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntPCRanges.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntPCRanges.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -46,7 +46,7 @@
return llintStart <= pcAsInt && pcAsInt <= llintEnd;
}
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
static const GPRReg LLIntPC = GPRInfo::regT4;
#endif
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -536,7 +536,7 @@
slowPathLogF("Num vars = %u.\n", codeBlock->numVars());
}
slowPathLogF("Current OS stack end is at %p.\n", vm.softStackLimit());
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
slowPathLogF("Current C Loop stack end is at %p.\n", vm.cloopStackLimit());
#endif
@@ -547,7 +547,7 @@
// 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 ENABLE(C_LOOP)
Register* topOfFrame = exec->topOfFrame();
if (LIKELY(topOfFrame < reinterpret_cast<Register*>(exec))) {
ASSERT(!vm.interpreter->cloopStack().containsAddress(topOfFrame));
@@ -1861,7 +1861,7 @@
return encodeResult(0, 0);
}
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM* vm, Register* newTopOfStack)
{
bool success = vm->ensureStackCapacityFor(newTopOfStack);
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -132,7 +132,7 @@
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 ENABLE(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;
Modified: trunk/Source/_javascript_Core/llint/LLIntThunks.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LLIntThunks.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LLIntThunks.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -98,8 +98,9 @@
} // namespace LLInt
-#else // ENABLE(JIT)
+#endif
+#if ENABLE(C_LOOP)
// Non-JIT (i.e. C Loop LLINT) case:
EncodedJSValue vmEntryToJavaScript(void* executableAddress, VM* vm, ProtoCallFrame* protoCallFrame)
@@ -122,7 +123,6 @@
return reinterpret_cast<VMEntryRecord*>(reinterpret_cast<char*>(entryFrame) - VMEntryTotalFrameSize);
}
+#endif // ENABLE(C_LOOP)
-#endif // ENABLE(JIT)
-
} // namespace JSC
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -29,7 +29,7 @@
#include "LLIntOfflineAsmConfig.h"
#include <wtf/InlineASM.h>
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "Bytecodes.h"
#include "CLoopStackInlines.h"
#include "CodeBlock.h"
@@ -559,4 +559,4 @@
// for the interpreter, as compiled from LowLevelInterpreter.asm.
#include "LLIntAssembly.h"
-#endif // ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.h (236380 => 236381)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -27,7 +27,7 @@
#include "Opcode.h"
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
namespace JSC {
@@ -44,4 +44,4 @@
} // namespace JSC
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
Modified: trunk/Source/_javascript_Core/runtime/JSCJSValue.h (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/JSCJSValue.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/JSCJSValue.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -59,7 +59,7 @@
class SpeculativeJIT;
}
#endif
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
namespace LLInt {
class CLoop;
}
@@ -147,7 +147,7 @@
friend class DFG::OSRExitCompiler;
friend class DFG::SpeculativeJIT;
#endif
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
friend class LLInt::CLoop;
#endif
Modified: trunk/Source/_javascript_Core/runtime/MachineContext.h (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/MachineContext.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/MachineContext.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -50,10 +50,10 @@
template<size_t N> void*& argumentPointer(PlatformRegisters&);
template<size_t N> void* argumentPointer(const PlatformRegisters&);
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
void*& llintInstructionPointer(PlatformRegisters&);
void* llintInstructionPointer(const PlatformRegisters&);
-#endif // ENABLE(JIT)
+#endif // !ENABLE(C_LOOP)
#if HAVE(MACHINE_CONTEXT)
@@ -72,10 +72,10 @@
template<size_t N> void*& argumentPointer(mcontext_t&);
template<size_t N> void* argumentPointer(const mcontext_t&);
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
void*& llintInstructionPointer(mcontext_t&);
void* llintInstructionPointer(const mcontext_t&);
-#endif // ENABLE(JIT)
+#endif // !ENABLE(C_LOOP)
#endif // HAVE(MACHINE_CONTEXT)
#endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
@@ -668,7 +668,7 @@
}
#endif // HAVE(MACHINE_CONTEXT)
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
#if OS(WINDOWS) || HAVE(MACHINE_CONTEXT)
inline void*& llintInstructionPointer(PlatformRegisters& regs)
{
@@ -783,7 +783,7 @@
return llintInstructionPointer(const_cast<mcontext_t&>(machineContext));
}
#endif // HAVE(MACHINE_CONTEXT)
-#endif // ENABLE(JIT)
+#endif // !ENABLE(C_LOOP)
}
}
Modified: trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -601,10 +601,15 @@
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;
+ }
+#endif
+ UNUSED_PARAM(appendCodeOrigin);
}
}
Modified: trunk/Source/_javascript_Core/runtime/TestRunnerUtils.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/TestRunnerUtils.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/TestRunnerUtils.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -102,10 +102,8 @@
#if ENABLE(JIT)
if (CodeBlock* baselineCodeBlock = getSomeBaselineCodeBlockForFunction(theFunctionValue))
baselineCodeBlock->optimizeNextInvocation();
-#else
+#endif
UNUSED_PARAM(theFunctionValue);
-#endif
-
return jsUndefined();
}
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2018-09-22 05:26:44 UTC (rev 236381)
@@ -159,7 +159,7 @@
#include <wtf/text/AtomicStringTable.h>
#include <wtf/text/SymbolRegistry.h>
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
#include "CLoopStack.h"
#include "CLoopStackInlines.h"
#endif
@@ -461,7 +461,7 @@
ftlThunks = std::make_unique<FTL::Thunks>();
#endif // ENABLE(FTL_JIT)
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
initializeHostCallReturnValue(); // This is needed to convince the linker not to drop host call return support.
#endif
@@ -741,9 +741,8 @@
intrinsic != NoIntrinsic ? thunkGeneratorForIntrinsic(intrinsic) : 0,
intrinsic, signature, name);
}
-#else // ENABLE(JIT)
+#endif // ENABLE(JIT)
UNUSED_PARAM(intrinsic);
-#endif // ENABLE(JIT)
return NativeExecutable::create(*this,
adoptRef(*new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITCode::HostCallThunk)), function,
adoptRef(*new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_construct_trampoline), JITCode::HostCallThunk)), constructor,
@@ -876,7 +875,7 @@
{
size_t oldSoftReservedZoneSize = m_currentSoftReservedZoneSize;
m_currentSoftReservedZoneSize = softReservedZoneSize;
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
interpreter->cloopStack().setSoftReservedZoneSize(softReservedZoneSize);
#endif
@@ -1145,7 +1144,7 @@
ASSERT(vm->currentThreadIsHoldingAPILock());
ASSERT_UNUSED(stackBounds, stackBounds.contains(vm->lastStackTop()));
}
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
vm->interpreter->cloopStack().sanitizeStack();
#else
sanitizeStackForVMImpl(vm);
@@ -1154,7 +1153,7 @@
size_t VM::committedStackByteCount()
{
-#if ENABLE(JIT)
+#if !ENABLE(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 +1165,7 @@
#endif
}
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
bool VM::ensureStackCapacityForCLoop(Register* newTopOfStack)
{
return interpreter->cloopStack().ensureCapacityFor(newTopOfStack);
@@ -1176,7 +1175,7 @@
{
return interpreter->cloopStack().isSafeToRecurse();
}
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
#if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
void VM::verifyExceptionCheckNeedIsSatisfied(unsigned recursionDepth, ExceptionEventLocation& location)
Modified: trunk/Source/_javascript_Core/runtime/VM.h (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/VM.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -716,7 +716,7 @@
void* stackLimit() { return m_stackLimit; }
void* softStackLimit() { return m_softStackLimit; }
void** addressOfSoftStackLimit() { return &m_softStackLimit; }
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
void* cloopStackLimit() { return m_cloopStackLimit; }
void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; }
#endif
@@ -929,10 +929,10 @@
m_exception = nullptr;
}
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
bool ensureStackCapacityForCLoop(Register* newTopOfStack);
bool isSafeToRecurseSoftCLoop() const;
-#endif // !ENABLE(JIT)
+#endif // ENABLE(C_LOOP)
JS_EXPORT_PRIVATE void throwException(ExecState*, Exception*);
JS_EXPORT_PRIVATE JSValue throwException(ExecState*, JSValue);
@@ -953,7 +953,7 @@
size_t m_currentSoftReservedZoneSize;
void* m_stackLimit { nullptr };
void* m_softStackLimit { nullptr };
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
void* m_cloopStackLimit { nullptr };
#endif
void* m_lastStackTop { nullptr };
@@ -1035,7 +1035,7 @@
return &m_vm->heap;
}
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
extern "C" void sanitizeStackForVMImpl(VM*);
#endif
Modified: trunk/Source/_javascript_Core/runtime/VMInlines.h (236380 => 236381)
--- trunk/Source/_javascript_Core/runtime/VMInlines.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/_javascript_Core/runtime/VMInlines.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -35,7 +35,7 @@
bool VM::ensureStackCapacityFor(Register* newTopOfStack)
{
-#if ENABLE(JIT)
+#if !ENABLE(C_LOOP)
ASSERT(Thread::current().stack().isGrowingDownward());
return newTopOfStack >= m_softStackLimit;
#else
@@ -47,7 +47,7 @@
bool VM::isSafeToRecurseSoft() const
{
bool safe = isSafeToRecurse(m_softStackLimit);
-#if !ENABLE(JIT)
+#if ENABLE(C_LOOP)
safe = safe && isSafeToRecurseSoftCLoop();
#endif
return safe;
Modified: trunk/Source/WTF/ChangeLog (236380 => 236381)
--- trunk/Source/WTF/ChangeLog 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/WTF/ChangeLog 2018-09-22 05:26:44 UTC (rev 236381)
@@ -1,3 +1,20 @@
+2018-09-21 Yusuke Suzuki <[email protected]>
+
+ [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.
+
+ 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:
+
2018-09-21 Keith Miller <[email protected]>
Add Promise SPI
Modified: trunk/Source/WTF/wtf/Platform.h (236380 => 236381)
--- trunk/Source/WTF/wtf/Platform.h 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/WTF/wtf/Platform.h 2018-09-22 05:26:44 UTC (rev 236381)
@@ -757,6 +757,15 @@
#define ENABLE_JIT 0
#endif
+#if !defined(ENABLE_C_LOOP)
+#if ENABLE(JIT) \
+ || CPU(X86_64) || (CPU(ARM64) && !defined(__ILP32__))
+#define ENABLE_C_LOOP 0
+#else
+#define ENABLE_C_LOOP 1
+#endif
+#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 +872,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 !ENABLE(C_LOOP) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT))
#define ENABLE_SAMPLING_PROFILER 1
#else
#define ENABLE_SAMPLING_PROFILER 0
@@ -947,11 +956,11 @@
#endif
/* Determine if we need to enable Computed Goto Opcodes or not: */
-#if HAVE(COMPUTED_GOTO) || ENABLE(JIT)
+#if HAVE(COMPUTED_GOTO) || !ENABLE(C_LOOP)
#define ENABLE_COMPUTED_GOTO_OPCODES 1
#endif
-#if ENABLE(JIT) && !COMPILER(MSVC) && \
+#if !ENABLE(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 +990,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) || !ENABLE(C_LOOP)
#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
#else
Modified: trunk/Source/cmake/WebKitFeatures.cmake (236380 => 236381)
--- trunk/Source/cmake/WebKitFeatures.cmake 2018-09-22 02:03:51 UTC (rev 236380)
+++ trunk/Source/cmake/WebKitFeatures.cmake 2018-09-22 05:26:44 UTC (rev 236381)
@@ -71,9 +71,13 @@
if (WTF_CPU_ARM OR WTF_CPU_ARM64 OR WTF_CPU_MIPS OR WTF_CPU_X86_64 OR WTF_CPU_X86)
set(ENABLE_JIT_DEFAULT ON)
set(USE_SYSTEM_MALLOC_DEFAULT OFF)
+ set(ENABLE_C_LOOP_DEFAULT OFF)
+ set(ENABLE_SAMPLING_PROFILER_DEFAULT ON)
else ()
set(ENABLE_JIT_DEFAULT OFF)
set(USE_SYSTEM_MALLOC_DEFAULT ON)
+ set(ENABLE_C_LOOP_DEFAULT ON)
+ set(ENABLE_SAMPLING_PROFILER_DEFAULT OFF)
endif ()
WEBKIT_OPTION_DEFINE(ENABLE_3D_TRANSFORMS "Toggle 3D transforms support" PRIVATE ON)
@@ -100,6 +104,7 @@
WEBKIT_OPTION_DEFINE(ENABLE_CSS_SELECTORS_LEVEL4 "Toggle CSS Selectors Level 4 support" PRIVATE ON)
WEBKIT_OPTION_DEFINE(ENABLE_CURSOR_VISIBILITY "Toggle cursor visibility support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CUSTOM_SCHEME_HANDLER "Toggle Custom Scheme Handler support" PRIVATE OFF)
+ WEBKIT_OPTION_DEFINE(ENABLE_C_LOOP "Enable CLoop interpreter" PRIVATE ${ENABLE_C_LOOP_DEFAULT})
WEBKIT_OPTION_DEFINE(ENABLE_DASHBOARD_SUPPORT "Toggle dashboard support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_DATACUE_VALUE "Toggle datacue value support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_DATALIST_ELEMENT "Toggle HTML5 datalist support" PRIVATE OFF)
@@ -158,7 +163,7 @@
WEBKIT_OPTION_DEFINE(ENABLE_RESOLUTION_MEDIA_QUERY "Toggle resolution media query support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_RESOURCE_USAGE "Toggle resource usage support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_RUBBER_BANDING "Toggle rubber banding support" PRIVATE OFF)
- WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ON)
+ WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ${ENABLE_SAMPLING_PROFILER_DEFAULT})
WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_CONTROLS "Toggle service controls support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_WORKER "Toggle ServiceWorker support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_SMOOTH_SCROLLING "Toggle smooth scrolling" PRIVATE ON)
@@ -190,12 +195,14 @@
WEBKIT_OPTION_DEFINE(ENABLE_XSLT "Toggle XSLT support" PRIVATE ON)
WEBKIT_OPTION_DEFINE(USE_SYSTEM_MALLOC "Toggle system allocator instead of WebKit's custom allocator" PRIVATE ${USE_SYSTEM_MALLOC_DEFAULT})
+ WEBKIT_OPTION_CONFLICT(ENABLE_JIT ENABLE_C_LOOP)
+ WEBKIT_OPTION_CONFLICT(ENABLE_SAMPLING_PROFILER ENABLE_C_LOOP)
+
WEBKIT_OPTION_DEPEND(ENABLE_WEB_RTC ENABLE_MEDIA_STREAM)
WEBKIT_OPTION_DEPEND(ENABLE_LEGACY_ENCRYPTED_MEDIA ENABLE_VIDEO)
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)