Changeset 236381 in webkit
- Timestamp:
- Sep 21, 2018, 10:26:44 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r236321 r236381 1 2018-09-21 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration 4 https://bugs.webkit.org/show_bug.cgi?id=189778 5 6 Reviewed by Keith Miller. 7 8 ENABLE_SAMPLING_PROFILER does not depend on ENABLE_JIT now since it can be 9 used with LLInt ASM interpreter. 10 11 * Source/cmake/WebKitFeatures.cmake: 12 1 13 2018-09-21 Mike Gorse <mgorse@suse.com> 2 14 -
trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp
r236032 r236381 128 128 Options::softReservedZoneSize() = 128 * KB; 129 129 Options::reservedZoneSize() = 64 * KB; 130 #if ENABLE( JIT)130 #if ENABLE(C_LOOP) 131 131 // Normally, we want to disable the LLINT to force the use of JITted code which is necessary for 132 132 // reproducing the regression in https://bugs.webkit.org/show_bug.cgi?id=148749. However, we only -
trunk/Source/JavaScriptCore/CMakeLists.txt
r236005 r236381 232 232 233 233 if (NOT ENABLE_JIT) 234 set(OFFLINE_ASM_BACKEND "C_LOOP") 234 if (ENABLE_C_LOOP) 235 set(OFFLINE_ASM_BACKEND "C_LOOP") 236 endif () 235 237 endif () 236 238 endif () … … 265 267 # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch) 266 268 # after every asm.rb run. 267 if (MSVC AND ENABLE_JIT)269 if (MSVC AND NOT ENABLE_C_LOOP) 268 270 set(LLIntOutput LowLevelInterpreterWin.asm) 269 271 set(OFFLINE_ASM_ARGS --assembler=MASM) … … 285 287 # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS 286 288 # since it is used in the add_library() call at the end of this file. 287 if (MSVC AND ENABLE_JIT)289 if (MSVC AND NOT ENABLE_C_LOOP) 288 290 enable_language(ASM_MASM) 289 291 if (CMAKE_SIZEOF_VOID_P EQUAL 4) … … 1183 1185 1184 1186 if (WTF_CPU_X86_64) 1185 if (MSVC AND ENABLE_JIT)1187 if (MSVC AND NOT ENABLE_C_LOOP) 1186 1188 add_custom_command( 1187 1189 OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj -
trunk/Source/JavaScriptCore/ChangeLog
r236372 r236381 1 2018-09-21 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration 4 https://bugs.webkit.org/show_bug.cgi?id=189778 5 6 Reviewed by Keith Miller. 7 8 LLInt ASM interpreter is 2x and 15% faster than CLoop interpreter on 9 Linux and macOS respectively. We would like to enable it for non JIT 10 configurations in X86_64 and ARM64. 11 12 This patch enables LLInt for non JIT builds in X86_64 and ARM64 architectures. 13 Previously, we switch LLInt ASM interpreter and CLoop by using ENABLE(JIT) 14 configuration. But it is wrong in the new scenario since we have a build 15 configuration that uses LLInt ASM interpreter and JIT is disabled. We introduce 16 ENABLE(C_LOOP) option, which represents that we use CLoop. And we replace 17 ENABLE(JIT) with ENABLE(C_LOOP) if the previous ENABLE(JIT) is essentially just 18 related to LLInt ASM interpreter and not related to JIT. 19 20 We also replace some ENABLE(JIT) configurations with ENABLE(ASSEMBLER). 21 ENABLE(ASSEMBLER) is now enabled even if we disable JIT since MacroAssembler 22 has machine register information that is used in LLInt ASM interpreter. 23 24 * API/tests/PingPongStackOverflowTest.cpp: 25 (testPingPongStackOverflow): 26 * CMakeLists.txt: 27 * JavaScriptCore.xcodeproj/project.pbxproj: 28 * assembler/MaxFrameExtentForSlowPathCall.h: 29 * bytecode/CallReturnOffsetToBytecodeOffset.h: Removed. It is no longer used. 30 * bytecode/CodeBlock.cpp: 31 (JSC::CodeBlock::finishCreation): 32 * bytecode/CodeBlock.h: 33 (JSC::CodeBlock::calleeSaveRegisters const): 34 (JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): 35 (JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): 36 (JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters): 37 * bytecode/Opcode.h: 38 (JSC::padOpcodeName): 39 * heap/Heap.cpp: 40 (JSC::Heap::gatherJSStackRoots): 41 (JSC::Heap::stopThePeriphery): 42 * interpreter/CLoopStack.cpp: 43 * interpreter/CLoopStack.h: 44 * interpreter/CLoopStackInlines.h: 45 * interpreter/EntryFrame.h: 46 * interpreter/Interpreter.cpp: 47 (JSC::Interpreter::Interpreter): 48 (JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const): 49 * interpreter/Interpreter.h: 50 * interpreter/StackVisitor.cpp: 51 (JSC::StackVisitor::Frame::calleeSaveRegisters): 52 * interpreter/VMEntryRecord.h: 53 * jit/ExecutableAllocator.h: 54 * jit/FPRInfo.h: 55 (WTF::printInternal): 56 * jit/GPRInfo.cpp: 57 * jit/GPRInfo.h: 58 (WTF::printInternal): 59 * jit/HostCallReturnValue.cpp: 60 (JSC::getHostCallReturnValueWithExecState): Moved. They are used in LLInt ASM interpreter too. 61 * jit/HostCallReturnValue.h: 62 * jit/JITOperations.cpp: 63 (JSC::getHostCallReturnValueWithExecState): Deleted. 64 * jit/JITOperationsMSVC64.cpp: 65 * jit/Reg.cpp: 66 * jit/Reg.h: 67 * jit/RegisterAtOffset.cpp: 68 * jit/RegisterAtOffset.h: 69 * jit/RegisterAtOffsetList.cpp: 70 * jit/RegisterAtOffsetList.h: 71 * jit/RegisterMap.h: 72 * jit/RegisterSet.cpp: 73 * jit/RegisterSet.h: 74 * jit/TempRegisterSet.cpp: 75 * jit/TempRegisterSet.h: 76 * llint/LLIntCLoop.cpp: 77 * llint/LLIntCLoop.h: 78 * llint/LLIntData.cpp: 79 (JSC::LLInt::initialize): 80 (JSC::LLInt::Data::performAssertions): 81 * llint/LLIntData.h: 82 * llint/LLIntOfflineAsmConfig.h: 83 * llint/LLIntOpcode.h: 84 * llint/LLIntPCRanges.h: 85 * llint/LLIntSlowPaths.cpp: 86 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 87 * llint/LLIntSlowPaths.h: 88 * llint/LLIntThunks.cpp: 89 * llint/LowLevelInterpreter.cpp: 90 * llint/LowLevelInterpreter.h: 91 * runtime/JSCJSValue.h: 92 * runtime/MachineContext.h: 93 * runtime/SamplingProfiler.cpp: 94 (JSC::SamplingProfiler::processUnverifiedStackTraces): Enable SamplingProfiler 95 for LLInt ASM interpreter with non JIT configuration. 96 * runtime/TestRunnerUtils.cpp: 97 (JSC::optimizeNextInvocation): 98 * runtime/VM.cpp: 99 (JSC::VM::VM): 100 (JSC::VM::getHostFunction): 101 (JSC::VM::updateSoftReservedZoneSize): 102 (JSC::sanitizeStackForVM): 103 (JSC::VM::committedStackByteCount): 104 * runtime/VM.h: 105 * runtime/VMInlines.h: 106 (JSC::VM::ensureStackCapacityFor): 107 (JSC::VM::isSafeToRecurseSoft const): 108 1 109 2018-09-21 Keith Miller <keith_miller@apple.com> 2 110 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r236372 r236381 110 110 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 111 111 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 112 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */; settings = {ATTRIBUTES = (Private, ); }; };113 112 0F0CAEFC1EC4DA6B00970D12 /* JSHeapFinalizerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CAEFA1EC4DA6200970D12 /* JSHeapFinalizerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 114 113 0F0CAEFF1EC4DA8800970D12 /* HeapFinalizerCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CAEFE1EC4DA8500970D12 /* HeapFinalizerCallback.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 2013 2012 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallLinkInfo.cpp; sourceTree = "<group>"; }; 2014 2013 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallLinkInfo.h; sourceTree = "<group>"; }; 2015 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallReturnOffsetToBytecodeOffset.h; sourceTree = "<group>"; };2016 2014 0F0CAEF91EC4DA6200970D12 /* JSHeapFinalizerPrivate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHeapFinalizerPrivate.cpp; sourceTree = "<group>"; }; 2017 2015 0F0CAEFA1EC4DA6200970D12 /* JSHeapFinalizerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHeapFinalizerPrivate.h; sourceTree = "<group>"; }; … … 7635 7633 627673211B680C1E00FD9F2E /* CallMode.cpp */, 7636 7634 627673221B680C1E00FD9F2E /* CallMode.h */, 7637 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */,7638 7635 0F3B7E2419A11B8000D9BC56 /* CallVariant.cpp */, 7639 7636 0F3B7E2519A11B8000D9BC56 /* CallVariant.h */, … … 8484 8481 0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */, 8485 8482 627673241B680C1E00FD9F2E /* CallMode.h in Headers */, 8486 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */,8487 8483 0F3B7E2B19A11B8000D9BC56 /* CallVariant.h in Headers */, 8488 8484 FE80C1971D775CDD008510C0 /* CatchScope.h in Headers */, -
trunk/Source/JavaScriptCore/assembler/MaxFrameExtentForSlowPathCall.h
r210232 r236381 36 36 // from JS code. 37 37 38 #if !ENABLE( JIT)38 #if !ENABLE(ASSEMBLER) 39 39 static const size_t maxFrameExtentForSlowPathCall = 0; 40 40 … … 70 70 COMPILE_ASSERT(!(maxFrameExtentForSlowPathCall % sizeof(Register)), extent_must_be_in_multiples_of_registers); 71 71 72 #if ENABLE( JIT)72 #if ENABLE(ASSEMBLER) 73 73 // Make sure that cfr - maxFrameExtentForSlowPathCall bytes will make the stack pointer aligned 74 74 COMPILE_ASSERT((maxFrameExtentForSlowPathCall % 16) == 16 - sizeof(CallerFrameAndPC), extent_must_align_stack_from_callframe_pointer); -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r234501 r236381 90 90 #include <wtf/text/UniquedStringImpl.h> 91 91 92 #if ENABLE( JIT)92 #if ENABLE(ASSEMBLER) 93 93 #include "RegisterAtOffsetList.h" 94 94 #endif … … 510 510 m_objectAllocationProfiles = RefCountedArray<ObjectAllocationProfile>(size); 511 511 512 #if ENABLE(JIT)512 #if !ENABLE(C_LOOP) 513 513 setCalleeSaveRegisters(RegisterSet::llintBaselineCalleeSaveRegisters()); 514 514 #endif … … 2146 2146 } 2147 2147 2148 #if ENABLE(JIT)2148 #if !ENABLE(C_LOOP) 2149 2149 void CodeBlock::setCalleeSaveRegisters(RegisterSet calleeSaveRegisters) 2150 2150 { … … 2173 2173 return roundCalleeSaveSpaceAsVirtualRegisters(m_calleeSaveRegisters->size()); 2174 2174 } 2175 #endif 2176 2177 #if ENABLE(JIT) 2175 2178 2176 2179 void CodeBlock::countReoptimization() -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r234086 r236381 646 646 JS_EXPORT_PRIVATE unsigned reoptimizationRetryCounter() const; 647 647 void countReoptimization(); 648 #if ENABLE(JIT) 648 649 #if !ENABLE(C_LOOP) 650 void setCalleeSaveRegisters(RegisterSet); 651 void setCalleeSaveRegisters(std::unique_ptr<RegisterAtOffsetList>); 652 653 RegisterAtOffsetList* calleeSaveRegisters() const { return m_calleeSaveRegisters.get(); } 654 649 655 static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return RegisterSet::llintBaselineCalleeSaveRegisters().numberOfSetRegisters(); } 650 656 static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters(); 651 657 size_t calleeSaveSpaceAsVirtualRegisters(); 652 658 #else 659 static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return 0; } 660 static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters() { return 0; }; 661 size_t calleeSaveSpaceAsVirtualRegisters() { return 0; } 662 #endif 663 664 #if ENABLE(JIT) 653 665 unsigned numberOfDFGCompiles(); 654 666 … … 740 752 bool shouldReoptimizeFromLoopNow(); 741 753 742 void setCalleeSaveRegisters(RegisterSet);743 void setCalleeSaveRegisters(std::unique_ptr<RegisterAtOffsetList>);744 745 RegisterAtOffsetList* calleeSaveRegisters() const { return m_calleeSaveRegisters.get(); }746 754 #else // No JIT 747 static unsigned numberOfLLIntBaselineCalleeSaveRegisters() { return 0; }748 static size_t llintBaselineCalleeSaveSpaceAsVirtualRegisters() { return 0; };749 size_t calleeSaveSpaceAsVirtualRegisters() { return 0; }750 755 void optimizeAfterWarmUp() { } 751 756 unsigned numberOfDFGCompiles() { return 0; } … … 966 971 StructureWatchpointMap m_llintGetByIdWatchpointMap; 967 972 PoisonedRefPtr<CodeBlockPoison, JITCode> m_jitCode; 973 #if !ENABLE(C_LOOP) 974 std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters; 975 #endif 968 976 #if ENABLE(JIT) 969 std::unique_ptr<RegisterAtOffsetList> m_calleeSaveRegisters;970 977 PoisonedBag<CodeBlockPoison, StructureStubInfo> m_stubInfos; 971 978 PoisonedBag<CodeBlockPoison, JITAddIC> m_addICs; -
trunk/Source/JavaScriptCore/bytecode/Opcode.h
r235935 r236381 59 59 60 60 const int maxOpcodeLength = 9; 61 #if !ENABLE(JIT)61 #if ENABLE(C_LOOP) 62 62 const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_CLOOP_BYTECODE_HELPER_IDS + NUMBER_OF_BYTECODE_HELPER_IDS; 63 63 #else -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r235271 r236381 673 673 void Heap::gatherJSStackRoots(ConservativeRoots& roots) 674 674 { 675 #if !ENABLE(JIT)675 #if ENABLE(C_LOOP) 676 676 m_vm->interpreter->cloopStack().gatherConservativeRoots(roots, *m_jitStubRoutines, *m_codeBlocks); 677 677 #else … … 1606 1606 setGCDidJIT(); 1607 1607 } 1608 #e lse1608 #endif // ENABLE(JIT) 1609 1609 UNUSED_PARAM(conn); 1610 #endif // ENABLE(JIT)1611 1610 1612 1611 vm()->shadowChicken().update(*vm(), vm()->topCallFrame); -
trunk/Source/JavaScriptCore/interpreter/CLoopStack.cpp
r230303 r236381 30 30 #include "CLoopStack.h" 31 31 32 #if !ENABLE(JIT)32 #if ENABLE(C_LOOP) 33 33 34 34 #include "CLoopStackInlines.h" … … 164 164 } // namespace JSC 165 165 166 #endif // !ENABLE(JIT)166 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/interpreter/CLoopStack.h
r225140 r236381 29 29 #pragma once 30 30 31 #if !ENABLE(JIT)31 #if ENABLE(C_LOOP) 32 32 33 33 #include "Register.h" … … 108 108 } // namespace JSC 109 109 110 #endif // !ENABLE(JIT)110 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/interpreter/CLoopStackInlines.h
r225140 r236381 26 26 #pragma once 27 27 28 #if !ENABLE(JIT)28 #if ENABLE(C_LOOP) 29 29 30 30 #include "CLoopStack.h" … … 60 60 } // namespace JSC 61 61 62 #endif // !ENABLE(JIT)62 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/interpreter/EntryFrame.h
r235419 r236381 32 32 33 33 struct EntryFrame { 34 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 034 #if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 35 35 static ptrdiff_t vmEntryRecordOffset() 36 36 { -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r235450 r236381 68 68 #include "RegExpObject.h" 69 69 #include "Register.h" 70 #include "RegisterAtOffsetList.h" 70 71 #include "ScopedArguments.h" 71 72 #include "StackAlignment.h" … … 333 334 Interpreter::Interpreter(VM& vm) 334 335 : m_vm(vm) 335 #if !ENABLE(JIT)336 #if ENABLE(C_LOOP) 336 337 , m_cloopStack(vm) 337 338 #endif … … 564 565 void copyCalleeSavesToEntryFrameCalleeSavesBuffer(StackVisitor& visitor) const 565 566 { 566 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0567 #if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 567 568 RegisterAtOffsetList* currentCalleeSaves = visitor->calleeSaveRegisters(); 568 569 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r235450 r236381 37 37 #include <wtf/HashMap.h> 38 38 39 #if !ENABLE(JIT)39 #if ENABLE(C_LOOP) 40 40 #include "CLoopStack.h" 41 41 #endif … … 94 94 ~Interpreter(); 95 95 96 #if !ENABLE(JIT)96 #if ENABLE(C_LOOP) 97 97 CLoopStack& cloopStack() { return m_cloopStack; } 98 98 #endif … … 148 148 149 149 VM& m_vm; 150 #if !ENABLE(JIT)150 #if ENABLE(C_LOOP) 151 151 CLoopStack m_cloopStack; 152 152 #endif -
trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp
r235419 r236381 258 258 return nullptr; 259 259 260 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0260 #if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 261 261 262 262 #if ENABLE(WEBASSEMBLY) … … 274 274 return codeBlock->calleeSaveRegisters(); 275 275 276 #endif // ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0276 #endif // !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 277 277 278 278 return nullptr; -
trunk/Source/JavaScriptCore/interpreter/VMEntryRecord.h
r235419 r236381 47 47 JSObject* callee() const { return m_callee; } 48 48 49 #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 049 #if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 50 50 intptr_t calleeSaveRegistersBuffer[NUMBER_OF_CALLEE_SAVES_REGISTERS]; 51 51 #endif -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h
r231175 r236381 146 146 #else 147 147 inline bool isJITPC(void*) { return false; } 148 #endif // ENABLE( JIT) && ENABLE(ASSEMBLER)148 #endif // ENABLE(ASSEMBLER) 149 149 150 150 -
trunk/Source/JavaScriptCore/jit/FPRInfo.h
r234984 r236381 34 34 static constexpr FPRReg InvalidFPRReg { FPRReg::InvalidFPRReg }; 35 35 36 #if ENABLE( JIT)36 #if ENABLE(ASSEMBLER) 37 37 38 38 #if CPU(X86) || CPU(X86_64) … … 333 333 constexpr FPRInfo toInfoFromReg(FPRReg) { return FPRInfo(); } 334 334 335 #endif // ENABLE( JIT)335 #endif // ENABLE(ASSEMBLER) 336 336 337 337 } // namespace JSC … … 341 341 inline void printInternal(PrintStream& out, JSC::FPRReg reg) 342 342 { 343 #if ENABLE( JIT)343 #if ENABLE(ASSEMBLER) 344 344 out.print("%", JSC::FPRInfo::debugName(reg)); 345 345 #else -
trunk/Source/JavaScriptCore/jit/GPRInfo.cpp
r199069 r236381 27 27 #include "GPRInfo.h" 28 28 29 #if ENABLE( JIT)29 #if ENABLE(ASSEMBLER) 30 30 31 31 namespace JSC { … … 49 49 } // namespace JSC 50 50 51 #endif // ENABLE( JIT)51 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/jit/GPRInfo.h
r234984 r236381 42 42 static constexpr GPRReg InvalidGPRReg { GPRReg::InvalidGPRReg }; 43 43 44 #if ENABLE( JIT)44 #if ENABLE(ASSEMBLER) 45 45 46 46 #if USE(JSVALUE64) … … 817 817 constexpr GPRInfo toInfoFromReg(GPRReg) { return GPRInfo(); } 818 818 819 #endif // ENABLE( JIT)819 #endif // ENABLE(ASSEMBLER) 820 820 821 821 } // namespace JSC … … 825 825 inline void printInternal(PrintStream& out, JSC::GPRReg reg) 826 826 { 827 #if ENABLE( JIT)827 #if ENABLE(ASSEMBLER) 828 828 out.print("%", JSC::GPRInfo::debugName(reg)); 829 829 #else -
trunk/Source/JavaScriptCore/jit/HostCallReturnValue.cpp
r163844 r236381 27 27 #include "HostCallReturnValue.h" 28 28 29 #if !ENABLE(C_LOOP) 30 29 31 #include "CallFrame.h" 30 32 #include "JSCJSValueInlines.h" … … 36 38 namespace JSC { 37 39 38 // Nothing to see here. 40 // Note: getHostCallReturnValueWithExecState() needs to be placed before the 41 // definition of getHostCallReturnValue() below because the Windows build 42 // requires it. 43 extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) 44 { 45 if (!exec) 46 return JSValue::encode(JSValue()); 47 return JSValue::encode(exec->vm().hostCallReturnValue); 48 } 49 50 #if COMPILER(GCC_OR_CLANG) && CPU(X86_64) 51 asm ( 52 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 53 HIDE_SYMBOL(getHostCallReturnValue) "\n" 54 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 55 "lea -8(%rsp), %rdi\n" 56 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 57 ); 58 59 #elif COMPILER(GCC_OR_CLANG) && CPU(X86) 60 asm ( 61 ".text" "\n" \ 62 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 63 HIDE_SYMBOL(getHostCallReturnValue) "\n" 64 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 65 "push %ebp\n" 66 "mov %esp, %eax\n" 67 "leal -4(%esp), %esp\n" 68 "push %eax\n" 69 "call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 70 "leal 8(%esp), %esp\n" 71 "pop %ebp\n" 72 "ret\n" 73 ); 74 75 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2) 76 asm ( 77 ".text" "\n" 78 ".align 2" "\n" 79 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 80 HIDE_SYMBOL(getHostCallReturnValue) "\n" 81 ".thumb" "\n" 82 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" 83 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 84 "sub r0, sp, #8" "\n" 85 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 86 ); 87 88 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL) 89 asm ( 90 ".text" "\n" 91 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 92 HIDE_SYMBOL(getHostCallReturnValue) "\n" 93 INLINE_ARM_FUNCTION(getHostCallReturnValue) 94 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 95 "sub r0, sp, #8" "\n" 96 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 97 ); 98 99 #elif CPU(ARM64) 100 asm ( 101 ".text" "\n" 102 ".align 2" "\n" 103 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 104 HIDE_SYMBOL(getHostCallReturnValue) "\n" 105 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 106 "sub x0, sp, #16" "\n" 107 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 108 ); 109 110 #elif COMPILER(GCC_OR_CLANG) && CPU(MIPS) 111 112 #if WTF_MIPS_PIC 113 #define LOAD_FUNCTION_TO_T9(function) \ 114 ".set noreorder" "\n" \ 115 ".cpload $25" "\n" \ 116 ".set reorder" "\n" \ 117 "la $t9, " LOCAL_REFERENCE(function) "\n" 118 #else 119 #define LOAD_FUNCTION_TO_T9(function) "" "\n" 120 #endif 121 122 asm ( 123 ".text" "\n" 124 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 125 HIDE_SYMBOL(getHostCallReturnValue) "\n" 126 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 127 LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState) 128 "addi $a0, $sp, -8" "\n" 129 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 130 ); 131 132 #elif COMPILER(MSVC) && CPU(X86) 133 extern "C" { 134 __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue() 135 { 136 __asm lea eax, [esp - 4] 137 __asm mov [esp + 4], eax; 138 __asm jmp getHostCallReturnValueWithExecState 139 } 140 } 141 #endif 39 142 40 143 } // namespace JSC 41 144 145 #endif // !ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/jit/HostCallReturnValue.h
r218794 r236381 28 28 #include "JSCJSValue.h" 29 29 30 #if ENABLE(JIT)30 #if !ENABLE(C_LOOP) 31 31 32 32 #if CALLING_CONVENTION_IS_STDCALL … … 58 58 } // namespace JSC 59 59 60 #endif // ENABLE(JIT)60 #endif // !ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r235419 r236381 2909 2909 } // extern "C" 2910 2910 2911 // Note: getHostCallReturnValueWithExecState() needs to be placed before the2912 // definition of getHostCallReturnValue() below because the Windows build2913 // requires it.2914 extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec)2915 {2916 if (!exec)2917 return JSValue::encode(JSValue());2918 return JSValue::encode(exec->vm().hostCallReturnValue);2919 }2920 2921 #if COMPILER(GCC_OR_CLANG) && CPU(X86_64)2922 asm (2923 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2924 HIDE_SYMBOL(getHostCallReturnValue) "\n"2925 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2926 "lea -8(%rsp), %rdi\n"2927 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2928 );2929 2930 #elif COMPILER(GCC_OR_CLANG) && CPU(X86)2931 asm (2932 ".text" "\n" \2933 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2934 HIDE_SYMBOL(getHostCallReturnValue) "\n"2935 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2936 "push %ebp\n"2937 "mov %esp, %eax\n"2938 "leal -4(%esp), %esp\n"2939 "push %eax\n"2940 "call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2941 "leal 8(%esp), %esp\n"2942 "pop %ebp\n"2943 "ret\n"2944 );2945 2946 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2)2947 asm (2948 ".text" "\n"2949 ".align 2" "\n"2950 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2951 HIDE_SYMBOL(getHostCallReturnValue) "\n"2952 ".thumb" "\n"2953 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"2954 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2955 "sub r0, sp, #8" "\n"2956 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2957 );2958 2959 #elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL)2960 asm (2961 ".text" "\n"2962 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2963 HIDE_SYMBOL(getHostCallReturnValue) "\n"2964 INLINE_ARM_FUNCTION(getHostCallReturnValue)2965 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2966 "sub r0, sp, #8" "\n"2967 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2968 );2969 2970 #elif CPU(ARM64)2971 asm (2972 ".text" "\n"2973 ".align 2" "\n"2974 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2975 HIDE_SYMBOL(getHostCallReturnValue) "\n"2976 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2977 "sub x0, sp, #16" "\n"2978 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2979 );2980 2981 #elif COMPILER(GCC_OR_CLANG) && CPU(MIPS)2982 2983 #if WTF_MIPS_PIC2984 #define LOAD_FUNCTION_TO_T9(function) \2985 ".set noreorder" "\n" \2986 ".cpload $25" "\n" \2987 ".set reorder" "\n" \2988 "la $t9, " LOCAL_REFERENCE(function) "\n"2989 #else2990 #define LOAD_FUNCTION_TO_T9(function) "" "\n"2991 #endif2992 2993 asm (2994 ".text" "\n"2995 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2996 HIDE_SYMBOL(getHostCallReturnValue) "\n"2997 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2998 LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState)2999 "addi $a0, $sp, -8" "\n"3000 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"3001 );3002 3003 #elif COMPILER(MSVC) && CPU(X86)3004 extern "C" {3005 __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue()3006 {3007 __asm lea eax, [esp - 4]3008 __asm mov [esp + 4], eax;3009 __asm jmp getHostCallReturnValueWithExecState3010 }3011 }3012 #endif3013 3014 2911 } // namespace JSC 3015 2912 -
trunk/Source/JavaScriptCore/jit/JITOperationsMSVC64.cpp
r163844 r236381 26 26 #include "config.h" 27 27 28 #if !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)28 #if ENABLE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64) 29 29 30 30 #include "CallFrame.h" … … 44 44 } // namespace JSC 45 45 46 #endif // !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)46 #endif // ENABLE(C_LOOP) && COMPILER(MSVC) && CPU(X86_64) -
trunk/Source/JavaScriptCore/jit/Reg.cpp
r201783 r236381 27 27 #include "Reg.h" 28 28 29 #if ENABLE( JIT)29 #if ENABLE(ASSEMBLER) 30 30 31 31 #include "FPRInfo.h" … … 55 55 } // namespace JSC 56 56 57 #endif // ENABLE( JIT)57 #endif // ENABLE(ASSEMBLER) 58 58 -
trunk/Source/JavaScriptCore/jit/Reg.h
r206525 r236381 26 26 #pragma once 27 27 28 #if ENABLE( JIT)28 #if ENABLE(ASSEMBLER) 29 29 30 30 #include "MacroAssembler.h" … … 246 246 } // namespace WTF 247 247 248 #endif // ENABLE( JIT)248 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/jit/RegisterAtOffset.cpp
r195365 r236381 27 27 #include "RegisterAtOffset.h" 28 28 29 #if ENABLE( JIT)29 #if ENABLE(ASSEMBLER) 30 30 31 31 namespace JSC { … … 42 42 } // namespace JSC 43 43 44 #endif // ENABLE( JIT)44 #endif // ENABLE(ASSEMBLER) 45 45 -
trunk/Source/JavaScriptCore/jit/RegisterAtOffset.h
r206525 r236381 26 26 #pragma once 27 27 28 #if ENABLE( JIT)28 #if ENABLE(ASSEMBLER) 29 29 30 30 #include "Reg.h" … … 75 75 } // namespace JSC 76 76 77 #endif // ENABLE( JIT)77 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp
r199758 r236381 27 27 #include "RegisterAtOffsetList.h" 28 28 29 #if ENABLE( JIT)29 #if ENABLE(ASSEMBLER) 30 30 31 31 #include <wtf/ListDump.h> … … 69 69 } // namespace JSC 70 70 71 #endif // ENABLE( JIT)71 #endif // ENABLE(ASSEMBLER) 72 72 -
trunk/Source/JavaScriptCore/jit/RegisterAtOffsetList.h
r215292 r236381 26 26 #pragma once 27 27 28 #if ENABLE( JIT)28 #if ENABLE(ASSEMBLER) 29 29 30 30 #include "RegisterAtOffset.h" … … 70 70 } // namespace JSC 71 71 72 #endif // ENABLE( JIT)72 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/jit/RegisterMap.h
r206525 r236381 26 26 #pragma once 27 27 28 #if ENABLE( JIT)28 #if ENABLE(ASSEMBLER) 29 29 30 30 #include "FPRInfo.h" … … 108 108 } // namespace JSC 109 109 110 #endif // ENABLE( JIT)110 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/jit/RegisterSet.cpp
r231961 r236381 27 27 #include "RegisterSet.h" 28 28 29 #if ENABLE( JIT)29 #if ENABLE(ASSEMBLER) 30 30 31 31 #include "GPRInfo.h" … … 396 396 } // namespace JSC 397 397 398 #endif // ENABLE( JIT)399 398 #endif // ENABLE(ASSEMBLER) 399 -
trunk/Source/JavaScriptCore/jit/RegisterSet.h
r230517 r236381 26 26 #pragma once 27 27 28 #if ENABLE(JIT)28 #if !ENABLE(C_LOOP) 29 29 30 30 #include "GPRInfo.h" … … 247 247 } // namespace WTF 248 248 249 #endif // ENABLE(JIT)249 #endif // !ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/jit/TempRegisterSet.cpp
r165021 r236381 27 27 #include "TempRegisterSet.h" 28 28 29 #if ENABLE( JIT)29 #if ENABLE(ASSEMBLER) 30 30 31 #include "JSCInlines.h"32 31 #include "RegisterSet.h" 33 32 … … 52 51 } // namespace JSC 53 52 54 #endif // ENABLE( JIT)53 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/jit/TempRegisterSet.h
r206525 r236381 26 26 #pragma once 27 27 28 #if ENABLE( JIT)28 #if ENABLE(ASSEMBLER) 29 29 30 30 #include "FPRInfo.h" … … 206 206 } // namespace JSC 207 207 208 #else // ENABLE( JIT) -> so if JIT is disabled208 #else // ENABLE(ASSEMBLER) -> so if JIT is disabled 209 209 210 210 namespace JSC { … … 217 217 } // namespace JSC 218 218 219 #endif // ENABLE( JIT)219 #endif // ENABLE(ASSEMBLER) -
trunk/Source/JavaScriptCore/llint/LLIntCLoop.cpp
r170147 r236381 27 27 #include "LLIntCLoop.h" 28 28 29 #if !ENABLE(JIT)29 #if ENABLE(C_LOOP) 30 30 31 31 #include "LLIntData.h" … … 42 42 } // namespace JSC 43 43 44 #endif // !ENABLE(JIT)44 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/llint/LLIntCLoop.h
r218794 r236381 26 26 #pragma once 27 27 28 #if !ENABLE(JIT)28 #if ENABLE(C_LOOP) 29 29 30 30 #include "JSCJSValue.h" … … 45 45 using JSC::LLInt::CLoop; 46 46 47 #endif // !ENABLE(JIT)47 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/llint/LLIntData.cpp
r235935 r236381 47 47 Opcode Data::s_opcodeMap[numOpcodeIDs] = { }; 48 48 49 #if ENABLE(JIT)49 #if !ENABLE(C_LOOP) 50 50 extern "C" void llint_entry(void*); 51 51 #endif … … 53 53 void initialize() 54 54 { 55 #if !ENABLE(JIT)55 #if ENABLE(C_LOOP) 56 56 CLoop::initialize(); 57 57 58 #else // ENABLE(JIT)58 #else // !ENABLE(C_LOOP) 59 59 llint_entry(&Data::s_opcodeMap); 60 60 … … 65 65 for (int i = 0; i < maxOpcodeLength + 1; ++i) 66 66 Data::s_exceptionInstructions[i].u.pointer = handler; 67 #endif // ENABLE( JIT)67 #endif // ENABLE(C_LOOP) 68 68 } 69 69 … … 126 126 STATIC_ASSERT(ValueNull == TagBitTypeOther); 127 127 #endif 128 #if (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) || !ENABLE( JIT)128 #if (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) || !ENABLE(ASSEMBLER) 129 129 STATIC_ASSERT(!maxFrameExtentForSlowPathCall); 130 130 #elif CPU(ARM) … … 136 136 #endif 137 137 138 #if !ENABLE(JIT) || USE(JSVALUE32_64)138 #if ENABLE(C_LOOP) || USE(JSVALUE32_64) 139 139 ASSERT(!CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters()); 140 140 #elif (CPU(X86_64) && !OS(WINDOWS)) || CPU(ARM64) -
trunk/Source/JavaScriptCore/llint/LLIntData.h
r232719 r236381 35 35 struct Instruction; 36 36 37 #if !ENABLE(JIT)37 #if ENABLE(C_LOOP) 38 38 typedef OpcodeID LLIntCode; 39 39 #else -
trunk/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
r233658 r236381 31 31 #include <wtf/Poisoned.h> 32 32 33 #if !ENABLE(JIT)33 #if ENABLE(C_LOOP) 34 34 #define OFFLINE_ASM_C_LOOP 1 35 35 #define OFFLINE_ASM_X86 0 … … 46 46 #define OFFLINE_ASM_MIPS 0 47 47 48 #else // ENABLE( JIT)48 #else // ENABLE(C_LOOP) 49 49 50 50 #define OFFLINE_ASM_C_LOOP 0 … … 138 138 #endif 139 139 140 #endif // ENABLE( JIT)140 #endif // ENABLE(C_LOOP) 141 141 142 142 #if USE(JSVALUE64) -
trunk/Source/JavaScriptCore/llint/LLIntOpcode.h
r206525 r236381 26 26 #pragma once 27 27 28 #if !ENABLE(JIT)28 #if ENABLE(C_LOOP) 29 29 30 30 #define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \ 31 31 FOR_EACH_CLOOP_BYTECODE_HELPER_ID(macro) 32 32 33 #else // ENABLE(JIT)33 #else // !ENABLE(C_LOOP) 34 34 35 35 #define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \ 36 // Nothing to do here. Use the JIT impl instead.36 // Nothing to do here. Use the LLInt ASM / JIT impl instead. 37 37 38 #endif // !ENABLE(JIT)38 #endif // ENABLE(C_LOOP) 39 39 40 40 -
trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h
r231027 r236381 47 47 } 48 48 49 #if ENABLE(JIT)49 #if !ENABLE(C_LOOP) 50 50 static const GPRReg LLIntPC = GPRInfo::regT4; 51 51 #endif -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r235935 r236381 537 537 } 538 538 slowPathLogF("Current OS stack end is at %p.\n", vm.softStackLimit()); 539 #if !ENABLE(JIT)539 #if ENABLE(C_LOOP) 540 540 slowPathLogF("Current C Loop stack end is at %p.\n", vm.cloopStackLimit()); 541 541 #endif … … 548 548 // Hence, if we get here, then we know a stack overflow is imminent. So, just 549 549 // throw the StackOverflowError unconditionally. 550 #if !ENABLE(JIT)550 #if ENABLE(C_LOOP) 551 551 Register* topOfFrame = exec->topOfFrame(); 552 552 if (LIKELY(topOfFrame < reinterpret_cast<Register*>(exec))) { … … 1862 1862 } 1863 1863 1864 #if !ENABLE(JIT)1864 #if ENABLE(C_LOOP) 1865 1865 extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM* vm, Register* newTopOfStack) 1866 1866 { -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h
r233658 r236381 133 133 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_super_sampler_end); 134 134 extern "C" SlowPathReturnType llint_throw_stack_overflow_error(VM*, ProtoCallFrame*) WTF_INTERNAL; 135 #if !ENABLE(JIT)135 #if ENABLE(C_LOOP) 136 136 extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM*, Register*) WTF_INTERNAL; 137 137 #endif -
trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
r235785 r236381 99 99 } // namespace LLInt 100 100 101 #e lse // ENABLE(JIT)101 #endif 102 102 103 #if ENABLE(C_LOOP) 103 104 // Non-JIT (i.e. C Loop LLINT) case: 104 105 … … 123 124 } 124 125 125 126 #endif // ENABLE(JIT) 126 #endif // ENABLE(C_LOOP) 127 127 128 128 } // namespace JSC -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
r232719 r236381 30 30 #include <wtf/InlineASM.h> 31 31 32 #if !ENABLE(JIT)32 #if ENABLE(C_LOOP) 33 33 #include "Bytecodes.h" 34 34 #include "CLoopStackInlines.h" … … 560 560 #include "LLIntAssembly.h" 561 561 562 #endif // ENABLE( JIT)562 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.h
r206525 r236381 28 28 #include "Opcode.h" 29 29 30 #if !ENABLE(JIT)30 #if ENABLE(C_LOOP) 31 31 32 32 namespace JSC { … … 45 45 } // namespace JSC 46 46 47 #endif // !ENABLE(JIT)47 #endif // ENABLE(C_LOOP) -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.h
r233630 r236381 60 60 } 61 61 #endif 62 #if !ENABLE(JIT)62 #if ENABLE(C_LOOP) 63 63 namespace LLInt { 64 64 class CLoop; … … 148 148 friend class DFG::SpeculativeJIT; 149 149 #endif 150 #if !ENABLE(JIT)150 #if ENABLE(C_LOOP) 151 151 friend class LLInt::CLoop; 152 152 #endif -
trunk/Source/JavaScriptCore/runtime/MachineContext.h
r234649 r236381 51 51 template<size_t N> void*& argumentPointer(PlatformRegisters&); 52 52 template<size_t N> void* argumentPointer(const PlatformRegisters&); 53 #if ENABLE(JIT)53 #if !ENABLE(C_LOOP) 54 54 void*& llintInstructionPointer(PlatformRegisters&); 55 55 void* llintInstructionPointer(const PlatformRegisters&); 56 #endif // ENABLE(JIT)56 #endif // !ENABLE(C_LOOP) 57 57 58 58 #if HAVE(MACHINE_CONTEXT) … … 73 73 template<size_t N> void*& argumentPointer(mcontext_t&); 74 74 template<size_t N> void* argumentPointer(const mcontext_t&); 75 #if ENABLE(JIT)75 #if !ENABLE(C_LOOP) 76 76 void*& llintInstructionPointer(mcontext_t&); 77 77 void* llintInstructionPointer(const mcontext_t&); 78 #endif // ENABLE(JIT)78 #endif // !ENABLE(C_LOOP) 79 79 #endif // HAVE(MACHINE_CONTEXT) 80 80 #endif // OS(WINDOWS) || HAVE(MACHINE_CONTEXT) … … 669 669 #endif // HAVE(MACHINE_CONTEXT) 670 670 671 #if ENABLE(JIT)671 #if !ENABLE(C_LOOP) 672 672 #if OS(WINDOWS) || HAVE(MACHINE_CONTEXT) 673 673 inline void*& llintInstructionPointer(PlatformRegisters& regs) … … 784 784 } 785 785 #endif // HAVE(MACHINE_CONTEXT) 786 #endif // ENABLE(JIT)787 788 } 789 } 786 #endif // !ENABLE(C_LOOP) 787 788 } 789 } -
trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp
r234528 r236381 602 602 startIndex = 1; 603 603 } 604 } else if (std::optional<CodeOrigin> codeOrigin = topCodeBlock->findPC(unprocessedStackTrace.topPC)) { 605 appendCodeOrigin(topCodeBlock, *codeOrigin); 606 storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee); 607 startIndex = 1; 604 } else { 605 #if ENABLE(JIT) 606 if (std::optional<CodeOrigin> codeOrigin = topCodeBlock->findPC(unprocessedStackTrace.topPC)) { 607 appendCodeOrigin(topCodeBlock, *codeOrigin); 608 storeCalleeIntoLastFrame(unprocessedStackTrace.frames[0].unverifiedCallee); 609 startIndex = 1; 610 } 611 #endif 612 UNUSED_PARAM(appendCodeOrigin); 608 613 } 609 614 } -
trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.cpp
r229478 r236381 103 103 if (CodeBlock* baselineCodeBlock = getSomeBaselineCodeBlockForFunction(theFunctionValue)) 104 104 baselineCodeBlock->optimizeNextInvocation(); 105 #e lse105 #endif 106 106 UNUSED_PARAM(theFunctionValue); 107 #endif108 109 107 return jsUndefined(); 110 108 } -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r235419 r236381 160 160 #include <wtf/text/SymbolRegistry.h> 161 161 162 #if !ENABLE(JIT)162 #if ENABLE(C_LOOP) 163 163 #include "CLoopStack.h" 164 164 #include "CLoopStackInlines.h" … … 462 462 #endif // ENABLE(FTL_JIT) 463 463 464 #if ENABLE(JIT)464 #if !ENABLE(C_LOOP) 465 465 initializeHostCallReturnValue(); // This is needed to convince the linker not to drop host call return support. 466 466 #endif … … 742 742 intrinsic, signature, name); 743 743 } 744 #e lse// ENABLE(JIT)744 #endif // ENABLE(JIT) 745 745 UNUSED_PARAM(intrinsic); 746 #endif // ENABLE(JIT)747 746 return NativeExecutable::create(*this, 748 747 adoptRef(*new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITCode::HostCallThunk)), function, … … 877 876 size_t oldSoftReservedZoneSize = m_currentSoftReservedZoneSize; 878 877 m_currentSoftReservedZoneSize = softReservedZoneSize; 879 #if !ENABLE(JIT)878 #if ENABLE(C_LOOP) 880 879 interpreter->cloopStack().setSoftReservedZoneSize(softReservedZoneSize); 881 880 #endif … … 1146 1145 ASSERT_UNUSED(stackBounds, stackBounds.contains(vm->lastStackTop())); 1147 1146 } 1148 #if !ENABLE(JIT)1147 #if ENABLE(C_LOOP) 1149 1148 vm->interpreter->cloopStack().sanitizeStack(); 1150 1149 #else … … 1155 1154 size_t VM::committedStackByteCount() 1156 1155 { 1157 #if ENABLE(JIT)1156 #if !ENABLE(C_LOOP) 1158 1157 // When using the C stack, we don't know how many stack pages are actually 1159 1158 // committed. So, we use the current stack usage as an estimate. … … 1167 1166 } 1168 1167 1169 #if !ENABLE(JIT)1168 #if ENABLE(C_LOOP) 1170 1169 bool VM::ensureStackCapacityForCLoop(Register* newTopOfStack) 1171 1170 { … … 1177 1176 return interpreter->cloopStack().isSafeToRecurse(); 1178 1177 } 1179 #endif // !ENABLE(JIT)1178 #endif // ENABLE(C_LOOP) 1180 1179 1181 1180 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION) -
trunk/Source/JavaScriptCore/runtime/VM.h
r235419 r236381 717 717 void* softStackLimit() { return m_softStackLimit; } 718 718 void** addressOfSoftStackLimit() { return &m_softStackLimit; } 719 #if !ENABLE(JIT)719 #if ENABLE(C_LOOP) 720 720 void* cloopStackLimit() { return m_cloopStackLimit; } 721 721 void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; } … … 930 930 } 931 931 932 #if !ENABLE(JIT)932 #if ENABLE(C_LOOP) 933 933 bool ensureStackCapacityForCLoop(Register* newTopOfStack); 934 934 bool isSafeToRecurseSoftCLoop() const; 935 #endif // !ENABLE(JIT)935 #endif // ENABLE(C_LOOP) 936 936 937 937 JS_EXPORT_PRIVATE void throwException(ExecState*, Exception*); … … 954 954 void* m_stackLimit { nullptr }; 955 955 void* m_softStackLimit { nullptr }; 956 #if !ENABLE(JIT)956 #if ENABLE(C_LOOP) 957 957 void* m_cloopStackLimit { nullptr }; 958 958 #endif … … 1036 1036 } 1037 1037 1038 #if ENABLE(JIT)1038 #if !ENABLE(C_LOOP) 1039 1039 extern "C" void sanitizeStackForVMImpl(VM*); 1040 1040 #endif -
trunk/Source/JavaScriptCore/runtime/VMInlines.h
r235419 r236381 36 36 bool VM::ensureStackCapacityFor(Register* newTopOfStack) 37 37 { 38 #if ENABLE(JIT)38 #if !ENABLE(C_LOOP) 39 39 ASSERT(Thread::current().stack().isGrowingDownward()); 40 40 return newTopOfStack >= m_softStackLimit; … … 48 48 { 49 49 bool safe = isSafeToRecurse(m_softStackLimit); 50 #if !ENABLE(JIT)50 #if ENABLE(C_LOOP) 51 51 safe = safe && isSafeToRecurseSoftCLoop(); 52 52 #endif -
trunk/Source/WTF/ChangeLog
r236372 r236381 1 2018-09-21 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration 4 https://bugs.webkit.org/show_bug.cgi?id=189778 5 6 Reviewed by Keith Miller. 7 8 This patch adds ENABLE(C_LOOP) which indicates we use CLoop as the interpreter. 9 Previously, we used !ENABLE(JIT) for this configuration. But now, we have 10 a build configuration that has LLInt ASM interpreter (not CLoop) and !ENABLE(JIT). 11 12 We enable LLInt ASM interpreter for non JIT environment in X86_64 and ARM64 architectures. 13 And we enable ENABLE(ASSEMBLER) for non JIT environment since it offers machine register 14 information which is used for LLInt and SamplingProfiler. 15 16 * wtf/Platform.h: 17 1 18 2018-09-21 Keith Miller <keith_miller@apple.com> 2 19 -
trunk/Source/WTF/wtf/Platform.h
r236077 r236381 758 758 #endif 759 759 760 #if !defined(ENABLE_C_LOOP) 761 #if ENABLE(JIT) \ 762 || CPU(X86_64) || (CPU(ARM64) && !defined(__ILP32__)) 763 #define ENABLE_C_LOOP 0 764 #else 765 #define ENABLE_C_LOOP 1 766 #endif 767 #endif 768 760 769 /* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */ 761 770 #if USE(JSVALUE32_64) … … 864 873 * sampling profiler is enabled if WebKit uses pthreads and glibc. */ 865 874 #if !defined(ENABLE_SAMPLING_PROFILER) 866 #if ENABLE(JIT) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT))875 #if !ENABLE(C_LOOP) && (OS(WINDOWS) || HAVE(MACHINE_CONTEXT)) 867 876 #define ENABLE_SAMPLING_PROFILER 1 868 877 #else … … 948 957 949 958 /* Determine if we need to enable Computed Goto Opcodes or not: */ 950 #if HAVE(COMPUTED_GOTO) || ENABLE(JIT)959 #if HAVE(COMPUTED_GOTO) || !ENABLE(C_LOOP) 951 960 #define ENABLE_COMPUTED_GOTO_OPCODES 1 952 961 #endif 953 962 954 #if ENABLE(JIT) && !COMPILER(MSVC) && \963 #if !ENABLE(C_LOOP) && !COMPILER(MSVC) && \ 955 964 (CPU(X86) || CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && OS(DARWIN))) 956 965 /* This feature works by embedding the OpcodeID in the 32 bit just before the generated LLint code … … 982 991 /* If either the JIT or the RegExp JIT is enabled, then the Assembler must be 983 992 enabled as well: */ 984 #if ENABLE(JIT) || ENABLE(YARR_JIT) 993 #if ENABLE(JIT) || ENABLE(YARR_JIT) || !ENABLE(C_LOOP) 985 994 #if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER 986 995 #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler" -
trunk/Source/cmake/WebKitFeatures.cmake
r235531 r236381 72 72 set(ENABLE_JIT_DEFAULT ON) 73 73 set(USE_SYSTEM_MALLOC_DEFAULT OFF) 74 set(ENABLE_C_LOOP_DEFAULT OFF) 75 set(ENABLE_SAMPLING_PROFILER_DEFAULT ON) 74 76 else () 75 77 set(ENABLE_JIT_DEFAULT OFF) 76 78 set(USE_SYSTEM_MALLOC_DEFAULT ON) 79 set(ENABLE_C_LOOP_DEFAULT ON) 80 set(ENABLE_SAMPLING_PROFILER_DEFAULT OFF) 77 81 endif () 78 82 … … 101 105 WEBKIT_OPTION_DEFINE(ENABLE_CURSOR_VISIBILITY "Toggle cursor visibility support" PRIVATE OFF) 102 106 WEBKIT_OPTION_DEFINE(ENABLE_CUSTOM_SCHEME_HANDLER "Toggle Custom Scheme Handler support" PRIVATE OFF) 107 WEBKIT_OPTION_DEFINE(ENABLE_C_LOOP "Enable CLoop interpreter" PRIVATE ${ENABLE_C_LOOP_DEFAULT}) 103 108 WEBKIT_OPTION_DEFINE(ENABLE_DASHBOARD_SUPPORT "Toggle dashboard support" PRIVATE OFF) 104 109 WEBKIT_OPTION_DEFINE(ENABLE_DATACUE_VALUE "Toggle datacue value support" PRIVATE OFF) … … 159 164 WEBKIT_OPTION_DEFINE(ENABLE_RESOURCE_USAGE "Toggle resource usage support" PRIVATE OFF) 160 165 WEBKIT_OPTION_DEFINE(ENABLE_RUBBER_BANDING "Toggle rubber banding support" PRIVATE OFF) 161 WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ON)166 WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ${ENABLE_SAMPLING_PROFILER_DEFAULT}) 162 167 WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_CONTROLS "Toggle service controls support" PRIVATE OFF) 163 168 WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_WORKER "Toggle ServiceWorker support" PRIVATE OFF) … … 191 196 WEBKIT_OPTION_DEFINE(USE_SYSTEM_MALLOC "Toggle system allocator instead of WebKit's custom allocator" PRIVATE ${USE_SYSTEM_MALLOC_DEFAULT}) 192 197 198 WEBKIT_OPTION_CONFLICT(ENABLE_JIT ENABLE_C_LOOP) 199 WEBKIT_OPTION_CONFLICT(ENABLE_SAMPLING_PROFILER ENABLE_C_LOOP) 200 193 201 WEBKIT_OPTION_DEPEND(ENABLE_WEB_RTC ENABLE_MEDIA_STREAM) 194 202 WEBKIT_OPTION_DEPEND(ENABLE_LEGACY_ENCRYPTED_MEDIA ENABLE_VIDEO) … … 196 204 WEBKIT_OPTION_DEPEND(ENABLE_FTL_JIT ENABLE_DFG_JIT) 197 205 WEBKIT_OPTION_DEPEND(ENABLE_WEBASSEMBLY ENABLE_FTL_JIT) 198 WEBKIT_OPTION_DEPEND(ENABLE_SAMPLING_PROFILER ENABLE_JIT)199 206 WEBKIT_OPTION_DEPEND(ENABLE_INDEXED_DATABASE_IN_WORKERS ENABLE_INDEXED_DATABASE) 200 207 WEBKIT_OPTION_DEPEND(ENABLE_MEDIA_CONTROLS_SCRIPT ENABLE_VIDEO)
Note:
See TracChangeset
for help on using the changeset viewer.